proteus 1.9.0
C/C++/Fortran libraries
Loading...
Searching...
No Matches
BoundaryConditions.cpp
Go to the documentation of this file.
1/* Generated by Cython 3.3.0 */
2
3/* BEGIN: Cython Metadata
4{
5 "distutils": {
6 "depends": [
7 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayobject.h",
8 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayscalars.h",
9 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
10 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
11 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ufuncobject.h",
12 "proteus/BoundaryConditions.pxd"
13 ],
14 "extra_compile_args": [
15 "-std=c++14"
16 ],
17 "include_dirs": [
18 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include",
19 "proteus"
20 ],
21 "language": "c++",
22 "name": "BoundaryConditions",
23 "sources": [
24 "proteus/BoundaryConditions.py"
25 ]
26 },
27 "module_name": "BoundaryConditions"
28}
29END: Cython Metadata */
30
31#ifndef PY_SSIZE_T_CLEAN
32#define PY_SSIZE_T_CLEAN
33#endif /* PY_SSIZE_T_CLEAN */
34/* InitLimitedAPI */
35#if defined(Py_LIMITED_API)
36 #if !defined(CYTHON_LIMITED_API)
37 #define CYTHON_LIMITED_API 1
38 #endif
39#elif defined(CYTHON_LIMITED_API)
40 #ifdef _MSC_VER
41 #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.")
42 #else
43 #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.
44 #endif
45#endif
46
47#include "Python.h"
48#ifndef Py_PYTHON_H
49 #error Python headers needed to compile C extensions, please install development version of Python.
50#elif PY_VERSION_HEX < 0x03090000
51 #error Cython requires Python 3.9+.
52#elif defined(Py_LIMITED_API) && (Py_LIMITED_API & 0xFFFF0000) > (PY_VERSION_HEX & 0xFFFF0000)
53 #error 'Py_LIMITED_API' can only select past Python X.Y versions, not future ones.
54#else
55#define __PYX_ABI_VERSION "3_3_0"
56#define CYTHON_HEX_VERSION 0x030300F0
57#define CYTHON_FUTURE_DIVISION 1
58/* CModulePreamble */
59#include <stddef.h>
60#ifndef offsetof
61 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
62#endif
63#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
64 #ifndef __stdcall
65 #define __stdcall
66 #endif
67 #ifndef __cdecl
68 #define __cdecl
69 #endif
70 #ifndef __fastcall
71 #define __fastcall
72 #endif
73#endif
74#ifdef __has_builtin
75 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
76#else
77 #define __Pyx_has_cbuiltin(name) (0)
78#endif
79#ifndef DL_IMPORT
80 #define DL_IMPORT(t) t
81#endif
82#ifndef DL_EXPORT
83 #define DL_EXPORT(t) t
84#endif
85#define __PYX_COMMA ,
86#ifndef PY_LONG_LONG
87 #define PY_LONG_LONG LONG_LONG
88#endif
89#ifndef Py_HUGE_VAL
90 #define Py_HUGE_VAL HUGE_VAL
91#endif
92#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
93#if defined(CYTHON_LIMITED_API)
94 #ifdef Py_LIMITED_API
95 #undef __PYX_LIMITED_VERSION_HEX
96 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
97 #if Py_LIMITED_API < 0x03090000
98 #error "Cython 3.3 requires the Python Limited API version to be 3.9 or greater."
99 #endif
100 #endif
101 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
102 #ifdef _MSC_VER
103 #pragma message ("Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
104 code for PyPy and GraalPy and is unlikely to work.")
105 #else
106 #warning "Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
107 code for PyPy and GraalPy and is unlikely to work."
108 #endif
109 #endif
110 #define CYTHON_COMPILING_IN_PYPY 0
111 #define CYTHON_COMPILING_IN_CPYTHON 0
112 #define CYTHON_COMPILING_IN_LIMITED_API 1
113 #define CYTHON_COMPILING_IN_GRAAL 0
114 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
115 #undef CYTHON_USE_TYPE_SLOTS
116 #define CYTHON_USE_TYPE_SLOTS 0
117 #undef CYTHON_USE_TYPE_SPECS
118 #define CYTHON_USE_TYPE_SPECS 1
119 #undef CYTHON_USE_PYTYPE_LOOKUP
120 #define CYTHON_USE_PYTYPE_LOOKUP 0
121 #undef CYTHON_USE_PYLIST_INTERNALS
122 #define CYTHON_USE_PYLIST_INTERNALS 0
123 #undef CYTHON_USE_UNICODE_INTERNALS
124 #define CYTHON_USE_UNICODE_INTERNALS 0
125 #ifndef CYTHON_USE_UNICODE_WRITER
126 #define CYTHON_USE_UNICODE_WRITER 0
127 #endif
128 #undef CYTHON_USE_PYLONG_INTERNALS
129 #define CYTHON_USE_PYLONG_INTERNALS 0
130 #ifndef CYTHON_AVOID_BORROWED_REFS
131 #define CYTHON_AVOID_BORROWED_REFS 0
132 #endif
133 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
134 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
135 #endif
136 #undef CYTHON_ASSUME_SAFE_MACROS
137 #define CYTHON_ASSUME_SAFE_MACROS 0
138 #undef CYTHON_ASSUME_SAFE_SIZE
139 #define CYTHON_ASSUME_SAFE_SIZE 0
140 #undef CYTHON_UNPACK_METHODS
141 #define CYTHON_UNPACK_METHODS 0
142 #undef CYTHON_FAST_THREAD_STATE
143 #define CYTHON_FAST_THREAD_STATE 0
144 #undef CYTHON_FAST_GIL
145 #define CYTHON_FAST_GIL 0
146 #undef CYTHON_VECTORCALL
147 #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
148 #ifndef CYTHON_VECTORCALL_TPNEW
149 #define CYTHON_VECTORCALL_TPNEW (CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
150 #endif
151 #ifndef CYTHON_PEP487_INIT_SUBCLASS
152 #define CYTHON_PEP487_INIT_SUBCLASS 1
153 #endif
154 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
155 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
156 #endif
157 #ifndef CYTHON_USE_MODULE_STATE
158 #define CYTHON_USE_MODULE_STATE 0
159 #endif
160 #undef CYTHON_USE_SYS_MONITORING
161 #define CYTHON_USE_SYS_MONITORING 0
162 #ifndef CYTHON_USE_TP_FINALIZE
163 #define CYTHON_USE_TP_FINALIZE (__PYX_LIMITED_VERSION_HEX >= 0x030F0000 && PY_VERSION_HEX > 0x030F00A8)
164 #endif
165 #ifndef CYTHON_USE_AM_SEND
166 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
167 #endif
168 #undef CYTHON_USE_DICT_VERSIONS
169 #define CYTHON_USE_DICT_VERSIONS 0
170 #undef CYTHON_USE_EXC_INFO_STACK
171 #define CYTHON_USE_EXC_INFO_STACK 0
172 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
173 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
174 #endif
175 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
176 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
177 #endif
178 #ifndef CYTHON_USE_FREELISTS
179 #define CYTHON_USE_FREELISTS 1
180 #endif
181 #undef CYTHON_IMMORTAL_CONSTANTS
182 #define CYTHON_IMMORTAL_CONSTANTS 0
183 #if __PYX_LIMITED_VERSION_HEX < 0x030E0000
184 #undef CYTHON_OPAQUE_OBJECTS
185 #define CYTHON_OPAQUE_OBJECTS 0
186 #elif !defined(CYTHON_OPAQUE_OBJECTS)
187 #define CYTHON_OPAQUE_OBJECTS (__PYX_LIMITED_VERSION_HEX >= 0x030F0000)
188 #endif
189#elif defined(GRAALVM_PYTHON)
190 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
191 The existence of this section does not imply that anything works or is even tested */
192 #define CYTHON_COMPILING_IN_PYPY 0
193 #define CYTHON_COMPILING_IN_CPYTHON 0
194 #define CYTHON_COMPILING_IN_LIMITED_API 0
195 #define CYTHON_COMPILING_IN_GRAAL 1
196 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
197 #ifndef CYTHON_USE_TYPE_SLOTS
198 #define CYTHON_USE_TYPE_SLOTS 0
199 #endif
200 #undef CYTHON_USE_TYPE_SPECS
201 #define CYTHON_USE_TYPE_SPECS 0
202 #undef CYTHON_USE_PYTYPE_LOOKUP
203 #define CYTHON_USE_PYTYPE_LOOKUP 0
204 #undef CYTHON_USE_PYLIST_INTERNALS
205 #define CYTHON_USE_PYLIST_INTERNALS 0
206 #undef CYTHON_USE_UNICODE_INTERNALS
207 #define CYTHON_USE_UNICODE_INTERNALS 0
208 #undef CYTHON_USE_UNICODE_WRITER
209 #define CYTHON_USE_UNICODE_WRITER 0
210 #undef CYTHON_USE_PYLONG_INTERNALS
211 #define CYTHON_USE_PYLONG_INTERNALS 0
212 #undef CYTHON_AVOID_BORROWED_REFS
213 #define CYTHON_AVOID_BORROWED_REFS 1
214 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
215 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
216 #undef CYTHON_ASSUME_SAFE_MACROS
217 #define CYTHON_ASSUME_SAFE_MACROS 0
218 #undef CYTHON_ASSUME_SAFE_SIZE
219 #define CYTHON_ASSUME_SAFE_SIZE 0
220 #undef CYTHON_UNPACK_METHODS
221 #define CYTHON_UNPACK_METHODS 0
222 #undef CYTHON_FAST_THREAD_STATE
223 #define CYTHON_FAST_THREAD_STATE 0
224 #undef CYTHON_FAST_GIL
225 #define CYTHON_FAST_GIL 0
226 #ifndef CYTHON_VECTORCALL
227 #define CYTHON_VECTORCALL 1
228 #endif
229 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
230 #undef CYTHON_VECTORCALL_TPNEW
231 #define CYTHON_VECTORCALL_TPNEW 0
232 #elif !defined(CYTHON_VECTORCALL_TPNEW)
233 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
234 #endif
235 #ifndef CYTHON_PEP487_INIT_SUBCLASS
236 #define CYTHON_PEP487_INIT_SUBCLASS 1
237 #endif
238 #undef CYTHON_PEP489_MULTI_PHASE_INIT
239 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
240 #undef CYTHON_USE_MODULE_STATE
241 #define CYTHON_USE_MODULE_STATE 0
242 #undef CYTHON_USE_SYS_MONITORING
243 #define CYTHON_USE_SYS_MONITORING 0
244 #undef CYTHON_USE_TP_FINALIZE
245 #define CYTHON_USE_TP_FINALIZE 0
246 #undef CYTHON_USE_AM_SEND
247 #define CYTHON_USE_AM_SEND 0
248 #undef CYTHON_USE_DICT_VERSIONS
249 #define CYTHON_USE_DICT_VERSIONS 0
250 #undef CYTHON_USE_EXC_INFO_STACK
251 #define CYTHON_USE_EXC_INFO_STACK 1
252 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
253 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
254 #endif
255 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
256 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
257 #endif
258 #undef CYTHON_USE_FREELISTS
259 #define CYTHON_USE_FREELISTS 0
260 #undef CYTHON_IMMORTAL_CONSTANTS
261 #define CYTHON_IMMORTAL_CONSTANTS 0
262 #undef CYTHON_OPAQUE_OBJECTS
263 #define CYTHON_OPAQUE_OBJECTS 0
264#elif defined(PYPY_VERSION)
265 #define CYTHON_COMPILING_IN_PYPY 1
266 #define CYTHON_COMPILING_IN_CPYTHON 0
267 #define CYTHON_COMPILING_IN_LIMITED_API 0
268 #define CYTHON_COMPILING_IN_GRAAL 0
269 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
270 #undef CYTHON_USE_TYPE_SLOTS
271 #define CYTHON_USE_TYPE_SLOTS 1
272 #ifndef CYTHON_USE_TYPE_SPECS
273 #define CYTHON_USE_TYPE_SPECS 0
274 #endif
275 #undef CYTHON_USE_PYTYPE_LOOKUP
276 #define CYTHON_USE_PYTYPE_LOOKUP 0
277 #undef CYTHON_USE_PYLIST_INTERNALS
278 #define CYTHON_USE_PYLIST_INTERNALS 0
279 #undef CYTHON_USE_UNICODE_INTERNALS
280 #define CYTHON_USE_UNICODE_INTERNALS 0
281 #undef CYTHON_USE_UNICODE_WRITER
282 #define CYTHON_USE_UNICODE_WRITER 0
283 #undef CYTHON_USE_PYLONG_INTERNALS
284 #define CYTHON_USE_PYLONG_INTERNALS 0
285 #undef CYTHON_AVOID_BORROWED_REFS
286 #define CYTHON_AVOID_BORROWED_REFS 1
287 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
288 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
289 #undef CYTHON_ASSUME_SAFE_MACROS
290 #define CYTHON_ASSUME_SAFE_MACROS 0
291 #ifndef CYTHON_ASSUME_SAFE_SIZE
292 #define CYTHON_ASSUME_SAFE_SIZE 1
293 #endif
294 #undef CYTHON_UNPACK_METHODS
295 #define CYTHON_UNPACK_METHODS 0
296 #undef CYTHON_FAST_THREAD_STATE
297 #define CYTHON_FAST_THREAD_STATE 0
298 #undef CYTHON_FAST_GIL
299 #define CYTHON_FAST_GIL 0
300 #ifndef CYTHON_VECTORCALL
301 #define CYTHON_VECTORCALL 1
302 #endif
303 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
304 #undef CYTHON_VECTORCALL_TPNEW
305 #define CYTHON_VECTORCALL_TPNEW 0
306 #elif !defined(CYTHON_VECTORCALL_TPNEW)
307 #define CYTHON_VECTORCALL_TPNEW (PYPY_VERSION_NUM >= 0x07030800 && CYTHON_VECTORCALL)
308 #endif
309 #ifndef CYTHON_PEP487_INIT_SUBCLASS
310 #define CYTHON_PEP487_INIT_SUBCLASS 1
311 #endif
312 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
313 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
314 #endif
315 #undef CYTHON_USE_MODULE_STATE
316 #define CYTHON_USE_MODULE_STATE 0
317 #undef CYTHON_USE_SYS_MONITORING
318 #define CYTHON_USE_SYS_MONITORING 0
319 #ifndef CYTHON_USE_TP_FINALIZE
320 #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
321 #endif
322 #undef CYTHON_USE_AM_SEND
323 #define CYTHON_USE_AM_SEND 0
324 #undef CYTHON_USE_DICT_VERSIONS
325 #define CYTHON_USE_DICT_VERSIONS 0
326 #undef CYTHON_USE_EXC_INFO_STACK
327 #define CYTHON_USE_EXC_INFO_STACK 0
328 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
329 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
330 #endif
331 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
332 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
333 #endif
334 #undef CYTHON_USE_FREELISTS
335 #define CYTHON_USE_FREELISTS 0
336 #undef CYTHON_IMMORTAL_CONSTANTS
337 #define CYTHON_IMMORTAL_CONSTANTS 0
338 #undef CYTHON_OPAQUE_OBJECTS
339 #define CYTHON_OPAQUE_OBJECTS 0
340#else
341 #define CYTHON_COMPILING_IN_PYPY 0
342 #define CYTHON_COMPILING_IN_CPYTHON 1
343 #define CYTHON_COMPILING_IN_LIMITED_API 0
344 #define CYTHON_COMPILING_IN_GRAAL 0
345 #ifdef Py_GIL_DISABLED
346 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
347 #else
348 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
349 #endif
350 #if PY_VERSION_HEX < 0x030A0000
351 #undef CYTHON_USE_TYPE_SLOTS
352 #define CYTHON_USE_TYPE_SLOTS 1
353 #elif !defined(CYTHON_USE_TYPE_SLOTS)
354 #define CYTHON_USE_TYPE_SLOTS 1
355 #endif
356 #ifndef CYTHON_USE_TYPE_SPECS
357 #define CYTHON_USE_TYPE_SPECS 0
358 #endif
359 #ifndef CYTHON_USE_PYTYPE_LOOKUP
360 #define CYTHON_USE_PYTYPE_LOOKUP 1
361 #endif
362 #ifndef CYTHON_USE_PYLONG_INTERNALS
363 #define CYTHON_USE_PYLONG_INTERNALS 1
364 #endif
365 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
366 #undef CYTHON_USE_PYLIST_INTERNALS
367 #define CYTHON_USE_PYLIST_INTERNALS 0
368 #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
369 #define CYTHON_USE_PYLIST_INTERNALS 1
370 #endif
371 #ifndef CYTHON_USE_UNICODE_INTERNALS
372 #define CYTHON_USE_UNICODE_INTERNALS 1
373 #endif
374 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
375 #undef CYTHON_USE_UNICODE_WRITER
376 #define CYTHON_USE_UNICODE_WRITER 0
377 #elif !defined(CYTHON_USE_UNICODE_WRITER)
378 #define CYTHON_USE_UNICODE_WRITER 1
379 #endif
380 #ifndef CYTHON_AVOID_BORROWED_REFS
381 #define CYTHON_AVOID_BORROWED_REFS 0
382 #endif
383 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
384 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
385 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
386 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
387 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
388 #endif
389 #ifndef CYTHON_ASSUME_SAFE_MACROS
390 #define CYTHON_ASSUME_SAFE_MACROS 1
391 #endif
392 #ifndef CYTHON_ASSUME_SAFE_SIZE
393 #define CYTHON_ASSUME_SAFE_SIZE 1
394 #endif
395 #ifndef CYTHON_UNPACK_METHODS
396 #define CYTHON_UNPACK_METHODS 1
397 #endif
398 #ifndef CYTHON_FAST_THREAD_STATE
399 #define CYTHON_FAST_THREAD_STATE 1
400 #endif
401 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
402 #undef CYTHON_FAST_GIL
403 #define CYTHON_FAST_GIL 0
404 #elif !defined(CYTHON_FAST_GIL)
405 #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
406 #endif
407 #ifndef CYTHON_VECTORCALL
408 #define CYTHON_VECTORCALL 1
409 #endif
410 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
411 #undef CYTHON_VECTORCALL_TPNEW
412 #define CYTHON_VECTORCALL_TPNEW 0
413 #elif !defined(CYTHON_VECTORCALL_TPNEW)
414 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
415 #endif
416 #ifndef CYTHON_PEP487_INIT_SUBCLASS
417 #define CYTHON_PEP487_INIT_SUBCLASS 1
418 #endif
419 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
420 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
421 #endif
422 #ifndef CYTHON_USE_MODULE_STATE
423 #define CYTHON_USE_MODULE_STATE 0
424 #endif
425 #ifndef CYTHON_USE_SYS_MONITORING
426 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
427 #endif
428 #ifndef CYTHON_USE_TP_FINALIZE
429 #define CYTHON_USE_TP_FINALIZE 1
430 #endif
431 #ifndef CYTHON_USE_AM_SEND
432 #define CYTHON_USE_AM_SEND 1
433 #endif
434 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
435 #undef CYTHON_USE_DICT_VERSIONS
436 #define CYTHON_USE_DICT_VERSIONS 0
437 #elif !defined(CYTHON_USE_DICT_VERSIONS)
438 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
439 #endif
440 #ifndef CYTHON_USE_EXC_INFO_STACK
441 #define CYTHON_USE_EXC_INFO_STACK 1
442 #endif
443 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
444 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
445 #endif
446 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
447 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
448 #endif
449 #ifndef CYTHON_USE_FREELISTS
450 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
451 #endif
452 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
453 #undef CYTHON_IMMORTAL_CONSTANTS
454 #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work
455 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
456 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
457 #endif
458 #ifndef CYTHON_OPAQUE_OBJECTS
459 #define CYTHON_OPAQUE_OBJECTS 0
460 #endif
461#endif
462#if CYTHON_USE_PYLONG_INTERNALS
463 #undef SHIFT
464 #undef BASE
465 #undef MASK
466 #ifdef SIZEOF_VOID_P
467 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
468 #endif
469#endif
470#ifndef __has_attribute
471 #define __has_attribute(x) 0
472#endif
473#ifndef __has_cpp_attribute
474 #define __has_cpp_attribute(x) 0
475#endif
476#ifndef CYTHON_RESTRICT
477 #if defined(__GNUC__)
478 #define CYTHON_RESTRICT __restrict__
479 #elif defined(_MSC_VER) && _MSC_VER >= 1400
480 #define CYTHON_RESTRICT __restrict
481 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
482 #define CYTHON_RESTRICT restrict
483 #else
484 #define CYTHON_RESTRICT
485 #endif
486#endif
487#ifndef CYTHON_UNUSED
488 #if defined(__cplusplus)
489 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
490 * but leads to warnings with -pedantic, since it is a C++17 feature */
491 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
492 #if __has_cpp_attribute(maybe_unused)
493 #define CYTHON_UNUSED [[maybe_unused]]
494 #endif
495 #endif
496 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
497 #define CYTHON_UNUSED [[maybe_unused]]
498 #endif
499#endif
500#ifndef CYTHON_UNUSED
501# if defined(__GNUC__)
502# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
503# define CYTHON_UNUSED __attribute__ ((__unused__))
504# else
505# define CYTHON_UNUSED
506# endif
507# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
508# define CYTHON_UNUSED __attribute__ ((__unused__))
509# else
510# define CYTHON_UNUSED
511# endif
512#endif
513#ifndef CYTHON_UNUSED_VAR
514# if defined(__cplusplus)
515 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
516# else
517# define CYTHON_UNUSED_VAR(x) (void)(x)
518# endif
519#endif
520#ifndef CYTHON_MAYBE_UNUSED_VAR
521 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
522#endif
523#ifndef CYTHON_NCP_UNUSED
524# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
525# define CYTHON_NCP_UNUSED
526# else
527# define CYTHON_NCP_UNUSED CYTHON_UNUSED
528# endif
529#endif
530#ifndef CYTHON_USE_CPP_STD_MOVE
531 #if defined(__cplusplus) && (\
532 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
533 #define CYTHON_USE_CPP_STD_MOVE 1
534 #else
535 #define CYTHON_USE_CPP_STD_MOVE 0
536 #endif
537#endif
538#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
539#include <stdint.h>
540typedef uintptr_t __pyx_uintptr_t;
541#ifndef CYTHON_FALLTHROUGH
542 #if defined(__cplusplus)
543 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
544 * but leads to warnings with -pedantic, since it is a C++17 feature */
545 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
546 #if __has_cpp_attribute(fallthrough)
547 #define CYTHON_FALLTHROUGH [[fallthrough]]
548 #endif
549 #endif
550 #ifndef CYTHON_FALLTHROUGH
551 #if __has_cpp_attribute(clang::fallthrough)
552 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
553 #elif __has_cpp_attribute(gnu::fallthrough)
554 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
555 #endif
556 #endif
557 #endif
558 #ifndef CYTHON_FALLTHROUGH
559 #if __has_attribute(fallthrough)
560 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
561 #else
562 #define CYTHON_FALLTHROUGH
563 #endif
564 #endif
565 #if defined(__clang__) && defined(__apple_build_version__)
566 #if __apple_build_version__ < 7000000
567 #undef CYTHON_FALLTHROUGH
568 #define CYTHON_FALLTHROUGH
569 #endif
570 #endif
571#endif
572#ifdef Py_UNREACHABLE
573 #define __Pyx_UNREACHABLE() Py_UNREACHABLE()
574#elif __Pyx_has_cbuiltin(__builtin_unreachable)
575 #define __Pyx_UNREACHABLE() __builtin_unreachable()
576#elif defined(__clang__) || defined(__INTEL_COMPILER) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
577 #define __Pyx_UNREACHABLE() __builtin_unreachable()
578#elif defined(_MSC_VER)
579 #define __Pyx_UNREACHABLE() __assume(0)
580#else
581 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
582#endif
583#ifndef Py_UNREACHABLE
584 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
585#endif
586#ifdef __cplusplus
587 template <typename T>
588 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
589 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
590#else
591 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
592#endif
593#if CYTHON_COMPILING_IN_PYPY == 1
594 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
595#else
596 #define __PYX_NEED_TP_PRINT_SLOT 0
597#endif
598#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
599#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
600#define __Pyx_PyErr_FetchException(petype, peval, petb) PyErr_Fetch(petype, peval, petb)
601#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_Restore(etype, eval, etb)
602#else
603#define __Pyx_PyErr_FetchException(petype, peval, petb) *(petype)=NULL; *(peval)=PyErr_GetRaisedException(); *(petb)=NULL
604#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_SetRaisedException(eval)
605#endif
606
607/* CppInitCode */
608#ifndef __cplusplus
609 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
610#endif
611#ifndef CYTHON_INLINE
612 #if defined(__clang__)
613 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
614 #else
615 #define CYTHON_INLINE inline
616 #endif
617#endif
618template<typename T>
619void __Pyx_call_destructor(T& x) {
620 x.~T();
621}
622template<typename T>
623class __Pyx_FakeReference {
624 public:
625 __Pyx_FakeReference() : ptr(NULL) { }
626 __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
627 T *operator->() { return ptr; }
628 T *operator&() { return ptr; }
629 operator T&() { return *ptr; }
630 template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
631 template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
632 template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
633 template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
634 private:
635 T *ptr;
636};
637
638/* PythonCompatibility */
639#define __PYX_BUILD_PY_SSIZE_T "n"
640#define CYTHON_FORMAT_SSIZE_T "z"
641#define __Pyx_BUILTIN_MODULE_NAME "builtins"
642#define __Pyx_DefaultClassType PyType_Type
643#if CYTHON_COMPILING_IN_LIMITED_API
644 #ifndef CO_OPTIMIZED
645 static int CO_OPTIMIZED;
646 #endif
647 #ifndef CO_NEWLOCALS
648 static int CO_NEWLOCALS;
649 #endif
650 #ifndef CO_VARARGS
651 static int CO_VARARGS;
652 #endif
653 #ifndef CO_VARKEYWORDS
654 static int CO_VARKEYWORDS;
655 #endif
656 #ifndef CO_ASYNC_GENERATOR
657 static int CO_ASYNC_GENERATOR;
658 #endif
659 #ifndef CO_GENERATOR
660 static int CO_GENERATOR;
661 #endif
662 #ifndef CO_COROUTINE
663 static int CO_COROUTINE;
664 #endif
665#else
666 #ifndef CO_COROUTINE
667 #define CO_COROUTINE 0x80
668 #endif
669 #ifndef CO_ASYNC_GENERATOR
670 #define CO_ASYNC_GENERATOR 0x200
671 #endif
672#endif
673static int __Pyx_init_co_variables(void);
674#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
675 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
676#else
677 #define __Pyx_Py_Is(x, y) ((x) == (y))
678#endif
679#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
680 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
681#else
682 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
683#endif
684#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
685 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
686#else
687 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
688#endif
689#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
690 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
691#else
692 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
693#endif
694#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
695#if CYTHON_COMPILING_IN_PYPY
696 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
697#else
698 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
699#endif
700#if CYTHON_COMPILING_IN_LIMITED_API
701static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
702static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
703#else
704#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
705#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
706#endif
707static int __Pyx_init_tpflags_variables(void);
708#ifndef Py_TPFLAGS_HAVE_FINALIZE
709 #define Py_TPFLAGS_HAVE_FINALIZE 0
710#endif
711#ifndef Py_TPFLAGS_SEQUENCE
712 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
713#endif
714#ifndef Py_TPFLAGS_MAPPING
715 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
716#endif
717#ifndef Py_TPFLAGS_IMMUTABLETYPE
718 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
719#endif
720#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
721 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
722#endif
723#ifndef METH_STACKLESS
724 #define METH_STACKLESS 0
725#endif
726#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
727 #ifndef METH_FASTCALL
728 #define METH_FASTCALL 0x80
729 #endif
730 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
731 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
732 Py_ssize_t nargs, PyObject *kwnames);
733#else
734 #if PY_VERSION_HEX >= 0x030d00A4
735 # define __Pyx_PyCFunctionFast PyCFunctionFast
736 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
737 #else
738 # define __Pyx_PyCFunctionFast _PyCFunctionFast
739 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
740 #endif
741#endif
742#if CYTHON_VECTORCALL
743 #define __Pyx_METH_FASTCALL METH_FASTCALL
744 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
745 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
746#else
747 #define __Pyx_METH_FASTCALL METH_VARARGS
748 #define __Pyx_PyCFunction_FastCall PyCFunction
749 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
750#endif
751#if CYTHON_VECTORCALL
752 #define __pyx_vectorcallfunc vectorcallfunc
753 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
754 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
755#else
756 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
757 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
758#endif
759#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
760#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
761#if CYTHON_COMPILING_IN_CPYTHON
762#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
763#elif !CYTHON_COMPILING_IN_LIMITED_API
764#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
765#endif
766#if CYTHON_COMPILING_IN_CPYTHON
767#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
768static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
769 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
770}
771#endif
772static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
773#if CYTHON_COMPILING_IN_LIMITED_API
774 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
775#else
776 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
777#endif
778}
779#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
780#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
781 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
782#else
783 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
784#endif
785#if CYTHON_COMPILING_IN_PYPY
786 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
787#else
788 #define __Pyx_PyCMethod PyCMethod
789#endif
790#ifndef METH_METHOD
791 #define METH_METHOD 0x200
792#endif
793#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
794 #define PyObject_Malloc(s) PyMem_Malloc(s)
795 #define PyObject_Free(p) PyMem_Free(p)
796 #define PyObject_Realloc(p) PyMem_Realloc(p)
797#endif
798#if CYTHON_COMPILING_IN_LIMITED_API
799 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
800#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
801 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
802 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
803#elif CYTHON_COMPILING_IN_GRAAL
804 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
805 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
806#else
807 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
808 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
809#endif
810#if CYTHON_COMPILING_IN_LIMITED_API
811 #define __Pyx_PyThreadState_Current PyThreadState_Get()
812#elif !CYTHON_FAST_THREAD_STATE
813 #define __Pyx_PyThreadState_Current PyThreadState_GET()
814#elif PY_VERSION_HEX >= 0x030d00A1
815 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
816#else
817 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
818#endif
819#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
820 #define __PYX_SHARED_SIZEOF(T) -((int)sizeof(T))
821 #define __PYX_SHARED_RELATIVE_OFFSET Py_RELATIVE_OFFSET
822 #define CYTHON_OPAQUE_SHARED_TYPES 1
823#else
824 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
825 #define __PYX_SHARED_RELATIVE_OFFSET 0
826 #define CYTHON_OPAQUE_SHARED_TYPES 0
827#endif
828#if CYTHON_USE_MODULE_STATE
829static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
830{
831 void *result;
832 result = PyModule_GetState(op);
833 if (!result)
834 Py_FatalError("Couldn't find the module state");
835 return result;
836}
837#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
838#else
839#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
840#endif
841#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
842#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
843#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
844#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
845#if CYTHON_USE_TYPE_SLOTS
846 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
847 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
848 #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
849 #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
850#else
851 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
852 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
853 ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
854 (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
855 __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
856 #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
857 #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
858#endif
859#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
860#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
861#else
862#define __Pyx_PyDict_NewPresized(n) PyDict_New()
863#endif
864#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
865#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
866#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
867#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
868static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
869 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
870 if (res == NULL && PyErr_Occurred()) {
871 PyErr_WriteUnraisable(NULL);
872 }
873 return res;
874}
875#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
876#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
877#define __Pyx_PyDict_GetItemStr PyDict_GetItem
878#else
879static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
880#if CYTHON_COMPILING_IN_PYPY
881 return PyDict_GetItem(dict, name);
882#else
883 PyDictEntry *ep;
884 PyDictObject *mp = (PyDictObject*) dict;
885 long hash = ((PyStringObject *) name)->ob_shash;
886 assert(hash != -1);
887 ep = (mp->ma_lookup)(mp, name, hash);
888 if (ep == NULL) {
889 return NULL;
890 }
891 return ep->me_value;
892#endif
893}
894#define __Pyx_PyDict_GetItemStr PyDict_GetItem
895#endif
896#if CYTHON_USE_TYPE_SLOTS
897 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
898 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
899#else
900 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
901 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
902#endif
903#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
904#if CYTHON_USE_TYPE_SPECS
905#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
906 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
907 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
908 PyObject_GC_Del(obj);\
909 Py_DECREF(type);\
910}
911#else
912#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
913#endif
914#if CYTHON_COMPILING_IN_LIMITED_API
915 #define __Pyx_PyUnicode_READY(op) (0)
916 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
917 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
918 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
919 #define __Pyx_PyUnicode_KIND_04(u) __Pyx_PyUnicode_KIND(u)
920 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
921 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
922 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
923#else
924 #if PY_VERSION_HEX >= 0x030C0000
925 #define __Pyx_PyUnicode_READY(op) (0)
926 #else
927 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
928 0 : _PyUnicode_Ready((PyObject *)(op)))
929 #endif
930 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
931 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
932 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
933 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
934 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
935 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
936 #if PY_VERSION_HEX >= 0x030C0000
937 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
938 #else
939 #if CYTHON_COMPILING_IN_CPYTHON
940 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
941 #else
942 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
943 #endif
944 #endif
945 static CYTHON_INLINE int __Pyx_PyUnicode_KIND_04(PyObject *o) {
946 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
947 }
948#endif
949#if CYTHON_COMPILING_IN_PYPY
950 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
951 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
952#else
953 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
954 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
955 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
956#endif
957#if CYTHON_COMPILING_IN_PYPY
958 #if !defined(PyUnicode_DecodeUnicodeEscape)
959 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
960 #endif
961 #if !defined(PyUnicode_Contains)
962 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
963 #endif
964 #if !defined(PyByteArray_Check)
965 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
966 #endif
967 #if !defined(PyObject_Format)
968 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
969 #endif
970#endif
971#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
972#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
973 #define __Pyx_PySequence_ListKeepNew(obj)\
974 (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
975#elif CYTHON_COMPILING_IN_CPYTHON
976 #define __Pyx_PySequence_ListKeepNew(obj)\
977 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
978#else
979 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
980#endif
981#ifndef PySet_CheckExact
982 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
983#endif
984enum __Pyx_ReferenceSharing {
985 __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
986 __Pyx_ReferenceSharing_OwnStrongReference,
987 __Pyx_ReferenceSharing_FunctionArgument,
988 __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
989};
990#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
991#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
992 (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
993 (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
994 (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
995#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
996#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
997#else
998#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
999#endif
1000#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1001 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
1002#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1003 #if CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
1004 #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1005 #else
1006 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
1007 #endif
1008#elif CYTHON_COMPILING_IN_LIMITED_API || !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
1009 #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
1010#else
1011 #define __Pyx_PyList_GetItemRef(o, i) (likely(__Pyx_is_valid_index(i, PyList_GET_SIZE(o))) ?\
1012 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1013#endif
1014#if CYTHON_AVOID_BORROWED_REFS || CYTHON_COMPILING_IN_LIMITED_API
1015 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1016 __Pyx_PyList_GetItemRef(o, i))
1017#elif CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1018 #if CYTHON_ASSUME_SAFE_MACROS
1019 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1020 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1021 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1022 #else
1023 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1024 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1025 __Pyx_XNewRef(PyList_GetItem(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1026 #endif
1027#elif CYTHON_ASSUME_SAFE_MACROS
1028 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1029 __Pyx_NewRef(PyList_GET_ITEM(o, i)))
1030#else
1031 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1032 __Pyx_XNewRef(PyList_GetItem(o, i)))
1033#endif
1034#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1035#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
1036#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1037static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1038 *result = PyObject_GetItem(dict, key);
1039 if (*result == NULL) {
1040 if (PyErr_ExceptionMatches(PyExc_KeyError)) {
1041 PyErr_Clear();
1042 return 0;
1043 }
1044 return -1;
1045 }
1046 return 1;
1047}
1048#else
1049static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1050 *result = PyDict_GetItemWithError(dict, key);
1051 if (*result == NULL) {
1052 return PyErr_Occurred() ? -1 : 0;
1053 }
1054 Py_INCREF(*result);
1055 return 1;
1056}
1057#endif
1058#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1059 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1060#else
1061 #define __Pyx_VISIT_CONST(obj)
1062#endif
1063#if CYTHON_ASSUME_SAFE_MACROS
1064 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1065 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1066 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1067 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
1068 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1069 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
1070#else
1071 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1072 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1073 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1074 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
1075 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1076 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
1077#endif
1078#if CYTHON_ASSUME_SAFE_SIZE
1079 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1080 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1081 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1082 #define __Pyx_PyDict_GET_SIZE(o) PyDict_GET_SIZE(o)
1083 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1084 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1085 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
1086#else
1087 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1088 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1089 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1090 #define __Pyx_PyDict_GET_SIZE(o) PyDict_Size(o)
1091 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1092 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1093 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
1094#endif
1095#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1096 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1097#endif
1098#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
1099#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
1100#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1101 #define __Pyx_PySendResult PySendResult
1102#else
1103 typedef enum {
1104 PYGEN_RETURN = 0,
1105 PYGEN_ERROR = -1,
1106 PYGEN_NEXT = 1,
1107 } __Pyx_PySendResult;
1108#endif
1109#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1110 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1111#else
1112 #define __Pyx_pyiter_sendfunc sendfunc
1113#endif
1114#if !CYTHON_USE_AM_SEND
1115#define __PYX_HAS_PY_AM_SEND 0
1116#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1117#define __PYX_HAS_PY_AM_SEND 1
1118#else
1119#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation
1120#endif
1121#if __PYX_HAS_PY_AM_SEND < 2
1122 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1123#else
1124 typedef struct {
1125 unaryfunc am_await;
1126 unaryfunc am_aiter;
1127 unaryfunc am_anext;
1128 __Pyx_pyiter_sendfunc am_send;
1129 } __Pyx_PyAsyncMethodsStruct;
1130 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1131#endif
1132#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1133 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1134#else
1135 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1136#endif
1137#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1138#ifdef __cplusplus
1139extern "C"
1140#endif
1141PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
1142#endif
1143#if CYTHON_COMPILING_IN_LIMITED_API
1144static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
1145 int value;
1146 PyObject *py_value = PyObject_GetAttrString(inspect, name);
1147 if (!py_value) return 0;
1148 value = (int) PyLong_AsLong(py_value);
1149 Py_DECREF(py_value);
1150 *write_to = value;
1151 return value != -1 || !PyErr_Occurred();
1152}
1153static int __Pyx_init_co_variables(void) {
1154 PyObject *inspect;
1155 int result;
1156 inspect = PyImport_ImportModule("inspect");
1157 result =
1158#if !defined(CO_OPTIMIZED)
1159 __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
1160#endif
1161#if !defined(CO_NEWLOCALS)
1162 __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
1163#endif
1164#if !defined(CO_VARARGS)
1165 __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
1166#endif
1167#if !defined(CO_VARKEYWORDS)
1168 __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1169#endif
1170#if !defined(CO_ASYNC_GENERATOR)
1171 __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1172#endif
1173#if !defined(CO_GENERATOR)
1174 __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
1175#endif
1176#if !defined(CO_COROUTINE)
1177 __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
1178#endif
1179 1;
1180 Py_DECREF(inspect);
1181 return result ? 0 : -1;
1182}
1183static int __Pyx_init_tpflags_bitcount(unsigned long flag) {
1184 int count = 0;
1185 while (flag) {
1186 count += (int) (flag & 1);
1187 flag >>= 1;
1188 }
1189 return count;
1190}
1191static int __Pyx_init_tpflags_variables(void) {
1192 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1193 return 0;
1194 }
1195 PyObject *collections_abc = PyImport_ImportModule("collections.abc");
1196 if (!collections_abc) return -1;
1197 int result = 0;
1198 PyObject *sequence = NULL, *mapping = NULL;
1199#if __PYX_LIMITED_VERSION_HEX >= 0x030D0000
1200 if (PyObject_GetOptionalAttrString(collections_abc, "Sequence", &sequence) != 1) goto fail;
1201 if (PyObject_GetOptionalAttrString(collections_abc, "Mapping", &mapping) != 1) goto fail;
1202#else
1203 sequence = PyObject_GetAttrString(collections_abc, "Sequence");
1204 if (!sequence) goto fail_attr_lookup;
1205 mapping = PyObject_GetAttrString(collections_abc, "Mapping");
1206 if (!mapping) goto fail_attr_lookup;
1207#endif
1208 if (!PyType_Check(sequence) || !PyType_Check(mapping)) goto fail;
1209 {
1210 unsigned long sequence_flags = PyType_GetFlags((PyTypeObject*)sequence);
1211 unsigned long mapping_flags = PyType_GetFlags((PyTypeObject*)mapping);
1212 unsigned long mutual_flags = sequence_flags & mapping_flags;
1213 sequence_flags = sequence_flags ^ mutual_flags;
1214 mapping_flags = mapping_flags ^ mutual_flags;
1215 if (__Pyx_Runtime_TPFLAGS_SEQUENCE == 0 && __Pyx_init_tpflags_bitcount(sequence_flags) == 1) {
1216 __Pyx_Runtime_TPFLAGS_SEQUENCE = sequence_flags;
1217 }
1218 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1219 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1220 }
1221 }
1222 cleanup:
1223 Py_XDECREF(mapping);
1224 Py_XDECREF(sequence);
1225 Py_DECREF(collections_abc);
1226 return result;
1227#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1228 fail_attr_lookup:
1229 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1230 PyErr_Clear();
1231 }
1232#endif
1233 fail:
1234 result = PyErr_Occurred() ? -1 : 0;
1235 goto cleanup;
1236}
1237#else
1238static int __Pyx_init_co_variables(void) {
1239 return 0; // It's a limited API-only feature
1240}
1241static int __Pyx_init_tpflags_variables(void) {
1242 return 0; // It's a limited API-only feature
1243}
1244#endif
1245
1246/* MathInitCode */
1247#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1248 #ifndef _USE_MATH_DEFINES
1249 #define _USE_MATH_DEFINES
1250 #endif
1251#endif
1252#include <math.h>
1253#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1254#define __Pyx_truncl trunc
1255#else
1256#define __Pyx_truncl truncl
1257#endif
1258
1259#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1260#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1261#endif
1262#ifndef CYTHON_CLINE_IN_TRACEBACK
1263#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1264#endif
1265#if CYTHON_CLINE_IN_TRACEBACK
1266#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; }
1267#else
1268#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; }
1269#endif
1270#define __PYX_ERR(f_index, lineno, Ln_error) \
1271 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1272
1273#ifdef CYTHON_EXTERN_C
1274 #undef __PYX_EXTERN_C
1275 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1276#elif defined(__PYX_EXTERN_C)
1277 #ifdef _MSC_VER
1278 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1279 #else
1280 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1281 #endif
1282#else
1283 #define __PYX_EXTERN_C extern "C++"
1284#endif
1285
1286#define __PYX_HAVE__BoundaryConditions
1287#define __PYX_HAVE_API__BoundaryConditions
1288/* Early includes */
1289#include <string.h>
1290#include <stdio.h>
1291
1292 /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
1293
1294#include "numpy/arrayobject.h"
1295#include "numpy/ndarrayobject.h"
1296#include "numpy/ndarraytypes.h"
1297#include "numpy/arrayscalars.h"
1298#include "numpy/ufuncobject.h"
1299#include "pythread.h"
1300
1301 typedef int (*__pyx_memoryview_to_dtype_func_type)(char*, PyObject*);
1302
1303#include <stdlib.h>
1304#ifdef _OPENMP
1305#include <omp.h>
1306#endif /* _OPENMP */
1307
1308#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1309#define CYTHON_WITHOUT_ASSERTIONS
1310#endif
1311
1312#ifdef CYTHON_FREETHREADING_COMPATIBLE
1313#if CYTHON_FREETHREADING_COMPATIBLE
1314#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1315#else
1316#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1317#endif
1318#else
1319#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1320#endif
1321#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1322#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1323#define __PYX_DEFAULT_STRING_ENCODING ""
1324#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1325#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1326#define __Pyx_uchar_cast(c) ((unsigned char)c)
1327#define __Pyx_long_cast(x) ((long)x)
1328#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1329 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1330 (sizeof(type) > sizeof(Py_ssize_t) &&\
1331 likely(v < (type)PY_SSIZE_T_MAX ||\
1332 v == (type)PY_SSIZE_T_MAX) &&\
1333 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1334 v == (type)PY_SSIZE_T_MIN))) ||\
1335 (sizeof(type) == sizeof(Py_ssize_t) &&\
1336 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1337 v == (type)PY_SSIZE_T_MAX))) )
1338static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1339 return (size_t) i < (size_t) limit;
1340}
1341#if defined (__cplusplus) && __cplusplus >= 201103L
1342 #include <cstdlib>
1343 #define __Pyx_sst_abs(value) std::abs(value)
1344#elif SIZEOF_INT >= SIZEOF_SIZE_T
1345 #define __Pyx_sst_abs(value) abs(value)
1346#elif SIZEOF_LONG >= SIZEOF_SIZE_T
1347 #define __Pyx_sst_abs(value) labs(value)
1348#elif defined (_MSC_VER)
1349 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1350#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1351 #define __Pyx_sst_abs(value) llabs(value)
1352#elif defined (__GNUC__)
1353 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1354#else
1355 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1356#endif
1357static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1358static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1359static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1360static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1361#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1362#define __Pyx_PyBytes_FromString PyBytes_FromString
1363#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1364static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1365#if CYTHON_ASSUME_SAFE_MACROS
1366 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1367 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1368 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1369 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1370 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1371 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1372 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
1373#else
1374 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
1375 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
1376 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
1377 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
1378 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
1379 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
1380 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
1381#endif
1382#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1383#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1384#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1385#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1386#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1387#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1388#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1389#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1390#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1391#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1392#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1393static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
1394#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
1395 return Py_NewRef(obj);
1396#else
1397 Py_INCREF(obj);
1398 return obj;
1399#endif
1400}
1401static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
1402#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
1403 return Py_XNewRef(obj);
1404#else
1405 Py_XINCREF(obj);
1406 return obj;
1407#endif
1408}
1409static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
1410static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1411static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1412static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1413static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
1414#define __Pyx_PyObject_RichCompareBool(a,b,cmp) __Pyx_PyObject_IsTrueAndDecref(PyObject_RichCompare((a),(b),(cmp)))
1415#define __Pyx_PySequence_Tuple(obj)\
1416 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1417static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1418static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
1419static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1420#if CYTHON_ASSUME_SAFE_MACROS
1421#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1422#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
1423#define __Pyx_PyFloat_IsNonZero(x) (PyFloat_AS_DOUBLE(x) != 0.0)
1424#else
1425#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1426#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
1427#define __Pyx_PyFloat_IsNonZero(x) PyObject_IsTrue(x)
1428#endif
1429#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
1430#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1431#if CYTHON_USE_PYLONG_INTERNALS
1432 #if PY_VERSION_HEX >= 0x030C00A7
1433 #ifndef _PyLong_SIGN_MASK
1434 #define _PyLong_SIGN_MASK 3
1435 #endif
1436 #ifndef _PyLong_NON_SIZE_BITS
1437 #define _PyLong_NON_SIZE_BITS 3
1438 #endif
1439 #define __Pyx_PyLong_SignBits(x) ((int) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK))
1440 #define __Pyx_PyLong_Sign(x) (1 - __Pyx_PyLong_SignBits(x))
1441 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_SignBits(x) & 2) != 0)
1442 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1443 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_SignBits(x) & 1)
1444 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_SignBits(x) == 0)
1445 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1446 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1447 #define __Pyx_PyLong_SignedDigitCount(x)\
1448 (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1449 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1450 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1451 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1452 #else
1453 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1454 #define __Pyx_PyLong_CompactValue(x) (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1455 #endif
1456 static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_CompareSignAndSize(PyObject *a, PyObject *b) {
1457 uintptr_t tag_a = ((PyLongObject*)a)->long_value.lv_tag;
1458 uintptr_t tag_b = ((PyLongObject*)b)->long_value.lv_tag;
1459 if (tag_a == tag_b) return 0;
1460 int sign_a = (int) (tag_a & _PyLong_SIGN_MASK);
1461 int sign_b = (int) (tag_b & _PyLong_SIGN_MASK);
1462 if (sign_a > sign_b) return -1;
1463 if (sign_a < sign_b) return 1;
1464 Py_ssize_t size_a = (Py_ssize_t) (tag_a >> _PyLong_NON_SIZE_BITS);
1465 Py_ssize_t size_b = (Py_ssize_t) (tag_b >> _PyLong_NON_SIZE_BITS);
1466 return (1 - sign_a) * (size_a - size_b);
1467 }
1468 typedef Py_ssize_t __Pyx_compact_pylong;
1469 typedef size_t __Pyx_compact_upylong;
1470 #else
1471 #define __Pyx_PyLong_Sign(x) ((int) ((Py_SIZE(x) == 0) ? 0 : (Py_SIZE(x) < 0) ? -1 : 1))
1472 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1473 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1474 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1475 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1476 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1477 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1478 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1479 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1480 #define __Pyx_PyLong_CompactValue(x)\
1481 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1482 #define __Pyx_PyLong_CompareSignAndSize(a, b) (Py_SIZE(a) - Py_SIZE(b))
1483 typedef sdigit __Pyx_compact_pylong;
1484 typedef digit __Pyx_compact_upylong;
1485 #endif
1486 #if PY_VERSION_HEX >= 0x030C00A5
1487 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1488 #else
1489 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1490 #endif
1491 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1492#else
1493 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
1494#endif
1495#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
1496 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1497#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1498 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
1499#else
1500 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1501#endif
1502
1503
1504/* Test for GCC > 2.95 */
1505#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1506 #define likely(x) __builtin_expect(!!(x), 1)
1507 #define unlikely(x) __builtin_expect(!!(x), 0)
1508#else /* !__GNUC__ or GCC < 2.95 */
1509 #define likely(x) (x)
1510 #define unlikely(x) (x)
1511#endif /* __GNUC__ */
1512/* PretendToInitialize */
1513#ifdef __cplusplus
1514#if __cplusplus > 201103L
1515#include <type_traits>
1516#endif
1517template <typename T>
1518static void __Pyx_pretend_to_initialize(T* ptr) {
1519#if __cplusplus > 201103L
1520 if ((std::is_trivially_default_constructible<T>::value))
1521#endif
1522 *ptr = T();
1523 (void)ptr;
1524}
1525#else
1526static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1527#endif
1528
1529
1530#if !CYTHON_USE_MODULE_STATE
1531static PyObject *__pyx_m = NULL;
1532#endif
1533static const char * const __pyx_cfilenm = __FILE__;
1534
1535/* Header.proto */
1536#if !defined(CYTHON_CCOMPLEX)
1537 #if defined(__cplusplus)
1538 #define CYTHON_CCOMPLEX 1
1539 #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1540 #define CYTHON_CCOMPLEX 1
1541 #else
1542 #define CYTHON_CCOMPLEX 0
1543 #endif
1544#endif
1545#if CYTHON_CCOMPLEX
1546 #ifdef __cplusplus
1547 #include <complex>
1548 #else
1549 #include <complex.h>
1550 #endif
1551#endif
1552#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1553 #undef _Complex_I
1554 #define _Complex_I 1.0fj
1555#endif
1556
1557/* #### Code section: filename_table ### */
1558
1559static const char* const __pyx_f[] = {
1560 "proteus/BoundaryConditions.py",
1561 "View.MemoryView",
1562 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1563 "proteus/BoundaryConditions.pxd",
1564 "cpython/type.pxd",
1565};
1566/* #### Code section: utility_code_proto_before_types ### */
1567/* Atomics.proto (used by UnpackUnboundCMethod) */
1568#include <pythread.h>
1569#ifndef CYTHON_ATOMICS
1570 #define CYTHON_ATOMICS 1
1571#endif
1572#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1573#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1574#define __pyx_atomic_int_type int
1575#define __pyx_nonatomic_int_type int
1576#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1577 (__STDC_VERSION__ >= 201112L) &&\
1578 !defined(__STDC_NO_ATOMICS__))
1579 #include <stdatomic.h>
1580#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1581 (__cplusplus >= 201103L) ||\
1582 (defined(_MSC_VER) && _MSC_VER >= 1700)))
1583 #include <atomic>
1584#endif
1585#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1586 (__STDC_VERSION__ >= 201112L) &&\
1587 !defined(__STDC_NO_ATOMICS__) &&\
1588 ATOMIC_INT_LOCK_FREE == 2)
1589 #undef __pyx_atomic_int_type
1590 #define __pyx_atomic_int_type atomic_int
1591 #define __pyx_atomic_ptr_type atomic_uintptr_t
1592 #define __pyx_nonatomic_ptr_type uintptr_t
1593 #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1594 #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
1595 #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1596 #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
1597 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1598 #define __pyx_atomic_load(value) atomic_load(value)
1599 #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
1600 #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
1601 #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
1602 #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1603 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1604 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1605 #pragma message ("Using standard C atomics")
1606 #elif defined(__PYX_DEBUG_ATOMICS)
1607 #warning "Using standard C atomics"
1608 #endif
1609#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1610 (__cplusplus >= 201103L) ||\
1611\
1612 (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1613 ATOMIC_INT_LOCK_FREE == 2)
1614 #undef __pyx_atomic_int_type
1615 #define __pyx_atomic_int_type std::atomic_int
1616 #define __pyx_atomic_ptr_type std::atomic_uintptr_t
1617 #define __pyx_nonatomic_ptr_type uintptr_t
1618 #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1619 #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
1620 #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1621 #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
1622 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1623 #define __pyx_atomic_load(value) std::atomic_load(value)
1624 #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
1625 #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
1626 #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
1627 #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1628 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1629 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1630 #pragma message ("Using standard C++ atomics")
1631 #elif defined(__PYX_DEBUG_ATOMICS)
1632 #warning "Using standard C++ atomics"
1633 #endif
1634#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1635 (__GNUC_MINOR__ > 1 ||\
1636 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1637 #define __pyx_atomic_ptr_type void*
1638 #define __pyx_nonatomic_ptr_type void*
1639 #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
1640 #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
1641 #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
1642 #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
1643 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1644 __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
1645 int result = old == *expected;
1646 *expected = old;
1647 return result;
1648 }
1649 #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
1650 #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
1651 #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
1652 #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
1653 #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
1654 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1655 __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
1656 int result = old == *expected;
1657 *expected = old;
1658 return result;
1659 }
1660 #ifdef __PYX_DEBUG_ATOMICS
1661 #warning "Using GNU atomics"
1662 #endif
1663#elif CYTHON_ATOMICS && defined(_MSC_VER)
1664 #include <intrin.h>
1665 #undef __pyx_atomic_int_type
1666 #define __pyx_atomic_int_type long
1667 #define __pyx_atomic_ptr_type void*
1668 #undef __pyx_nonatomic_int_type
1669 #define __pyx_nonatomic_int_type long
1670 #define __pyx_nonatomic_ptr_type void*
1671 #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
1672 #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
1673 #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
1674 #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
1675 #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
1676 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1677 __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
1678 int result = old == *expected;
1679 *expected = old;
1680 return result;
1681 }
1682 #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
1683 #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
1684 #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
1685 #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
1686 #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
1687 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1688 __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
1689 int result = old == *expected;
1690 *expected = old;
1691 return result;
1692 }
1693 #ifdef __PYX_DEBUG_ATOMICS
1694 #pragma message ("Using MSVC atomics")
1695 #endif
1696#else
1697 #undef CYTHON_ATOMICS
1698 #define CYTHON_ATOMICS 0
1699 #ifdef __PYX_DEBUG_ATOMICS
1700 #warning "Not using atomics"
1701 #endif
1702#endif
1703
1704/* CriticalSectionsDefinition.proto (used by CriticalSections) */
1705#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1706#define __Pyx_PyCriticalSection void*
1707#define __Pyx_PyCriticalSection2 void*
1708#define __Pyx_PyCriticalSection_End(cs)
1709#define __Pyx_PyCriticalSection2_End(cs)
1710#else
1711#define __Pyx_PyCriticalSection PyCriticalSection
1712#define __Pyx_PyCriticalSection2 PyCriticalSection2
1713#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1714#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
1715#endif
1716
1717/* CriticalSections.proto (used by ParseKeywordsImpl) */
1718#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1719#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
1720#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
1721#else
1722#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1723#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1724#endif
1725#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1726#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1727#define __Pyx_END_CRITICAL_SECTION() }
1728#else
1729#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1730#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1731#endif
1732
1733/* ForceInitThreads.proto */
1734#ifndef __PYX_FORCE_INIT_THREADS
1735 #define __PYX_FORCE_INIT_THREADS 0
1736#endif
1737
1738/* NoFastGil.proto */
1739#define __Pyx_PyGILState_Ensure PyGILState_Ensure
1740#define __Pyx_PyGILState_Release PyGILState_Release
1741#define __Pyx_FastGIL_Remember()
1742#define __Pyx_FastGIL_Forget()
1743#define __Pyx_FastGilFuncInit()
1744
1745/* Profile_config.proto (used by Profile) */
1746#ifndef CYTHON_PROFILE
1747#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
1748 #define CYTHON_PROFILE 0
1749#else
1750 #define CYTHON_PROFILE 1
1751#endif
1752#endif
1753#ifndef CYTHON_TRACE_NOGIL
1754 #define CYTHON_TRACE_NOGIL 0
1755#else
1756 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1757 #define CYTHON_TRACE 1
1758 #endif
1759#endif
1760#ifndef CYTHON_TRACE
1761 #define CYTHON_TRACE 0
1762#endif
1763#if CYTHON_PROFILE || CYTHON_TRACE
1764#if CYTHON_USE_SYS_MONITORING
1765 typedef enum {
1766 __Pyx_Monitoring_PY_START = 0,
1767 __Pyx_Monitoring_PY_RETURN,
1768 __Pyx_Monitoring_PY_UNWIND,
1769 __Pyx_Monitoring_LINE,
1770 __Pyx_Monitoring_RAISE,
1771 __Pyx_Monitoring_RERAISE,
1772 __Pyx_Monitoring_EXCEPTION_HANDLED,
1773 __Pyx_Monitoring_PY_RESUME,
1774 __Pyx_Monitoring_PY_YIELD,
1775 __Pyx_Monitoring_STOP_ITERATION,
1776 } __Pyx_Monitoring_Event_Index;
1777 static const unsigned char __Pyx_MonitoringEventTypes[] = {
1778 PY_MONITORING_EVENT_PY_START,
1779 PY_MONITORING_EVENT_PY_RETURN,
1780 PY_MONITORING_EVENT_PY_UNWIND,
1781 PY_MONITORING_EVENT_LINE,
1782 PY_MONITORING_EVENT_RAISE,
1783 PY_MONITORING_EVENT_RERAISE,
1784 PY_MONITORING_EVENT_EXCEPTION_HANDLED,
1785 PY_MONITORING_EVENT_PY_RESUME,
1786 PY_MONITORING_EVENT_PY_YIELD,
1787 PY_MONITORING_EVENT_STOP_ITERATION,
1788 };
1789 #define __Pyx_MonitoringEventTypes_CyFunc_count (sizeof(__Pyx_MonitoringEventTypes) - 3)
1790 #define __Pyx_MonitoringEventTypes_CyGen_count (sizeof(__Pyx_MonitoringEventTypes))
1791#endif
1792#endif
1793
1794/* IncludeStructmemberH.proto (used by CythonFunctionShared) */
1795#include <structmember.h>
1796
1797/* BufferFormatStructs.proto */
1798struct __Pyx_StructField_;
1799#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1800typedef struct {
1801 const char* name;
1802 const struct __Pyx_StructField_* fields;
1803 size_t size;
1804 size_t arraysize[8];
1805 int ndim;
1806 char typegroup;
1807 char is_unsigned;
1808 int flags;
1809} __Pyx_TypeInfo;
1810typedef struct __Pyx_StructField_ {
1811 const __Pyx_TypeInfo* type;
1812 const char* name;
1813 size_t offset;
1814} __Pyx_StructField;
1815typedef struct {
1816 const __Pyx_StructField* field;
1817 size_t parent_offset;
1818} __Pyx_BufFmt_StackElem;
1819typedef struct {
1820 __Pyx_StructField root;
1821 __Pyx_BufFmt_StackElem* head;
1822 size_t fmt_offset;
1823 size_t new_count, enc_count;
1824 size_t struct_alignment;
1825 int is_complex;
1826 char enc_type;
1827 char new_packmode;
1828 char enc_packmode;
1829 char is_valid_array;
1830} __Pyx_BufFmt_Context;
1831
1832/* MemviewSliceStruct.proto */
1833struct __pyx_memoryview_obj;
1834typedef struct {
1835 struct __pyx_memoryview_obj *memview;
1836 char *data;
1837 Py_ssize_t shape[8];
1838 Py_ssize_t strides[8];
1839 Py_ssize_t suboffsets[8];
1840} __Pyx_memviewslice;
1841#define __Pyx_MemoryView_Len(m) (m.shape[0])
1842#define __Pyx_MEMVIEW_DIRECT 1
1843#define __Pyx_MEMVIEW_PTR 2
1844#define __Pyx_MEMVIEW_FULL 4
1845#define __Pyx_MEMVIEW_CONTIG 8
1846#define __Pyx_MEMVIEW_STRIDED 16
1847#define __Pyx_MEMVIEW_FOLLOW 32
1848#define __Pyx_IS_C_CONTIG 1
1849#define __Pyx_IS_F_CONTIG 2
1850#define __Pyx_MEMSLICE_INIT { 0, 0, { 0 }, { 0 }, { 0 } }
1851#if CYTHON_ATOMICS
1852 #define __pyx_add_acquisition_count(memview)\
1853 __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview))
1854 #define __pyx_sub_acquisition_count(memview)\
1855 __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview))
1856#else
1857 #define __pyx_add_acquisition_count(memview)\
1858 __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1859 #define __pyx_sub_acquisition_count(memview)\
1860 __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1861#endif
1862
1863/* #### Code section: numeric_typedefs ### */
1864
1865/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":761
1866 * # in Cython to enable them only on the right systems.
1867 *
1868 * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1869 * ctypedef npy_int16 int16_t
1870 * ctypedef npy_int32 int32_t
1871*/
1872typedef npy_int8 __pyx_t_5numpy_int8_t;
1873
1874/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":762
1875 *
1876 * ctypedef npy_int8 int8_t
1877 * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1878 * ctypedef npy_int32 int32_t
1879 * ctypedef npy_int64 int64_t
1880*/
1881typedef npy_int16 __pyx_t_5numpy_int16_t;
1882
1883/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":763
1884 * ctypedef npy_int8 int8_t
1885 * ctypedef npy_int16 int16_t
1886 * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1887 * ctypedef npy_int64 int64_t
1888 *
1889*/
1890typedef npy_int32 __pyx_t_5numpy_int32_t;
1891
1892/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":764
1893 * ctypedef npy_int16 int16_t
1894 * ctypedef npy_int32 int32_t
1895 * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1896 *
1897 * ctypedef npy_uint8 uint8_t
1898*/
1899typedef npy_int64 __pyx_t_5numpy_int64_t;
1900
1901/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":766
1902 * ctypedef npy_int64 int64_t
1903 *
1904 * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1905 * ctypedef npy_uint16 uint16_t
1906 * ctypedef npy_uint32 uint32_t
1907*/
1908typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1909
1910/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":767
1911 *
1912 * ctypedef npy_uint8 uint8_t
1913 * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1914 * ctypedef npy_uint32 uint32_t
1915 * ctypedef npy_uint64 uint64_t
1916*/
1917typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1918
1919/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":768
1920 * ctypedef npy_uint8 uint8_t
1921 * ctypedef npy_uint16 uint16_t
1922 * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1923 * ctypedef npy_uint64 uint64_t
1924 *
1925*/
1926typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1927
1928/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":769
1929 * ctypedef npy_uint16 uint16_t
1930 * ctypedef npy_uint32 uint32_t
1931 * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1932 *
1933 * ctypedef npy_float32 float32_t
1934*/
1935typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1936
1937/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":771
1938 * ctypedef npy_uint64 uint64_t
1939 *
1940 * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1941 * ctypedef npy_float64 float64_t
1942 * #ctypedef npy_float80 float80_t
1943*/
1944typedef npy_float32 __pyx_t_5numpy_float32_t;
1945
1946/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":772
1947 *
1948 * ctypedef npy_float32 float32_t
1949 * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1950 * #ctypedef npy_float80 float80_t
1951 * #ctypedef npy_float128 float128_t
1952*/
1953typedef npy_float64 __pyx_t_5numpy_float64_t;
1954
1955/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":779
1956 * ctypedef double complex complex128_t
1957 *
1958 * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1959 * ctypedef npy_ulonglong ulonglong_t
1960 *
1961*/
1962typedef npy_longlong __pyx_t_5numpy_longlong_t;
1963
1964/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":780
1965 *
1966 * ctypedef npy_longlong longlong_t
1967 * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1968 *
1969 * ctypedef npy_intp intp_t
1970*/
1971typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1972
1973/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":782
1974 * ctypedef npy_ulonglong ulonglong_t
1975 *
1976 * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1977 * ctypedef npy_uintp uintp_t
1978 *
1979*/
1980typedef npy_intp __pyx_t_5numpy_intp_t;
1981
1982/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":783
1983 *
1984 * ctypedef npy_intp intp_t
1985 * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1986 *
1987 * ctypedef npy_double float_t
1988*/
1989typedef npy_uintp __pyx_t_5numpy_uintp_t;
1990
1991/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":785
1992 * ctypedef npy_uintp uintp_t
1993 *
1994 * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1995 * ctypedef npy_double double_t
1996 * ctypedef npy_longdouble longdouble_t
1997*/
1998typedef npy_double __pyx_t_5numpy_float_t;
1999
2000/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":786
2001 *
2002 * ctypedef npy_double float_t
2003 * ctypedef npy_double double_t # <<<<<<<<<<<<<<
2004 * ctypedef npy_longdouble longdouble_t
2005 *
2006*/
2007typedef npy_double __pyx_t_5numpy_double_t;
2008
2009/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":787
2010 * ctypedef npy_double float_t
2011 * ctypedef npy_double double_t
2012 * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
2013 *
2014 * ctypedef float complex cfloat_t
2015*/
2016typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
2017/* #### Code section: complex_type_declarations ### */
2018/* Declarations.proto */
2019#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2020 #ifdef __cplusplus
2021 typedef ::std::complex< float > __pyx_t_float_complex;
2022 #else
2023 typedef float _Complex __pyx_t_float_complex;
2024 #endif
2025#else
2026 typedef struct { float real, imag; } __pyx_t_float_complex;
2027#endif
2028static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
2029
2030/* Declarations.proto */
2031#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2032 #ifdef __cplusplus
2033 typedef ::std::complex< double > __pyx_t_double_complex;
2034 #else
2035 typedef double _Complex __pyx_t_double_complex;
2036 #endif
2037#else
2038 typedef struct { double real, imag; } __pyx_t_double_complex;
2039#endif
2040static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
2041
2042/* Declarations.proto */
2043#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2044 #ifdef __cplusplus
2045 typedef ::std::complex< long double > __pyx_t_long_double_complex;
2046 #else
2047 typedef long double _Complex __pyx_t_long_double_complex;
2048 #endif
2049#else
2050 typedef struct { long double real, imag; } __pyx_t_long_double_complex;
2051#endif
2052static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
2053
2054/* #### Code section: type_declarations ### */
2055
2056/*--- Type declarations ---*/
2057struct __pyx_obj_18BoundaryConditions_BC_Base;
2058struct __pyx_obj_18BoundaryConditions_BoundaryCondition;
2059struct __pyx_defaults;
2060struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC;
2061struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
2062struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
2063struct __pyx_array_obj;
2064struct __pyx_MemviewEnum_obj;
2065struct __pyx_memoryview_obj;
2066struct __pyx_memoryviewslice_obj;
2067
2068/* "BoundaryConditions.pxd":17
2069 * # cpdef void getContext(BC_Base cls, object context=*)
2070 *
2071 * ctypedef double (*cpp_uOfXT) (BoundaryCondition, double[:], double) # <<<<<<<<<<<<<<
2072 * cdef class BoundaryCondition:
2073 * cdef cpp_uOfXT uuOfXT
2074*/
2075typedef double (*__pyx_t_18BoundaryConditions_cpp_uOfXT)(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *, __Pyx_memviewslice, double);
2076
2077/* "BoundaryConditions.pxd":6
2078 * import cython
2079 *
2080 * cdef class BC_Base: # <<<<<<<<<<<<<<
2081 * cdef double[:] _b_or
2082 * cdef public:
2083*/
2084struct __pyx_obj_18BoundaryConditions_BC_Base {
2085 PyObject_HEAD
2086 __Pyx_memviewslice _b_or;
2087 int nd;
2088 PyObject *Shape;
2089 PyObject *name;
2090 PyObject *BC_type;
2091 PyObject *ct;
2092};
2093
2094
2095/* "BoundaryConditions.pxd":18
2096 *
2097 * ctypedef double (*cpp_uOfXT) (BoundaryCondition, double[:], double)
2098 * cdef class BoundaryCondition: # <<<<<<<<<<<<<<
2099 * cdef cpp_uOfXT uuOfXT
2100 * cdef public:
2101*/
2102struct __pyx_obj_18BoundaryConditions_BoundaryCondition {
2103 PyObject_HEAD
2104 struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtab;
2105 __pyx_t_18BoundaryConditions_cpp_uOfXT uuOfXT;
2106 PyObject *uOfXT;
2107};
2108
2109
2110/* "BoundaryConditions.py":97
2111 *
2112 * """
2113 * self.uOfXT = lambda x, t, n=np.zeros(3,): value # <<<<<<<<<<<<<<
2114 *
2115 *
2116*/
2117struct __pyx_defaults {
2118 PyObject_HEAD
2119 PyObject *arg0;
2120};
2121
2122
2123/* "BoundaryConditions.py":87
2124 * self.uOfXT = None
2125 *
2126 * def setConstantBC(self, value): # <<<<<<<<<<<<<<
2127 * """
2128 * function returning constant BC
2129*/
2130struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC {
2131 PyObject_HEAD
2132 PyObject *__pyx_v_value;
2133};
2134
2135
2136/* "BoundaryConditions.py":100
2137 *
2138 *
2139 * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
2140 * """
2141 * function returning value=a0+ax*x+ay*y+az*z
2142*/
2143struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC {
2144 PyObject_HEAD
2145 PyObject *__pyx_v_a;
2146 PyObject *__pyx_v_a0;
2147};
2148
2149
2150/* "BoundaryConditions.py":115
2151 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
2152 *
2153 * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
2154 * """
2155 * function setting a linear ramp from t=0 to t=t1
2156*/
2157struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp {
2158 PyObject_HEAD
2159 PyObject *__pyx_v_t1;
2160 PyObject *__pyx_v_value;
2161};
2162
2163
2164/* "View.MemoryView":128
2165 *
2166 *
2167 * @cython.collection_type("sequence") # <<<<<<<<<<<<<<
2168 * @cname("__pyx_array")
2169 * cdef class array:
2170*/
2171struct __pyx_array_obj {
2172 PyObject_HEAD
2173 struct __pyx_vtabstruct_array *__pyx_vtab;
2174 char *data;
2175 Py_ssize_t len;
2176 char *format;
2177 int ndim;
2178 Py_ssize_t *_shape;
2179 Py_ssize_t *_strides;
2180 Py_ssize_t itemsize;
2181 PyObject *mode;
2182 PyObject *_format;
2183 void (*callback_free_data)(void *);
2184 int free_data;
2185 int dtype_is_object;
2186};
2187
2188
2189/* "View.MemoryView":318
2190 *
2191 *
2192 * @cname('__pyx_MemviewEnum') # <<<<<<<<<<<<<<
2193 * cdef class Enum(object):
2194 * cdef object name
2195*/
2196struct __pyx_MemviewEnum_obj {
2197 PyObject_HEAD
2198 PyObject *name;
2199};
2200
2201
2202/* "View.MemoryView":353
2203 *
2204 *
2205 * @cname('__pyx_memoryview') # <<<<<<<<<<<<<<
2206 * cdef class memoryview:
2207 *
2208*/
2209struct __pyx_memoryview_obj {
2210 PyObject_HEAD
2211 struct __pyx_vtabstruct_memoryview *__pyx_vtab;
2212 PyObject *obj;
2213 PyObject *_size;
2214 void *_unused;
2215 PyThread_type_lock lock;
2216 __pyx_atomic_int_type acquisition_count;
2217 Py_buffer view;
2218 int flags;
2219 int dtype_is_object;
2220 __Pyx_TypeInfo const *typeinfo;
2221};
2222
2223
2224/* "View.MemoryView":947
2225 *
2226 *
2227 * @cython.collection_type("sequence") # <<<<<<<<<<<<<<
2228 * @cname('__pyx_memoryviewslice')
2229 * cdef class _memoryviewslice(memoryview):
2230*/
2231struct __pyx_memoryviewslice_obj {
2232 struct __pyx_memoryview_obj __pyx_base;
2233 __Pyx_memviewslice from_slice;
2234 PyObject *from_object;
2235 PyObject *(*to_object_func)(char *);
2236 __pyx_memoryview_to_dtype_func_type to_dtype_func;
2237};
2238
2239
2240
2241/* "BoundaryConditions.py":68
2242 *
2243 *
2244 * class BoundaryCondition: # <<<<<<<<<<<<<<
2245 * """
2246 * Boundary condition class
2247*/
2248
2249struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition {
2250 void (*resetBC)(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *, int __pyx_skip_dispatch);
2251};
2252static struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtabptr_18BoundaryConditions_BoundaryCondition;
2253
2254
2255/* "View.MemoryView":128
2256 *
2257 *
2258 * @cython.collection_type("sequence") # <<<<<<<<<<<<<<
2259 * @cname("__pyx_array")
2260 * cdef class array:
2261*/
2262
2263struct __pyx_vtabstruct_array {
2264 PyObject *(*get_memview)(struct __pyx_array_obj *);
2265};
2266static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
2267
2268
2269/* "View.MemoryView":353
2270 *
2271 *
2272 * @cname('__pyx_memoryview') # <<<<<<<<<<<<<<
2273 * cdef class memoryview:
2274 *
2275*/
2276
2277struct __pyx_vtabstruct_memoryview {
2278 char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
2279 PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
2280 PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2281 PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
2282 PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2283 PyObject *(*setitem_indexed1)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2284 PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
2285 PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
2286 PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
2287};
2288static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
2289
2290
2291/* "View.MemoryView":947
2292 *
2293 *
2294 * @cython.collection_type("sequence") # <<<<<<<<<<<<<<
2295 * @cname('__pyx_memoryviewslice')
2296 * cdef class _memoryviewslice(memoryview):
2297*/
2298
2299struct __pyx_vtabstruct__memoryviewslice {
2300 struct __pyx_vtabstruct_memoryview __pyx_base;
2301};
2302static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
2303/* #### Code section: utility_code_proto ### */
2304
2305/* --- Runtime support code (head) --- */
2306/* Refnanny.proto */
2307#ifndef CYTHON_REFNANNY
2308 #define CYTHON_REFNANNY 0
2309#endif
2310#if CYTHON_REFNANNY
2311 typedef struct {
2312 void (*INCREF)(void*, PyObject*, Py_ssize_t);
2313 void (*DECREF)(void*, PyObject*, Py_ssize_t);
2314 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
2315 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
2316 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
2317 void (*FinishContext)(void**);
2318 } __Pyx_RefNannyAPIStruct;
2319 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
2320 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2321 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2322 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2323 if (acquire_gil) {\
2324 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2325 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2326 PyGILState_Release(__pyx_gilstate_save);\
2327 } else {\
2328 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2329 }
2330 #define __Pyx_RefNannyFinishContextNogil() {\
2331 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2332 __Pyx_RefNannyFinishContext();\
2333 PyGILState_Release(__pyx_gilstate_save);\
2334 }
2335 #define __Pyx_RefNannyFinishContextNogil() {\
2336 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2337 __Pyx_RefNannyFinishContext();\
2338 PyGILState_Release(__pyx_gilstate_save);\
2339 }
2340 #define __Pyx_RefNannyFinishContext()\
2341 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2342 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2343 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2344 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2345 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2346 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
2347 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
2348 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
2349 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
2350#else
2351 #define __Pyx_RefNannyDeclarations
2352 #define __Pyx_RefNannySetupContext(name, acquire_gil)
2353 #define __Pyx_RefNannyFinishContextNogil()
2354 #define __Pyx_RefNannyFinishContext()
2355 #define __Pyx_INCREF(r) Py_INCREF(r)
2356 #define __Pyx_DECREF(r) Py_DECREF(r)
2357 #define __Pyx_GOTREF(r)
2358 #define __Pyx_GIVEREF(r)
2359 #define __Pyx_XINCREF(r) Py_XINCREF(r)
2360 #define __Pyx_XDECREF(r) Py_XDECREF(r)
2361 #define __Pyx_XGOTREF(r)
2362 #define __Pyx_XGIVEREF(r)
2363#endif
2364#define __Pyx_Py_XDECREF_SET(r, v) do {\
2365 PyObject *tmp = (PyObject *) r;\
2366 r = v; Py_XDECREF(tmp);\
2367 } while (0)
2368#define __Pyx_XDECREF_SET(r, v) do {\
2369 PyObject *tmp = (PyObject *) r;\
2370 r = v; __Pyx_XDECREF(tmp);\
2371 } while (0)
2372#define __Pyx_DECREF_SET(r, v) do {\
2373 PyObject *tmp = (PyObject *) r;\
2374 r = v; __Pyx_DECREF(tmp);\
2375 } while (0)
2376#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2377#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2378
2379/* FastTypeChecks.proto (used by GivenExceptionMatches) */
2380#if CYTHON_COMPILING_IN_CPYTHON
2381#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2382#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2383static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2384static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2385#define __Pyx_PyAnySet_Check(obj) __Pyx_TypeCheck2(obj, &PySet_Type, &PyFrozenSet_Type)
2386#else
2387#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2388#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2389#define __Pyx_PyAnySet_Check(obj) PyAnySet_Check(obj)
2390#endif
2391
2392/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
2393#if CYTHON_FAST_THREAD_STATE
2394#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2395#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2396#if PY_VERSION_HEX >= 0x030C00A6
2397#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
2398#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
2399#else
2400#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2401#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2402#endif
2403#else
2404#define __Pyx_PyThreadState_declare
2405#define __Pyx_PyThreadState_assign
2406#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2407#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2408#endif
2409
2410/* PyErrFetchRestore.proto (used by GivenExceptionMatches) */
2411#if CYTHON_FAST_THREAD_STATE
2412#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2413#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2414#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2415#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2416#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2417static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2418static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2419#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2420#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2421#else
2422#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2423#endif
2424#else
2425#define __Pyx_PyErr_Clear() PyErr_Clear()
2426#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2427#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2428#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2429#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2430#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2431#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2432#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2433#endif
2434
2435/* GivenExceptionMatches.proto (used by PyErrExceptionMatches) */
2436#if CYTHON_COMPILING_IN_CPYTHON
2437static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2438static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2439#else
2440#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2441static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
2442 return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
2443}
2444#endif
2445#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2446
2447/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
2448#if CYTHON_FAST_THREAD_STATE
2449#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2450static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2451#else
2452#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2453#endif
2454
2455/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
2456#if CYTHON_USE_TYPE_SLOTS
2457static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2458#else
2459#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2460#endif
2461
2462/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
2463static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2464
2465/* GetBuiltinName.proto */
2466static PyObject *__Pyx_GetBuiltinName(PyObject *name);
2467
2468/* CopyObjectArray.proto (used by TupleOrListFromArrayImpl) */
2469#if CYTHON_COMPILING_IN_CPYTHON
2470static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length);
2471#endif
2472
2473/* TupleOrListFromArrayImpl.proto (used by TupleFromArray) */
2474#if PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API
2475#define __Pyx_PyTuple_FromArray(src, n) PyTuple_FromArray(src, ((n)<0) ? 0 : (n))
2476#else
2477CYTHON_UNUSED static PyObject *
2478__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
2479#endif
2480
2481/* TupleFromArray.proto (used by fastcall) */
2482
2483
2484/* IncludeStringH.proto (used by PyObjectCompare) */
2485#include <string.h>
2486
2487/* PyObjectCompare.proto (used by UnicodeEquals) */
2488static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop);
2489
2490/* UnicodeEquals.proto (used by fastcall) */
2491#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
2492
2493/* fastcall.proto */
2494#if CYTHON_AVOID_BORROWED_REFS
2495 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
2496#elif CYTHON_ASSUME_SAFE_MACROS
2497 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
2498#else
2499 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
2500#endif
2501#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2502#define __Pyx_KwValues_VARARGS(args, nargs) NULL
2503#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2504#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2505#if CYTHON_VECTORCALL
2506 #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
2507 #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
2508 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2509 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
2510 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
2511 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
2512 #else
2513 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2514 #endif
2515#else
2516 #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
2517 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2518 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2519 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2520 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2521#endif
2522#if CYTHON_VECTORCALL_TPNEW
2523 #if !CYTHON_VECTORCALL
2524 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
2525 #endif
2526 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_FASTCALL
2527 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_FASTCALL
2528 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_FASTCALL
2529 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_FASTCALL
2530 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_FASTCALL
2531#else
2532 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_VARARGS
2533 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_VARARGS
2534 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_VARARGS
2535 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_VARARGS
2536 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_VARARGS
2537#endif
2538#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2539#if CYTHON_VECTORCALL
2540#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
2541#else
2542#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
2543#endif
2544
2545/* py_dict_items.proto (used by OwnedDictNext) */
2546#define __Pyx_PyDict_items_TypePtr (&PyDictKeys_Type)
2547#define __Pyx_PyDict_items_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictItems_TypePtr)
2548#define __Pyx_PyDict_items_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictItems_TypePtr)
2549static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
2550
2551/* CallCFunction.proto (used by CallUnboundCMethod0) */
2552#define __Pyx_CallCFunction(cfunc, self, args)\
2553 ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
2554#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
2555 ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
2556#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
2557 ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
2558#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
2559 ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
2560
2561/* PyObjectCall.proto (used by PyObjectFastCall) */
2562#if CYTHON_COMPILING_IN_CPYTHON
2563static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2564#else
2565#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2566#endif
2567
2568/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
2569#if CYTHON_COMPILING_IN_CPYTHON
2570static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2571#endif
2572
2573/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
2574#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2575static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargsf, PyObject *kwargs);
2576
2577/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
2578static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2579
2580/* UnpackUnboundCMethod_decl.proto (used by UnpackUnboundCMethod) */
2581typedef struct {
2582 PyObject *type;
2583 PyObject **method_name;
2584 PyCFunction func;
2585 PyObject *method;
2586 int flag;
2587#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2588 __pyx_atomic_int_type initialized;
2589#endif
2590} __Pyx_CachedCFunction;
2591
2592/* IgnoreException.proto (used by UnpackUnboundCMethod_impl) */
2593static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2594#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2595
2596/* UnpackUnboundCMethod_impl.export */
2597static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2598
2599/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
2600#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2601static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2602#if !CYTHON_ATOMICS
2603 return 1;
2604#else
2605 __pyx_nonatomic_int_type expected = 0;
2606 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2607 return 0;
2608 }
2609 return expected;
2610#endif
2611}
2612static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2613#if CYTHON_ATOMICS
2614 __pyx_atomic_store(&cfunc->initialized, 2);
2615#endif
2616}
2617#else
2618#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2619#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
2620#endif
2621
2622/* CallUnboundCMethod0.proto */
2623CYTHON_UNUSED
2624static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2625#if CYTHON_COMPILING_IN_CPYTHON
2626static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2627#else
2628#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2629#endif
2630
2631/* py_dict_values.proto (used by OwnedDictNext) */
2632#define __Pyx_PyDict_values_TypePtr (&PyDictKeys_Type)
2633#define __Pyx_PyDict_values_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictValues_TypePtr)
2634#define __Pyx_PyDict_values_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictValues_TypePtr)
2635static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2636
2637/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
2638#if CYTHON_AVOID_BORROWED_REFS
2639static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2640#else
2641CYTHON_INLINE
2642static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2643#endif
2644
2645/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
2646static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2647
2648/* ParseKeywordsImpl.export */
2649static int __Pyx_ParseKeywordsTuple(
2650 PyObject *kwds,
2651 PyObject * const *kwvalues,
2652 PyObject ** const argnames[],
2653 PyObject *kwds2,
2654 PyObject *values[],
2655 Py_ssize_t num_pos_args,
2656 Py_ssize_t num_kwargs,
2657 const char* function_name,
2658 int ignore_unknown_kwargs
2659);
2660static int __Pyx_ParseKeywordDictToDict(
2661 PyObject *kwds,
2662 PyObject ** const argnames[],
2663 PyObject *kwds2,
2664 PyObject *values[],
2665 Py_ssize_t num_pos_args,
2666 const char* function_name
2667);
2668static int __Pyx_ParseKeywordDict(
2669 PyObject *kwds,
2670 PyObject ** const argnames[],
2671 PyObject *values[],
2672 Py_ssize_t num_pos_args,
2673 Py_ssize_t num_kwargs,
2674 const char* function_name,
2675 int ignore_unknown_kwargs
2676);
2677
2678/* CallUnboundCMethod2.proto */
2679CYTHON_UNUSED
2680static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2681#if CYTHON_COMPILING_IN_CPYTHON
2682static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2683#else
2684#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2685#endif
2686
2687/* ParseKeywords.proto */
2688static CYTHON_INLINE int __Pyx_ParseKeywords(
2689 PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
2690 PyObject *kwds2, PyObject *values[],
2691 Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
2692 const char* function_name,
2693 int ignore_unknown_kwargs
2694);
2695
2696/* RaiseArgTupleInvalid.export */
2697static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2698 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2699
2700/* ArgTypeTestError.export */
2701static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2702
2703/* ArgTypeTest.proto */
2704static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact);
2705
2706/* PyObjectFastCallMethod.proto */
2707#if CYTHON_VECTORCALL
2708#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
2709#else
2710static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
2711#endif
2712
2713/* FormatTypeName.proto (used by RaiseErrorWithObjectType1) */
2714#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2715typedef PyObject *__Pyx_TypeName;
2716#define __Pyx_FMT_TYPENAME "%N"
2717#define __Pyx_PyType_GetFullyQualifiedName(tp) Py_NewRef((PyObject*)tp)
2718#define __Pyx_DECREF_TypeName(obj) Py_DECREF(obj)
2719#elif CYTHON_COMPILING_IN_LIMITED_API
2720typedef PyObject *__Pyx_TypeName;
2721#define __Pyx_FMT_TYPENAME "%U"
2722#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2723static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
2724#else // !LIMITED_API
2725typedef const char *__Pyx_TypeName;
2726#define __Pyx_FMT_TYPENAME "%.200s"
2727#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
2728#define __Pyx_DECREF_TypeName(obj)
2729#endif
2730
2731/* RaiseErrorWithObjectType1.proto (used by RaiseUnexpectedTypeError) */
2732#define __Pyx_RaiseTypeErrorWithObjectType1(message, arg, obj) __Pyx_RaiseErrorWithObjectType1(PyExc_TypeError, message, arg, obj)
2733#define __Pyx_RaiseErrorWithObjectType1(exc_type, message, arg, obj) __Pyx_RaiseErrorWithType1(exc_type, message, arg, Py_TYPE(obj))
2734CYTHON_UNUSED
2735static void __Pyx_RaiseErrorWithType1(PyObject* exc_type, const char* message, const char *arg, PyTypeObject *type_obj);
2736
2737/* RaiseUnexpectedTypeError.proto */
2738CYTHON_UNUSED
2739static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
2740
2741/* PyMemoryError_Check.proto */
2742#define __Pyx_PyExc_MemoryError_Check(obj) __Pyx_TypeCheck(obj, PyExc_MemoryError)
2743
2744/* RaiseException.export */
2745static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2746
2747/* PyValueError_Check.proto */
2748#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError)
2749
2750/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */
2751static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
2752 int prepend_sign, char padding_char);
2753
2754/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
2755static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
2756static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);
2757
2758/* GCCDiagnostics.proto (used by CIntToPyUnicode) */
2759#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2760#define __Pyx_HAS_GCC_DIAGNOSTIC
2761#endif
2762
2763/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
2764#include <stdlib.h>
2765
2766/* CIntToPyUnicode.proto */
2767#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
2768 ((format_char) == ('c')) ?\
2769 __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
2770 __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
2771 )
2772static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
2773static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
2774
2775/* CIntToPyUnicode.proto */
2776#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
2777 ((format_char) == ('c')) ?\
2778 __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
2779 __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
2780 )
2781static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
2782static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
2783
2784/* JoinPyUnicode.proto */
2785#define __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH\
2786 (!CYTHON_COMPILING_IN_GRAAL && !CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API)
2787
2788/* JoinPyUnicode.export */
2789static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, int kind);
2790
2791/* UnicodeEqualsUCS4.proto (used by UnicodeEquals_uchar) */
2792#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
2793#define __Pyx_PyObject_Equals_uchar(s1, s2, ch2, equals, s1_is_str) (\
2794 ((s1) == (s2)) ? ((equals) == Py_EQ) :\
2795 ((s1) == Py_None) ? ((equals) == Py_NE) :\
2796 __Pyx_PyObject_RichCompareBool(s1, s2, equals)\
2797 )
2798#else
2799#define __Pyx_PyObject_Equals_uchar(s1, s2, ch2, equals, s1_is_str) (\
2800 ((s1) == (s2)) ? ((equals) == Py_EQ) :\
2801 ((s1) == Py_None) ? ((equals) == Py_NE) :\
2802 (likely((s1_is_str) || PyUnicode_CheckExact(s1)) ?\
2803 __Pyx__PyUnicode_EqualsUCS4(s1, ch2, equals) :\
2804 __Pyx_PyObject_RichCompareBool(s1, s2, equals)\
2805 ))
2806static CYTHON_INLINE int __Pyx__PyUnicode_EqualsUCS4(PyObject* s1, Py_UCS4 ch2, int equals);
2807#endif
2808
2809/* UnicodeEquals_uchar.proto */
2810#define __Pyx_PyObject_Equals_obj_ch99(s1, s2, equals) __Pyx_PyObject_Equals_uchar(s1, s2, 99, equals, 0)
2811
2812/* PyObjectCompare.proto */
2813static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_object_str(PyObject *op1, PyObject *op2, int pyop);
2814
2815/* PyObjectFormatSimple.proto */
2816#if CYTHON_COMPILING_IN_PYPY
2817 #define __Pyx_PyObject_FormatSimple(s, f) (\
2818 likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2819 PyObject_Format(s, f))
2820#elif CYTHON_USE_TYPE_SLOTS
2821 #define __Pyx_PyObject_FormatSimple(s, f) (\
2822 likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2823 likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
2824 likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
2825 PyObject_Format(s, f))
2826#else
2827 #define __Pyx_PyObject_FormatSimple(s, f) (\
2828 likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2829 PyObject_Format(s, f))
2830#endif
2831
2832/* PyObjectCompare.proto */
2833static CYTHON_INLINE PyObject* __Pyx_PyObject_CompareEq_object_bytes(PyObject *op1, PyObject *op2, int pyop);
2834
2835CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2836/* UnicodeEquals_uchar.proto */
2837#define __Pyx_PyObject_Equals_str_ch99(s1, s2, equals) __Pyx_PyObject_Equals_uchar(s1, s2, 99, equals, 1)
2838
2839static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2840/* GetAttr.proto */
2841static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2842
2843/* PyFrozenDict.proto (used by GetItemInt) */
2844#if CYTHON_COMPILING_IN_LIMITED_API
2845#define __Pyx_PyFrozenDict_TypePtr ((PyTypeObject*) __pyx_mstate_global->__Pyx_PyFrozenDictType)
2846#define __Pyx_PyFrozenDict_New(it) __Pyx__PyFrozenDict_New(__pyx_mstate_global->__Pyx_PyFrozenDictType, it)
2847static CYTHON_INLINE PyObject* __Pyx__PyFrozenDict_New(PyObject* frozendict_type, PyObject* it);
2848#define __Pyx_PyFrozenDict_NewEmpty() __Pyx_PyFrozenDict_New(NULL)
2849#define __Pyx_PyFrozenDict_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyFrozenDict_TypePtr)
2850#define __Pyx_PyFrozenDict_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyFrozenDict_TypePtr)
2851#define __Pyx_PyAnyDict_Check(obj) __Pyx__PyAnyDict_Check(obj, __Pyx_PyFrozenDict_TypePtr)
2852static CYTHON_INLINE int __Pyx__PyAnyDict_Check(PyObject *obj, PyTypeObject* frozendict_type) {
2853 return PyObject_TypeCheck(obj, &PyDict_Type) || PyObject_TypeCheck(obj, frozendict_type);
2854}
2855#define __Pyx_PyAnyDict_CheckExact(obj) __Pyx__PyAnyDict_CheckExact(obj, __Pyx_PyFrozenDict_TypePtr)
2856static CYTHON_INLINE int __Pyx__PyAnyDict_CheckExact(PyObject *obj, PyTypeObject* frozendict_type) {
2857 return Py_IS_TYPE(obj, &PyDict_Type) || Py_IS_TYPE(obj, frozendict_type);
2858}
2859#elif PY_VERSION_HEX >= 0x030f00a6 ||\
2860 (defined(PyFrozenDict_Check) && defined(PyAnyDict_Check) && defined(PyFrozenDict_New))
2861#define __Pyx_PyFrozenDict_TypePtr (&PyFrozenDict_Type)
2862#define __Pyx_PyFrozenDict_New(it) PyFrozenDict_New(it)
2863#define __Pyx_PyFrozenDict_NewEmpty() PyFrozenDict_New(NULL)
2864#define __Pyx_PyFrozenDict_Check(obj) PyFrozenDict_Check(obj)
2865#define __Pyx_PyFrozenDict_CheckExact(obj) PyFrozenDict_CheckExact(obj)
2866#define __Pyx_PyAnyDict_Check(obj) PyAnyDict_Check(obj)
2867#define __Pyx_PyAnyDict_CheckExact(obj) PyAnyDict_CheckExact(obj)
2868#else
2869#define __Pyx_PyFrozenDict_TypePtr (&PyDict_Type)
2870static CYTHON_INLINE PyObject* __Pyx_PyFrozenDict_New(PyObject* it) {
2871 if (!it) {
2872 return PyDict_New();
2873 } else if (PyDict_Check(it)) {
2874 return PyDict_Copy(it);
2875 } else {
2876 PyObject *dict = PyDict_New();
2877 if (!dict) return NULL;
2878 PyObject *result = PyNumber_InPlaceOr(dict, it);
2879 Py_DECREF(dict);
2880 return result;
2881 }
2882}
2883#define __Pyx_PyFrozenDict_NewEmpty() PyDict_New()
2884#define __Pyx_PyFrozenDict_Check(obj) PyDict_Check(obj)
2885#define __Pyx_PyFrozenDict_CheckExact(obj) PyDict_CheckExact(obj)
2886#define __Pyx_PyAnyDict_Check(obj) PyDict_Check(obj)
2887#define __Pyx_PyAnyDict_CheckExact(obj) PyDict_CheckExact(obj)
2888#endif
2889
2890/* GetItemInt.proto */
2891#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2892 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2893 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2894 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
2895#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2896 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2897 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2898 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2899static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2900 int wraparound, int boundscheck, int unsafe_shared);
2901#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2902 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2903 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2904 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2905static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2906 int wraparound, int boundscheck, int unsafe_shared);
2907static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2908static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2909 int wraparound, int boundscheck, int unsafe_shared);
2910
2911/* RaiseErrorWithObjectType.proto (used by ObjectGetItem) */
2912#define __Pyx_RaiseTypeErrorWithObjectType(message, obj) __Pyx_RaiseErrorWithObjectType(PyExc_TypeError, message, obj)
2913#define __Pyx_RaiseErrorWithObjectType(exc_type, message, obj) __Pyx_RaiseErrorWithType(exc_type, message, Py_TYPE(obj))
2914CYTHON_UNUSED
2915static void __Pyx_RaiseErrorWithType(PyObject* exc_type, const char* message, PyTypeObject *type_obj);
2916
2917/* ObjectGetItem.proto */
2918#if CYTHON_USE_TYPE_SLOTS
2919static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
2920#else
2921#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2922#endif
2923
2924/* RejectKeywords.export */
2925static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);
2926
2927/* PyTypeError_Check.proto */
2928#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError)
2929
2930/* DivInt[Py_ssize_t].proto */
2931static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t, int b_is_constant);
2932
2933/* UnaryNegOverflows.proto */
2934#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
2935 (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2936
2937/* GetAttr3.proto */
2938static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2939
2940/* PyDictVersioning.proto (used by GetModuleGlobalName) */
2941#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2942#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2943#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2944#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2945 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2946 (cache_var) = (value);
2947#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2948 static PY_UINT64_T __pyx_dict_version = 0;\
2949 static PyObject *__pyx_dict_cached_value = NULL;\
2950 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2951 (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
2952 } else {\
2953 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2954 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2955 }\
2956}
2957static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2958static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2959static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2960#else
2961#define __PYX_GET_DICT_VERSION(dict) (0)
2962#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2963#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2964#endif
2965
2966/* GetModuleGlobalName.proto */
2967#if CYTHON_USE_DICT_VERSIONS
2968#define __Pyx_GetModuleGlobalName(var, name) do {\
2969 static PY_UINT64_T __pyx_dict_version = 0;\
2970 static PyObject *__pyx_dict_cached_value = NULL;\
2971 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
2972 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2973 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2974} while(0)
2975#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
2976 PY_UINT64_T __pyx_dict_version;\
2977 PyObject *__pyx_dict_cached_value;\
2978 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2979} while(0)
2980static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2981#else
2982#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2983#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2984static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2985#endif
2986
2987/* AssertionsEnabled.proto */
2988#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000
2989 static int __pyx_assertions_enabled_flag;
2990 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
2991 #if __clang__ || __GNUC__
2992 __attribute__((no_sanitize("thread")))
2993 #endif
2994 static int __Pyx_init_assertions_enabled(void) {
2995 PyObject *builtins, *debug, *debug_str;
2996 int flag;
2997 builtins = PyEval_GetBuiltins();
2998 if (!builtins) goto bad;
2999 debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
3000 if (!debug_str) goto bad;
3001 debug = PyObject_GetItem(builtins, debug_str);
3002 Py_DECREF(debug_str);
3003 if (!debug) goto bad;
3004 flag = PyObject_IsTrue(debug);
3005 Py_DECREF(debug);
3006 if (flag == -1) goto bad;
3007 __pyx_assertions_enabled_flag = flag;
3008 return 0;
3009 bad:
3010 __pyx_assertions_enabled_flag = 1;
3011 return -1;
3012 }
3013#else
3014 #define __Pyx_init_assertions_enabled() (0)
3015 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
3016#endif
3017
3018/* PyAssertionError_Check.proto */
3019#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError)
3020
3021/* RaiseTooManyValuesToUnpack.proto */
3022static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
3023
3024/* RaiseNeedMoreValuesToUnpack.proto */
3025static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
3026
3027/* RaiseNoneIterError.proto */
3028static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
3029
3030/* GetTopmostException.proto (used by SaveResetException) */
3031#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
3032static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
3033#endif
3034
3035/* SaveResetException.proto */
3036#if CYTHON_FAST_THREAD_STATE
3037#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
3038static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3039#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
3040static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
3041#else
3042#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
3043#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
3044#endif
3045
3046/* RaiseErrorWithObjectTypes.proto (used by ExtTypeTest) */
3047#define __Pyx_RaiseErrorWithObjectTypes1(exc_type, message, arg, obj1, obj2) __Pyx_RaiseErrorWithTypes1(exc_type, message, arg, Py_TYPE(obj1), Py_TYPE(obj2))
3048#define __Pyx_RaiseTypeErrorWithObjectTypes(message, obj1, obj2) __Pyx_RaiseTypeErrorWithTypes(message, Py_TYPE(obj1), Py_TYPE(obj2))
3049#define __Pyx_RaiseTypeErrorWithTypes(message, type_obj1, type_obj2) __Pyx_RaiseErrorWithTypes1(PyExc_TypeError, "%.1s" message, "", type_obj1, type_obj2)
3050CYTHON_UNUSED
3051static void __Pyx_RaiseErrorWithTypes1(PyObject* exc_type, const char *message, const char *arg, PyTypeObject *type_obj1, PyTypeObject *type_obj2);
3052
3053/* ExtTypeTest.proto */
3054static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
3055
3056/* GetException.proto */
3057#if CYTHON_FAST_THREAD_STATE
3058#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
3059static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3060#else
3061static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
3062#endif
3063
3064/* SwapException.proto */
3065#if CYTHON_FAST_THREAD_STATE
3066#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
3067static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3068#else
3069static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
3070#endif
3071
3072/* HasAttr.proto (used by ImportImpl) */
3073#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
3074#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
3075#else
3076static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
3077#endif
3078
3079/* TupleOrListFromArrayImpl.proto (used by ListFromArray) */
3080CYTHON_UNUSED static PyObject *
3081__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
3082
3083/* ListFromArray.proto (used by ImportImpl) */
3084
3085
3086/* ImportImpl.export */
3087static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
3088
3089/* Import.proto */
3090static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
3091
3092CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
3093/* ListCompAppendAndDecref.proto */
3094static CYTHON_INLINE int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x);
3095
3096/* PySequenceMultiply.proto */
3097#define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul)
3098#if !CYTHON_USE_TYPE_SLOTS
3099#define __Pyx_PySequence_Multiply PySequence_Repeat
3100#else
3101static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
3102#endif
3103
3104/* PyNumberBinop.proto */
3105#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
3106#define __Pyx_PyNumber_Multiply_object_int(op1, op2) PyNumber_Multiply(op1, op2)
3107#define __Pyx_PyNumber_InPlaceMultiply_object_int(op1, op2) PyNumber_InPlaceMultiply(op1, op2)
3108#else
3109#define __Pyx_PyNumber_Multiply_object_int(op1, op2) __Pyx__PyNumber_Multiply_object_int(op1, op2, 0)
3110#define __Pyx_PyNumber_InPlaceMultiply_object_int(op1, op2) __Pyx__PyNumber_Multiply_object_int(op1, op2, 1)
3111static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_object_int(PyObject *op1, PyObject *op2, int inplace);
3112#endif
3113
3114/* PyObjectFormatAndDecref.proto */
3115static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
3116static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
3117
3118/* PyObjectFormat.proto */
3119#if CYTHON_USE_UNICODE_WRITER
3120static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
3121#else
3122#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
3123#endif
3124
3125/* PyObject_Unicode.proto */
3126#define __Pyx_PyObject_Unicode(obj)\
3127 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
3128
3129/* SetItemInt.proto */
3130#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
3131 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3132 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck, unsafe_shared) :\
3133 __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
3134static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
3135static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
3136 int wraparound, int boundscheck, int unsafe_shared);
3137
3138/* RaiseUnboundLocalError.proto */
3139static void __Pyx_RaiseUnboundLocalError(const char *varname);
3140
3141/* DivInt[long].proto */
3142static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant);
3143
3144/* PyException_Check.proto */
3145#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
3146
3147/* PyImportError_Check.proto */
3148#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
3149
3150/* Profile.proto */
3151#if CYTHON_TRACE
3152 #undef CYTHON_PROFILE_REUSE_FRAME
3153#endif
3154#if CYTHON_USE_MODULE_STATE
3155 #undef CYTHON_PROFILE_REUSE_CODEOBJ
3156 #define CYTHON_PROFILE_REUSE_CODEOBJ 0
3157 #undef CYTHON_PROFILE_REUSE_FRAME
3158#endif
3159#ifndef CYTHON_PROFILE_REUSE_CODEOBJ
3160 #define CYTHON_PROFILE_REUSE_CODEOBJ 1
3161#endif
3162#ifndef CYTHON_PROFILE_REUSE_FRAME
3163 #define CYTHON_PROFILE_REUSE_FRAME 0
3164#endif
3165#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
3166 #define __PYX_MONITORING_ABI_SUFFIX "_mon"
3167#else
3168 #define __PYX_MONITORING_ABI_SUFFIX
3169#endif
3170#if CYTHON_PROFILE || CYTHON_TRACE
3171#if CYTHON_USE_SYS_MONITORING
3172 typedef uint64_t __pyx_monitoring_version_type;
3173 #define __Pyx_TraceDeclarationsFunc\
3174 PyObject *__pyx_frame_code = NULL;\
3175 PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyFunc_count];\
3176 int __pyx_exception_already_reported = 0;\
3177 const int __pyx_sys_monitoring_disabled_in_parallel = 0; CYTHON_UNUSED_VAR(__pyx_sys_monitoring_disabled_in_parallel);
3178 #define __Pyx_TraceDeclarationsGen\
3179 PyObject *__pyx_frame_code = Py_NewRef(__pyx_generator->gi_code);\
3180 PyMonitoringState* __pyx_pymonitoring_state = __pyx_generator->__pyx_pymonitoring_state;\
3181 __pyx_monitoring_version_type __pyx_pymonitoring_version = __pyx_generator->__pyx_pymonitoring_version;\
3182 int __pyx_exception_already_reported = 0;\
3183 const int __pyx_sys_monitoring_disabled_in_parallel = 0; CYTHON_UNUSED_VAR(__pyx_sys_monitoring_disabled_in_parallel);
3184 #define __Pyx_IsTracing(event_id) ((!__pyx_sys_monitoring_disabled_in_parallel) && (__pyx_pymonitoring_state[event_id]).active)
3185 #define __Pyx_TraceFrameInit(codeobj)\
3186 if (codeobj) __pyx_frame_code = codeobj;
3187 #define __Pyx_TurnOffSysMonitoringInParallel\
3188 const int __pyx_sys_monitoring_disabled_in_parallel = 1;\
3189 CYTHON_UNUSED_VAR(__pyx_sys_monitoring_disabled_in_parallel);
3190 CYTHON_UNUSED static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
3191 CYTHON_UNUSED static int __Pyx__TraceStartFunc(PyMonitoringState *state_array, PyObject *code_obj, int offset, int skip_event);
3192 CYTHON_UNUSED static int __Pyx__TraceStartGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset);
3193 CYTHON_UNUSED static int __Pyx__TraceResumeGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset);
3194 CYTHON_UNUSED static void __Pyx__TraceException(PyMonitoringState *monitoring_state, PyObject *code_obj, int offset, int reraised);
3195 #define __Pyx_PyMonitoring_ExitScope(nogil)\
3196 if (nogil) {\
3197 (void) __pyx_exception_already_reported;\
3198 if (CYTHON_TRACE_NOGIL) {\
3199 PyGILState_STATE state = PyGILState_Ensure();\
3200 PyMonitoring_ExitScope();\
3201 Py_XDECREF(__pyx_frame_code);\
3202 PyGILState_Release(state);\
3203 }\
3204 } else {\
3205 PyMonitoring_ExitScope();\
3206 Py_XDECREF(__pyx_frame_code);\
3207 }
3208 #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\
3209 if ((0) ); else {\
3210 int ret = 0;\
3211 memset(__pyx_pymonitoring_state, 0, sizeof(__pyx_pymonitoring_state));\
3212 if (nogil) {\
3213 if (CYTHON_TRACE_NOGIL) {\
3214 PyGILState_STATE state = PyGILState_Ensure();\
3215 if (!__Pyx_PyThreadState_Current->tracing) {\
3216 if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\
3217 else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\
3218 if (unlikely(!__pyx_frame_code)) ret = -1;\
3219 else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
3220 } else __pyx_frame_code = NULL;\
3221 PyGILState_Release(state);\
3222 } else __pyx_frame_code = NULL;\
3223 } else {\
3224 if (!__Pyx_PyThreadState_Current->tracing) {\
3225 if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\
3226 else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\
3227 if (unlikely(!__pyx_frame_code)) ret = -1;\
3228 else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
3229 } else __pyx_frame_code = NULL;\
3230 }\
3231 if (unlikely(ret == -1)) goto_error;\
3232 }
3233 #define __Pyx_TraceStartGen(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\
3234 if ((0) ); else {\
3235 int ret = __Pyx__TraceStartGen(__pyx_pymonitoring_state, &__pyx_pymonitoring_version, __pyx_frame_code, offset);\
3236 if (unlikely(ret == -1)) goto_error;\
3237 }
3238 #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error)\
3239 if ((0) ); else {\
3240 int ret = __Pyx__TraceResumeGen(__pyx_pymonitoring_state, &__pyx_pymonitoring_version, __pyx_frame_code, offset);\
3241 if (unlikely(ret == -1)) goto_error;\
3242 }
3243 #define __Pyx_TraceYield(result, offset, goto_error)\
3244 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_YIELD)); else {\
3245 int ret = PyMonitoring_FirePyYieldEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\
3246 PyMonitoring_ExitScope();\
3247 if (unlikely(ret == -1)) goto_error;\
3248 }
3249 #define __Pyx_TraceException(offset, reraised, fresh)\
3250 if (!__Pyx_IsTracing((reraised) ? __Pyx_Monitoring_RERAISE : __Pyx_Monitoring_RAISE)); else {\
3251 if (fresh || reraised || !__pyx_exception_already_reported) {\
3252 __Pyx__TraceException(&__pyx_pymonitoring_state[(reraised) ? __Pyx_Monitoring_RERAISE : __Pyx_Monitoring_RAISE], __pyx_frame_code, offset, reraised);\
3253 }\
3254 __pyx_exception_already_reported = 1;\
3255 }
3256 #define __Pyx_TraceExceptionDone() __pyx_exception_already_reported = 0
3257 #define __Pyx_TraceExceptionHandled(offset)\
3258 if (!__Pyx_IsTracing(__Pyx_Monitoring_EXCEPTION_HANDLED)); else {\
3259 (void) PyMonitoring_FireExceptionHandledEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_EXCEPTION_HANDLED], __pyx_frame_code, offset);\
3260 __pyx_exception_already_reported = 0;\
3261 }
3262 #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\
3263 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_RETURN)); else {\
3264 int ret = 0;\
3265 if (nogil) {\
3266 if (CYTHON_TRACE_NOGIL) {\
3267 PyGILState_STATE state = PyGILState_Ensure();\
3268 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\
3269 PyGILState_Release(state);\
3270 }\
3271 } else {\
3272 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\
3273 }\
3274 if (unlikely(ret == -1)) goto_error;\
3275 }
3276 #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\
3277 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_RETURN)); else {\
3278 int ret = 0;\
3279 if (nogil) {\
3280 if (CYTHON_TRACE_NOGIL) {\
3281 PyGILState_STATE state = PyGILState_Ensure();\
3282 PyObject *pyvalue = convert_function(cresult);\
3283 if (unlikely(!pyvalue)) {\
3284 if (!PyErr_ExceptionMatches(PyExc_Exception)) goto_error;\
3285 PyErr_Clear();\
3286 pyvalue = Py_None; Py_INCREF(Py_None);\
3287 }\
3288 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, pyvalue);\
3289 Py_DECREF(pyvalue);\
3290 PyGILState_Release(state);\
3291 }\
3292 } else {\
3293 PyObject *pyvalue = convert_function(cresult);\
3294 if (unlikely(!pyvalue)) {\
3295 if (!PyErr_ExceptionMatches(PyExc_Exception)) goto_error;\
3296 PyErr_Clear();\
3297 pyvalue = Py_None; Py_INCREF(Py_None);\
3298 }\
3299 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, pyvalue);\
3300 Py_DECREF(pyvalue);\
3301 }\
3302 if (unlikely(ret == -1)) goto_error;\
3303 }
3304 #define __Pyx_TraceExceptionUnwind(offset, nogil)\
3305 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_UNWIND)); else {\
3306 if (nogil) {\
3307 if (CYTHON_TRACE_NOGIL) {\
3308 PyGILState_STATE state = PyGILState_Ensure();\
3309 (void) PyMonitoring_FirePyUnwindEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_UNWIND], __pyx_frame_code, offset);\
3310 PyGILState_Release(state);\
3311 }\
3312 } else {\
3313 (void) PyMonitoring_FirePyUnwindEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_UNWIND], __pyx_frame_code, offset);\
3314 }\
3315 }
3316 #if CYTHON_TRACE
3317 CYTHON_UNUSED static int __Pyx__TraceLine(PyMonitoringState *monitoring_state, PyObject *code_obj, int line, int offset);
3318 #define __Pyx_TraceLine(line, offset, nogil, goto_error)\
3319 if (!__Pyx_IsTracing(__Pyx_Monitoring_LINE)); else {\
3320 int ret = 0;\
3321 if (nogil) {\
3322 if (CYTHON_TRACE_NOGIL) {\
3323 PyGILState_STATE state = PyGILState_Ensure();\
3324 ret = __Pyx__TraceLine(&__pyx_pymonitoring_state[__Pyx_Monitoring_LINE], __pyx_frame_code, line, offset);\
3325 PyGILState_Release(state);\
3326 }\
3327 } else {\
3328 ret = __Pyx__TraceLine(&__pyx_pymonitoring_state[__Pyx_Monitoring_LINE], __pyx_frame_code, line, offset);\
3329 }\
3330 if (unlikely(ret == -1)) goto_error;\
3331 }
3332 #endif
3333#else
3334 #include "compile.h"
3335 #include "frameobject.h"
3336 #include "traceback.h"
3337#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION)
3338 #ifndef Py_BUILD_CORE
3339 #define Py_BUILD_CORE 1
3340 #endif
3341 #include "internal/pycore_frame.h"
3342#endif
3343 #if CYTHON_PROFILE_REUSE_FRAME
3344 #define CYTHON_FRAME_MODIFIER static
3345 #define CYTHON_FRAME_DEL(frame)
3346 #else
3347 #define CYTHON_FRAME_MODIFIER
3348 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
3349 #endif
3350 #if CYTHON_PROFILE_REUSE_CODEOBJ
3351 #define CYTHON_CODEOBJ_MODIFIER static
3352 #else
3353 #define CYTHON_CODEOBJ_MODIFIER
3354 #endif
3355 #define __Pyx_TraceDeclarationsFunc\
3356 CYTHON_CODEOBJ_MODIFIER PyCodeObject *__pyx_frame_code = NULL;\
3357 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
3358 int __Pyx_use_tracing = 0;
3359 #define __Pyx_TraceDeclarationsGen\
3360 PyObject *__pyx_frame_code = __pyx_generator->gi_code;\
3361 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
3362 int __Pyx_use_tracing = 0;
3363 #define __Pyx_TraceFrameInit(codeobj)\
3364 if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
3365 #define __Pyx_PyMonitoring_ExitScope(nogil)\
3366 if (!CYTHON_PROFILE_REUSE_FRAME && nogil) {\
3367 PyGILState_STATE state = PyGILState_Ensure();\
3368 CYTHON_FRAME_DEL(__pyx_frame);\
3369 PyGILState_Release(state);\
3370 } else {\
3371 CYTHON_FRAME_DEL(__pyx_frame);\
3372 }
3373 #define __Pyx_TraceException(offset, reraised, fresh) {}
3374 #define __Pyx_TraceExceptionHandled(offset) {}
3375 #define __Pyx_TraceExceptionDone() {}
3376 #define __Pyx_TurnOffSysMonitoringInParallel {} // Only needed for freethreading
3377#if PY_VERSION_HEX >= 0x030b00a2
3378 #if PY_VERSION_HEX >= 0x030C00b1
3379 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3380 ((!(check_tracing) || !(tstate)->tracing) &&\
3381 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3382 #else
3383 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3384 (unlikely((tstate)->cframe->use_tracing) &&\
3385 (!(check_tracing) || !(tstate)->tracing) &&\
3386 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3387 #endif
3388 #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
3389 #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
3390#elif PY_VERSION_HEX >= 0x030a00b1
3391 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3392 (unlikely((tstate)->cframe->use_tracing) &&\
3393 (!(check_tracing) || !(tstate)->tracing) &&\
3394 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3395 #define __Pyx_EnterTracing(tstate)\
3396 do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
3397 #define __Pyx_LeaveTracing(tstate)\
3398 do {\
3399 tstate->tracing--;\
3400 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
3401 || tstate->c_profilefunc != NULL);\
3402 } while (0)
3403#else
3404 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3405 (unlikely((tstate)->use_tracing) &&\
3406 (!(check_tracing) || !(tstate)->tracing) &&\
3407 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3408 #define __Pyx_EnterTracing(tstate)\
3409 do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
3410 #define __Pyx_LeaveTracing(tstate)\
3411 do {\
3412 tstate->tracing--;\
3413 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
3414 || tstate->c_profilefunc != NULL);\
3415 } while (0)
3416#endif
3417 #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\
3418 if (nogil) {\
3419 if (CYTHON_TRACE_NOGIL) {\
3420 PyThreadState *tstate;\
3421 PyGILState_STATE state = PyGILState_Ensure();\
3422 tstate = __Pyx_PyThreadState_Current;\
3423 if (__Pyx_IsTracing(tstate, 1, 1)) {\
3424 __Pyx_use_tracing = __Pyx_TraceSetupAndCall((PyCodeObject**)&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno, skip_event);\
3425 }\
3426 PyGILState_Release(state);\
3427 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
3428 }\
3429 } else {\
3430 PyThreadState* tstate = PyThreadState_GET();\
3431 if (__Pyx_IsTracing(tstate, 1, 1)) {\
3432 __Pyx_use_tracing = __Pyx_TraceSetupAndCall((PyCodeObject**)&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno, skip_event);\
3433 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
3434 }\
3435 }
3436 #define __Pyx_TraceStartGen __Pyx_TraceStartFunc
3437 #define __Pyx_TraceYield(result, offset, goto_error)\
3438 if (likely(!__Pyx_use_tracing)); else {\
3439 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3440 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3441 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3442 }\
3443 if ((1)); else goto_error;\
3444 }
3445 #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error)\
3446 __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, 0, 0, goto_error)
3447 CYTHON_UNUSED static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
3448 PyObject *type, *value, *traceback;
3449 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
3450 __Pyx_EnterTracing(tstate);
3451 if (CYTHON_TRACE && tstate->c_tracefunc)
3452 tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
3453 if (tstate->c_profilefunc)
3454 tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
3455 __Pyx_LeaveTracing(tstate);
3456 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
3457 }
3458 #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\
3459 if (likely(!__Pyx_use_tracing)); else {\
3460 if (nogil) {\
3461 if (CYTHON_TRACE_NOGIL) {\
3462 PyThreadState *tstate;\
3463 PyGILState_STATE state = PyGILState_Ensure();\
3464 tstate = __Pyx_PyThreadState_Current;\
3465 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3466 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3467 }\
3468 PyGILState_Release(state);\
3469 }\
3470 } else {\
3471 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3472 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3473 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3474 }\
3475 }\
3476 if ((1)); else goto_error;\
3477 }
3478 #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\
3479 if (likely(!__Pyx_use_tracing)); else {\
3480 if (nogil) {\
3481 if (CYTHON_TRACE_NOGIL) {\
3482 PyThreadState *tstate;\
3483 PyGILState_STATE state = PyGILState_Ensure();\
3484 tstate = __Pyx_PyThreadState_Current;\
3485 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3486 PyObject *pyvalue = convert_function(cresult);\
3487 if (unlikely(!pyvalue)) {\
3488 if (!PyErr_ExceptionMatches(PyExc_Exception)) goto_error\
3489 PyErr_Clear();\
3490 pyvalue = Py_None; Py_INCREF(Py_None);\
3491 }\
3492 __Pyx_call_return_trace_func(tstate, __pyx_frame, pyvalue);\
3493 Py_DECREF(pyvalue);\
3494 }\
3495 PyGILState_Release(state);\
3496 }\
3497 } else {\
3498 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3499 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3500 PyObject *pyvalue = convert_function(cresult);\
3501 if (unlikely(!pyvalue)) {\
3502 if (!PyErr_ExceptionMatches(PyExc_Exception)) goto_error\
3503 PyErr_Clear();\
3504 pyvalue = Py_None; Py_INCREF(Py_None);\
3505 }\
3506 __Pyx_call_return_trace_func(tstate, __pyx_frame, pyvalue);\
3507 Py_DECREF(pyvalue);\
3508 }\
3509 }\
3510 if ((1)); else goto_error;\
3511 }
3512 #define __Pyx_TraceExceptionUnwind(offset, nogil)\
3513 if (likely(!__Pyx_use_tracing)); else {\
3514 if (nogil) {\
3515 if (CYTHON_TRACE_NOGIL) {\
3516 PyThreadState *tstate;\
3517 PyGILState_STATE state = PyGILState_Ensure();\
3518 tstate = __Pyx_PyThreadState_Current;\
3519 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3520 __Pyx_call_return_trace_func(tstate, __pyx_frame, Py_None);\
3521 }\
3522 PyGILState_Release(state);\
3523 }\
3524 } else {\
3525 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3526 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3527 __Pyx_call_return_trace_func(tstate, __pyx_frame, Py_None);\
3528 }\
3529 }\
3530 }
3531 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno, int skip_event);
3532#if CYTHON_TRACE
3533 CYTHON_UNUSED static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int line);
3534 #define __Pyx_TraceLine(line, offset, nogil, goto_error)\
3535 if (likely(!__Pyx_use_tracing)); else {\
3536 int ret = 0;\
3537 if (nogil) {\
3538 if (CYTHON_TRACE_NOGIL) {\
3539 PyThreadState *tstate;\
3540 PyGILState_STATE state = __Pyx_PyGILState_Ensure();\
3541 tstate = __Pyx_PyThreadState_Current;\
3542 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
3543 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, line);\
3544 }\
3545 __Pyx_PyGILState_Release(state);\
3546 }\
3547 } else {\
3548 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3549 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
3550 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, line);\
3551 }\
3552 }\
3553 if (unlikely(ret)) goto_error;\
3554 }
3555#endif
3556#endif
3557#else
3558 #define __Pyx_TraceDeclarationsFunc
3559 #define __Pyx_TraceDeclarationsGen
3560 #define __Pyx_TraceExceptionDone() {}
3561 #define __Pyx_TraceFrameInit(codeobj) {}
3562 #define __Pyx_TurnOffSysMonitoringInParallel {}
3563 #define __Pyx_PyMonitoring_ExitScope(nogil) {}
3564 #define __Pyx_TraceException(offset, reraised, fresh) {}
3565 #define __Pyx_TraceExceptionUnwind(offset, nogil) {}
3566 #define __Pyx_TraceExceptionHandled(offset) {}
3567 #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error) if ((1)); else goto_error;
3568 #define __Pyx_TraceStartGen __Pyx_TraceStartFunc
3569 #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error) if ((1)); else goto_error;
3570 #define __Pyx_TraceYield(result, offset, goto_error) if ((1)); else goto_error;
3571 #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\
3572 if ((1)); else goto_error;
3573 #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\
3574 if ((1)); else { (void) convert_function; goto_error }
3575#endif
3576#if !CYTHON_TRACE
3577 #define __Pyx_TraceLine(line, offset, nogil, goto_error) if ((1)); else goto_error;
3578#endif
3579
3580/* ImportFrom.export */
3581static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
3582
3583/* RaiseClosureNameError.proto */
3584static void __Pyx_RaiseClosureNameError(const char *varname);
3585
3586/* dict_setdefault.proto (used by FetchCommonType) */
3587static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
3588
3589/* AddModuleRef.proto (used by FetchSharedCythonModule) */
3590#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3) ||\
3591 __PYX_LIMITED_VERSION_HEX < 0x030d0000)
3592 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
3593#else
3594 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
3595#endif
3596
3597/* FetchSharedCythonModule.proto (used by FetchCommonType) */
3598static PyObject *__Pyx_FetchSharedCythonABIModule(void);
3599
3600/* VerifyCachedType.proto (used by FetchCommonType) */
3601static int __Pyx_VerifyCachedType(PyObject *cached_type,
3602 const char *name,
3603 Py_ssize_t expected_basicsize);
3604
3605/* FetchCommonType.proto (used by CommonTypesMetaclass) */
3606static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
3607
3608/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
3609static int __pyx_CommonTypesMetaclass_init(PyObject *module);
3610#define __Pyx_CommonTypesMetaclass_USED
3611
3612/* CythonFunctionPerModule.proto (used by CythonFunctionShared) */
3613#define __Pyx_CyFunction_USED
3614#if CYTHON_OPAQUE_SHARED_TYPES
3615#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)PyObject_GetTypeData((o), __pyx_mstate_global->__pyx_CyFunctionType))
3616#else
3617#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
3618#endif
3619#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
3620#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
3621#define __Pyx_CYFUNCTION_CCLASS 0x04
3622#define __Pyx_CYFUNCTION_COROUTINE 0x08
3623#define __Pyx_CyFunction_GetClosure(f)\
3624 ((__Pyx_as_CyFunctionObject(f))->func_closure)
3625#if CYTHON_COMPILING_IN_LIMITED_API
3626 #define __Pyx__CyFunction_GetClassObj(f)\
3627 ((f)->func_classobj)
3628#else
3629 #define __Pyx__CyFunction_GetClassObj(f)\
3630 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
3631#endif
3632#define __Pyx_CyFunction_GetClassObj(f)\
3633 __Pyx__CyFunction_GetClassObj(__Pyx_as_CyFunctionObject(f))
3634#define __Pyx_CyFunction_SetClassObj(f, classobj)\
3635 __Pyx__CyFunction_SetClassObj(__Pyx_as_CyFunctionObject(f), (classobj))
3636#define __Pyx_CyFunction_Defaults(type, f)\
3637 ((type *)((__Pyx_as_CyFunctionObject(f))->defaults))
3638#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
3639 (__Pyx_as_CyFunctionObject(f))->defaults_getter = (g)
3640typedef struct {
3641#if CYTHON_COMPILING_IN_LIMITED_API
3642#if !CYTHON_OPAQUE_OBJECTS
3643 PyObject_HEAD
3644#endif
3645 PyMethodDef *func_methoddef;
3646 PyObject *func_module;
3647#else
3648 PyCMethodObject func;
3649#endif
3650#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
3651 __pyx_vectorcallfunc func_vectorcall;
3652#endif
3653#if CYTHON_COMPILING_IN_LIMITED_API
3654 PyObject *func_weakreflist;
3655#endif
3656#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
3657 PyObject *func_dict;
3658#endif
3659 PyObject *func_name;
3660 PyObject *func_qualname;
3661 PyObject *func_doc;
3662 PyObject *func_globals;
3663 PyObject *func_code;
3664 PyObject *func_closure;
3665#if CYTHON_COMPILING_IN_LIMITED_API
3666 PyObject *func_classobj;
3667#endif
3668 PyObject *defaults;
3669 int flags;
3670 PyObject *defaults_tuple;
3671 PyObject *defaults_kwdict;
3672 PyObject *(*defaults_getter)(PyObject *);
3673 PyObject *func_annotations;
3674#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
3675 PyObject *func_is_coroutine;
3676#endif
3677} __pyx_CyFunctionObject;
3678#undef __Pyx_CyOrPyCFunction_Check
3679#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
3680#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
3681#define __Pyx_CyFunction_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
3682static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
3683#undef __Pyx_IsSameCFunction
3684#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
3685static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
3686static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
3687 PyTypeObject *defaults_type);
3688static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
3689 PyObject *tuple);
3690static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
3691 PyObject *dict);
3692static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
3693 PyObject *dict);
3694static int __pyx_CyFunction_init(PyObject *module);
3695#if CYTHON_VECTORCALL
3696#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
3697#define __Pyx_CyFunction_func_vectorcall(f) ((f)->func_vectorcall)
3698#else
3699#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
3700#endif
3701#endif
3702
3703/* CallTypeTraverse.proto (used by CythonFunctionShared) */
3704#if !CYTHON_USE_TYPE_SPECS
3705#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
3706#else
3707static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
3708#endif
3709
3710/* PyMethodNew.proto (used by CythonFunctionShared) */
3711static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
3712
3713/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
3714#if CYTHON_VECTORCALL
3715static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
3716#endif
3717
3718/* CythonFunctionShared.proto (used by CythonFunction) */
3719static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
3720 int flags, PyObject* qualname,
3721 PyObject *closure,
3722 PyObject *module, PyObject *globals,
3723 PyObject* code);
3724#if CYTHON_VECTORCALL
3725static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
3726static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
3727static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
3728static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
3729#endif
3730
3731/* CythonFunction.export */
3732static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
3733 int flags, PyObject* qualname,
3734 PyObject *closure,
3735 PyObject *module, PyObject *globals,
3736 PyObject* code);
3737static PyTypeObject *__Pyx_Get_CyFunction_Type(void);
3738
3739/* SliceObject.proto */
3740static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
3741 PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
3742 PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
3743 int has_cstart, int has_cstop, int wraparound);
3744
3745/* PyNumberBinop.proto */
3746#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
3747#define __Pyx_PyNumber_Multiply_object_object(op1, op2) PyNumber_Multiply(op1, op2)
3748#define __Pyx_PyNumber_InPlaceMultiply_object_object(op1, op2) PyNumber_InPlaceMultiply(op1, op2)
3749#else
3750#define __Pyx_PyNumber_Multiply_object_object(op1, op2) __Pyx__PyNumber_Multiply_object_object(op1, op2, 0)
3751#define __Pyx_PyNumber_InPlaceMultiply_object_object(op1, op2) __Pyx__PyNumber_Multiply_object_object(op1, op2, 1)
3752static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_object_object(PyObject *op1, PyObject *op2, int inplace);
3753#endif
3754
3755/* PyNumberBinop.proto */
3756#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
3757#define __Pyx_PyNumber_Add_object_object(op1, op2) PyNumber_Add(op1, op2)
3758#define __Pyx_PyNumber_InPlaceAdd_object_object(op1, op2) PyNumber_InPlaceAdd(op1, op2)
3759#else
3760#define __Pyx_PyNumber_Add_object_object(op1, op2) __Pyx__PyNumber_Add_object_object(op1, op2, 0)
3761#define __Pyx_PyNumber_InPlaceAdd_object_object(op1, op2) __Pyx__PyNumber_Add_object_object(op1, op2, 1)
3762static CYTHON_INLINE PyObject* __Pyx__PyNumber_Add_object_object(PyObject *op1, PyObject *op2, int inplace);
3763#endif
3764
3765/* PyObjectCompare.proto */
3766static CYTHON_INLINE int __Pyx_PyObject_CompareBoolLt_int_object(PyObject *op1, PyObject *op2, int pyop);
3767
3768/* AllocateExtensionType.proto */
3769static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);
3770
3771/* CallSlotAsVectorcall.proto */
3772#if CYTHON_VECTORCALL_TPNEW
3773typedef PyObject * (*__Pyx_tpnewvectorcallfunc)(PyTypeObject* o, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames);
3774static PyObject * __Pyx_CallTpnewAsVectorcall(__Pyx_tpnewvectorcallfunc f, PyTypeObject* o, PyObject *a, PyObject *k);
3775#endif
3776
3777/* CallNewInitFromVectorcall.proto */
3778#if CYTHON_VECTORCALL_TPNEW
3779static PyObject *__Pyx_CallNewInitFromVectorcall(PyTypeObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames);
3780#endif
3781
3782/* CallSlotAsVectorcall.proto */
3783#if CYTHON_VECTORCALL_TPNEW
3784typedef int (*__Pyx_tpinitvectorcallfunc)(PyObject* o, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames);
3785static int __Pyx_CallTpinitAsVectorcall(__Pyx_tpinitvectorcallfunc f, PyObject* o, PyObject *a, PyObject *k);
3786#endif
3787
3788/* CheckTypeForFreelists.proto */
3789#if CYTHON_USE_FREELISTS
3790#if CYTHON_USE_TYPE_SPECS
3791#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp)))
3792#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT
3793#else
3794#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size)))
3795#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)
3796#endif
3797#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\
3798 (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\
3799 (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS)))
3800#endif
3801
3802/* DeallocKeepAlive.proto */
3803#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
3804#define __Pyx_DeallocKeepAliveBegin(o) do {\
3805 _Py_atomic_store_uintptr_relaxed(&(o)->ob_tid, _Py_ThreadId());\
3806 _Py_atomic_store_uint32_relaxed(&(o)->ob_ref_local, 1);\
3807 _Py_atomic_store_ssize_relaxed(&(o)->ob_ref_shared, 0);\
3808 } while (0)
3809#define __Pyx_DeallocKeepAliveEnd(o)\
3810 _Py_atomic_store_uint32_relaxed(&(o)->ob_ref_local, 0)
3811#else
3812#define __Pyx_DeallocKeepAliveBegin(o) Py_SET_REFCNT(o, Py_REFCNT(o) + 1)
3813#define __Pyx_DeallocKeepAliveEnd(o) Py_SET_REFCNT(o, Py_REFCNT(o) - 1)
3814#endif
3815
3816/* DefaultPlacementNew.proto */
3817#include <new>
3818template<typename T>
3819void __Pyx_default_placement_construct(T* x) {
3820 new (static_cast<void*>(x)) T();
3821}
3822
3823/* PyObjectCallMethod0.proto (used by PyType_Ready) */
3824static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
3825
3826/* GetTypeDictOffset.proto (used by ValidateBasesTuple) */
3827#if !CYTHON_USE_TYPE_SLOTS
3828CYTHON_UNUSED static Py_ssize_t __Pyx_GetTypeDictOffset(PyObject *tp, int require_cython_valid_result);
3829#endif
3830
3831/* ValidateBasesTuple.proto (used by PyType_Ready) */
3832#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
3833static int __Pyx_validate_bases_tuple(const char *type_name, int has_dictoffset, PyObject *bases);
3834#endif
3835
3836/* PyType_Ready.export */
3837CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
3838
3839/* LimitedApiGetTypeTypeDict.proto (used by DelItemOnTypeDict) */
3840#if CYTHON_COMPILING_IN_LIMITED_API
3841static PyObject *__Pyx_GetTypeTypeDict(PyTypeObject *tp);
3842#endif
3843
3844/* DelItemOnTypeDict.proto (used by SetupReduce) */
3845#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)
3846
3847/* DelItemOnTypeDict.export */
3848static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
3849
3850/* SetItemOnTypeDict.proto (used by SetupReduce) */
3851#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
3852
3853/* SetItemOnTypeDict.export */
3854static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
3855
3856/* SetupReduce.export */
3857static int __Pyx_setup_reduce(PyObject* type_obj);
3858
3859/* GetVTable.proto (used by MergeVTables) */
3860static int __Pyx_GetVtable(PyTypeObject *type, void** table);
3861
3862/* MergeVTables.proto (used by SetVTable) */
3863static int __Pyx_MergeVtables(PyTypeObject *type);
3864
3865/* SetVTable.export */
3866static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
3867
3868/* ApplySequenceOrMappingFlag.proto */
3869#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
3870int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence);
3871#else
3872#define __Pyx_ApplySequenceOrMappingFlag(tp, is_sequence) (0)
3873#endif
3874
3875/* TypeImport.proto */
3876#ifndef __PYX_HAVE_RT_ImportType_proto_3_3_0
3877#define __PYX_HAVE_RT_ImportType_proto_3_3_0
3878#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
3879#include <stdalign.h>
3880#endif
3881#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
3882#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
3883#else
3884#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
3885#endif
3886enum __Pyx_ImportType_CheckSize_3_3_0 {
3887 __Pyx_ImportType_CheckSize_Error_3_3_0 = 0,
3888 __Pyx_ImportType_CheckSize_Warn_3_3_0 = 1,
3889 __Pyx_ImportType_CheckSize_Ignore_3_3_0 = 2
3890};
3891static 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);
3892#endif
3893
3894/* CLineInTraceback.proto (used by AddTraceback) */
3895#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
3896static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
3897#else
3898#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
3899#endif
3900
3901/* CodeObjectCache.proto (used by AddTraceback) */
3902#if CYTHON_COMPILING_IN_LIMITED_API
3903typedef PyObject __Pyx_CachedCodeObjectType;
3904#else
3905typedef PyCodeObject __Pyx_CachedCodeObjectType;
3906#endif
3907typedef struct {
3908 __Pyx_CachedCodeObjectType* code_object;
3909 int code_line;
3910} __Pyx_CodeObjectCacheEntry;
3911struct __Pyx_CodeObjectCache {
3912 int count;
3913 int max_count;
3914 __Pyx_CodeObjectCacheEntry* entries;
3915 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
3916 __pyx_atomic_int_type accessor_count;
3917 #endif
3918};
3919static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
3920static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
3921static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
3922
3923/* AddTraceback.proto */
3924static void __Pyx_AddTraceback(const char *funcname, int c_line,
3925 int py_line, const char *filename);
3926
3927/* BufferStructDeclare.proto */
3928typedef struct {
3929 Py_ssize_t shape, strides, suboffsets;
3930} __Pyx_Buf_DimInfo;
3931typedef struct {
3932 size_t refcount;
3933 Py_buffer pybuffer;
3934} __Pyx_Buffer;
3935typedef struct {
3936 __Pyx_Buffer *rcbuffer;
3937 char *data;
3938 __Pyx_Buf_DimInfo diminfo[8];
3939} __Pyx_LocalBuf_ND;
3940
3941/* MemviewRefcount.proto */
3942static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
3943 __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
3944static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
3945 __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
3946#define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
3947#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
3948#define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
3949static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
3950static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);
3951
3952/* MemviewSliceIsContig.proto */
3953static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
3954
3955/* OverlappingSlices.proto */
3956static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
3957 __Pyx_memviewslice *slice2,
3958 int ndim, size_t itemsize);
3959
3960/* MemviewSliceInit.proto */
3961static int __Pyx_init_memviewslice(
3962 struct __pyx_memoryview_obj *memview,
3963 int ndim,
3964 __Pyx_memviewslice *memviewslice,
3965 int memview_is_new_reference);
3966
3967/* SliceMemoryviewSlice.proto */
3968static CYTHON_INLINE int __pyx_memoryview_slice_memviewslice(
3969 __Pyx_memviewslice *dst,
3970 Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
3971 int dim, int new_ndim, int *suboffset_dim,
3972 Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step,
3973 int have_start, int have_stop, int have_step,
3974 int is_slice);
3975
3976/* MemviewDtypeToObject.proto */
3977static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
3978static CYTHON_INLINE int __pyx_memview_set_double(char *itemp, PyObject *obj);
3979
3980/* IsLittleEndian.proto (used by BufferFormatCheck) */
3981static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
3982
3983/* BufferFormatCheck.proto (used by MemviewSliceValidateAndInit) */
3984static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
3985static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
3986 __Pyx_BufFmt_StackElem* stack,
3987 const __Pyx_TypeInfo* type);
3988
3989/* TypeInfoCompare.proto (used by MemviewSliceValidateAndInit) */
3990static int __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b);
3991
3992/* MemviewSliceValidateAndInit.export */
3993static int __Pyx_ValidateAndInit_memviewslice(
3994 int *axes_specs,
3995 int c_or_f_flag,
3996 int buf_flags,
3997 int ndim,
3998 const __Pyx_TypeInfo *dtype,
3999 __Pyx_BufFmt_StackElem stack[],
4000 __Pyx_memviewslice *memviewslice,
4001 PyObject *original_obj);
4002
4003/* ObjectToMemviewSlice.proto */
4004static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
4005
4006/* PyObjectCallMethod1.proto */
4007static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
4008
4009/* CheckUnpickleChecksumError.export */
4010static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members);
4011
4012/* RealImag.proto */
4013#if CYTHON_CCOMPLEX
4014 #ifdef __cplusplus
4015 #define __Pyx_CREAL(z) ((z).real())
4016 #define __Pyx_CIMAG(z) ((z).imag())
4017 #else
4018 #define __Pyx_CREAL(z) (__real__(z))
4019 #define __Pyx_CIMAG(z) (__imag__(z))
4020 #endif
4021#else
4022 #define __Pyx_CREAL(z) ((z).real)
4023 #define __Pyx_CIMAG(z) ((z).imag)
4024#endif
4025#if defined(__cplusplus) && CYTHON_CCOMPLEX\
4026 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
4027 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
4028 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
4029#else
4030 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
4031 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
4032#endif
4033
4034/* Arithmetic.proto */
4035#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
4036 #define __Pyx_c_eq_float(a, b) ((a)==(b))
4037 #define __Pyx_c_sum_float(a, b) ((a)+(b))
4038 #define __Pyx_c_diff_float(a, b) ((a)-(b))
4039 #define __Pyx_c_prod_float(a, b) ((a)*(b))
4040 #define __Pyx_c_quot_float(a, b) ((a)/(b))
4041 #define __Pyx_c_neg_float(a) (-(a))
4042 #ifdef __cplusplus
4043 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
4044 #define __Pyx_c_conj_float(z) (::std::conj(z))
4045 #if 1
4046 #define __Pyx_c_abs_float(z) (::std::abs(z))
4047 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
4048 #endif
4049 #else
4050 #define __Pyx_c_is_zero_float(z) ((z)==0)
4051 #define __Pyx_c_conj_float(z) (conjf(z))
4052 #if 1
4053 #define __Pyx_c_abs_float(z) (cabsf(z))
4054 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
4055 #endif
4056 #endif
4057#else
4058 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
4059 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
4060 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
4061 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
4062 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
4063 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
4064 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
4065 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
4066 #if 1
4067 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
4068 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
4069 #endif
4070#endif
4071
4072/* Arithmetic.proto */
4073#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
4074 #define __Pyx_c_eq_double(a, b) ((a)==(b))
4075 #define __Pyx_c_sum_double(a, b) ((a)+(b))
4076 #define __Pyx_c_diff_double(a, b) ((a)-(b))
4077 #define __Pyx_c_prod_double(a, b) ((a)*(b))
4078 #define __Pyx_c_quot_double(a, b) ((a)/(b))
4079 #define __Pyx_c_neg_double(a) (-(a))
4080 #ifdef __cplusplus
4081 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
4082 #define __Pyx_c_conj_double(z) (::std::conj(z))
4083 #if 1
4084 #define __Pyx_c_abs_double(z) (::std::abs(z))
4085 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
4086 #endif
4087 #else
4088 #define __Pyx_c_is_zero_double(z) ((z)==0)
4089 #define __Pyx_c_conj_double(z) (conj(z))
4090 #if 1
4091 #define __Pyx_c_abs_double(z) (cabs(z))
4092 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
4093 #endif
4094 #endif
4095#else
4096 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
4097 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
4098 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
4099 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
4100 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
4101 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
4102 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
4103 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
4104 #if 1
4105 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
4106 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
4107 #endif
4108#endif
4109
4110/* Arithmetic.proto */
4111#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
4112 #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
4113 #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
4114 #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
4115 #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
4116 #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
4117 #define __Pyx_c_neg_long__double(a) (-(a))
4118 #ifdef __cplusplus
4119 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
4120 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
4121 #if 1
4122 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
4123 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
4124 #endif
4125 #else
4126 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
4127 #define __Pyx_c_conj_long__double(z) (conjl(z))
4128 #if 1
4129 #define __Pyx_c_abs_long__double(z) (cabsl(z))
4130 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
4131 #endif
4132 #endif
4133#else
4134 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
4135 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
4136 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
4137 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
4138 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
4139 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
4140 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
4141 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
4142 #if 1
4143 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
4144 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
4145 #endif
4146#endif
4147
4148/* MemviewSliceCopy.proto */
4149static __Pyx_memviewslice
4150__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
4151 const char *mode, int ndim,
4152 Py_ssize_t sizeof_dtype, int contig_flag,
4153 int dtype_is_object);
4154
4155/* PyObjectVectorcallKwds.proto (used by PyObjectVectorcallMethodKwds) */
4156#if CYTHON_VECTORCALL
4157#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
4158CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
4159#else
4160#define __Pyx_Object_VectorcallKwds __Pyx_PyObject_FastCallDict
4161CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n);
4162CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i);
4163#endif
4164
4165/* PyObjectVectorcallMethodKwds.proto (used by CIntToPy) */
4166#if CYTHON_VECTORCALL
4167#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
4168#else
4169static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
4170#endif
4171
4172/* CIntToPy.proto */
4173static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value);
4174
4175/* CIntFromPy.proto */
4176static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
4177
4178/* CIntFromPy.proto */
4179static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
4180
4181/* CIntToPy.proto */
4182static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
4183
4184/* UpdateUnpickledDict.export */
4185static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index);
4186
4187/* CheckUnpickleChecksum.proto */
4188static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members);
4189
4190/* CIntFromPy.proto */
4191static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *);
4192
4193/* GetRuntimeVersion.proto */
4194#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
4195static unsigned long __Pyx_cached_runtime_version = 0;
4196static void __Pyx_init_runtime_version(void);
4197#else
4198#define __Pyx_init_runtime_version()
4199#endif
4200static unsigned long __Pyx_get_runtime_version(void);
4201
4202/* CheckBinaryVersion.proto */
4203static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
4204
4205/* DecompressString.proto */
4206static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
4207
4208/* DecompressString_LZSS.proto */
4209static PyObject *__Pyx_DecompressString_LZSS(const char *s, size_t compressed_length, size_t uncompressed_length);
4210
4211/* MultiPhaseInitModuleState.proto */
4212#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
4213#include <stdlib.h>
4214static PyObject *__Pyx_State_FindModule(void*);
4215static int __Pyx_State_AddModule(PyObject* module, void*);
4216static int __Pyx_State_RemoveModule(void*);
4217#elif CYTHON_USE_MODULE_STATE
4218#define __Pyx_State_FindModule PyState_FindModule
4219#define __Pyx_State_AddModule PyState_AddModule
4220#define __Pyx_State_RemoveModule PyState_RemoveModule
4221#endif
4222
4223/* #### Code section: module_declarations ### */
4224/* CythonABIVersion.proto */
4225#if CYTHON_COMPILING_IN_LIMITED_API
4226 #if CYTHON_VECTORCALL
4227 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
4228 #else
4229 #define __PYX_VECTORCALL_ABI_SUFFIX
4230 #endif
4231 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
4232#else
4233 #define __PYX_LIMITED_ABI_SUFFIX
4234#endif
4235#if __PYX_HAS_PY_AM_SEND == 1
4236 #define __PYX_AM_SEND_ABI_SUFFIX
4237#elif __PYX_HAS_PY_AM_SEND == 2
4238 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
4239#else
4240 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
4241#endif
4242#ifndef __PYX_MONITORING_ABI_SUFFIX
4243 #define __PYX_MONITORING_ABI_SUFFIX
4244#endif
4245#if CYTHON_USE_TP_FINALIZE
4246 #define __PYX_TP_FINALIZE_ABI_SUFFIX
4247#else
4248 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
4249#endif
4250#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
4251 #define __PYX_FREELISTS_ABI_SUFFIX
4252#else
4253 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
4254#endif
4255#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
4256 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
4257#else
4258 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
4259#endif
4260#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
4261#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
4262#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
4263
4264static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
4265static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
4266static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
4267static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
4268static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
4269static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_indices, PyObject *__pyx_v_value); /* proto*/
4270static PyObject *__pyx_memoryview_setitem_indexed1(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
4271static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
4272static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
4273static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
4274static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
4275static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
4276static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
4277static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4278static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4279static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4280static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4281static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4282static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4283static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4284static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4285static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4286static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4287static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self); /* proto*/
4288static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
4289static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
4290static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
4291static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
4292static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
4293static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
4294static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self); /* proto*/
4295static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self); /* proto*/
4296static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self); /* proto*/
4297static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self); /* proto*/
4298static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self); /* proto*/
4299static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self); /* proto*/
4300static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self); /* proto*/
4301static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4302static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4303static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4304static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4305static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4306static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4307static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4308static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4309static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4310static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4311static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self); /* proto*/
4312static void __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
4313
4314/* Module declarations from "cython.view" */
4315
4316/* Module declarations from "cython.dataclasses" */
4317
4318/* Module declarations from "cython" */
4319
4320/* Module declarations from "libc.string" */
4321
4322/* Module declarations from "libc.stdio" */
4323
4324/* Module declarations from "__builtin__" */
4325
4326/* Module declarations from "cpython.type" */
4327
4328/* Module declarations from "cpython" */
4329
4330/* Module declarations from "cpython.object" */
4331
4332/* Module declarations from "cpython.ref" */
4333
4334/* Module declarations from "numpy" */
4335
4336/* Module declarations from "numpy" */
4337
4338/* Module declarations from "BoundaryConditions" */
4339static PyObject *__pyx_collections_abc_Sequence = 0;
4340static PyObject *generic = 0;
4341static PyObject *strided = 0;
4342static PyObject *indirect = 0;
4343static PyObject *contiguous = 0;
4344static PyObject *indirect_contiguous = 0;
4345static int __pyx_memoryview_thread_locks_used;
4346static PyThread_type_lock __pyx_memoryview_thread_locks[8];
4347static PyObject *__pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(struct __pyx_obj_18BoundaryConditions_BC_Base *, PyObject *); /*proto*/
4348static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
4349static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char const *, char *); /*proto*/
4350static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo const *); /*proto*/
4351static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
4352static int __pyx_memoryview_err_invalid_index(PyObject *); /*proto*/
4353static PyObject *_unellipsify_index_tuple(PyObject *, int); /*proto*/
4354static PyObject *_unellipsify(PyObject *, int); /*proto*/
4355static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
4356static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
4357static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
4358static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
4359static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), __pyx_memoryview_to_dtype_func_type, int); /*proto*/
4360static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
4361static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
4362static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
4363static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
4364static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
4365static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
4366static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
4367static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
4368static size_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
4369static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
4370static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
4371static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
4372static int __pyx_memoryview_err_dim(PyObject *, char const *, int); /*proto*/
4373static int __pyx_memoryview_err(PyObject *, char const *); /*proto*/
4374static int __pyx_memoryview_err_no_memory(void); /*proto*/
4375static int __pyx_memoryview_err_ValueError(char const *); /*proto*/
4376static int __pyx_memoryview_err_IndexError(char const *, Py_ssize_t); /*proto*/
4377static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
4378static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
4379static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
4380static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
4381static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
4382static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
4383static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
4384static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
4385/* #### Code section: typeinfo ### */
4386static const __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
4387/* #### Code section: before_global_var ### */
4388#define __Pyx_MODULE_NAME "BoundaryConditions"
4389extern int __pyx_module_is_main_BoundaryConditions;
4390int __pyx_module_is_main_BoundaryConditions = 0;
4391
4392/* Implementation of "BoundaryConditions" */
4393/* #### Code section: global_var ### */
4394static PyObject *__pyx_builtin_sum;
4395static PyObject *__pyx_builtin___import__;
4396static PyObject *__pyx_builtin_enumerate;
4397static PyObject *__pyx_builtin_Ellipsis;
4398static PyObject *__pyx_builtin_id;
4399/* #### Code section: string_decls ### */
4400static const char __pyx_k_c[] = "c";
4401static const char __pyx_k_name[] = "name";
4402static const char __pyx_k_fortran[] = "fortran";
4403static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
4404static const char __pyx_k_Cannot_index_with_type_200U[] = "Cannot index with type \047%.200U\047";
4405static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
4406static const char __pyx_k_BC_type_Shape__b_or_ct_name_nd[] = "BC_type, Shape, _b_or, ct, name, nd";
4407static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
4408static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
4409static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
4410static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
4411static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
4412static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
4413static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %zd)";
4414static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
4415static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %zd and %zd)";
4416/* #### Code section: decls ### */
4417static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
4418static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
4419static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4420static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4421static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4422static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
4423static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
4424static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
4425static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
4426static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4427static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
4428static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
4429static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
4430static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
4431static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
4432static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4433static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
4434static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
4435static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
4436static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4437static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4438static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4439static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4440static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4441static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4442static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4443static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4444static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4445static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4446static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4447static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4448static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4449static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4450static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4451static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4452static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4453static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4454static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4455static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4456static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4457static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
4458static int __pyx_pf_18BoundaryConditions_7BC_Base___init__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_name, PyObject *__pyx_v_b_or, PyObject *__pyx_v_b_i, PyObject *__pyx_v_nd); /* proto */
4459static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2getContext(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_context); /* proto */
4460static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4461static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4462static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4463static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4464static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4465static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4466static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4467static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4468static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4469static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4470static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4471static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4472static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4473static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4474static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
4475static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
4476static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
4477static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
4478static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
4479static PyObject *__pyx_pf_18BoundaryConditions_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
4480static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n); /* proto */
4481static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4482static PyObject *__pyx_pf_18BoundaryConditions_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
4483static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n); /* proto */
4484static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_a0, PyObject *__pyx_v_a); /* proto */
4485static PyObject *__pyx_pf_18BoundaryConditions_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
4486static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n); /* proto */
4487static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_t1, PyObject *__pyx_v_value); /* proto */
4488static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
4489static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4490static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
4491static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
4492static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4493static PyObject *__pyx_pf_18BoundaryConditions___pyx_unpickle_BC_Base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
4494static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions_BC_Base(PyObject *o,
4495#if CYTHON_VECTORCALL_TPNEW
4496 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4497#else
4498 PyObject *a, PyObject *k
4499#endif
4500); /*proto*/
4501static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base(PyTypeObject *t,
4502#if CYTHON_VECTORCALL_TPNEW
4503 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4504#else
4505 PyObject *a, PyObject *k
4506#endif
4507); /*proto*/
4508#if CYTHON_VECTORCALL_TPNEW
4509static PyObject *__pyx_tp_new_18BoundaryConditions_BC_Base(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4510#endif
4511#if !CYTHON_VECTORCALL_TPNEW
4512#define __pyx_tp_new_18BoundaryConditions_BC_Base __pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base
4513#endif
4514#if CYTHON_VECTORCALL_TPNEW
4515static PyObject *__pyx_tp_vectorcall_18BoundaryConditions_BC_Base(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4516#endif
4517#if CYTHON_VECTORCALL_TPNEW
4518static int __pyx_tp_init_18BoundaryConditions_BC_Base(PyObject *o, PyObject *args, PyObject *kwds); /*proto*/
4519#endif
4520#if !CYTHON_VECTORCALL_TPNEW
4521#define __pyx_tp_init_18BoundaryConditions_BC_Base __pyx_pw_18BoundaryConditions_7BC_Base_1__init__
4522#endif
4523static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions_BoundaryCondition(PyObject *o,
4524#if CYTHON_VECTORCALL_TPNEW
4525 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4526#else
4527 PyObject *a, PyObject *k
4528#endif
4529); /*proto*/
4530static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition(PyTypeObject *t,
4531#if CYTHON_VECTORCALL_TPNEW
4532 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4533#else
4534 PyObject *a, PyObject *k
4535#endif
4536); /*proto*/
4537#if CYTHON_VECTORCALL_TPNEW
4538static PyObject *__pyx_tp_new_18BoundaryConditions_BoundaryCondition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4539#endif
4540#if !CYTHON_VECTORCALL_TPNEW
4541#define __pyx_tp_new_18BoundaryConditions_BoundaryCondition __pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition
4542#endif
4543#if CYTHON_VECTORCALL_TPNEW
4544static PyObject *__pyx_tp_vectorcall_18BoundaryConditions_BoundaryCondition(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4545#endif
4546#if CYTHON_VECTORCALL_TPNEW
4547static int __pyx_tp_init_18BoundaryConditions_BoundaryCondition(PyObject *o, PyObject *args, PyObject *kwds); /*proto*/
4548#endif
4549#if !CYTHON_VECTORCALL_TPNEW
4550#define __pyx_tp_init_18BoundaryConditions_BoundaryCondition __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__
4551#endif
4552static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_defaults(PyObject *o,
4553#if CYTHON_VECTORCALL_TPNEW
4554 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4555#else
4556 PyObject *a, PyObject *k
4557#endif
4558); /*proto*/
4559static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults(PyTypeObject *t,
4560#if CYTHON_VECTORCALL_TPNEW
4561 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4562#else
4563 PyObject *a, PyObject *k
4564#endif
4565); /*proto*/
4566#if CYTHON_VECTORCALL_TPNEW
4567static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4568#endif
4569#if !CYTHON_VECTORCALL_TPNEW
4570#define __pyx_tp_new_18BoundaryConditions___pyx_defaults __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults
4571#endif
4572#if CYTHON_VECTORCALL_TPNEW
4573static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_defaults(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4574#endif
4575static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o,
4576#if CYTHON_VECTORCALL_TPNEW
4577 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4578#else
4579 PyObject *a, PyObject *k
4580#endif
4581); /*proto*/
4582static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t,
4583#if CYTHON_VECTORCALL_TPNEW
4584 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4585#else
4586 PyObject *a, PyObject *k
4587#endif
4588); /*proto*/
4589#if CYTHON_VECTORCALL_TPNEW
4590static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4591#endif
4592#if !CYTHON_VECTORCALL_TPNEW
4593#define __pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC
4594#endif
4595#if CYTHON_VECTORCALL_TPNEW
4596static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4597#endif
4598static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o,
4599#if CYTHON_VECTORCALL_TPNEW
4600 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4601#else
4602 PyObject *a, PyObject *k
4603#endif
4604); /*proto*/
4605static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t,
4606#if CYTHON_VECTORCALL_TPNEW
4607 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4608#else
4609 PyObject *a, PyObject *k
4610#endif
4611); /*proto*/
4612#if CYTHON_VECTORCALL_TPNEW
4613static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4614#endif
4615#if !CYTHON_VECTORCALL_TPNEW
4616#define __pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC
4617#endif
4618#if CYTHON_VECTORCALL_TPNEW
4619static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4620#endif
4621static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o,
4622#if CYTHON_VECTORCALL_TPNEW
4623 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4624#else
4625 PyObject *a, PyObject *k
4626#endif
4627); /*proto*/
4628static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t,
4629#if CYTHON_VECTORCALL_TPNEW
4630 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4631#else
4632 PyObject *a, PyObject *k
4633#endif
4634); /*proto*/
4635#if CYTHON_VECTORCALL_TPNEW
4636static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4637#endif
4638#if !CYTHON_VECTORCALL_TPNEW
4639#define __pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp
4640#endif
4641#if CYTHON_VECTORCALL_TPNEW
4642static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4643#endif
4644static PyObject *__pyx_tp_new__initialisation_array(PyObject *o,
4645#if CYTHON_VECTORCALL_TPNEW
4646 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4647#else
4648 PyObject *a, PyObject *k
4649#endif
4650); /*proto*/
4651static PyObject *__pyx_tp_new_vectorcall_array(PyTypeObject *t,
4652#if CYTHON_VECTORCALL_TPNEW
4653 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4654#else
4655 PyObject *a, PyObject *k
4656#endif
4657); /*proto*/
4658#if CYTHON_VECTORCALL_TPNEW
4659static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4660#endif
4661#if !CYTHON_VECTORCALL_TPNEW
4662#define __pyx_tp_new_array __pyx_tp_new_vectorcall_array
4663#endif
4664#if CYTHON_VECTORCALL_TPNEW
4665static PyObject *__pyx_tp_vectorcall_array(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4666#endif
4667static PyObject *__pyx_tp_new__initialisation_Enum(PyObject *o,
4668#if CYTHON_VECTORCALL_TPNEW
4669 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4670#else
4671 PyObject *a, PyObject *k
4672#endif
4673); /*proto*/
4674static PyObject *__pyx_tp_new_vectorcall_Enum(PyTypeObject *t,
4675#if CYTHON_VECTORCALL_TPNEW
4676 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4677#else
4678 PyObject *a, PyObject *k
4679#endif
4680); /*proto*/
4681#if CYTHON_VECTORCALL_TPNEW
4682static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4683#endif
4684#if !CYTHON_VECTORCALL_TPNEW
4685#define __pyx_tp_new_Enum __pyx_tp_new_vectorcall_Enum
4686#endif
4687#if CYTHON_VECTORCALL_TPNEW
4688static PyObject *__pyx_tp_vectorcall_Enum(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4689#endif
4690#if CYTHON_VECTORCALL_TPNEW
4691static int __pyx_tp_init_Enum(PyObject *o, PyObject *args, PyObject *kwds); /*proto*/
4692#endif
4693#if !CYTHON_VECTORCALL_TPNEW
4694#define __pyx_tp_init_Enum __pyx_MemviewEnum___init__
4695#endif
4696static PyObject *__pyx_tp_new__initialisation_memoryview(PyObject *o,
4697#if CYTHON_VECTORCALL_TPNEW
4698 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4699#else
4700 PyObject *a, PyObject *k
4701#endif
4702); /*proto*/
4703static PyObject *__pyx_tp_new_vectorcall_memoryview(PyTypeObject *t,
4704#if CYTHON_VECTORCALL_TPNEW
4705 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4706#else
4707 PyObject *a, PyObject *k
4708#endif
4709); /*proto*/
4710#if CYTHON_VECTORCALL_TPNEW
4711static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4712#endif
4713#if !CYTHON_VECTORCALL_TPNEW
4714#define __pyx_tp_new_memoryview __pyx_tp_new_vectorcall_memoryview
4715#endif
4716#if CYTHON_VECTORCALL_TPNEW
4717static PyObject *__pyx_tp_vectorcall_memoryview(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4718#endif
4719static PyObject *__pyx_tp_new__initialisation__memoryviewslice(PyObject *o,
4720#if CYTHON_VECTORCALL_TPNEW
4721 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4722#else
4723 PyObject *a, PyObject *k
4724#endif
4725); /*proto*/
4726static PyObject *__pyx_tp_new_vectorcall__memoryviewslice(PyTypeObject *t,
4727#if CYTHON_VECTORCALL_TPNEW
4728 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
4729#else
4730 PyObject *a, PyObject *k
4731#endif
4732); /*proto*/
4733#if CYTHON_VECTORCALL_TPNEW
4734static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4735#endif
4736#if !CYTHON_VECTORCALL_TPNEW
4737#define __pyx_tp_new__memoryviewslice __pyx_tp_new_vectorcall__memoryviewslice
4738#endif
4739#if CYTHON_VECTORCALL_TPNEW
4740static PyObject *__pyx_tp_vectorcall__memoryviewslice(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames); /*proto*/
4741#endif
4742/* #### Code section: late_includes ### */
4743/* #### Code section: module_state ### */
4744/* SmallCodeConfig */
4745#ifndef CYTHON_SMALL_CODE
4746#if defined(__clang__)
4747 #define CYTHON_SMALL_CODE
4748#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
4749 #define CYTHON_SMALL_CODE __attribute__((cold))
4750#else
4751 #define CYTHON_SMALL_CODE
4752#endif
4753#endif
4754
4755#ifdef __cplusplus
4756namespace {
4757 #endif
4758 typedef struct {
4759 PyObject *__pyx_d;
4760 PyObject *__pyx_b;
4761 PyObject *__pyx_cython_runtime;
4762 PyObject *__pyx_empty_tuple;
4763 PyObject *__pyx_empty_bytes;
4764 PyObject *__pyx_empty_unicode;
4765 PyTypeObject *__pyx_ptype_7cpython_4type_type;
4766 PyTypeObject *__pyx_ptype_5numpy_dtype;
4767 PyTypeObject *__pyx_ptype_5numpy_flatiter;
4768 PyTypeObject *__pyx_ptype_5numpy_broadcast;
4769 PyTypeObject *__pyx_ptype_5numpy_ndarray;
4770 PyTypeObject *__pyx_ptype_5numpy_generic;
4771 PyTypeObject *__pyx_ptype_5numpy_number;
4772 PyTypeObject *__pyx_ptype_5numpy_integer;
4773 PyTypeObject *__pyx_ptype_5numpy_signedinteger;
4774 PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
4775 PyTypeObject *__pyx_ptype_5numpy_inexact;
4776 PyTypeObject *__pyx_ptype_5numpy_floating;
4777 PyTypeObject *__pyx_ptype_5numpy_complexfloating;
4778 PyTypeObject *__pyx_ptype_5numpy_flexible;
4779 PyTypeObject *__pyx_ptype_5numpy_character;
4780 PyTypeObject *__pyx_ptype_5numpy_ufunc;
4781 PyObject *__pyx_type_18BoundaryConditions_BC_Base;
4782 PyObject *__pyx_type_18BoundaryConditions_BoundaryCondition;
4783 PyObject *__pyx_type_18BoundaryConditions___pyx_defaults;
4784 PyObject *__pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC;
4785 PyObject *__pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
4786 PyObject *__pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
4787 PyObject *__pyx_type___pyx_array;
4788 PyObject *__pyx_type___pyx_MemviewEnum;
4789 PyObject *__pyx_type___pyx_memoryview;
4790 PyObject *__pyx_type___pyx_memoryviewslice;
4791 PyTypeObject *__pyx_ptype_18BoundaryConditions_BC_Base;
4792 PyTypeObject *__pyx_ptype_18BoundaryConditions_BoundaryCondition;
4793 PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_defaults;
4794 PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC;
4795 PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
4796 PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
4797 PyTypeObject *__pyx_array_type;
4798 PyTypeObject *__pyx_MemviewEnum_type;
4799 PyTypeObject *__pyx_memoryview_type;
4800 PyTypeObject *__pyx_memoryviewslice_type;
4801 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
4802 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
4803 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
4804 PyObject *__pyx_slice[1];
4805 PyObject *__pyx_tuple[3];
4806 PyObject *__pyx_codeobj_tab[34];
4807 PyObject *__pyx_string_tab[172];
4808 PyObject *__pyx_number_tab[5];
4809/* #### Code section: module_state_contents ### */
4810/* PyFrozenDict.module_state_decls */
4811#if CYTHON_COMPILING_IN_LIMITED_API
4812PyObject *__Pyx_PyFrozenDictType;
4813#endif
4814
4815/* CommonTypesMetaclass.module_state_decls */
4816PyTypeObject *__pyx_CommonTypesMetaclassType;
4817
4818/* CachedMethodType.module_state_decls */
4819#if CYTHON_COMPILING_IN_LIMITED_API
4820PyObject *__Pyx_CachedMethodType;
4821#endif
4822
4823/* CythonFunctionPerModule.module_state_decls */
4824PyTypeObject *__pyx_CyFunctionType;
4825
4826
4827#if CYTHON_USE_FREELISTS
4828struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_freelist_18BoundaryConditions___pyx_scope_struct__setConstantBC[8];
4829int __pyx_freecount_18BoundaryConditions___pyx_scope_struct__setConstantBC;
4830#endif
4831
4832#if CYTHON_USE_FREELISTS
4833struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_freelist_18BoundaryConditions___pyx_scope_struct_1_setLinearBC[8];
4834int __pyx_freecount_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
4835#endif
4836
4837#if CYTHON_USE_FREELISTS
4838struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_freelist_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp[8];
4839int __pyx_freecount_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
4840#endif
4841/* CodeObjectCache.module_state_decls */
4842struct __Pyx_CodeObjectCache __pyx_code_cache;
4843
4844/* #### Code section: module_state_end ### */
4845} __pyx_mstatetype;
4846#ifdef __cplusplus
4847} /* anonymous namespace */
4848#endif
4849
4850#if CYTHON_USE_MODULE_STATE
4851#ifdef __cplusplus
4852namespace {
4853extern struct PyModuleDef __pyx_moduledef;
4854} /* anonymous namespace */
4855#else
4856static struct PyModuleDef __pyx_moduledef;
4857#endif
4858
4859#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
4860
4861#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
4862#else
4863static __pyx_mstatetype __pyx_mstate_global_static =
4864#ifdef __cplusplus
4865 {};
4866#else
4867 {0};
4868#endif
4869static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
4870#endif
4871/* #### Code section: constant_name_defines ### */
4872#define __pyx_kp_u_at_0x __pyx_string_tab[0]
4873#define __pyx_kp_u_object __pyx_string_tab[1]
4874#define __pyx_kp_u_tree_fragment __pyx_string_tab[2]
4875#define __pyx_kp_u__3 __pyx_string_tab[3]
4876#define __pyx_kp_u__2 __pyx_string_tab[4]
4877#define __pyx_kp_u_MemoryView_of __pyx_string_tab[5]
4878#define __pyx_kp_u_contiguous_and_direct __pyx_string_tab[6]
4879#define __pyx_kp_u_contiguous_and_indirect __pyx_string_tab[7]
4880#define __pyx_kp_u_strided_and_direct_or_indirect __pyx_string_tab[8]
4881#define __pyx_kp_u_strided_and_direct __pyx_string_tab[9]
4882#define __pyx_kp_u_strided_and_indirect __pyx_string_tab[10]
4883#define __pyx_kp_u__4 __pyx_string_tab[11]
4884#define __pyx_kp_u_ __pyx_string_tab[12]
4885#define __pyx_kp_u_Cannot_assign_to_read_only_memor __pyx_string_tab[13]
4886#define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_string_tab[14]
4887#define __pyx_kp_u_Invalid_shape_in_axis __pyx_string_tab[15]
4888#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[16]
4889#define __pyx_kp_u_Shape_or_nd_must_be_passed_to_BC __pyx_string_tab[17]
4890#define __pyx_kp_u_add_note __pyx_string_tab[18]
4891#define __pyx_kp_u_collections_abc __pyx_string_tab[19]
4892#define __pyx_kp_u_disable __pyx_string_tab[20]
4893#define __pyx_kp_u_enable __pyx_string_tab[21]
4894#define __pyx_kp_u_gc __pyx_string_tab[22]
4895#define __pyx_kp_u_isenabled __pyx_string_tab[23]
4896#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[24]
4897#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[25]
4898#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[26]
4899#define __pyx_kp_u_proteus_BoundaryConditions_pxd __pyx_string_tab[27]
4900#define __pyx_kp_u_proteus_BoundaryConditions_py __pyx_string_tab[28]
4901#define __pyx_kp_u_self_uuOfXT_cannot_be_converted __pyx_string_tab[29]
4902#define __pyx_kp_u_unable_to_allocate_array_data __pyx_string_tab[30]
4903#define __pyx_kp_u_unable_to_allocate_shape_and_str __pyx_string_tab[31]
4904#define __pyx_n_u_lambda __pyx_string_tab[32]
4905#define __pyx_n_u_ASCII __pyx_string_tab[33]
4906#define __pyx_n_u_BC_Base __pyx_string_tab[34]
4907#define __pyx_n_u_BC_Base___reduce_cython __pyx_string_tab[35]
4908#define __pyx_n_u_BC_Base___setstate_cython __pyx_string_tab[36]
4909#define __pyx_n_u_BC_Base_getContext __pyx_string_tab[37]
4910#define __pyx_n_u_BoundaryCondition __pyx_string_tab[38]
4911#define __pyx_n_u_BoundaryCondition___reduce_cytho __pyx_string_tab[39]
4912#define __pyx_n_u_BoundaryCondition___setstate_cyt __pyx_string_tab[40]
4913#define __pyx_n_u_BoundaryCondition_init_cython __pyx_string_tab[41]
4914#define __pyx_n_u_BoundaryCondition_resetBC __pyx_string_tab[42]
4915#define __pyx_n_u_BoundaryCondition_setConstantBC __pyx_string_tab[43]
4916#define __pyx_n_u_BoundaryCondition_setLinearBC __pyx_string_tab[44]
4917#define __pyx_n_u_BoundaryCondition_setLinearRamp __pyx_string_tab[45]
4918#define __pyx_n_u_BoundaryConditions __pyx_string_tab[46]
4919#define __pyx_n_u_Context __pyx_string_tab[47]
4920#define __pyx_n_u_Domain __pyx_string_tab[48]
4921#define __pyx_n_u_Ellipsis __pyx_string_tab[49]
4922#define __pyx_n_u_None __pyx_string_tab[50]
4923#define __pyx_n_u_Sequence __pyx_string_tab[51]
4924#define __pyx_n_u_View_MemoryView __pyx_string_tab[52]
4925#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[53]
4926#define __pyx_n_u_all __pyx_string_tab[54]
4927#define __pyx_n_u_annotate __pyx_string_tab[55]
4928#define __pyx_n_u_class __pyx_string_tab[56]
4929#define __pyx_n_u_class_getitem __pyx_string_tab[57]
4930#define __pyx_n_u_del __pyx_string_tab[58]
4931#define __pyx_n_u_dict __pyx_string_tab[59]
4932#define __pyx_n_u_func __pyx_string_tab[60]
4933#define __pyx_n_u_get_2 __pyx_string_tab[61]
4934#define __pyx_n_u_getstate __pyx_string_tab[62]
4935#define __pyx_n_u_import __pyx_string_tab[63]
4936#define __pyx_n_u_init __pyx_string_tab[64]
4937#define __pyx_n_u_main __pyx_string_tab[65]
4938#define __pyx_n_u_module __pyx_string_tab[66]
4939#define __pyx_n_u_name_2 __pyx_string_tab[67]
4940#define __pyx_n_u_new __pyx_string_tab[68]
4941#define __pyx_n_u_pyx_checksum __pyx_string_tab[69]
4942#define __pyx_n_u_pyx_result __pyx_string_tab[70]
4943#define __pyx_n_u_pyx_state __pyx_string_tab[71]
4944#define __pyx_n_u_pyx_type __pyx_string_tab[72]
4945#define __pyx_n_u_pyx_unpickle_BC_Base __pyx_string_tab[73]
4946#define __pyx_n_u_pyx_unpickle_BC_Base__set_stat __pyx_string_tab[74]
4947#define __pyx_n_u_pyx_unpickle_Enum __pyx_string_tab[75]
4948#define __pyx_n_u_pyx_vtable __pyx_string_tab[76]
4949#define __pyx_n_u_qualname __pyx_string_tab[77]
4950#define __pyx_n_u_reduce __pyx_string_tab[78]
4951#define __pyx_n_u_reduce_cython __pyx_string_tab[79]
4952#define __pyx_n_u_reduce_ex __pyx_string_tab[80]
4953#define __pyx_n_u_set __pyx_string_tab[81]
4954#define __pyx_n_u_set_name __pyx_string_tab[82]
4955#define __pyx_n_u_setstate __pyx_string_tab[83]
4956#define __pyx_n_u_setstate_cython __pyx_string_tab[84]
4957#define __pyx_n_u_test __pyx_string_tab[85]
4958#define __pyx_n_u_dict_2 __pyx_string_tab[86]
4959#define __pyx_n_u_is_coroutine __pyx_string_tab[87]
4960#define __pyx_n_u_a __pyx_string_tab[88]
4961#define __pyx_n_u_a0 __pyx_string_tab[89]
4962#define __pyx_n_u_abc __pyx_string_tab[90]
4963#define __pyx_n_u_allocate_buffer __pyx_string_tab[91]
4964#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[92]
4965#define __pyx_n_u_b_i __pyx_string_tab[93]
4966#define __pyx_n_u_b_or __pyx_string_tab[94]
4967#define __pyx_n_u_base __pyx_string_tab[95]
4968#define __pyx_n_u_c __pyx_string_tab[96]
4969#define __pyx_n_u_cline_in_traceback __pyx_string_tab[97]
4970#define __pyx_n_u_context __pyx_string_tab[98]
4971#define __pyx_n_u_count __pyx_string_tab[99]
4972#define __pyx_n_u_dtype_is_object __pyx_string_tab[100]
4973#define __pyx_n_u_encode __pyx_string_tab[101]
4974#define __pyx_n_u_enumerate __pyx_string_tab[102]
4975#define __pyx_n_u_error __pyx_string_tab[103]
4976#define __pyx_n_u_flags __pyx_string_tab[104]
4977#define __pyx_n_u_format __pyx_string_tab[105]
4978#define __pyx_n_u_fortran __pyx_string_tab[106]
4979#define __pyx_n_u_get __pyx_string_tab[107]
4980#define __pyx_n_u_getContext __pyx_string_tab[108]
4981#define __pyx_n_u_id __pyx_string_tab[109]
4982#define __pyx_n_u_index __pyx_string_tab[110]
4983#define __pyx_n_u_init_cython __pyx_string_tab[111]
4984#define __pyx_n_u_items __pyx_string_tab[112]
4985#define __pyx_n_u_itemsize __pyx_string_tab[113]
4986#define __pyx_n_u_memview __pyx_string_tab[114]
4987#define __pyx_n_u_mode __pyx_string_tab[115]
4988#define __pyx_n_u_n __pyx_string_tab[116]
4989#define __pyx_n_u_name __pyx_string_tab[117]
4990#define __pyx_n_u_nd __pyx_string_tab[118]
4991#define __pyx_n_u_ndim __pyx_string_tab[119]
4992#define __pyx_n_u_np __pyx_string_tab[120]
4993#define __pyx_n_u_numpy __pyx_string_tab[121]
4994#define __pyx_n_u_obj __pyx_string_tab[122]
4995#define __pyx_n_u_pack __pyx_string_tab[123]
4996#define __pyx_n_u_pop __pyx_string_tab[124]
4997#define __pyx_n_u_proteus __pyx_string_tab[125]
4998#define __pyx_n_u_register __pyx_string_tab[126]
4999#define __pyx_n_u_resetBC __pyx_string_tab[127]
5000#define __pyx_n_u_self __pyx_string_tab[128]
5001#define __pyx_n_u_setConstantBC __pyx_string_tab[129]
5002#define __pyx_n_u_setConstantBC_locals_lambda __pyx_string_tab[130]
5003#define __pyx_n_u_setLinearBC __pyx_string_tab[131]
5004#define __pyx_n_u_setLinearBC_locals_lambda __pyx_string_tab[132]
5005#define __pyx_n_u_setLinearRamp __pyx_string_tab[133]
5006#define __pyx_n_u_setLinearRamp_locals_lambda __pyx_string_tab[134]
5007#define __pyx_n_u_setdefault __pyx_string_tab[135]
5008#define __pyx_n_u_shape __pyx_string_tab[136]
5009#define __pyx_n_u_size __pyx_string_tab[137]
5010#define __pyx_n_u_start __pyx_string_tab[138]
5011#define __pyx_n_u_state __pyx_string_tab[139]
5012#define __pyx_n_u_step __pyx_string_tab[140]
5013#define __pyx_n_u_stop __pyx_string_tab[141]
5014#define __pyx_n_u_struct __pyx_string_tab[142]
5015#define __pyx_n_u_sum __pyx_string_tab[143]
5016#define __pyx_n_u_t __pyx_string_tab[144]
5017#define __pyx_n_u_t1 __pyx_string_tab[145]
5018#define __pyx_n_u_unpack __pyx_string_tab[146]
5019#define __pyx_n_u_update __pyx_string_tab[147]
5020#define __pyx_n_u_use_setstate __pyx_string_tab[148]
5021#define __pyx_n_u_value __pyx_string_tab[149]
5022#define __pyx_n_u_values __pyx_string_tab[150]
5023#define __pyx_n_u_x __pyx_string_tab[151]
5024#define __pyx_n_u_zeros __pyx_string_tab[152]
5025#define __pyx_n_b_O __pyx_string_tab[153]
5026#define __pyx_kp_b_iso88591_Q __pyx_string_tab[154]
5027#define __pyx_kp_b_iso88591_QfA __pyx_string_tab[155]
5028#define __pyx_kp_b_iso88591_q_0_kQR_7_1_7_N_1 __pyx_string_tab[156]
5029#define __pyx_kp_b_iso88591_Zt84xt5_G4q_q_l_vWE_Q_q_t9G5_4w __pyx_string_tab[157]
5030#define __pyx_kp_b_iso88591_A_IQ __pyx_string_tab[158]
5031#define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[159]
5032#define __pyx_kp_b_iso88591_A_IQ_2 __pyx_string_tab[160]
5033#define __pyx_kp_b_iso88591_A_IQ_4 __pyx_string_tab[161]
5034#define __pyx_kp_b_iso88591_A_IQ_3 __pyx_string_tab[162]
5035#define __pyx_kp_b_iso88591_A __pyx_string_tab[163]
5036#define __pyx_kp_b_iso88591_q __pyx_string_tab[164]
5037#define __pyx_kp_b_iso88591__5 __pyx_string_tab[165]
5038#define __pyx_kp_b_iso88591_BfAU __pyx_string_tab[166]
5039#define __pyx_kp_b_iso88591_BfAU_AS_Qaq __pyx_string_tab[167]
5040#define __pyx_kp_b_iso88591_BfAZq_Rq __pyx_string_tab[168]
5041#define __pyx_kp_b_iso88591_J_at_y_1DP_eeppqqu_v_B_B_H_H_S __pyx_string_tab[169]
5042#define __pyx_kp_b_iso88591_V1_IQ_HA_Kq_6_fD_gQ_q_a_3gV1_5 __pyx_string_tab[170]
5043#define __pyx_kp_b_iso88591_1_gT_a __pyx_string_tab[171]
5044#define __pyx_int_0 __pyx_number_tab[0]
5045#define __pyx_int_neg_1 __pyx_number_tab[1]
5046#define __pyx_int_3 __pyx_number_tab[2]
5047#define __pyx_int_81007987 __pyx_number_tab[3]
5048#define __pyx_int_136983863 __pyx_number_tab[4]
5049/* #### Code section: module_state_clear ### */
5050#if CYTHON_USE_MODULE_STATE
5051static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
5052 __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
5053 if (!clear_module_state) return 0;
5054 Py_CLEAR(clear_module_state->__pyx_d);
5055 Py_CLEAR(clear_module_state->__pyx_b);
5056 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
5057 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
5058 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
5059 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
5060 #if CYTHON_PEP489_MULTI_PHASE_INIT
5061 __Pyx_State_RemoveModule(NULL);
5062 #endif
5063 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
5064 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
5065 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
5066 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
5067 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
5068 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
5069 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
5070 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
5071 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
5072 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
5073 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
5074 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
5075 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
5076 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
5077 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
5078 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
5079 Py_CLEAR(clear_module_state->__pyx_ptype_18BoundaryConditions_BC_Base);
5080 Py_CLEAR(clear_module_state->__pyx_type_18BoundaryConditions_BC_Base);
5081 Py_CLEAR(clear_module_state->__pyx_ptype_18BoundaryConditions_BoundaryCondition);
5082 Py_CLEAR(clear_module_state->__pyx_type_18BoundaryConditions_BoundaryCondition);
5083 Py_CLEAR(clear_module_state->__pyx_ptype_18BoundaryConditions___pyx_defaults);
5084 Py_CLEAR(clear_module_state->__pyx_type_18BoundaryConditions___pyx_defaults);
5085 Py_CLEAR(clear_module_state->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC);
5086 Py_CLEAR(clear_module_state->__pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC);
5087 Py_CLEAR(clear_module_state->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC);
5088 Py_CLEAR(clear_module_state->__pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC);
5089 Py_CLEAR(clear_module_state->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp);
5090 Py_CLEAR(clear_module_state->__pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp);
5091 Py_CLEAR(clear_module_state->__pyx_array_type);
5092 Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
5093 Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
5094 Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
5095 Py_CLEAR(clear_module_state->__pyx_memoryview_type);
5096 Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
5097 Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
5098 Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
5099 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_items.method);
5100 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_pop.method);
5101 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_values.method);
5102 for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); }
5103 for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
5104 for (int i=0; i<34; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
5105 for (int i=0; i<172; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
5106 for (int i=0; i<5; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
5107/* #### Code section: module_state_clear_contents ### */
5108/* CommonTypesMetaclass.module_state_clear */
5109Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
5110
5111/* CythonFunctionPerModule.module_state_clear */
5112Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
5113
5114/* #### Code section: module_state_clear_end ### */
5115return 0;
5116}
5117#endif
5118/* #### Code section: module_state_traverse ### */
5119#if CYTHON_USE_MODULE_STATE
5120static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
5121 __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
5122 if (!traverse_module_state) return 0;
5123 Py_VISIT(traverse_module_state->__pyx_d);
5124 Py_VISIT(traverse_module_state->__pyx_b);
5125 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
5126 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
5127 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
5128 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
5129 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
5130 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
5131 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
5132 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
5133 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
5134 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
5135 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
5136 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
5137 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
5138 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
5139 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
5140 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
5141 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
5142 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
5143 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
5144 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
5145 Py_VISIT(traverse_module_state->__pyx_ptype_18BoundaryConditions_BC_Base);
5146 Py_VISIT(traverse_module_state->__pyx_type_18BoundaryConditions_BC_Base);
5147 Py_VISIT(traverse_module_state->__pyx_ptype_18BoundaryConditions_BoundaryCondition);
5148 Py_VISIT(traverse_module_state->__pyx_type_18BoundaryConditions_BoundaryCondition);
5149 Py_VISIT(traverse_module_state->__pyx_ptype_18BoundaryConditions___pyx_defaults);
5150 Py_VISIT(traverse_module_state->__pyx_type_18BoundaryConditions___pyx_defaults);
5151 Py_VISIT(traverse_module_state->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC);
5152 Py_VISIT(traverse_module_state->__pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC);
5153 Py_VISIT(traverse_module_state->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC);
5154 Py_VISIT(traverse_module_state->__pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC);
5155 Py_VISIT(traverse_module_state->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp);
5156 Py_VISIT(traverse_module_state->__pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp);
5157 Py_VISIT(traverse_module_state->__pyx_array_type);
5158 Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
5159 Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
5160 Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
5161 Py_VISIT(traverse_module_state->__pyx_memoryview_type);
5162 Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
5163 Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
5164 Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
5165 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_items.method);
5166 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_pop.method);
5167 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_values.method);
5168 for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); }
5169 for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
5170 for (int i=0; i<34; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
5171 for (int i=0; i<172; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
5172 for (int i=0; i<5; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
5173/* #### Code section: module_state_traverse_contents ### */
5174/* CommonTypesMetaclass.module_state_traverse */
5175Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
5176
5177/* CythonFunctionPerModule.module_state_traverse */
5178Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
5179
5180/* #### Code section: module_state_traverse_end ### */
5181return 0;
5182}
5183#endif
5184/* #### Code section: module_code ### */
5185
5186/* "View.MemoryView":147
5187 * cdef bint dtype_is_object
5188 *
5189 * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5190 * mode="c", bint allocate_buffer=True):
5191 *
5192*/
5193
5194/* Python wrapper */
5195static int __pyx_array___cinit__(PyObject *__pyx_v_self,
5196#if CYTHON_VECTORCALL_TPNEW
5197PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5198#else
5199PyObject *__pyx_args, PyObject *__pyx_kwds
5200#endif
5201); /*proto*/
5202static int __pyx_array___cinit__(PyObject *__pyx_v_self,
5203#if CYTHON_VECTORCALL_TPNEW
5204PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5205#else
5206PyObject *__pyx_args, PyObject *__pyx_kwds
5207#endif
5208) {
5209 PyObject *__pyx_v_shape = 0;
5210 Py_ssize_t __pyx_v_itemsize;
5211 PyObject *__pyx_v_format = 0;
5212 PyObject *__pyx_v_mode = 0;
5213 int __pyx_v_allocate_buffer;
5214 #if !CYTHON_VECTORCALL_TPNEW
5215 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5216 #endif
5217 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5218 PyObject* values[5] = {0,0,0,0,0};
5219 int __pyx_lineno = 0;
5220 const char *__pyx_filename = NULL;
5221 int __pyx_clineno = 0;
5222 int __pyx_r;
5223 __Pyx_RefNannyDeclarations
5224 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
5225 #if !CYTHON_VECTORCALL_TPNEW
5226 #if CYTHON_ASSUME_SAFE_SIZE
5227 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5228 #else
5229 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
5230 #endif
5231 #endif
5232 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
5233 {
5234 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_itemsize,&__pyx_mstate_global->__pyx_n_u_format,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_allocate_buffer,0};
5235 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL_TPNEW(__pyx_kwds) : 0;
5236 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 147, __pyx_L3_error)
5237 if (__pyx_kwds_len > 0) {
5238 switch (__pyx_nargs) {
5239 case 5:
5240 values[4] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 4);
5241 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 147, __pyx_L3_error)
5242 CYTHON_FALLTHROUGH;
5243 case 4:
5244 values[3] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 3);
5245 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 147, __pyx_L3_error)
5246 CYTHON_FALLTHROUGH;
5247 case 3:
5248 values[2] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 2);
5249 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 147, __pyx_L3_error)
5250 CYTHON_FALLTHROUGH;
5251 case 2:
5252 values[1] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 1);
5253 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 147, __pyx_L3_error)
5254 CYTHON_FALLTHROUGH;
5255 case 1:
5256 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
5257 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 147, __pyx_L3_error)
5258 CYTHON_FALLTHROUGH;
5259 case 0: break;
5260 default: goto __pyx_L5_argtuple_error;
5261 }
5262 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5263 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 147, __pyx_L3_error)
5264 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
5265 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
5266 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(1, 147, __pyx_L3_error) }
5267 }
5268 } else {
5269 switch (__pyx_nargs) {
5270 case 5:
5271 values[4] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 4);
5272 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 147, __pyx_L3_error)
5273 CYTHON_FALLTHROUGH;
5274 case 4:
5275 values[3] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 3);
5276 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 147, __pyx_L3_error)
5277 CYTHON_FALLTHROUGH;
5278 case 3:
5279 values[2] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 2);
5280 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 147, __pyx_L3_error)
5281 values[1] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 1);
5282 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 147, __pyx_L3_error)
5283 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
5284 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 147, __pyx_L3_error)
5285 break;
5286 default: goto __pyx_L5_argtuple_error;
5287 }
5288 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
5289 }
5290 __pyx_v_shape = ((PyObject*)values[0]);
5291 __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error)
5292 __pyx_v_format = values[2];
5293 __pyx_v_mode = values[3];
5294 if (values[4]) {
5295 __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 148, __pyx_L3_error)
5296 } else {
5297
5298 /* "View.MemoryView":148
5299 *
5300 * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
5301 * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
5302 *
5303 * cdef int idx
5304*/
5305 __pyx_v_allocate_buffer = ((int)1);
5306 }
5307 }
5308 goto __pyx_L6_skip;
5309 __pyx_L5_argtuple_error:;
5310 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 147, __pyx_L3_error)
5311 __pyx_L6_skip:;
5312 goto __pyx_L4_argument_unpacking_done;
5313 __pyx_L3_error:;
5314 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5315 Py_XDECREF(values[__pyx_temp]);
5316 }
5317 __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5318 __Pyx_RefNannyFinishContext();
5319 return -1;
5320 __pyx_L4_argument_unpacking_done:;
5321 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 147, __pyx_L1_error)
5322 if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
5323 PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 147, __pyx_L1_error)
5324 }
5325 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
5326
5327 /* "View.MemoryView":147
5328 * cdef bint dtype_is_object
5329 *
5330 * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5331 * mode="c", bint allocate_buffer=True):
5332 *
5333*/
5334
5335 /* function exit code */
5336 goto __pyx_L0;
5337 __pyx_L1_error:;
5338 __pyx_r = -1;
5339 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5340 Py_XDECREF(values[__pyx_temp]);
5341 }
5342 goto __pyx_L7_cleaned_up;
5343 __pyx_L0:;
5344 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5345 Py_XDECREF(values[__pyx_temp]);
5346 }
5347 __pyx_L7_cleaned_up:;
5348
5349
5350 __Pyx_RefNannyFinishContext();
5351 return __pyx_r;
5352}
5353
5354static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
5355 int __pyx_v_idx;
5356 Py_ssize_t __pyx_v_dim;
5357 char __pyx_v_order;
5358 int __pyx_r;
5359 __Pyx_RefNannyDeclarations
5360 Py_ssize_t __pyx_t_1;
5361 int __pyx_t_2;
5362 int __pyx_t_3;
5363 int __pyx_t_4;
5364 PyObject *__pyx_t_5 = NULL;
5365 PyObject *__pyx_t_6 = NULL;
5366 size_t __pyx_t_7;
5367 char *__pyx_t_8;
5368 Py_ssize_t __pyx_t_9;
5369 PyObject *__pyx_t_10 = NULL;
5370 PyObject *__pyx_t_11[5];
5371 int __pyx_t_12;
5372 PyObject *__pyx_t_13 = NULL;
5373 int __pyx_lineno = 0;
5374 const char *__pyx_filename = NULL;
5375 int __pyx_clineno = 0;
5376 __Pyx_RefNannySetupContext("__cinit__", 0);
5377 __Pyx_INCREF(__pyx_v_format);
5378
5379 /* "View.MemoryView":153
5380 * cdef Py_ssize_t dim
5381 *
5382 * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
5383 * self.itemsize = itemsize
5384 *
5385*/
5386 if (unlikely(__pyx_v_shape == Py_None)) {
5387 PyErr_SetString(PyExc_TypeError, "object of type \047NoneType\047 has no len()");
5388 __PYX_ERR(1, 153, __pyx_L1_error)
5389 }
5390 __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 153, __pyx_L1_error)
5391 __pyx_v_self->ndim = ((int)__pyx_t_1);
5392
5393
5394 /* "View.MemoryView":154
5395 *
5396 * self.ndim = <int> len(shape)
5397 * self.itemsize = itemsize # <<<<<<<<<<<<<<
5398 *
5399 * if cython.unlikely(not self.ndim):
5400*/
5401 __pyx_v_self->itemsize = __pyx_v_itemsize;
5402
5403 /* "View.MemoryView":156
5404 * self.itemsize = itemsize
5405 *
5406 * if cython.unlikely(not self.ndim): # <<<<<<<<<<<<<<
5407 * _err_ValueError("Empty shape tuple for cython.array")
5408 *
5409*/
5410 __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
5411
5412 if (unlikely(__pyx_t_2)) {
5413
5414
5415 /* "View.MemoryView":157
5416 *
5417 * if cython.unlikely(not self.ndim):
5418 * _err_ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
5419 *
5420 * if cython.unlikely(itemsize <= 0):
5421*/
5422 __pyx_t_3 = __pyx_memoryview_err_ValueError(__pyx_k_Empty_shape_tuple_for_cython_arr); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 157, __pyx_L1_error)
5423
5424
5425 /* "View.MemoryView":156
5426 * self.itemsize = itemsize
5427 *
5428 * if cython.unlikely(not self.ndim): # <<<<<<<<<<<<<<
5429 * _err_ValueError("Empty shape tuple for cython.array")
5430 *
5431*/
5432 }
5433
5434 /* "View.MemoryView":159
5435 * _err_ValueError("Empty shape tuple for cython.array")
5436 *
5437 * if cython.unlikely(itemsize <= 0): # <<<<<<<<<<<<<<
5438 * _err_ValueError("itemsize <= 0 for cython.array")
5439 *
5440*/
5441 __pyx_t_2 = (__pyx_v_itemsize <= 0);
5442
5443 if (unlikely(__pyx_t_2)) {
5444
5445
5446 /* "View.MemoryView":160
5447 *
5448 * if cython.unlikely(itemsize <= 0):
5449 * _err_ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
5450 *
5451 * if not isinstance(format, bytes):
5452*/
5453 __pyx_t_3 = __pyx_memoryview_err_ValueError(__pyx_k_itemsize_0_for_cython_array); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 160, __pyx_L1_error)
5454
5455
5456 /* "View.MemoryView":159
5457 * _err_ValueError("Empty shape tuple for cython.array")
5458 *
5459 * if cython.unlikely(itemsize <= 0): # <<<<<<<<<<<<<<
5460 * _err_ValueError("itemsize <= 0 for cython.array")
5461 *
5462*/
5463 }
5464
5465 /* "View.MemoryView":162
5466 * _err_ValueError("itemsize <= 0 for cython.array")
5467 *
5468 * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5469 * format = format.encode('ASCII')
5470 * self._format = format # keep a reference to the byte string
5471*/
5472 __pyx_t_2 = PyBytes_Check(__pyx_v_format);
5473 __pyx_t_4 = (!__pyx_t_2);
5474
5475
5476 if (__pyx_t_4) {
5477
5478
5479 /* "View.MemoryView":163
5480 *
5481 * if not isinstance(format, bytes):
5482 * format = format.encode('ASCII') # <<<<<<<<<<<<<<
5483 * self._format = format # keep a reference to the byte string
5484 * self.format = self._format
5485*/
5486 __pyx_t_6 = __pyx_v_format;
5487 __Pyx_INCREF(__pyx_t_6);
5488 __pyx_t_7 = 0;
5489 {
5490 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ASCII};
5491 __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5492 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5493 if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 163, __pyx_L1_error)
5494 __Pyx_GOTREF(__pyx_t_5);
5495 }
5496 __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_5);
5497 __pyx_t_5 = 0;
5498
5499 /* "View.MemoryView":162
5500 * _err_ValueError("itemsize <= 0 for cython.array")
5501 *
5502 * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5503 * format = format.encode('ASCII')
5504 * self._format = format # keep a reference to the byte string
5505*/
5506 }
5507
5508 /* "View.MemoryView":164
5509 * if not isinstance(format, bytes):
5510 * format = format.encode('ASCII')
5511 * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
5512 * self.format = self._format
5513 *
5514*/
5515 __pyx_t_5 = __pyx_v_format;
5516 __Pyx_INCREF(__pyx_t_5);
5517 if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_5))) __PYX_ERR(1, 164, __pyx_L1_error)
5518 __Pyx_GIVEREF(__pyx_t_5);
5519 __Pyx_GOTREF(__pyx_v_self->_format);
5520 __Pyx_DECREF(__pyx_v_self->_format);
5521 __pyx_v_self->_format = ((PyObject*)__pyx_t_5);
5522 __pyx_t_5 = 0;
5523
5524 /* "View.MemoryView":165
5525 * format = format.encode('ASCII')
5526 * self._format = format # keep a reference to the byte string
5527 * self.format = self._format # <<<<<<<<<<<<<<
5528 *
5529 *
5530*/
5531 if (unlikely(__pyx_v_self->_format == Py_None)) {
5532 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
5533 __PYX_ERR(1, 165, __pyx_L1_error)
5534 }
5535 __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 165, __pyx_L1_error)
5536 __pyx_v_self->format = __pyx_t_8;
5537
5538 /* "View.MemoryView":168
5539 *
5540 *
5541 * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t> self.ndim) # <<<<<<<<<<<<<<
5542 * self._strides = self._shape + self.ndim
5543 *
5544*/
5545 __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_self->ndim))));
5546
5547 /* "View.MemoryView":169
5548 *
5549 * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t> self.ndim)
5550 * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
5551 *
5552 * if not self._shape:
5553*/
5554 __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
5555
5556 /* "View.MemoryView":171
5557 * self._strides = self._shape + self.ndim
5558 *
5559 * if not self._shape: # <<<<<<<<<<<<<<
5560 * raise MemoryError, "unable to allocate shape and strides."
5561 *
5562*/
5563 __pyx_t_4 = (!(__pyx_v_self->_shape != 0));
5564
5565 if (unlikely(__pyx_t_4)) {
5566
5567
5568 /* "View.MemoryView":172
5569 *
5570 * if not self._shape:
5571 * raise MemoryError, "unable to allocate shape and strides." # <<<<<<<<<<<<<<
5572 *
5573 *
5574*/
5575 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_shape_and_str, 0, 0);
5576 __PYX_ERR(1, 172, __pyx_L1_error)
5577
5578 /* "View.MemoryView":171
5579 * self._strides = self._shape + self.ndim
5580 *
5581 * if not self._shape: # <<<<<<<<<<<<<<
5582 * raise MemoryError, "unable to allocate shape and strides."
5583 *
5584*/
5585 }
5586
5587 /* "View.MemoryView":175
5588 *
5589 *
5590 * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
5591 * if dim <= 0:
5592 * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5593*/
5594
5595 __pyx_t_3 = 0;
5596 __pyx_t_5 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_5);
5597 __pyx_t_1 = 0;
5598 for (;;) {
5599 {
5600 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
5601 #if !CYTHON_ASSUME_SAFE_SIZE
5602 if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 175, __pyx_L1_error)
5603 #endif
5604 if (__pyx_t_1 >= __pyx_temp) break;
5605 }
5606 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5607 __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1));
5608 #else
5609 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_1);
5610 #endif
5611 ++__pyx_t_1;
5612 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 175, __pyx_L1_error)
5613 __Pyx_GOTREF(__pyx_t_6);
5614 __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error)
5615 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5616 __pyx_v_dim = __pyx_t_9;
5617 __pyx_v_idx = __pyx_t_3;
5618 __pyx_t_3 = (__pyx_t_3 + 1);
5619
5620 /* "View.MemoryView":176
5621 *
5622 * for idx, dim in enumerate(shape):
5623 * if dim <= 0: # <<<<<<<<<<<<<<
5624 * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5625 * self._shape[idx] = dim
5626*/
5627 __pyx_t_4 = (__pyx_v_dim <= 0);
5628
5629 if (unlikely(__pyx_t_4)) {
5630
5631
5632 /* "View.MemoryView":177
5633 * for idx, dim in enumerate(shape):
5634 * if dim <= 0:
5635 * raise ValueError, f"Invalid shape in axis {idx}: {dim}." # <<<<<<<<<<<<<<
5636 * self._shape[idx] = dim
5637 *
5638*/
5639 __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
5640 __Pyx_GOTREF(__pyx_t_6);
5641 __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
5642 __Pyx_GOTREF(__pyx_t_10);
5643 __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis;
5644 __pyx_t_11[1] = __pyx_t_6;
5645 __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u__2;
5646 __pyx_t_11[3] = __pyx_t_10;
5647 __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__3;
5648 __pyx_t_9 = 25;
5649 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
5650 __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11[1]) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11[3]);
5651 #endif
5652 __pyx_t_12 = 0;
5653 __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, __pyx_t_9, __pyx_t_12);
5654 if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 177, __pyx_L1_error)
5655 __Pyx_GOTREF(__pyx_t_13);
5656 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5657 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5658 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_13, 0, 0);
5659 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5660 __PYX_ERR(1, 177, __pyx_L1_error)
5661
5662 /* "View.MemoryView":176
5663 *
5664 * for idx, dim in enumerate(shape):
5665 * if dim <= 0: # <<<<<<<<<<<<<<
5666 * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5667 * self._shape[idx] = dim
5668*/
5669 }
5670
5671 /* "View.MemoryView":178
5672 * if dim <= 0:
5673 * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5674 * self._shape[idx] = dim # <<<<<<<<<<<<<<
5675 *
5676 * cdef char order
5677*/
5678 (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
5679
5680 /* "View.MemoryView":175
5681 *
5682 *
5683 * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
5684 * if dim <= 0:
5685 * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5686*/
5687 }
5688 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5689
5690 /* "View.MemoryView":181
5691 *
5692 * cdef char order
5693 * if mode == 'c': # <<<<<<<<<<<<<<
5694 * order = b'C'
5695 * self.mode = u'c'
5696*/
5697 __pyx_t_4 = (__Pyx_PyObject_Equals_obj_ch99(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 181, __pyx_L1_error)
5698 if (__pyx_t_4) {
5699
5700
5701 /* "View.MemoryView":182
5702 * cdef char order
5703 * if mode == 'c':
5704 * order = b'C' # <<<<<<<<<<<<<<
5705 * self.mode = u'c'
5706 * elif mode == 'fortran':
5707*/
5708 __pyx_v_order = 'C';
5709
5710 /* "View.MemoryView":183
5711 * if mode == 'c':
5712 * order = b'C'
5713 * self.mode = u'c' # <<<<<<<<<<<<<<
5714 * elif mode == 'fortran':
5715 * order = b'F'
5716*/
5717 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
5718 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_c);
5719 __Pyx_GOTREF(__pyx_v_self->mode);
5720 __Pyx_DECREF(__pyx_v_self->mode);
5721 __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_c;
5722
5723 /* "View.MemoryView":181
5724 *
5725 * cdef char order
5726 * if mode == 'c': # <<<<<<<<<<<<<<
5727 * order = b'C'
5728 * self.mode = u'c'
5729*/
5730 goto __pyx_L11;
5731 }
5732
5733 /* "View.MemoryView":184
5734 * order = b'C'
5735 * self.mode = u'c'
5736 * elif mode == 'fortran': # <<<<<<<<<<<<<<
5737 * order = b'F'
5738 * self.mode = u'fortran'
5739*/
5740 __pyx_t_4 = __Pyx_PyObject_CompareBoolEq_object_str(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 184, __pyx_L1_error)
5741 if (likely(__pyx_t_4)) {
5742
5743
5744 /* "View.MemoryView":185
5745 * self.mode = u'c'
5746 * elif mode == 'fortran':
5747 * order = b'F' # <<<<<<<<<<<<<<
5748 * self.mode = u'fortran'
5749 * else:
5750*/
5751 __pyx_v_order = 'F';
5752
5753 /* "View.MemoryView":186
5754 * elif mode == 'fortran':
5755 * order = b'F'
5756 * self.mode = u'fortran' # <<<<<<<<<<<<<<
5757 * else:
5758 * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
5759*/
5760 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
5761 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_fortran);
5762 __Pyx_GOTREF(__pyx_v_self->mode);
5763 __Pyx_DECREF(__pyx_v_self->mode);
5764 __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_fortran;
5765
5766 /* "View.MemoryView":184
5767 * order = b'C'
5768 * self.mode = u'c'
5769 * elif mode == 'fortran': # <<<<<<<<<<<<<<
5770 * order = b'F'
5771 * self.mode = u'fortran'
5772*/
5773 goto __pyx_L11;
5774 }
5775
5776 /* "View.MemoryView":188
5777 * self.mode = u'fortran'
5778 * else:
5779 * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" # <<<<<<<<<<<<<<
5780 *
5781 * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
5782*/
5783 /*else*/ {
5784 __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 188, __pyx_L1_error)
5785 __Pyx_GOTREF(__pyx_t_5);
5786 __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 188, __pyx_L1_error)
5787 __Pyx_GOTREF(__pyx_t_13);
5788 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5789 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_13, 0, 0);
5790 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5791 __PYX_ERR(1, 188, __pyx_L1_error)
5792 }
5793 __pyx_L11:;
5794
5795 /* "View.MemoryView":190
5796 * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
5797 *
5798 * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) # <<<<<<<<<<<<<<
5799 *
5800 * self.free_data = allocate_buffer
5801*/
5802 __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
5803
5804 /* "View.MemoryView":192
5805 * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
5806 *
5807 * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
5808 * self.dtype_is_object = format == b'O'
5809 *
5810*/
5811 __pyx_v_self->free_data = __pyx_v_allocate_buffer;
5812
5813 /* "View.MemoryView":193
5814 *
5815 * self.free_data = allocate_buffer
5816 * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
5817 *
5818 * if allocate_buffer:
5819*/
5820 __pyx_t_13 = __Pyx_PyObject_CompareEq_object_bytes(__pyx_v_format, __pyx_mstate_global->__pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 193, __pyx_L1_error)
5821 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 193, __pyx_L1_error)
5822 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5823 __pyx_v_self->dtype_is_object = __pyx_t_4;
5824
5825 /* "View.MemoryView":195
5826 * self.dtype_is_object = format == b'O'
5827 *
5828 * if allocate_buffer: # <<<<<<<<<<<<<<
5829 * _allocate_buffer(self)
5830 *
5831*/
5832 if (__pyx_v_allocate_buffer) {
5833
5834 /* "View.MemoryView":196
5835 *
5836 * if allocate_buffer:
5837 * _allocate_buffer(self) # <<<<<<<<<<<<<<
5838 *
5839 * @cname('getbuffer')
5840*/
5841 __pyx_t_3 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 196, __pyx_L1_error)
5842
5843
5844 /* "View.MemoryView":195
5845 * self.dtype_is_object = format == b'O'
5846 *
5847 * if allocate_buffer: # <<<<<<<<<<<<<<
5848 * _allocate_buffer(self)
5849 *
5850*/
5851 }
5852
5853 /* "View.MemoryView":147
5854 * cdef bint dtype_is_object
5855 *
5856 * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5857 * mode="c", bint allocate_buffer=True):
5858 *
5859*/
5860
5861 /* function exit code */
5862 __pyx_r = 0;
5863 goto __pyx_L0;
5864 __pyx_L1_error:;
5865 __Pyx_XDECREF(__pyx_t_5);
5866 __Pyx_XDECREF(__pyx_t_6);
5867 __Pyx_XDECREF(__pyx_t_10);
5868 __Pyx_XDECREF(__pyx_t_13);
5869 __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5870 __pyx_r = -1;
5871 __pyx_L0:;
5872
5873
5874
5875 __Pyx_XDECREF(__pyx_v_format);
5876
5877 __Pyx_RefNannyFinishContext();
5878 return __pyx_r;
5879}
5880
5881/* "View.MemoryView":198
5882 * _allocate_buffer(self)
5883 *
5884 * @cname('getbuffer') # <<<<<<<<<<<<<<
5885 * def __getbuffer__(self, Py_buffer *info, int flags):
5886 * cdef int bufmode = -1
5887*/
5888
5889/* Python wrapper */
5890CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
5891CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
5892 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5893 int __pyx_r;
5894 __Pyx_RefNannyDeclarations
5895 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
5896 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
5897 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
5898
5899 /* function exit code */
5900
5901
5902 __Pyx_RefNannyFinishContext();
5903 return __pyx_r;
5904}
5905
5906static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
5907 int __pyx_v_bufmode;
5908 int __pyx_r;
5909 __Pyx_RefNannyDeclarations
5910 int __pyx_t_1;
5911 int __pyx_t_2;
5912 char *__pyx_t_3;
5913 Py_ssize_t __pyx_t_4;
5914 Py_ssize_t *__pyx_t_5;
5915 int __pyx_lineno = 0;
5916 const char *__pyx_filename = NULL;
5917 int __pyx_clineno = 0;
5918 if (unlikely(__pyx_v_info == NULL)) {
5919 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
5920 return -1;
5921 }
5922 __Pyx_RefNannySetupContext("__getbuffer__", 0);
5923 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
5924 __Pyx_GIVEREF(__pyx_v_info->obj);
5925
5926 /* "View.MemoryView":200
5927 * @cname('getbuffer')
5928 * def __getbuffer__(self, Py_buffer *info, int flags):
5929 * cdef int bufmode = -1 # <<<<<<<<<<<<<<
5930 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5931 * if self.mode == u"c":
5932*/
5933 __pyx_v_bufmode = -1;
5934
5935 /* "View.MemoryView":201
5936 * def __getbuffer__(self, Py_buffer *info, int flags):
5937 * cdef int bufmode = -1
5938 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<<
5939 * if self.mode == u"c":
5940 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5941*/
5942 __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
5943
5944 if (__pyx_t_1) {
5945
5946
5947 /* "View.MemoryView":202
5948 * cdef int bufmode = -1
5949 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5950 * if self.mode == u"c": # <<<<<<<<<<<<<<
5951 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5952 * elif self.mode == u"fortran":
5953*/
5954 __pyx_t_1 = (__Pyx_PyObject_Equals_str_ch99(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 202, __pyx_L1_error)
5955 if (__pyx_t_1) {
5956
5957
5958 /* "View.MemoryView":203
5959 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5960 * if self.mode == u"c":
5961 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
5962 * elif self.mode == u"fortran":
5963 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5964*/
5965 __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5966
5967 /* "View.MemoryView":202
5968 * cdef int bufmode = -1
5969 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5970 * if self.mode == u"c": # <<<<<<<<<<<<<<
5971 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5972 * elif self.mode == u"fortran":
5973*/
5974 goto __pyx_L4;
5975 }
5976
5977 /* "View.MemoryView":204
5978 * if self.mode == u"c":
5979 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5980 * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
5981 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5982 * if cython.unlikely(not (flags & bufmode)):
5983*/
5984 __pyx_t_1 = __Pyx_PyObject_CompareBoolEq_str_str(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 204, __pyx_L1_error)
5985 if (__pyx_t_1) {
5986
5987
5988 /* "View.MemoryView":205
5989 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5990 * elif self.mode == u"fortran":
5991 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
5992 * if cython.unlikely(not (flags & bufmode)):
5993 * _err_ValueError("Can only create a buffer that is contiguous in memory.")
5994*/
5995 __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5996
5997 /* "View.MemoryView":204
5998 * if self.mode == u"c":
5999 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6000 * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
6001 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6002 * if cython.unlikely(not (flags & bufmode)):
6003*/
6004 }
6005 __pyx_L4:;
6006
6007 /* "View.MemoryView":206
6008 * elif self.mode == u"fortran":
6009 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6010 * if cython.unlikely(not (flags & bufmode)): # <<<<<<<<<<<<<<
6011 * _err_ValueError("Can only create a buffer that is contiguous in memory.")
6012 * info.buf = self.data
6013*/
6014 __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
6015
6016 if (unlikely(__pyx_t_1)) {
6017
6018
6019 /* "View.MemoryView":207
6020 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6021 * if cython.unlikely(not (flags & bufmode)):
6022 * _err_ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
6023 * info.buf = self.data
6024 * info.len = self.len
6025*/
6026 __pyx_t_2 = __pyx_memoryview_err_ValueError(__pyx_k_Can_only_create_a_buffer_that_is); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 207, __pyx_L1_error)
6027
6028
6029 /* "View.MemoryView":206
6030 * elif self.mode == u"fortran":
6031 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6032 * if cython.unlikely(not (flags & bufmode)): # <<<<<<<<<<<<<<
6033 * _err_ValueError("Can only create a buffer that is contiguous in memory.")
6034 * info.buf = self.data
6035*/
6036 }
6037
6038 /* "View.MemoryView":201
6039 * def __getbuffer__(self, Py_buffer *info, int flags):
6040 * cdef int bufmode = -1
6041 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<<
6042 * if self.mode == u"c":
6043 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6044*/
6045 }
6046
6047 /* "View.MemoryView":208
6048 * if cython.unlikely(not (flags & bufmode)):
6049 * _err_ValueError("Can only create a buffer that is contiguous in memory.")
6050 * info.buf = self.data # <<<<<<<<<<<<<<
6051 * info.len = self.len
6052 *
6053*/
6054 __pyx_t_3 = __pyx_v_self->data;
6055
6056 __pyx_v_info->buf = __pyx_t_3;
6057
6058 /* "View.MemoryView":209
6059 * _err_ValueError("Can only create a buffer that is contiguous in memory.")
6060 * info.buf = self.data
6061 * info.len = self.len # <<<<<<<<<<<<<<
6062 *
6063 * if flags & PyBUF_STRIDES:
6064*/
6065 __pyx_t_4 = __pyx_v_self->len;
6066
6067 __pyx_v_info->len = __pyx_t_4;
6068
6069 /* "View.MemoryView":211
6070 * info.len = self.len
6071 *
6072 * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
6073 * info.ndim = self.ndim
6074 * info.shape = self._shape
6075*/
6076 __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
6077
6078 if (__pyx_t_1) {
6079
6080
6081 /* "View.MemoryView":212
6082 *
6083 * if flags & PyBUF_STRIDES:
6084 * info.ndim = self.ndim # <<<<<<<<<<<<<<
6085 * info.shape = self._shape
6086 * info.strides = self._strides
6087*/
6088 __pyx_t_2 = __pyx_v_self->ndim;
6089
6090 __pyx_v_info->ndim = __pyx_t_2;
6091
6092 /* "View.MemoryView":213
6093 * if flags & PyBUF_STRIDES:
6094 * info.ndim = self.ndim
6095 * info.shape = self._shape # <<<<<<<<<<<<<<
6096 * info.strides = self._strides
6097 * else:
6098*/
6099 __pyx_t_5 = __pyx_v_self->_shape;
6100
6101 __pyx_v_info->shape = __pyx_t_5;
6102
6103 /* "View.MemoryView":214
6104 * info.ndim = self.ndim
6105 * info.shape = self._shape
6106 * info.strides = self._strides # <<<<<<<<<<<<<<
6107 * else:
6108 * info.ndim = 1
6109*/
6110 __pyx_t_5 = __pyx_v_self->_strides;
6111
6112 __pyx_v_info->strides = __pyx_t_5;
6113
6114 /* "View.MemoryView":211
6115 * info.len = self.len
6116 *
6117 * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
6118 * info.ndim = self.ndim
6119 * info.shape = self._shape
6120*/
6121 goto __pyx_L6;
6122 }
6123
6124 /* "View.MemoryView":216
6125 * info.strides = self._strides
6126 * else:
6127 * info.ndim = 1 # <<<<<<<<<<<<<<
6128 * info.shape = &self.len if flags & PyBUF_ND else NULL
6129 * info.strides = NULL
6130*/
6131 /*else*/ {
6132 __pyx_v_info->ndim = 1;
6133
6134 /* "View.MemoryView":217
6135 * else:
6136 * info.ndim = 1
6137 * info.shape = &self.len if flags & PyBUF_ND else NULL # <<<<<<<<<<<<<<
6138 * info.strides = NULL
6139 *
6140*/
6141 __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
6142
6143 if (__pyx_t_1) {
6144
6145 __pyx_t_5 = (&__pyx_v_self->len);
6146 } else {
6147
6148 __pyx_t_5 = NULL;
6149 }
6150
6151 __pyx_v_info->shape = __pyx_t_5;
6152
6153 /* "View.MemoryView":218
6154 * info.ndim = 1
6155 * info.shape = &self.len if flags & PyBUF_ND else NULL
6156 * info.strides = NULL # <<<<<<<<<<<<<<
6157 *
6158 * info.suboffsets = NULL
6159*/
6160 __pyx_v_info->strides = NULL;
6161 }
6162 __pyx_L6:;
6163
6164 /* "View.MemoryView":220
6165 * info.strides = NULL
6166 *
6167 * info.suboffsets = NULL # <<<<<<<<<<<<<<
6168 * info.itemsize = self.itemsize
6169 * info.readonly = 0
6170*/
6171 __pyx_v_info->suboffsets = NULL;
6172
6173 /* "View.MemoryView":221
6174 *
6175 * info.suboffsets = NULL
6176 * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
6177 * info.readonly = 0
6178 * info.format = self.format if flags & PyBUF_FORMAT else NULL
6179*/
6180 __pyx_t_4 = __pyx_v_self->itemsize;
6181
6182 __pyx_v_info->itemsize = __pyx_t_4;
6183
6184 /* "View.MemoryView":222
6185 * info.suboffsets = NULL
6186 * info.itemsize = self.itemsize
6187 * info.readonly = 0 # <<<<<<<<<<<<<<
6188 * info.format = self.format if flags & PyBUF_FORMAT else NULL
6189 * info.obj = self
6190*/
6191 __pyx_v_info->readonly = 0;
6192
6193 /* "View.MemoryView":223
6194 * info.itemsize = self.itemsize
6195 * info.readonly = 0
6196 * info.format = self.format if flags & PyBUF_FORMAT else NULL # <<<<<<<<<<<<<<
6197 * info.obj = self
6198 *
6199*/
6200 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
6201
6202 if (__pyx_t_1) {
6203
6204 __pyx_t_3 = __pyx_v_self->format;
6205 } else {
6206
6207 __pyx_t_3 = NULL;
6208 }
6209
6210 __pyx_v_info->format = __pyx_t_3;
6211
6212 /* "View.MemoryView":224
6213 * info.readonly = 0
6214 * info.format = self.format if flags & PyBUF_FORMAT else NULL
6215 * info.obj = self # <<<<<<<<<<<<<<
6216 *
6217 * def __dealloc__(array self):
6218*/
6219 __Pyx_INCREF((PyObject *)__pyx_v_self);
6220 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
6221 __Pyx_GOTREF(__pyx_v_info->obj);
6222 __Pyx_DECREF(__pyx_v_info->obj);
6223 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
6224
6225 /* "View.MemoryView":198
6226 * _allocate_buffer(self)
6227 *
6228 * @cname('getbuffer') # <<<<<<<<<<<<<<
6229 * def __getbuffer__(self, Py_buffer *info, int flags):
6230 * cdef int bufmode = -1
6231*/
6232
6233 /* function exit code */
6234 __pyx_r = 0;
6235 goto __pyx_L0;
6236 __pyx_L1_error:;
6237 __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6238 __pyx_r = -1;
6239 if (__pyx_v_info->obj != NULL) {
6240 __Pyx_GOTREF(__pyx_v_info->obj);
6241 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
6242 }
6243 goto __pyx_L2;
6244 __pyx_L0:;
6245 if (__pyx_v_info->obj == Py_None) {
6246 __Pyx_GOTREF(__pyx_v_info->obj);
6247 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
6248 }
6249 __pyx_L2:;
6250
6251
6252 __Pyx_RefNannyFinishContext();
6253 return __pyx_r;
6254}
6255
6256/* "View.MemoryView":226
6257 * info.obj = self
6258 *
6259 * def __dealloc__(array self): # <<<<<<<<<<<<<<
6260 * if self.callback_free_data != NULL:
6261 * self.callback_free_data(self.data)
6262*/
6263
6264/* Python wrapper */
6265static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
6266static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
6267 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6268 __Pyx_RefNannyDeclarations
6269 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
6270 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6271 __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
6272
6273 /* function exit code */
6274 __Pyx_RefNannyFinishContext();
6275}
6276
6277static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
6278 int __pyx_t_1;
6279 int __pyx_t_2;
6280
6281 /* "View.MemoryView":227
6282 *
6283 * def __dealloc__(array self):
6284 * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6285 * self.callback_free_data(self.data)
6286 * elif self.free_data and self.data is not NULL:
6287*/
6288 __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
6289
6290 if (__pyx_t_1) {
6291
6292
6293 /* "View.MemoryView":228
6294 * def __dealloc__(array self):
6295 * if self.callback_free_data != NULL:
6296 * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
6297 * elif self.free_data and self.data is not NULL:
6298 * if self.dtype_is_object:
6299*/
6300 __pyx_v_self->callback_free_data(__pyx_v_self->data);
6301
6302 /* "View.MemoryView":227
6303 *
6304 * def __dealloc__(array self):
6305 * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6306 * self.callback_free_data(self.data)
6307 * elif self.free_data and self.data is not NULL:
6308*/
6309 goto __pyx_L3;
6310 }
6311
6312 /* "View.MemoryView":229
6313 * if self.callback_free_data != NULL:
6314 * self.callback_free_data(self.data)
6315 * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<<
6316 * if self.dtype_is_object:
6317 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6318*/
6319 if (__pyx_v_self->free_data) {
6320 } else {
6321
6322 __pyx_t_1 = __pyx_v_self->free_data;
6323 goto __pyx_L4_bool_binop_done;
6324 }
6325 __pyx_t_2 = (__pyx_v_self->data != NULL);
6326
6327
6328 __pyx_t_1 = __pyx_t_2;
6329
6330 __pyx_L4_bool_binop_done:;
6331 if (__pyx_t_1) {
6332
6333
6334 /* "View.MemoryView":230
6335 * self.callback_free_data(self.data)
6336 * elif self.free_data and self.data is not NULL:
6337 * if self.dtype_is_object: # <<<<<<<<<<<<<<
6338 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6339 * free(self.data)
6340*/
6341 if (__pyx_v_self->dtype_is_object) {
6342
6343 /* "View.MemoryView":231
6344 * elif self.free_data and self.data is not NULL:
6345 * if self.dtype_is_object:
6346 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) # <<<<<<<<<<<<<<
6347 * free(self.data)
6348 * PyObject_Free(self._shape)
6349*/
6350 __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
6351
6352 /* "View.MemoryView":230
6353 * self.callback_free_data(self.data)
6354 * elif self.free_data and self.data is not NULL:
6355 * if self.dtype_is_object: # <<<<<<<<<<<<<<
6356 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6357 * free(self.data)
6358*/
6359 }
6360
6361 /* "View.MemoryView":232
6362 * if self.dtype_is_object:
6363 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6364 * free(self.data) # <<<<<<<<<<<<<<
6365 * PyObject_Free(self._shape)
6366 *
6367*/
6368 free(__pyx_v_self->data);
6369
6370 /* "View.MemoryView":229
6371 * if self.callback_free_data != NULL:
6372 * self.callback_free_data(self.data)
6373 * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<<
6374 * if self.dtype_is_object:
6375 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6376*/
6377 }
6378 __pyx_L3:;
6379
6380 /* "View.MemoryView":233
6381 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6382 * free(self.data)
6383 * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
6384 *
6385 * @property
6386*/
6387 PyObject_Free(__pyx_v_self->_shape);
6388
6389 /* "View.MemoryView":226
6390 * info.obj = self
6391 *
6392 * def __dealloc__(array self): # <<<<<<<<<<<<<<
6393 * if self.callback_free_data != NULL:
6394 * self.callback_free_data(self.data)
6395*/
6396
6397 /* function exit code */
6398
6399}
6400
6401/* "View.MemoryView":235
6402 * PyObject_Free(self._shape)
6403 *
6404 * @property # <<<<<<<<<<<<<<
6405 * def memview(self):
6406 * return array.get_memview(self)
6407*/
6408
6409/* Python wrapper */
6410static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
6411static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
6412 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6413 PyObject *__pyx_r = 0;
6414 __Pyx_RefNannyDeclarations
6415 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6416 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6417 __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
6418
6419 /* function exit code */
6420 __Pyx_RefNannyFinishContext();
6421 return __pyx_r;
6422}
6423
6424static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
6425 PyObject *__pyx_r = NULL;
6426 __Pyx_RefNannyDeclarations
6427 PyObject *__pyx_t_1 = NULL;
6428 int __pyx_lineno = 0;
6429 const char *__pyx_filename = NULL;
6430 int __pyx_clineno = 0;
6431 __Pyx_RefNannySetupContext("__get__", 0);
6432
6433 /* "View.MemoryView":237
6434 * @property
6435 * def memview(self):
6436 * return array.get_memview(self) # <<<<<<<<<<<<<<
6437 *
6438 *
6439*/
6440 __pyx_t_1 = __pyx_array_get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)
6441 __Pyx_GOTREF(__pyx_t_1);
6442 {
6443 PyObject *__pyx_temp;
6444 {
6445 __pyx_temp = __pyx_r;
6446 __pyx_r = __pyx_t_1;
6447 }
6448 __Pyx_XDECREF(__pyx_temp);
6449 }
6450 __pyx_t_1 = 0;
6451 goto __pyx_L0;
6452
6453 /* "View.MemoryView":235
6454 * PyObject_Free(self._shape)
6455 *
6456 * @property # <<<<<<<<<<<<<<
6457 * def memview(self):
6458 * return array.get_memview(self)
6459*/
6460
6461 /* function exit code */
6462 __pyx_L1_error:;
6463 __Pyx_XDECREF(__pyx_t_1);
6464 __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6465 __pyx_r = NULL;
6466 __pyx_L0:;
6467 __Pyx_XGIVEREF(__pyx_r);
6468 __Pyx_RefNannyFinishContext();
6469 return __pyx_r;
6470}
6471
6472/* "View.MemoryView":240
6473 *
6474 *
6475 * @cname('get_memview') # <<<<<<<<<<<<<<
6476 * cdef get_memview(self):
6477 * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6478*/
6479
6480static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
6481 int __pyx_v_flags;
6482 PyObject *__pyx_r = NULL;
6483 __Pyx_RefNannyDeclarations
6484 PyObject *__pyx_t_1 = NULL;
6485 PyObject *__pyx_t_2 = NULL;
6486 PyObject *__pyx_t_3 = NULL;
6487 PyObject *__pyx_t_4 = NULL;
6488 size_t __pyx_t_5;
6489 int __pyx_lineno = 0;
6490 const char *__pyx_filename = NULL;
6491 int __pyx_clineno = 0;
6492 __Pyx_RefNannySetupContext("get_memview", 0);
6493
6494 /* "View.MemoryView":242
6495 * @cname('get_memview')
6496 * cdef get_memview(self):
6497 * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
6498 * return memoryview(self, flags, self.dtype_is_object)
6499 *
6500*/
6501 __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
6502
6503 /* "View.MemoryView":243
6504 * cdef get_memview(self):
6505 * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6506 * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
6507 *
6508 * def __len__(self):
6509*/
6510 __pyx_t_2 = NULL;
6511 __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 243, __pyx_L1_error)
6512 __Pyx_GOTREF(__pyx_t_3);
6513 __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 243, __pyx_L1_error)
6514 __Pyx_GOTREF(__pyx_t_4);
6515 __pyx_t_5 = 1;
6516 {
6517 PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4};
6518 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6519 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6520 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6521 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6522 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 243, __pyx_L1_error)
6523 __Pyx_GOTREF((PyObject *)__pyx_t_1);
6524 }
6525 {
6526 PyObject *__pyx_temp;
6527 {
6528 __pyx_temp = __pyx_r;
6529 __pyx_r = ((PyObject *)__pyx_t_1);
6530 }
6531 __Pyx_XDECREF(__pyx_temp);
6532 }
6533 __pyx_t_1 = 0;
6534 goto __pyx_L0;
6535
6536 /* "View.MemoryView":240
6537 *
6538 *
6539 * @cname('get_memview') # <<<<<<<<<<<<<<
6540 * cdef get_memview(self):
6541 * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6542*/
6543
6544 /* function exit code */
6545 __pyx_L1_error:;
6546 __Pyx_XDECREF(__pyx_t_1);
6547 __Pyx_XDECREF(__pyx_t_2);
6548 __Pyx_XDECREF(__pyx_t_3);
6549 __Pyx_XDECREF(__pyx_t_4);
6550 __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
6551 __pyx_r = 0;
6552 __pyx_L0:;
6553
6554 __Pyx_XGIVEREF(__pyx_r);
6555 __Pyx_RefNannyFinishContext();
6556 return __pyx_r;
6557}
6558
6559/* "View.MemoryView":245
6560 * return memoryview(self, flags, self.dtype_is_object)
6561 *
6562 * def __len__(self): # <<<<<<<<<<<<<<
6563 * return self._shape[0]
6564 *
6565*/
6566
6567/* Python wrapper */
6568static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
6569static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
6570 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6571 Py_ssize_t __pyx_r;
6572 __Pyx_RefNannyDeclarations
6573 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
6574 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6575 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
6576
6577 /* function exit code */
6578 __Pyx_RefNannyFinishContext();
6579 return __pyx_r;
6580}
6581
6582static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
6583 Py_ssize_t __pyx_r;
6584
6585 /* "View.MemoryView":246
6586 *
6587 * def __len__(self):
6588 * return self._shape[0] # <<<<<<<<<<<<<<
6589 *
6590 * def __getattr__(self, attr):
6591*/
6592 {
6593
6594 __pyx_r = (__pyx_v_self->_shape[0]);
6595 }
6596 goto __pyx_L0;
6597
6598 /* "View.MemoryView":245
6599 * return memoryview(self, flags, self.dtype_is_object)
6600 *
6601 * def __len__(self): # <<<<<<<<<<<<<<
6602 * return self._shape[0]
6603 *
6604*/
6605
6606 /* function exit code */
6607 __pyx_L0:;
6608
6609 return __pyx_r;
6610}
6611
6612/* "View.MemoryView":248
6613 * return self._shape[0]
6614 *
6615 * def __getattr__(self, attr): # <<<<<<<<<<<<<<
6616 * return getattr(self.memview, attr)
6617 *
6618*/
6619
6620/* Python wrapper */
6621static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
6622static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
6623 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6624 PyObject *__pyx_r = 0;
6625 __Pyx_RefNannyDeclarations
6626 __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
6627 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6628 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
6629
6630 /* function exit code */
6631 __Pyx_RefNannyFinishContext();
6632 return __pyx_r;
6633}
6634
6635static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
6636 PyObject *__pyx_r = NULL;
6637 __Pyx_RefNannyDeclarations
6638 PyObject *__pyx_t_1 = NULL;
6639 PyObject *__pyx_t_2 = NULL;
6640 int __pyx_lineno = 0;
6641 const char *__pyx_filename = NULL;
6642 int __pyx_clineno = 0;
6643 __Pyx_RefNannySetupContext("__getattr__", 0);
6644
6645 /* "View.MemoryView":249
6646 *
6647 * def __getattr__(self, attr):
6648 * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
6649 *
6650 * def __getitem__(self, item):
6651*/
6652 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error)
6653 __Pyx_GOTREF(__pyx_t_1);
6654 __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error)
6655 __Pyx_GOTREF(__pyx_t_2);
6656 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6657 {
6658 PyObject *__pyx_temp;
6659 {
6660 __pyx_temp = __pyx_r;
6661 __pyx_r = __pyx_t_2;
6662 }
6663 __Pyx_XDECREF(__pyx_temp);
6664 }
6665 __pyx_t_2 = 0;
6666 goto __pyx_L0;
6667
6668 /* "View.MemoryView":248
6669 * return self._shape[0]
6670 *
6671 * def __getattr__(self, attr): # <<<<<<<<<<<<<<
6672 * return getattr(self.memview, attr)
6673 *
6674*/
6675
6676 /* function exit code */
6677 __pyx_L1_error:;
6678 __Pyx_XDECREF(__pyx_t_1);
6679 __Pyx_XDECREF(__pyx_t_2);
6680 __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6681 __pyx_r = NULL;
6682 __pyx_L0:;
6683 __Pyx_XGIVEREF(__pyx_r);
6684 __Pyx_RefNannyFinishContext();
6685 return __pyx_r;
6686}
6687
6688/* "View.MemoryView":251
6689 * return getattr(self.memview, attr)
6690 *
6691 * def __getitem__(self, item): # <<<<<<<<<<<<<<
6692 * return self.memview[item]
6693 *
6694*/
6695
6696/* Python wrapper */
6697static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
6698static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
6699 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6700 PyObject *__pyx_r = 0;
6701 __Pyx_RefNannyDeclarations
6702 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
6703 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6704 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
6705
6706 /* function exit code */
6707 __Pyx_RefNannyFinishContext();
6708 return __pyx_r;
6709}
6710
6711static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
6712 PyObject *__pyx_r = NULL;
6713 __Pyx_RefNannyDeclarations
6714 PyObject *__pyx_t_1 = NULL;
6715 PyObject *__pyx_t_2 = NULL;
6716 int __pyx_lineno = 0;
6717 const char *__pyx_filename = NULL;
6718 int __pyx_clineno = 0;
6719 __Pyx_RefNannySetupContext("__getitem__", 0);
6720
6721 /* "View.MemoryView":252
6722 *
6723 * def __getitem__(self, item):
6724 * return self.memview[item] # <<<<<<<<<<<<<<
6725 *
6726 * def __setitem__(self, item, value):
6727*/
6728 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
6729 __Pyx_GOTREF(__pyx_t_1);
6730 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
6731 __Pyx_GOTREF(__pyx_t_2);
6732 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6733 {
6734 PyObject *__pyx_temp;
6735 {
6736 __pyx_temp = __pyx_r;
6737 __pyx_r = __pyx_t_2;
6738 }
6739 __Pyx_XDECREF(__pyx_temp);
6740 }
6741 __pyx_t_2 = 0;
6742 goto __pyx_L0;
6743
6744 /* "View.MemoryView":251
6745 * return getattr(self.memview, attr)
6746 *
6747 * def __getitem__(self, item): # <<<<<<<<<<<<<<
6748 * return self.memview[item]
6749 *
6750*/
6751
6752 /* function exit code */
6753 __pyx_L1_error:;
6754 __Pyx_XDECREF(__pyx_t_1);
6755 __Pyx_XDECREF(__pyx_t_2);
6756 __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6757 __pyx_r = NULL;
6758 __pyx_L0:;
6759 __Pyx_XGIVEREF(__pyx_r);
6760 __Pyx_RefNannyFinishContext();
6761 return __pyx_r;
6762}
6763
6764/* "View.MemoryView":254
6765 * return self.memview[item]
6766 *
6767 * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
6768 * self.memview[item] = value
6769 *
6770*/
6771
6772/* Python wrapper */
6773static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
6774static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6775 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6776 int __pyx_r;
6777 __Pyx_RefNannyDeclarations
6778 __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
6779 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6780 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
6781
6782 /* function exit code */
6783 __Pyx_RefNannyFinishContext();
6784 return __pyx_r;
6785}
6786
6787static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6788 int __pyx_r;
6789 __Pyx_RefNannyDeclarations
6790 PyObject *__pyx_t_1 = NULL;
6791 int __pyx_lineno = 0;
6792 const char *__pyx_filename = NULL;
6793 int __pyx_clineno = 0;
6794 __Pyx_RefNannySetupContext("__setitem__", 0);
6795
6796 /* "View.MemoryView":255
6797 *
6798 * def __setitem__(self, item, value):
6799 * self.memview[item] = value # <<<<<<<<<<<<<<
6800 *
6801 *
6802*/
6803 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 255, __pyx_L1_error)
6804 __Pyx_GOTREF(__pyx_t_1);
6805 if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 255, __pyx_L1_error)
6806 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6807
6808 /* "View.MemoryView":254
6809 * return self.memview[item]
6810 *
6811 * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
6812 * self.memview[item] = value
6813 *
6814*/
6815
6816 /* function exit code */
6817 __pyx_r = 0;
6818 goto __pyx_L0;
6819 __pyx_L1_error:;
6820 __Pyx_XDECREF(__pyx_t_1);
6821 __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6822 __pyx_r = -1;
6823 __pyx_L0:;
6824
6825 __Pyx_RefNannyFinishContext();
6826 return __pyx_r;
6827}
6828
6829/* "(tree fragment)":1
6830 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6831 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6832 * def __setstate_cython__(self, __pyx_state):
6833*/
6834
6835/* Python wrapper */
6836static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self,
6837#if CYTHON_VECTORCALL
6838PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6839#else
6840PyObject *__pyx_args, PyObject *__pyx_kwds
6841#endif
6842); /*proto*/
6843static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self,
6844#if CYTHON_VECTORCALL
6845PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6846#else
6847PyObject *__pyx_args, PyObject *__pyx_kwds
6848#endif
6849) {
6850 #if !CYTHON_VECTORCALL
6851 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6852 #endif
6853 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6854 PyObject *__pyx_r = 0;
6855 __Pyx_RefNannyDeclarations
6856 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6857 #if !CYTHON_VECTORCALL
6858 #if CYTHON_ASSUME_SAFE_SIZE
6859 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6860 #else
6861 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6862 #endif
6863 #endif
6864 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6865 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
6866 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6867 if (unlikely(__pyx_kwds_len < 0)) return NULL;
6868 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
6869 __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
6870
6871 /* function exit code */
6872 __Pyx_RefNannyFinishContext();
6873 return __pyx_r;
6874}
6875
6876static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
6877 PyObject *__pyx_r = NULL;
6878 __Pyx_RefNannyDeclarations
6879 int __pyx_lineno = 0;
6880 const char *__pyx_filename = NULL;
6881 int __pyx_clineno = 0;
6882 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
6883
6884 /* "(tree fragment)":2
6885 * def __reduce_cython__(self):
6886 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
6887 * def __setstate_cython__(self, __pyx_state):
6888 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6889*/
6890 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
6891 __PYX_ERR(1, 2, __pyx_L1_error)
6892
6893 /* "(tree fragment)":1
6894 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6895 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6896 * def __setstate_cython__(self, __pyx_state):
6897*/
6898
6899 /* function exit code */
6900 __pyx_L1_error:;
6901 __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6902 __pyx_r = NULL;
6903 __Pyx_XGIVEREF(__pyx_r);
6904 __Pyx_RefNannyFinishContext();
6905 return __pyx_r;
6906}
6907
6908/* "(tree fragment)":3
6909 * def __reduce_cython__(self):
6910 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6911 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6912 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6913*/
6914
6915/* Python wrapper */
6916static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self,
6917#if CYTHON_VECTORCALL
6918PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6919#else
6920PyObject *__pyx_args, PyObject *__pyx_kwds
6921#endif
6922); /*proto*/
6923static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self,
6924#if CYTHON_VECTORCALL
6925PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6926#else
6927PyObject *__pyx_args, PyObject *__pyx_kwds
6928#endif
6929) {
6930 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
6931 #if !CYTHON_VECTORCALL
6932 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6933 #endif
6934 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6935 PyObject* values[1] = {0};
6936 int __pyx_lineno = 0;
6937 const char *__pyx_filename = NULL;
6938 int __pyx_clineno = 0;
6939 PyObject *__pyx_r = 0;
6940 __Pyx_RefNannyDeclarations
6941 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
6942 #if !CYTHON_VECTORCALL
6943 #if CYTHON_ASSUME_SAFE_SIZE
6944 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6945 #else
6946 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6947 #endif
6948 #endif
6949 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6950 {
6951 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
6952 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6953 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
6954 if (__pyx_kwds_len > 0) {
6955 switch (__pyx_nargs) {
6956 case 1:
6957 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6958 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
6959 CYTHON_FALLTHROUGH;
6960 case 0: break;
6961 default: goto __pyx_L5_argtuple_error;
6962 }
6963 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6964 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
6965 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
6966 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
6967 }
6968 } else if (unlikely(__pyx_nargs != 1)) {
6969 goto __pyx_L5_argtuple_error;
6970 } else {
6971 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6972 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
6973 }
6974 __pyx_v___pyx_state = values[0];
6975 }
6976 goto __pyx_L6_skip;
6977 __pyx_L5_argtuple_error:;
6978 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
6979 __pyx_L6_skip:;
6980 goto __pyx_L4_argument_unpacking_done;
6981 __pyx_L3_error:;
6982 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6983 Py_XDECREF(values[__pyx_temp]);
6984 }
6985 __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6986 __Pyx_RefNannyFinishContext();
6987 return NULL;
6988 __pyx_L4_argument_unpacking_done:;
6989 __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);
6990
6991 /* function exit code */
6992 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6993 Py_XDECREF(values[__pyx_temp]);
6994 }
6995 __Pyx_RefNannyFinishContext();
6996 return __pyx_r;
6997}
6998
6999static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
7000 PyObject *__pyx_r = NULL;
7001 __Pyx_RefNannyDeclarations
7002 int __pyx_lineno = 0;
7003 const char *__pyx_filename = NULL;
7004 int __pyx_clineno = 0;
7005 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7006
7007 /* "(tree fragment)":4
7008 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
7009 * def __setstate_cython__(self, __pyx_state):
7010 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
7011*/
7012 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
7013 __PYX_ERR(1, 4, __pyx_L1_error)
7014
7015 /* "(tree fragment)":3
7016 * def __reduce_cython__(self):
7017 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
7018 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7019 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
7020*/
7021
7022 /* function exit code */
7023 __pyx_L1_error:;
7024 __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7025 __pyx_r = NULL;
7026 __Pyx_XGIVEREF(__pyx_r);
7027 __Pyx_RefNannyFinishContext();
7028 return __pyx_r;
7029}
7030
7031/* "View.MemoryView":264
7032 * pass
7033 *
7034 * @cname("__pyx_array_allocate_buffer") # <<<<<<<<<<<<<<
7035 * cdef int _allocate_buffer(array self) except -1:
7036 *
7037*/
7038
7039static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
7040 Py_ssize_t __pyx_v_i;
7041 PyObject **__pyx_v_p;
7042 int __pyx_r;
7043 int __pyx_t_1;
7044 Py_ssize_t __pyx_t_2;
7045 Py_ssize_t __pyx_t_3;
7046 Py_ssize_t __pyx_t_4;
7047 int __pyx_lineno = 0;
7048 const char *__pyx_filename = NULL;
7049 int __pyx_clineno = 0;
7050
7051 /* "View.MemoryView":271
7052 * cdef PyObject **p
7053 *
7054 * self.free_data = True # <<<<<<<<<<<<<<
7055 * self.data = <char *>malloc(<size_t> self.len)
7056 * if not self.data:
7057*/
7058 __pyx_v_self->free_data = 1;
7059
7060 /* "View.MemoryView":272
7061 *
7062 * self.free_data = True
7063 * self.data = <char *>malloc(<size_t> self.len) # <<<<<<<<<<<<<<
7064 * if not self.data:
7065 * raise MemoryError, "unable to allocate array data."
7066*/
7067 __pyx_v_self->data = ((char *)malloc(((size_t)__pyx_v_self->len)));
7068
7069 /* "View.MemoryView":273
7070 * self.free_data = True
7071 * self.data = <char *>malloc(<size_t> self.len)
7072 * if not self.data: # <<<<<<<<<<<<<<
7073 * raise MemoryError, "unable to allocate array data."
7074 *
7075*/
7076 __pyx_t_1 = (!(__pyx_v_self->data != 0));
7077
7078 if (unlikely(__pyx_t_1)) {
7079
7080
7081 /* "View.MemoryView":274
7082 * self.data = <char *>malloc(<size_t> self.len)
7083 * if not self.data:
7084 * raise MemoryError, "unable to allocate array data." # <<<<<<<<<<<<<<
7085 *
7086 * if self.dtype_is_object:
7087*/
7088 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_array_data, 0, 0);
7089 __PYX_ERR(1, 274, __pyx_L1_error)
7090
7091 /* "View.MemoryView":273
7092 * self.free_data = True
7093 * self.data = <char *>malloc(<size_t> self.len)
7094 * if not self.data: # <<<<<<<<<<<<<<
7095 * raise MemoryError, "unable to allocate array data."
7096 *
7097*/
7098 }
7099
7100 /* "View.MemoryView":276
7101 * raise MemoryError, "unable to allocate array data."
7102 *
7103 * if self.dtype_is_object: # <<<<<<<<<<<<<<
7104 * p = <PyObject **> self.data
7105 * for i in range(self.len // self.itemsize):
7106*/
7107 if (__pyx_v_self->dtype_is_object) {
7108
7109 /* "View.MemoryView":277
7110 *
7111 * if self.dtype_is_object:
7112 * p = <PyObject **> self.data # <<<<<<<<<<<<<<
7113 * for i in range(self.len // self.itemsize):
7114 * p[i] = Py_None
7115*/
7116 __pyx_v_p = ((PyObject **)__pyx_v_self->data);
7117
7118 /* "View.MemoryView":278
7119 * if self.dtype_is_object:
7120 * p = <PyObject **> self.data
7121 * for i in range(self.len // self.itemsize): # <<<<<<<<<<<<<<
7122 * p[i] = Py_None
7123 * Py_INCREF(Py_None)
7124*/
7125 if (unlikely(__pyx_v_self->itemsize == 0)) {
7126 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
7127 __PYX_ERR(1, 278, __pyx_L1_error)
7128 }
7129 else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
7130 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
7131 __PYX_ERR(1, 278, __pyx_L1_error)
7132 }
7133
7134 __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize, 0);
7135 __pyx_t_3 = __pyx_t_2;
7136
7137 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
7138 __pyx_v_i = __pyx_t_4;
7139
7140 /* "View.MemoryView":279
7141 * p = <PyObject **> self.data
7142 * for i in range(self.len // self.itemsize):
7143 * p[i] = Py_None # <<<<<<<<<<<<<<
7144 * Py_INCREF(Py_None)
7145 * return 0
7146*/
7147 (__pyx_v_p[__pyx_v_i]) = Py_None;
7148
7149 /* "View.MemoryView":280
7150 * for i in range(self.len // self.itemsize):
7151 * p[i] = Py_None
7152 * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
7153 * return 0
7154 *
7155*/
7156 Py_INCREF(Py_None);
7157 }
7158
7159
7160 /* "View.MemoryView":276
7161 * raise MemoryError, "unable to allocate array data."
7162 *
7163 * if self.dtype_is_object: # <<<<<<<<<<<<<<
7164 * p = <PyObject **> self.data
7165 * for i in range(self.len // self.itemsize):
7166*/
7167 }
7168
7169 /* "View.MemoryView":281
7170 * p[i] = Py_None
7171 * Py_INCREF(Py_None)
7172 * return 0 # <<<<<<<<<<<<<<
7173 *
7174 *
7175*/
7176 {
7177
7178 __pyx_r = 0;
7179 }
7180 goto __pyx_L0;
7181
7182 /* "View.MemoryView":264
7183 * pass
7184 *
7185 * @cname("__pyx_array_allocate_buffer") # <<<<<<<<<<<<<<
7186 * cdef int _allocate_buffer(array self) except -1:
7187 *
7188*/
7189
7190 /* function exit code */
7191 __pyx_L1_error:;
7192 __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
7193 __pyx_r = -1;
7194 __pyx_L0:;
7195
7196
7197
7198 return __pyx_r;
7199}
7200
7201/* "View.MemoryView":284
7202 *
7203 *
7204 * @cname("__pyx_array_new") # <<<<<<<<<<<<<<
7205 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
7206 * cdef array result
7207*/
7208
7209static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char const *__pyx_v_c_mode, char *__pyx_v_buf) {
7210 struct __pyx_array_obj *__pyx_v_result = 0;
7211 PyObject *__pyx_v_mode = 0;
7212 struct __pyx_array_obj *__pyx_r = NULL;
7213 __Pyx_RefNannyDeclarations
7214 PyObject *__pyx_t_1 = NULL;
7215 int __pyx_t_2;
7216 PyObject *__pyx_t_3 = NULL;
7217 PyObject *__pyx_t_4 = NULL;
7218 int __pyx_lineno = 0;
7219 const char *__pyx_filename = NULL;
7220 int __pyx_clineno = 0;
7221 __Pyx_RefNannySetupContext("array_cwrapper", 0);
7222
7223 /* "View.MemoryView":287
7224 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
7225 * cdef array result
7226 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. # <<<<<<<<<<<<<<
7227 *
7228 * if buf is NULL:
7229*/
7230 __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
7231
7232 if (__pyx_t_2) {
7233 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
7234 __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_fortran;
7235 } else {
7236 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
7237 __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_c;
7238 }
7239
7240 __pyx_v_mode = ((PyObject*)__pyx_t_1);
7241 __pyx_t_1 = 0;
7242
7243 /* "View.MemoryView":289
7244 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string.
7245 *
7246 * if buf is NULL: # <<<<<<<<<<<<<<
7247 * result = array.__new__(array, shape, itemsize, format, mode)
7248 * else:
7249*/
7250 __pyx_t_2 = (__pyx_v_buf == NULL);
7251
7252 if (__pyx_t_2) {
7253
7254
7255 /* "View.MemoryView":290
7256 *
7257 * if buf is NULL:
7258 * result = array.__new__(array, shape, itemsize, format, mode) # <<<<<<<<<<<<<<
7259 * else:
7260 * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
7261*/
7262 __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error)
7263 __Pyx_GOTREF(__pyx_t_1);
7264 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 290, __pyx_L1_error)
7265 __Pyx_GOTREF(__pyx_t_3);
7266 __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 290, __pyx_L1_error)
7267 __Pyx_GOTREF(__pyx_t_4);
7268 __Pyx_INCREF(__pyx_v_shape);
7269 __Pyx_GIVEREF(__pyx_v_shape);
7270 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 290, __pyx_L1_error);
7271 __Pyx_GIVEREF(__pyx_t_1);
7272 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 290, __pyx_L1_error);
7273 __Pyx_GIVEREF(__pyx_t_3);
7274 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 290, __pyx_L1_error);
7275 __Pyx_INCREF(__pyx_v_mode);
7276 __Pyx_GIVEREF(__pyx_v_mode);
7277 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 290, __pyx_L1_error);
7278 __pyx_t_1 = 0;
7279 __pyx_t_3 = 0;
7280 __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 290, __pyx_L1_error)
7281 __Pyx_GOTREF(__pyx_t_3);
7282 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7283 __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
7284 __pyx_t_3 = 0;
7285
7286 /* "View.MemoryView":289
7287 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string.
7288 *
7289 * if buf is NULL: # <<<<<<<<<<<<<<
7290 * result = array.__new__(array, shape, itemsize, format, mode)
7291 * else:
7292*/
7293 goto __pyx_L3;
7294 }
7295
7296 /* "View.MemoryView":292
7297 * result = array.__new__(array, shape, itemsize, format, mode)
7298 * else:
7299 * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) # <<<<<<<<<<<<<<
7300 * result.data = buf
7301 *
7302*/
7303 /*else*/ {
7304 __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
7305 __Pyx_GOTREF(__pyx_t_3);
7306 __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 292, __pyx_L1_error)
7307 __Pyx_GOTREF(__pyx_t_4);
7308 __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
7309 __Pyx_GOTREF(__pyx_t_1);
7310 __Pyx_INCREF(__pyx_v_shape);
7311 __Pyx_GIVEREF(__pyx_v_shape);
7312 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 292, __pyx_L1_error);
7313 __Pyx_GIVEREF(__pyx_t_3);
7314 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 292, __pyx_L1_error);
7315 __Pyx_GIVEREF(__pyx_t_4);
7316 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 292, __pyx_L1_error);
7317 __Pyx_INCREF(__pyx_v_mode);
7318 __Pyx_GIVEREF(__pyx_v_mode);
7319 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 292, __pyx_L1_error);
7320 __pyx_t_3 = 0;
7321 __pyx_t_4 = 0;
7322 __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 292, __pyx_L1_error)
7323 __Pyx_GOTREF(__pyx_t_4);
7324 if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < (0)) __PYX_ERR(1, 292, __pyx_L1_error)
7325 __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
7326 __Pyx_GOTREF(__pyx_t_3);
7327 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7328 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7329 __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
7330 __pyx_t_3 = 0;
7331
7332 /* "View.MemoryView":293
7333 * else:
7334 * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
7335 * result.data = buf # <<<<<<<<<<<<<<
7336 *
7337 * return result
7338*/
7339 __pyx_v_result->data = __pyx_v_buf;
7340 }
7341 __pyx_L3:;
7342
7343 /* "View.MemoryView":295
7344 * result.data = buf
7345 *
7346 * return result # <<<<<<<<<<<<<<
7347 *
7348 *
7349*/
7350 {
7351 struct __pyx_array_obj *__pyx_temp;
7352 {
7353 __pyx_temp = __pyx_r;
7354 __Pyx_INCREF((PyObject *)__pyx_v_result);
7355 __pyx_r = __pyx_v_result;
7356 }
7357 __Pyx_XDECREF((PyObject *)__pyx_temp);
7358 }
7359 goto __pyx_L0;
7360
7361 /* "View.MemoryView":284
7362 *
7363 *
7364 * @cname("__pyx_array_new") # <<<<<<<<<<<<<<
7365 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
7366 * cdef array result
7367*/
7368
7369 /* function exit code */
7370 __pyx_L1_error:;
7371 __Pyx_XDECREF(__pyx_t_1);
7372 __Pyx_XDECREF(__pyx_t_3);
7373 __Pyx_XDECREF(__pyx_t_4);
7374 __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
7375 __pyx_r = 0;
7376 __pyx_L0:;
7377 __Pyx_XDECREF((PyObject *)__pyx_v_result);
7378 __Pyx_XDECREF(__pyx_v_mode);
7379 __Pyx_XGIVEREF((PyObject *)__pyx_r);
7380 __Pyx_RefNannyFinishContext();
7381 return __pyx_r;
7382}
7383
7384/* "View.MemoryView":321
7385 * cdef class Enum(object):
7386 * cdef object name
7387 * def __init__(self, name): # <<<<<<<<<<<<<<
7388 * self.name = name
7389 * def __repr__(self):
7390*/
7391
7392/* Python wrapper */
7393static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self,
7394#if CYTHON_VECTORCALL_TPNEW
7395PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7396#else
7397PyObject *__pyx_args, PyObject *__pyx_kwds
7398#endif
7399); /*proto*/
7400static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self,
7401#if CYTHON_VECTORCALL_TPNEW
7402PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7403#else
7404PyObject *__pyx_args, PyObject *__pyx_kwds
7405#endif
7406) {
7407 PyObject *__pyx_v_name = 0;
7408 #if !CYTHON_VECTORCALL_TPNEW
7409 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7410 #endif
7411 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7412 PyObject* values[1] = {0};
7413 int __pyx_lineno = 0;
7414 const char *__pyx_filename = NULL;
7415 int __pyx_clineno = 0;
7416 int __pyx_r;
7417 __Pyx_RefNannyDeclarations
7418 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7419 #if !CYTHON_VECTORCALL_TPNEW
7420 #if CYTHON_ASSUME_SAFE_SIZE
7421 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7422 #else
7423 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
7424 #endif
7425 #endif
7426 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
7427 {
7428 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
7429 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL_TPNEW(__pyx_kwds) : 0;
7430 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 321, __pyx_L3_error)
7431 if (__pyx_kwds_len > 0) {
7432 switch (__pyx_nargs) {
7433 case 1:
7434 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
7435 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 321, __pyx_L3_error)
7436 CYTHON_FALLTHROUGH;
7437 case 0: break;
7438 default: goto __pyx_L5_argtuple_error;
7439 }
7440 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7441 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 321, __pyx_L3_error)
7442 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
7443 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(1, 321, __pyx_L3_error) }
7444 }
7445 } else if (unlikely(__pyx_nargs != 1)) {
7446 goto __pyx_L5_argtuple_error;
7447 } else {
7448 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
7449 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 321, __pyx_L3_error)
7450 }
7451 __pyx_v_name = values[0];
7452 }
7453 goto __pyx_L6_skip;
7454 __pyx_L5_argtuple_error:;
7455 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 321, __pyx_L3_error)
7456 __pyx_L6_skip:;
7457 goto __pyx_L4_argument_unpacking_done;
7458 __pyx_L3_error:;
7459 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7460 Py_XDECREF(values[__pyx_temp]);
7461 }
7462 __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7463 __Pyx_RefNannyFinishContext();
7464 return -1;
7465 __pyx_L4_argument_unpacking_done:;
7466 __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
7467
7468 /* function exit code */
7469 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7470 Py_XDECREF(values[__pyx_temp]);
7471 }
7472 __Pyx_RefNannyFinishContext();
7473 return __pyx_r;
7474}
7475
7476static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
7477 int __pyx_r;
7478 __Pyx_RefNannyDeclarations
7479 __Pyx_RefNannySetupContext("__init__", 0);
7480
7481 /* "View.MemoryView":322
7482 * cdef object name
7483 * def __init__(self, name):
7484 * self.name = name # <<<<<<<<<<<<<<
7485 * def __repr__(self):
7486 * return self.name
7487*/
7488 __Pyx_INCREF(__pyx_v_name);
7489 __Pyx_GIVEREF(__pyx_v_name);
7490 __Pyx_GOTREF(__pyx_v_self->name);
7491 __Pyx_DECREF(__pyx_v_self->name);
7492 __pyx_v_self->name = __pyx_v_name;
7493
7494 /* "View.MemoryView":321
7495 * cdef class Enum(object):
7496 * cdef object name
7497 * def __init__(self, name): # <<<<<<<<<<<<<<
7498 * self.name = name
7499 * def __repr__(self):
7500*/
7501
7502 /* function exit code */
7503 __pyx_r = 0;
7504
7505 __Pyx_RefNannyFinishContext();
7506 return __pyx_r;
7507}
7508
7509/* "View.MemoryView":323
7510 * def __init__(self, name):
7511 * self.name = name
7512 * def __repr__(self): # <<<<<<<<<<<<<<
7513 * return self.name
7514 *
7515*/
7516
7517/* Python wrapper */
7518static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
7519static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
7520 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7521 PyObject *__pyx_r = 0;
7522 __Pyx_RefNannyDeclarations
7523 __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
7524 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7525 __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
7526
7527 /* function exit code */
7528 __Pyx_RefNannyFinishContext();
7529 return __pyx_r;
7530}
7531
7532static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
7533 PyObject *__pyx_r = NULL;
7534 __Pyx_RefNannyDeclarations
7535 __Pyx_RefNannySetupContext("__repr__", 0);
7536
7537 /* "View.MemoryView":324
7538 * self.name = name
7539 * def __repr__(self):
7540 * return self.name # <<<<<<<<<<<<<<
7541 *
7542 * cdef generic = Enum("<strided and direct or indirect>")
7543*/
7544 {
7545 PyObject *__pyx_temp;
7546 {
7547 __pyx_temp = __pyx_r;
7548 __Pyx_INCREF(__pyx_v_self->name);
7549 __pyx_r = __pyx_v_self->name;
7550 }
7551 __Pyx_XDECREF(__pyx_temp);
7552 }
7553 goto __pyx_L0;
7554
7555 /* "View.MemoryView":323
7556 * def __init__(self, name):
7557 * self.name = name
7558 * def __repr__(self): # <<<<<<<<<<<<<<
7559 * return self.name
7560 *
7561*/
7562
7563 /* function exit code */
7564 __pyx_L0:;
7565 __Pyx_XGIVEREF(__pyx_r);
7566 __Pyx_RefNannyFinishContext();
7567 return __pyx_r;
7568}
7569
7570/* "(tree fragment)":1
7571 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7572 * cdef tuple state
7573 * cdef object _dict
7574*/
7575
7576/* Python wrapper */
7577static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self,
7578#if CYTHON_VECTORCALL
7579PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7580#else
7581PyObject *__pyx_args, PyObject *__pyx_kwds
7582#endif
7583); /*proto*/
7584static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self,
7585#if CYTHON_VECTORCALL
7586PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7587#else
7588PyObject *__pyx_args, PyObject *__pyx_kwds
7589#endif
7590) {
7591 #if !CYTHON_VECTORCALL
7592 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7593 #endif
7594 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7595 PyObject *__pyx_r = 0;
7596 __Pyx_RefNannyDeclarations
7597 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7598 #if !CYTHON_VECTORCALL
7599 #if CYTHON_ASSUME_SAFE_SIZE
7600 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7601 #else
7602 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7603 #endif
7604 #endif
7605 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7606 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
7607 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7608 if (unlikely(__pyx_kwds_len < 0)) return NULL;
7609 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
7610 __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
7611
7612 /* function exit code */
7613 __Pyx_RefNannyFinishContext();
7614 return __pyx_r;
7615}
7616
7617static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
7618 PyObject *__pyx_v_state = 0;
7619 PyObject *__pyx_v__dict = 0;
7620 int __pyx_v_use_setstate;
7621 PyObject *__pyx_r = NULL;
7622 __Pyx_RefNannyDeclarations
7623 PyObject *__pyx_t_1 = NULL;
7624 PyObject *__pyx_t_2 = NULL;
7625 int __pyx_t_3;
7626 int __pyx_t_4;
7627 PyObject *__pyx_t_5 = NULL;
7628 int __pyx_lineno = 0;
7629 const char *__pyx_filename = NULL;
7630 int __pyx_clineno = 0;
7631 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
7632
7633 /* "(tree fragment)":5
7634 * cdef object _dict
7635 * cdef bint use_setstate
7636 * with CRITICAL_SECTION(self): # <<<<<<<<<<<<<<
7637 * state = (self.name,)
7638 * _dict = getattr(self, '__dict__', None)
7639*/
7640 {
7641 __Pyx_PyCriticalSection __pyx_cs;
7642 __pyx_t_1 = ((PyObject *)__pyx_v_self);
7643 __Pyx_INCREF(__pyx_t_1);
7644 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
7645 /*try:*/ {
7646
7647 /* "(tree fragment)":6
7648 * cdef bint use_setstate
7649 * with CRITICAL_SECTION(self):
7650 * state = (self.name,) # <<<<<<<<<<<<<<
7651 * _dict = getattr(self, '__dict__', None)
7652 * if _dict is not None and _dict:
7653*/
7654 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L4_error)
7655 __Pyx_GOTREF(__pyx_t_2);
7656 __Pyx_INCREF(__pyx_v_self->name);
7657 __Pyx_GIVEREF(__pyx_v_self->name);
7658 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
7659 __pyx_v_state = ((PyObject*)__pyx_t_2);
7660 __pyx_t_2 = 0;
7661
7662 /* "(tree fragment)":7
7663 * with CRITICAL_SECTION(self):
7664 * state = (self.name,)
7665 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
7666 * if _dict is not None and _dict:
7667 * state += (_dict,)
7668*/
7669 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L4_error)
7670 __Pyx_GOTREF(__pyx_t_2);
7671 __pyx_v__dict = __pyx_t_2;
7672 __pyx_t_2 = 0;
7673 }
7674
7675 /* "(tree fragment)":5
7676 * cdef object _dict
7677 * cdef bint use_setstate
7678 * with CRITICAL_SECTION(self): # <<<<<<<<<<<<<<
7679 * state = (self.name,)
7680 * _dict = getattr(self, '__dict__', None)
7681*/
7682 /*finally:*/ {
7683 /*normal exit:*/{
7684 __Pyx_PyCriticalSection_End(&__pyx_cs);
7685 goto __pyx_L5;
7686 }
7687 __pyx_L4_error: {
7688 __Pyx_PyCriticalSection_End(&__pyx_cs);
7689 goto __pyx_L1_error;
7690 }
7691 __pyx_L5:;
7692 }
7693 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7694 }
7695
7696 /* "(tree fragment)":8
7697 * state = (self.name,)
7698 * _dict = getattr(self, '__dict__', None)
7699 * if _dict is not None and _dict: # <<<<<<<<<<<<<<
7700 * state += (_dict,)
7701 * use_setstate = True
7702*/
7703 __pyx_t_4 = (__pyx_v__dict != Py_None);
7704 if (__pyx_t_4) {
7705
7706 } else {
7707
7708 __pyx_t_3 = __pyx_t_4;
7709
7710 goto __pyx_L7_bool_binop_done;
7711 }
7712 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 8, __pyx_L1_error)
7713
7714 __pyx_t_3 = __pyx_t_4;
7715
7716 __pyx_L7_bool_binop_done:;
7717 if (__pyx_t_3) {
7718
7719
7720 /* "(tree fragment)":9
7721 * _dict = getattr(self, '__dict__', None)
7722 * if _dict is not None and _dict:
7723 * state += (_dict,) # <<<<<<<<<<<<<<
7724 * use_setstate = True
7725 * else:
7726*/
7727 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
7728 __Pyx_GOTREF(__pyx_t_1);
7729 __Pyx_INCREF(__pyx_v__dict);
7730 __Pyx_GIVEREF(__pyx_v__dict);
7731 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 9, __pyx_L1_error);
7732 __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
7733 __Pyx_GOTREF(__pyx_t_2);
7734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7735 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
7736 __pyx_t_2 = 0;
7737
7738 /* "(tree fragment)":10
7739 * if _dict is not None and _dict:
7740 * state += (_dict,)
7741 * use_setstate = True # <<<<<<<<<<<<<<
7742 * else:
7743 * use_setstate = self.name is not None
7744*/
7745 __pyx_v_use_setstate = 1;
7746
7747 /* "(tree fragment)":8
7748 * state = (self.name,)
7749 * _dict = getattr(self, '__dict__', None)
7750 * if _dict is not None and _dict: # <<<<<<<<<<<<<<
7751 * state += (_dict,)
7752 * use_setstate = True
7753*/
7754 goto __pyx_L6;
7755 }
7756
7757 /* "(tree fragment)":12
7758 * use_setstate = True
7759 * else:
7760 * use_setstate = self.name is not None # <<<<<<<<<<<<<<
7761 * if use_setstate:
7762 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7763*/
7764 /*else*/ {
7765 __pyx_t_3 = (__pyx_v_self->name != Py_None);
7766 __pyx_v_use_setstate = __pyx_t_3;
7767 }
7768 __pyx_L6:;
7769
7770 /* "(tree fragment)":13
7771 * else:
7772 * use_setstate = self.name is not None
7773 * if use_setstate: # <<<<<<<<<<<<<<
7774 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7775 * else:
7776*/
7777 if (__pyx_v_use_setstate) {
7778
7779 /* "(tree fragment)":14
7780 * use_setstate = self.name is not None
7781 * if use_setstate:
7782 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state # <<<<<<<<<<<<<<
7783 * else:
7784 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7785*/
7786 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
7787 __Pyx_GOTREF(__pyx_t_2);
7788 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
7789 __Pyx_GOTREF(__pyx_t_1);
7790 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7791 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7792 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
7793 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863);
7794 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863);
7795 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
7796 __Pyx_INCREF(Py_None);
7797 __Pyx_GIVEREF(Py_None);
7798 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
7799 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
7800 __Pyx_GOTREF(__pyx_t_5);
7801 __Pyx_GIVEREF(__pyx_t_2);
7802 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
7803 __Pyx_GIVEREF(__pyx_t_1);
7804 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
7805 __Pyx_INCREF(__pyx_v_state);
7806 __Pyx_GIVEREF(__pyx_v_state);
7807 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
7808 __pyx_t_2 = 0;
7809 __pyx_t_1 = 0;
7810 {
7811 PyObject *__pyx_temp;
7812 {
7813 __pyx_temp = __pyx_r;
7814 __pyx_r = __pyx_t_5;
7815 }
7816 __Pyx_XDECREF(__pyx_temp);
7817 }
7818 __pyx_t_5 = 0;
7819 goto __pyx_L0;
7820
7821 /* "(tree fragment)":13
7822 * else:
7823 * use_setstate = self.name is not None
7824 * if use_setstate: # <<<<<<<<<<<<<<
7825 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7826 * else:
7827*/
7828 }
7829
7830 /* "(tree fragment)":16
7831 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7832 * else:
7833 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) # <<<<<<<<<<<<<<
7834 * def __setstate_cython__(self, __pyx_state):
7835 * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7836*/
7837 /*else*/ {
7838 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
7839 __Pyx_GOTREF(__pyx_t_5);
7840 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error)
7841 __Pyx_GOTREF(__pyx_t_1);
7842 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7843 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7844 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
7845 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863);
7846 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863);
7847 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
7848 __Pyx_INCREF(__pyx_v_state);
7849 __Pyx_GIVEREF(__pyx_v_state);
7850 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
7851 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
7852 __Pyx_GOTREF(__pyx_t_2);
7853 __Pyx_GIVEREF(__pyx_t_5);
7854 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
7855 __Pyx_GIVEREF(__pyx_t_1);
7856 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
7857 __pyx_t_5 = 0;
7858 __pyx_t_1 = 0;
7859 {
7860 PyObject *__pyx_temp;
7861 {
7862 __pyx_temp = __pyx_r;
7863 __pyx_r = __pyx_t_2;
7864 }
7865 __Pyx_XDECREF(__pyx_temp);
7866 }
7867 __pyx_t_2 = 0;
7868 goto __pyx_L0;
7869 }
7870
7871 /* "(tree fragment)":1
7872 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7873 * cdef tuple state
7874 * cdef object _dict
7875*/
7876
7877 /* function exit code */
7878 __pyx_L1_error:;
7879 __Pyx_XDECREF(__pyx_t_1);
7880 __Pyx_XDECREF(__pyx_t_2);
7881 __Pyx_XDECREF(__pyx_t_5);
7882 __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7883 __pyx_r = NULL;
7884 __pyx_L0:;
7885 __Pyx_XDECREF(__pyx_v_state);
7886 __Pyx_XDECREF(__pyx_v__dict);
7887
7888 __Pyx_XGIVEREF(__pyx_r);
7889 __Pyx_RefNannyFinishContext();
7890 return __pyx_r;
7891}
7892
7893/* "(tree fragment)":17
7894 * else:
7895 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7896 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7897 * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7898*/
7899
7900/* Python wrapper */
7901static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self,
7902#if CYTHON_VECTORCALL
7903PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7904#else
7905PyObject *__pyx_args, PyObject *__pyx_kwds
7906#endif
7907); /*proto*/
7908static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self,
7909#if CYTHON_VECTORCALL
7910PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7911#else
7912PyObject *__pyx_args, PyObject *__pyx_kwds
7913#endif
7914) {
7915 PyObject *__pyx_v___pyx_state = 0;
7916 #if !CYTHON_VECTORCALL
7917 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7918 #endif
7919 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7920 PyObject* values[1] = {0};
7921 int __pyx_lineno = 0;
7922 const char *__pyx_filename = NULL;
7923 int __pyx_clineno = 0;
7924 PyObject *__pyx_r = 0;
7925 __Pyx_RefNannyDeclarations
7926 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7927 #if !CYTHON_VECTORCALL
7928 #if CYTHON_ASSUME_SAFE_SIZE
7929 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7930 #else
7931 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7932 #endif
7933 #endif
7934 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7935 {
7936 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
7937 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7938 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 17, __pyx_L3_error)
7939 if (__pyx_kwds_len > 0) {
7940 switch (__pyx_nargs) {
7941 case 1:
7942 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7943 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 17, __pyx_L3_error)
7944 CYTHON_FALLTHROUGH;
7945 case 0: break;
7946 default: goto __pyx_L5_argtuple_error;
7947 }
7948 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7949 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 17, __pyx_L3_error)
7950 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
7951 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 17, __pyx_L3_error) }
7952 }
7953 } else if (unlikely(__pyx_nargs != 1)) {
7954 goto __pyx_L5_argtuple_error;
7955 } else {
7956 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7957 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 17, __pyx_L3_error)
7958 }
7959 __pyx_v___pyx_state = values[0];
7960 }
7961 goto __pyx_L6_skip;
7962 __pyx_L5_argtuple_error:;
7963 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 17, __pyx_L3_error)
7964 __pyx_L6_skip:;
7965 goto __pyx_L4_argument_unpacking_done;
7966 __pyx_L3_error:;
7967 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7968 Py_XDECREF(values[__pyx_temp]);
7969 }
7970 __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7971 __Pyx_RefNannyFinishContext();
7972 return NULL;
7973 __pyx_L4_argument_unpacking_done:;
7974 __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);
7975
7976 /* function exit code */
7977 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7978 Py_XDECREF(values[__pyx_temp]);
7979 }
7980 __Pyx_RefNannyFinishContext();
7981 return __pyx_r;
7982}
7983
7984static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7985 PyObject *__pyx_r = NULL;
7986 __Pyx_RefNannyDeclarations
7987 PyObject *__pyx_t_1 = NULL;
7988 PyObject *__pyx_t_2 = NULL;
7989 int __pyx_lineno = 0;
7990 const char *__pyx_filename = NULL;
7991 int __pyx_clineno = 0;
7992 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7993
7994 /* "(tree fragment)":18
7995 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7996 * def __setstate_cython__(self, __pyx_state):
7997 * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
7998*/
7999 __pyx_t_1 = __pyx_v___pyx_state;
8000 __Pyx_INCREF(__pyx_t_1);
8001 if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 18, __pyx_L1_error)
8002 if (unlikely(__pyx_t_1 == Py_None)) {
8003 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
8004 __PYX_ERR(1, 18, __pyx_L1_error)
8005 }
8006 __pyx_t_2 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error)
8007 __Pyx_GOTREF(__pyx_t_2);
8008 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8009 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8010
8011 /* "(tree fragment)":17
8012 * else:
8013 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
8014 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8015 * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8016*/
8017
8018 /* function exit code */
8019 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8020 goto __pyx_L0;
8021 __pyx_L1_error:;
8022 __Pyx_XDECREF(__pyx_t_1);
8023 __Pyx_XDECREF(__pyx_t_2);
8024 __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8025 __pyx_r = NULL;
8026 __pyx_L0:;
8027 __Pyx_XGIVEREF(__pyx_r);
8028 __Pyx_RefNannyFinishContext();
8029 return __pyx_r;
8030}
8031
8032/* "View.MemoryView":367
8033 * cdef const __Pyx_TypeInfo *typeinfo
8034 *
8035 * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8036 * self.obj = obj
8037 * self.flags = flags
8038*/
8039
8040/* Python wrapper */
8041static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self,
8042#if CYTHON_VECTORCALL_TPNEW
8043PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8044#else
8045PyObject *__pyx_args, PyObject *__pyx_kwds
8046#endif
8047); /*proto*/
8048static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self,
8049#if CYTHON_VECTORCALL_TPNEW
8050PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8051#else
8052PyObject *__pyx_args, PyObject *__pyx_kwds
8053#endif
8054) {
8055 PyObject *__pyx_v_obj = 0;
8056 int __pyx_v_flags;
8057 int __pyx_v_dtype_is_object;
8058 #if !CYTHON_VECTORCALL_TPNEW
8059 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8060 #endif
8061 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8062 PyObject* values[3] = {0,0,0};
8063 int __pyx_lineno = 0;
8064 const char *__pyx_filename = NULL;
8065 int __pyx_clineno = 0;
8066 int __pyx_r;
8067 __Pyx_RefNannyDeclarations
8068 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
8069 #if !CYTHON_VECTORCALL_TPNEW
8070 #if CYTHON_ASSUME_SAFE_SIZE
8071 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8072 #else
8073 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
8074 #endif
8075 #endif
8076 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
8077 {
8078 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_dtype_is_object,0};
8079 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL_TPNEW(__pyx_kwds) : 0;
8080 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 367, __pyx_L3_error)
8081 if (__pyx_kwds_len > 0) {
8082 switch (__pyx_nargs) {
8083 case 3:
8084 values[2] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 2);
8085 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 367, __pyx_L3_error)
8086 CYTHON_FALLTHROUGH;
8087 case 2:
8088 values[1] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 1);
8089 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 367, __pyx_L3_error)
8090 CYTHON_FALLTHROUGH;
8091 case 1:
8092 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
8093 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 367, __pyx_L3_error)
8094 CYTHON_FALLTHROUGH;
8095 case 0: break;
8096 default: goto __pyx_L5_argtuple_error;
8097 }
8098 const Py_ssize_t kwd_pos_args = __pyx_nargs;
8099 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 367, __pyx_L3_error)
8100 for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
8101 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 367, __pyx_L3_error) }
8102 }
8103 } else {
8104 switch (__pyx_nargs) {
8105 case 3:
8106 values[2] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 2);
8107 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 367, __pyx_L3_error)
8108 CYTHON_FALLTHROUGH;
8109 case 2:
8110 values[1] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 1);
8111 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 367, __pyx_L3_error)
8112 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
8113 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 367, __pyx_L3_error)
8114 break;
8115 default: goto __pyx_L5_argtuple_error;
8116 }
8117 }
8118 __pyx_v_obj = values[0];
8119 __pyx_v_flags = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 367, __pyx_L3_error)
8120 if (values[2]) {
8121 __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 367, __pyx_L3_error)
8122 } else {
8123 __pyx_v_dtype_is_object = ((int)0);
8124 }
8125 }
8126 goto __pyx_L6_skip;
8127 __pyx_L5_argtuple_error:;
8128 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 367, __pyx_L3_error)
8129 __pyx_L6_skip:;
8130 goto __pyx_L4_argument_unpacking_done;
8131 __pyx_L3_error:;
8132 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8133 Py_XDECREF(values[__pyx_temp]);
8134 }
8135 __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8136 __Pyx_RefNannyFinishContext();
8137 return -1;
8138 __pyx_L4_argument_unpacking_done:;
8139 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
8140
8141 /* function exit code */
8142 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8143 Py_XDECREF(values[__pyx_temp]);
8144 }
8145
8146
8147 __Pyx_RefNannyFinishContext();
8148 return __pyx_r;
8149}
8150
8151static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
8152 int __pyx_r;
8153 __Pyx_RefNannyDeclarations
8154 int __pyx_t_1;
8155 int __pyx_t_2;
8156 int __pyx_t_3;
8157 int __pyx_lineno = 0;
8158 const char *__pyx_filename = NULL;
8159 int __pyx_clineno = 0;
8160 __Pyx_RefNannySetupContext("__cinit__", 0);
8161
8162 /* "View.MemoryView":368
8163 *
8164 * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
8165 * self.obj = obj # <<<<<<<<<<<<<<
8166 * self.flags = flags
8167 * if type(self) is memoryview or obj is not None:
8168*/
8169 __Pyx_INCREF(__pyx_v_obj);
8170 __Pyx_GIVEREF(__pyx_v_obj);
8171 __Pyx_GOTREF(__pyx_v_self->obj);
8172 __Pyx_DECREF(__pyx_v_self->obj);
8173 __pyx_v_self->obj = __pyx_v_obj;
8174
8175 /* "View.MemoryView":369
8176 * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
8177 * self.obj = obj
8178 * self.flags = flags # <<<<<<<<<<<<<<
8179 * if type(self) is memoryview or obj is not None:
8180 * PyObject_GetBuffer(obj, &self.view, flags)
8181*/
8182 __pyx_v_self->flags = __pyx_v_flags;
8183
8184 /* "View.MemoryView":370
8185 * self.obj = obj
8186 * self.flags = flags
8187 * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
8188 * PyObject_GetBuffer(obj, &self.view, flags)
8189 * if <PyObject *> self.view.obj == NULL:
8190*/
8191 __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_memoryview_type));
8192 if (!__pyx_t_2) {
8193
8194 } else {
8195
8196 __pyx_t_1 = __pyx_t_2;
8197
8198 goto __pyx_L4_bool_binop_done;
8199 }
8200 __pyx_t_2 = (__pyx_v_obj != Py_None);
8201
8202 __pyx_t_1 = __pyx_t_2;
8203
8204 __pyx_L4_bool_binop_done:;
8205 if (__pyx_t_1) {
8206
8207
8208 /* "View.MemoryView":371
8209 * self.flags = flags
8210 * if type(self) is memoryview or obj is not None:
8211 * PyObject_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
8212 * if <PyObject *> self.view.obj == NULL:
8213 * (<__pyx_buffer *> &self.view).obj = Py_None
8214*/
8215 __pyx_t_3 = PyObject_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 371, __pyx_L1_error)
8216
8217
8218 /* "View.MemoryView":372
8219 * if type(self) is memoryview or obj is not None:
8220 * PyObject_GetBuffer(obj, &self.view, flags)
8221 * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
8222 * (<__pyx_buffer *> &self.view).obj = Py_None
8223 * Py_INCREF(Py_None)
8224*/
8225 __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
8226
8227 if (__pyx_t_1) {
8228
8229
8230 /* "View.MemoryView":373
8231 * PyObject_GetBuffer(obj, &self.view, flags)
8232 * if <PyObject *> self.view.obj == NULL:
8233 * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
8234 * Py_INCREF(Py_None)
8235 *
8236*/
8237 ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
8238
8239 /* "View.MemoryView":374
8240 * if <PyObject *> self.view.obj == NULL:
8241 * (<__pyx_buffer *> &self.view).obj = Py_None
8242 * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
8243 *
8244 * if not __PYX_CYTHON_ATOMICS_ENABLED():
8245*/
8246 Py_INCREF(Py_None);
8247
8248 /* "View.MemoryView":372
8249 * if type(self) is memoryview or obj is not None:
8250 * PyObject_GetBuffer(obj, &self.view, flags)
8251 * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
8252 * (<__pyx_buffer *> &self.view).obj = Py_None
8253 * Py_INCREF(Py_None)
8254*/
8255 }
8256
8257 /* "View.MemoryView":370
8258 * self.obj = obj
8259 * self.flags = flags
8260 * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
8261 * PyObject_GetBuffer(obj, &self.view, flags)
8262 * if <PyObject *> self.view.obj == NULL:
8263*/
8264 }
8265
8266 /* "View.MemoryView":376
8267 * Py_INCREF(Py_None)
8268 *
8269 * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
8270 * global __pyx_memoryview_thread_locks_used
8271 * if (__pyx_memoryview_thread_locks_used < 8 and
8272*/
8273 __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
8274
8275 if (__pyx_t_1) {
8276
8277
8278 /* "View.MemoryView":378
8279 * if not __PYX_CYTHON_ATOMICS_ENABLED():
8280 * global __pyx_memoryview_thread_locks_used
8281 * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<<
8282 *
8283 * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
8284*/
8285 __pyx_t_2 = (__pyx_memoryview_thread_locks_used < 8);
8286
8287 if (__pyx_t_2) {
8288
8289 } else {
8290
8291 __pyx_t_1 = __pyx_t_2;
8292
8293 goto __pyx_L9_bool_binop_done;
8294 }
8295
8296 /* "View.MemoryView":380
8297 * if (__pyx_memoryview_thread_locks_used < 8 and
8298 *
8299 * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): # <<<<<<<<<<<<<<
8300 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8301 * __pyx_memoryview_thread_locks_used += 1
8302*/
8303 __pyx_t_2 = (!__PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING());
8304
8305
8306 __pyx_t_1 = __pyx_t_2;
8307
8308 __pyx_L9_bool_binop_done:;
8309
8310 /* "View.MemoryView":378
8311 * if not __PYX_CYTHON_ATOMICS_ENABLED():
8312 * global __pyx_memoryview_thread_locks_used
8313 * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<<
8314 *
8315 * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
8316*/
8317 if (__pyx_t_1) {
8318
8319
8320 /* "View.MemoryView":381
8321 *
8322 * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
8323 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
8324 * __pyx_memoryview_thread_locks_used += 1
8325 * if self.lock is NULL:
8326*/
8327 __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8328
8329 /* "View.MemoryView":382
8330 * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
8331 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8332 * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
8333 * if self.lock is NULL:
8334 * self.lock = PyThread_allocate_lock()
8335*/
8336 __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
8337
8338 /* "View.MemoryView":378
8339 * if not __PYX_CYTHON_ATOMICS_ENABLED():
8340 * global __pyx_memoryview_thread_locks_used
8341 * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<<
8342 *
8343 * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
8344*/
8345 }
8346
8347 /* "View.MemoryView":383
8348 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8349 * __pyx_memoryview_thread_locks_used += 1
8350 * if self.lock is NULL: # <<<<<<<<<<<<<<
8351 * self.lock = PyThread_allocate_lock()
8352 * if self.lock is NULL:
8353*/
8354 __pyx_t_1 = (__pyx_v_self->lock == NULL);
8355
8356 if (__pyx_t_1) {
8357
8358
8359 /* "View.MemoryView":384
8360 * __pyx_memoryview_thread_locks_used += 1
8361 * if self.lock is NULL:
8362 * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
8363 * if self.lock is NULL:
8364 * raise MemoryError
8365*/
8366 __pyx_v_self->lock = PyThread_allocate_lock();
8367
8368 /* "View.MemoryView":385
8369 * if self.lock is NULL:
8370 * self.lock = PyThread_allocate_lock()
8371 * if self.lock is NULL: # <<<<<<<<<<<<<<
8372 * raise MemoryError
8373 *
8374*/
8375 __pyx_t_1 = (__pyx_v_self->lock == NULL);
8376
8377 if (unlikely(__pyx_t_1)) {
8378
8379
8380 /* "View.MemoryView":386
8381 * self.lock = PyThread_allocate_lock()
8382 * if self.lock is NULL:
8383 * raise MemoryError # <<<<<<<<<<<<<<
8384 *
8385 * if flags & PyBUF_FORMAT:
8386*/
8387 PyErr_NoMemory(); __PYX_ERR(1, 386, __pyx_L1_error)
8388
8389 /* "View.MemoryView":385
8390 * if self.lock is NULL:
8391 * self.lock = PyThread_allocate_lock()
8392 * if self.lock is NULL: # <<<<<<<<<<<<<<
8393 * raise MemoryError
8394 *
8395*/
8396 }
8397
8398 /* "View.MemoryView":383
8399 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8400 * __pyx_memoryview_thread_locks_used += 1
8401 * if self.lock is NULL: # <<<<<<<<<<<<<<
8402 * self.lock = PyThread_allocate_lock()
8403 * if self.lock is NULL:
8404*/
8405 }
8406
8407 /* "View.MemoryView":376
8408 * Py_INCREF(Py_None)
8409 *
8410 * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
8411 * global __pyx_memoryview_thread_locks_used
8412 * if (__pyx_memoryview_thread_locks_used < 8 and
8413*/
8414 }
8415
8416 /* "View.MemoryView":388
8417 * raise MemoryError
8418 *
8419 * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
8420 * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8421 * else:
8422*/
8423 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
8424
8425 if (__pyx_t_1) {
8426
8427
8428 /* "View.MemoryView":389
8429 *
8430 * if flags & PyBUF_FORMAT:
8431 * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
8432 * else:
8433 * self.dtype_is_object = dtype_is_object
8434*/
8435 __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
8436
8437 if (__pyx_t_2) {
8438
8439 } else {
8440
8441 __pyx_t_1 = __pyx_t_2;
8442
8443 goto __pyx_L14_bool_binop_done;
8444 }
8445 __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
8446
8447
8448 __pyx_t_1 = __pyx_t_2;
8449
8450 __pyx_L14_bool_binop_done:;
8451 __pyx_v_self->dtype_is_object = __pyx_t_1;
8452
8453 /* "View.MemoryView":388
8454 * raise MemoryError
8455 *
8456 * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
8457 * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8458 * else:
8459*/
8460 goto __pyx_L13;
8461 }
8462
8463 /* "View.MemoryView":391
8464 * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8465 * else:
8466 * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
8467 *
8468 * with cython.cdivision(True):
8469*/
8470 /*else*/ {
8471 __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
8472 }
8473 __pyx_L13:;
8474
8475 /* "View.MemoryView":394
8476 *
8477 * with cython.cdivision(True):
8478 * assert <uintptr_t>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 # <<<<<<<<<<<<<<
8479 * self.typeinfo = NULL
8480 *
8481*/
8482 #ifndef CYTHON_WITHOUT_ASSERTIONS
8483 if (unlikely(__pyx_assertions_enabled())) {
8484 __pyx_t_1 = ((((__pyx_uintptr_t)(&__pyx_v_self->acquisition_count)) % (sizeof(__pyx_atomic_int_type))) == 0);
8485
8486 if (unlikely(!__pyx_t_1)) {
8487 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
8488 __PYX_ERR(1, 394, __pyx_L1_error)
8489 }
8490
8491 }
8492 #else
8493 if ((1)); else __PYX_ERR(1, 394, __pyx_L1_error)
8494 #endif
8495
8496 /* "View.MemoryView":395
8497 * with cython.cdivision(True):
8498 * assert <uintptr_t>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
8499 * self.typeinfo = NULL # <<<<<<<<<<<<<<
8500 *
8501 * def __dealloc__(memoryview self):
8502*/
8503 __pyx_v_self->typeinfo = NULL;
8504
8505 /* "View.MemoryView":367
8506 * cdef const __Pyx_TypeInfo *typeinfo
8507 *
8508 * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8509 * self.obj = obj
8510 * self.flags = flags
8511*/
8512
8513 /* function exit code */
8514 __pyx_r = 0;
8515 goto __pyx_L0;
8516 __pyx_L1_error:;
8517 __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8518 __pyx_r = -1;
8519 __pyx_L0:;
8520
8521 __Pyx_RefNannyFinishContext();
8522 return __pyx_r;
8523}
8524
8525/* "View.MemoryView":397
8526 * self.typeinfo = NULL
8527 *
8528 * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
8529 * if self.obj is not None:
8530 * PyBuffer_Release(&self.view)
8531*/
8532
8533/* Python wrapper */
8534static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
8535static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
8536 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8537 __Pyx_RefNannyDeclarations
8538 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
8539 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8540 __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
8541
8542 /* function exit code */
8543 __Pyx_RefNannyFinishContext();
8544}
8545
8546static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
8547 int __pyx_v_i;
8548 int __pyx_t_1;
8549 Py_ssize_t __pyx_t_2;
8550 Py_ssize_t __pyx_t_3;
8551 int __pyx_t_4;
8552 PyThread_type_lock __pyx_t_5;
8553 PyThread_type_lock __pyx_t_6;
8554
8555 /* "View.MemoryView":398
8556 *
8557 * def __dealloc__(memoryview self):
8558 * if self.obj is not None: # <<<<<<<<<<<<<<
8559 * PyBuffer_Release(&self.view)
8560 * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8561*/
8562 __pyx_t_1 = (__pyx_v_self->obj != Py_None);
8563 if (__pyx_t_1) {
8564
8565
8566 /* "View.MemoryView":399
8567 * def __dealloc__(memoryview self):
8568 * if self.obj is not None:
8569 * PyBuffer_Release(&self.view) # <<<<<<<<<<<<<<
8570 * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8571 *
8572*/
8573 PyBuffer_Release((&__pyx_v_self->view));
8574
8575 /* "View.MemoryView":398
8576 *
8577 * def __dealloc__(memoryview self):
8578 * if self.obj is not None: # <<<<<<<<<<<<<<
8579 * PyBuffer_Release(&self.view)
8580 * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8581*/
8582 goto __pyx_L3;
8583 }
8584
8585 /* "View.MemoryView":400
8586 * if self.obj is not None:
8587 * PyBuffer_Release(&self.view)
8588 * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
8589 *
8590 * (<__pyx_buffer *> &self.view).obj = NULL
8591*/
8592 __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
8593
8594 if (__pyx_t_1) {
8595
8596
8597 /* "View.MemoryView":402
8598 * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8599 *
8600 * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
8601 * Py_DECREF(Py_None)
8602 *
8603*/
8604 ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
8605
8606 /* "View.MemoryView":403
8607 *
8608 * (<__pyx_buffer *> &self.view).obj = NULL
8609 * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
8610 *
8611 * cdef int i
8612*/
8613 Py_DECREF(Py_None);
8614
8615 /* "View.MemoryView":400
8616 * if self.obj is not None:
8617 * PyBuffer_Release(&self.view)
8618 * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
8619 *
8620 * (<__pyx_buffer *> &self.view).obj = NULL
8621*/
8622 }
8623 __pyx_L3:;
8624
8625 /* "View.MemoryView":407
8626 * cdef int i
8627 * global __pyx_memoryview_thread_locks_used
8628 * if self.lock != NULL: # <<<<<<<<<<<<<<
8629 * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
8630 * if __pyx_memoryview_thread_locks[i] is self.lock:
8631*/
8632 __pyx_t_1 = (__pyx_v_self->lock != NULL);
8633
8634 if (__pyx_t_1) {
8635
8636
8637 /* "View.MemoryView":408
8638 * global __pyx_memoryview_thread_locks_used
8639 * if self.lock != NULL:
8640 * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
8641 * if __pyx_memoryview_thread_locks[i] is self.lock:
8642 * __pyx_memoryview_thread_locks_used -= 1
8643*/
8644 __pyx_t_1 = __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING();
8645
8646 if (__pyx_t_1) {
8647
8648 __pyx_t_2 = 0;
8649 } else {
8650
8651 __pyx_t_2 = __pyx_memoryview_thread_locks_used;
8652 }
8653
8654 __pyx_t_3 = __pyx_t_2;
8655
8656 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
8657 __pyx_v_i = __pyx_t_4;
8658
8659 /* "View.MemoryView":409
8660 * if self.lock != NULL:
8661 * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
8662 * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
8663 * __pyx_memoryview_thread_locks_used -= 1
8664 * if i != __pyx_memoryview_thread_locks_used:
8665*/
8666 __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
8667
8668 if (__pyx_t_1) {
8669
8670
8671 /* "View.MemoryView":410
8672 * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
8673 * if __pyx_memoryview_thread_locks[i] is self.lock:
8674 * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
8675 * if i != __pyx_memoryview_thread_locks_used:
8676 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8677*/
8678 __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
8679
8680 /* "View.MemoryView":411
8681 * if __pyx_memoryview_thread_locks[i] is self.lock:
8682 * __pyx_memoryview_thread_locks_used -= 1
8683 * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
8684 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8685 * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8686*/
8687 __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
8688
8689 if (__pyx_t_1) {
8690
8691
8692 /* "View.MemoryView":413
8693 * if i != __pyx_memoryview_thread_locks_used:
8694 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8695 * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
8696 * break
8697 * else:
8698*/
8699 __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8700
8701 __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
8702
8703
8704 /* "View.MemoryView":412
8705 * __pyx_memoryview_thread_locks_used -= 1
8706 * if i != __pyx_memoryview_thread_locks_used:
8707 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
8708 * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8709 * break
8710*/
8711 (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
8712
8713 (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
8714
8715
8716 /* "View.MemoryView":411
8717 * if __pyx_memoryview_thread_locks[i] is self.lock:
8718 * __pyx_memoryview_thread_locks_used -= 1
8719 * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
8720 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8721 * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8722*/
8723 }
8724
8725 /* "View.MemoryView":414
8726 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8727 * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8728 * break # <<<<<<<<<<<<<<
8729 * else:
8730 * PyThread_free_lock(self.lock)
8731*/
8732 goto __pyx_L6_break;
8733
8734 /* "View.MemoryView":409
8735 * if self.lock != NULL:
8736 * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
8737 * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
8738 * __pyx_memoryview_thread_locks_used -= 1
8739 * if i != __pyx_memoryview_thread_locks_used:
8740*/
8741 }
8742 }
8743 /*else*/ {
8744
8745 /* "View.MemoryView":416
8746 * break
8747 * else:
8748 * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
8749 *
8750 *
8751*/
8752 PyThread_free_lock(__pyx_v_self->lock);
8753 }
8754 __pyx_L6_break:;
8755
8756
8757
8758 /* "View.MemoryView":407
8759 * cdef int i
8760 * global __pyx_memoryview_thread_locks_used
8761 * if self.lock != NULL: # <<<<<<<<<<<<<<
8762 * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
8763 * if __pyx_memoryview_thread_locks[i] is self.lock:
8764*/
8765 }
8766
8767 /* "View.MemoryView":397
8768 * self.typeinfo = NULL
8769 *
8770 * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
8771 * if self.obj is not None:
8772 * PyBuffer_Release(&self.view)
8773*/
8774
8775 /* function exit code */
8776
8777
8778}
8779
8780/* "View.MemoryView":419
8781 *
8782 *
8783 * cdef char *get_item_pointer(memoryview self, index: tuple) except NULL: # <<<<<<<<<<<<<<
8784 * cdef Py_ssize_t dim
8785 * cdef char *itemp = <char *> self.view.buf
8786*/
8787
8788static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
8789 Py_ssize_t __pyx_v_dim;
8790 char *__pyx_v_itemp;
8791 PyObject *__pyx_v_idx = NULL;
8792 char *__pyx_r;
8793 __Pyx_RefNannyDeclarations
8794 Py_ssize_t __pyx_t_1;
8795 PyObject *__pyx_t_2 = NULL;
8796 Py_ssize_t __pyx_t_3;
8797 PyObject *__pyx_t_4 = NULL;
8798 Py_ssize_t __pyx_t_5;
8799 char *__pyx_t_6;
8800 int __pyx_lineno = 0;
8801 const char *__pyx_filename = NULL;
8802 int __pyx_clineno = 0;
8803 __Pyx_RefNannySetupContext("get_item_pointer", 0);
8804
8805 /* "View.MemoryView":421
8806 * cdef char *get_item_pointer(memoryview self, index: tuple) except NULL:
8807 * cdef Py_ssize_t dim
8808 * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
8809 *
8810 * for dim, idx in enumerate(index):
8811*/
8812 __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
8813
8814 /* "View.MemoryView":423
8815 * cdef char *itemp = <char *> self.view.buf
8816 *
8817 * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
8818 * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8819 *
8820*/
8821
8822 __pyx_t_1 = 0;
8823 __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
8824 __pyx_t_3 = 0;
8825 for (;;) {
8826 {
8827 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
8828 #if !CYTHON_ASSUME_SAFE_SIZE
8829 if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 423, __pyx_L1_error)
8830 #endif
8831 if (__pyx_t_3 >= __pyx_temp) break;
8832 }
8833 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8834 __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
8835 #else
8836 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
8837 #endif
8838 ++__pyx_t_3;
8839 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 423, __pyx_L1_error)
8840 __Pyx_GOTREF(__pyx_t_4);
8841 __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
8842 __pyx_t_4 = 0;
8843 __pyx_v_dim = __pyx_t_1;
8844 __pyx_t_1 = (__pyx_t_1 + 1);
8845
8846 /* "View.MemoryView":424
8847 *
8848 * for dim, idx in enumerate(index):
8849 * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
8850 *
8851 * return itemp
8852*/
8853 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 424, __pyx_L1_error)
8854 __pyx_t_6 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_5, __pyx_v_dim); if (unlikely(__pyx_t_6 == ((void *)NULL))) __PYX_ERR(1, 424, __pyx_L1_error)
8855 __pyx_v_itemp = __pyx_t_6;
8856
8857
8858 /* "View.MemoryView":423
8859 * cdef char *itemp = <char *> self.view.buf
8860 *
8861 * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
8862 * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8863 *
8864*/
8865 }
8866 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8867
8868 /* "View.MemoryView":426
8869 * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8870 *
8871 * return itemp # <<<<<<<<<<<<<<
8872 *
8873 *
8874*/
8875 {
8876
8877 __pyx_r = __pyx_v_itemp;
8878 }
8879 goto __pyx_L0;
8880
8881 /* "View.MemoryView":419
8882 *
8883 *
8884 * cdef char *get_item_pointer(memoryview self, index: tuple) except NULL: # <<<<<<<<<<<<<<
8885 * cdef Py_ssize_t dim
8886 * cdef char *itemp = <char *> self.view.buf
8887*/
8888
8889 /* function exit code */
8890 __pyx_L1_error:;
8891 __Pyx_XDECREF(__pyx_t_2);
8892 __Pyx_XDECREF(__pyx_t_4);
8893 __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
8894 __pyx_r = NULL;
8895 __pyx_L0:;
8896
8897
8898 __Pyx_XDECREF(__pyx_v_idx);
8899
8900 __Pyx_RefNannyFinishContext();
8901 return __pyx_r;
8902}
8903
8904/* "View.MemoryView":429
8905 *
8906 *
8907 * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
8908 * cdef char *buffer
8909 * if self.view.ndim == 1 and isinstance(index, int):
8910*/
8911
8912/* Python wrapper */
8913static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
8914static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
8915 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8916 PyObject *__pyx_r = 0;
8917 __Pyx_RefNannyDeclarations
8918 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8919 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8920 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
8921
8922 /* function exit code */
8923 __Pyx_RefNannyFinishContext();
8924 return __pyx_r;
8925}
8926
8927static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
8928 char *__pyx_v_buffer;
8929 int __pyx_v_have_slices;
8930 PyObject *__pyx_v_indices = NULL;
8931 char *__pyx_v_itemp;
8932 PyObject *__pyx_r = NULL;
8933 __Pyx_RefNannyDeclarations
8934 int __pyx_t_1;
8935 int __pyx_t_2;
8936 Py_ssize_t __pyx_t_3;
8937 char *__pyx_t_4;
8938 PyObject *__pyx_t_5 = NULL;
8939 PyObject *__pyx_t_6 = NULL;
8940 PyObject *__pyx_t_7 = NULL;
8941 int __pyx_lineno = 0;
8942 const char *__pyx_filename = NULL;
8943 int __pyx_clineno = 0;
8944 __Pyx_RefNannySetupContext("__getitem__", 0);
8945
8946 /* "View.MemoryView":431
8947 * def __getitem__(memoryview self, object index):
8948 * cdef char *buffer
8949 * if self.view.ndim == 1 and isinstance(index, int): # <<<<<<<<<<<<<<
8950 * buffer = <char *> self.view.buf
8951 * return self.convert_item_to_object(
8952*/
8953 __pyx_t_2 = (__pyx_v_self->view.ndim == 1);
8954
8955 if (__pyx_t_2) {
8956
8957 } else {
8958
8959 __pyx_t_1 = __pyx_t_2;
8960
8961 goto __pyx_L4_bool_binop_done;
8962 }
8963 __pyx_t_2 = PyLong_Check(__pyx_v_index);
8964
8965 __pyx_t_1 = __pyx_t_2;
8966
8967 __pyx_L4_bool_binop_done:;
8968 if (__pyx_t_1) {
8969
8970
8971 /* "View.MemoryView":432
8972 * cdef char *buffer
8973 * if self.view.ndim == 1 and isinstance(index, int):
8974 * buffer = <char *> self.view.buf # <<<<<<<<<<<<<<
8975 * return self.convert_item_to_object(
8976 * pybuffer_index(&self.view, buffer, index, 0))
8977*/
8978 __pyx_v_buffer = ((char *)__pyx_v_self->view.buf);
8979
8980 /* "View.MemoryView":434
8981 * buffer = <char *> self.view.buf
8982 * return self.convert_item_to_object(
8983 * pybuffer_index(&self.view, buffer, index, 0)) # <<<<<<<<<<<<<<
8984 *
8985 * if index is Ellipsis:
8986*/
8987 __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 434, __pyx_L1_error)
8988 __pyx_t_4 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_buffer, __pyx_t_3, 0); if (unlikely(__pyx_t_4 == ((void *)NULL))) __PYX_ERR(1, 434, __pyx_L1_error)
8989
8990 /* "View.MemoryView":433
8991 * if self.view.ndim == 1 and isinstance(index, int):
8992 * buffer = <char *> self.view.buf
8993 * return self.convert_item_to_object( # <<<<<<<<<<<<<<
8994 * pybuffer_index(&self.view, buffer, index, 0))
8995 *
8996*/
8997 __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 433, __pyx_L1_error)
8998 __Pyx_GOTREF(__pyx_t_5);
8999
9000
9001 {
9002 PyObject *__pyx_temp;
9003 {
9004 __pyx_temp = __pyx_r;
9005 __pyx_r = __pyx_t_5;
9006 }
9007 __Pyx_XDECREF(__pyx_temp);
9008 }
9009 __pyx_t_5 = 0;
9010 goto __pyx_L0;
9011
9012 /* "View.MemoryView":431
9013 * def __getitem__(memoryview self, object index):
9014 * cdef char *buffer
9015 * if self.view.ndim == 1 and isinstance(index, int): # <<<<<<<<<<<<<<
9016 * buffer = <char *> self.view.buf
9017 * return self.convert_item_to_object(
9018*/
9019 }
9020
9021 /* "View.MemoryView":436
9022 * pybuffer_index(&self.view, buffer, index, 0))
9023 *
9024 * if index is Ellipsis: # <<<<<<<<<<<<<<
9025 * return self
9026 *
9027*/
9028 __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
9029 if (__pyx_t_1) {
9030
9031
9032 /* "View.MemoryView":437
9033 *
9034 * if index is Ellipsis:
9035 * return self # <<<<<<<<<<<<<<
9036 *
9037 * have_slices, indices = _unellipsify(index, self.view.ndim)
9038*/
9039 {
9040 PyObject *__pyx_temp;
9041 {
9042 __pyx_temp = __pyx_r;
9043 __Pyx_INCREF((PyObject *)__pyx_v_self);
9044 __pyx_r = ((PyObject *)__pyx_v_self);
9045 }
9046 __Pyx_XDECREF(__pyx_temp);
9047 }
9048 goto __pyx_L0;
9049
9050 /* "View.MemoryView":436
9051 * pybuffer_index(&self.view, buffer, index, 0))
9052 *
9053 * if index is Ellipsis: # <<<<<<<<<<<<<<
9054 * return self
9055 *
9056*/
9057 }
9058
9059 /* "View.MemoryView":439
9060 * return self
9061 *
9062 * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
9063 *
9064 * cdef char *itemp
9065*/
9066 __pyx_t_5 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 439, __pyx_L1_error)
9067 __Pyx_GOTREF(__pyx_t_5);
9068 if (likely(__pyx_t_5 != Py_None)) {
9069 PyObject* sequence = __pyx_t_5;
9070 Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
9071 if (unlikely(size != 2)) {
9072 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9073 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9074 __PYX_ERR(1, 439, __pyx_L1_error)
9075 }
9076 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9077 __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
9078 __Pyx_INCREF(__pyx_t_6);
9079 __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
9080 __Pyx_INCREF(__pyx_t_7);
9081 #else
9082 __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 439, __pyx_L1_error)
9083 __Pyx_GOTREF(__pyx_t_6);
9084 __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L1_error)
9085 __Pyx_GOTREF(__pyx_t_7);
9086 #endif
9087 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9088 } else {
9089 __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 439, __pyx_L1_error)
9090 }
9091 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 439, __pyx_L1_error)
9092 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9093 if (!(likely(PyTuple_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_7))) __PYX_ERR(1, 439, __pyx_L1_error)
9094 __pyx_v_have_slices = __pyx_t_1;
9095 __pyx_v_indices = ((PyObject*)__pyx_t_7);
9096 __pyx_t_7 = 0;
9097
9098 /* "View.MemoryView":442
9099 *
9100 * cdef char *itemp
9101 * if have_slices: # <<<<<<<<<<<<<<
9102 * return memview_slice(self, indices)
9103 * else:
9104*/
9105 if (__pyx_v_have_slices) {
9106
9107 /* "View.MemoryView":443
9108 * cdef char *itemp
9109 * if have_slices:
9110 * return memview_slice(self, indices) # <<<<<<<<<<<<<<
9111 * else:
9112 * itemp = memoryview.get_item_pointer(self, <tuple> indices)
9113*/
9114 __pyx_t_5 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 443, __pyx_L1_error)
9115 __Pyx_GOTREF(__pyx_t_5);
9116 {
9117 PyObject *__pyx_temp;
9118 {
9119 __pyx_temp = __pyx_r;
9120 __pyx_r = __pyx_t_5;
9121 }
9122 __Pyx_XDECREF(__pyx_temp);
9123 }
9124 __pyx_t_5 = 0;
9125 goto __pyx_L0;
9126
9127 /* "View.MemoryView":442
9128 *
9129 * cdef char *itemp
9130 * if have_slices: # <<<<<<<<<<<<<<
9131 * return memview_slice(self, indices)
9132 * else:
9133*/
9134 }
9135
9136 /* "View.MemoryView":445
9137 * return memview_slice(self, indices)
9138 * else:
9139 * itemp = memoryview.get_item_pointer(self, <tuple> indices) # <<<<<<<<<<<<<<
9140 * return self.convert_item_to_object(itemp)
9141 *
9142*/
9143 /*else*/ {
9144 if (unlikely(__pyx_v_indices == Py_None)) {
9145 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
9146 __PYX_ERR(1, 445, __pyx_L1_error)
9147 }
9148 __pyx_t_4 = __pyx_memoryview_get_item_pointer(__pyx_v_self, ((PyObject*)__pyx_v_indices)); if (unlikely(__pyx_t_4 == ((void *)NULL))) __PYX_ERR(1, 445, __pyx_L1_error)
9149 __pyx_v_itemp = __pyx_t_4;
9150
9151 /* "View.MemoryView":446
9152 * else:
9153 * itemp = memoryview.get_item_pointer(self, <tuple> indices)
9154 * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
9155 *
9156 * def __setitem__(memoryview self, object index, object value):
9157*/
9158 __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 446, __pyx_L1_error)
9159 __Pyx_GOTREF(__pyx_t_5);
9160 {
9161 PyObject *__pyx_temp;
9162 {
9163 __pyx_temp = __pyx_r;
9164 __pyx_r = __pyx_t_5;
9165 }
9166 __Pyx_XDECREF(__pyx_temp);
9167 }
9168 __pyx_t_5 = 0;
9169 goto __pyx_L0;
9170 }
9171
9172 /* "View.MemoryView":429
9173 *
9174 *
9175 * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
9176 * cdef char *buffer
9177 * if self.view.ndim == 1 and isinstance(index, int):
9178*/
9179
9180 /* function exit code */
9181 __pyx_L1_error:;
9182 __Pyx_XDECREF(__pyx_t_5);
9183 __Pyx_XDECREF(__pyx_t_6);
9184 __Pyx_XDECREF(__pyx_t_7);
9185 __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9186 __pyx_r = NULL;
9187 __pyx_L0:;
9188
9189
9190 __Pyx_XDECREF(__pyx_v_indices);
9191
9192 __Pyx_XGIVEREF(__pyx_r);
9193 __Pyx_RefNannyFinishContext();
9194 return __pyx_r;
9195}
9196
9197/* "View.MemoryView":448
9198 * return self.convert_item_to_object(itemp)
9199 *
9200 * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
9201 * if self.view.readonly:
9202 * raise TypeError, "Cannot assign to read-only memoryview"
9203*/
9204
9205/* Python wrapper */
9206static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
9207static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9208 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
9209 int __pyx_r;
9210 __Pyx_RefNannyDeclarations
9211 __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
9212 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
9213 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
9214
9215 /* function exit code */
9216 __Pyx_RefNannyFinishContext();
9217 return __pyx_r;
9218}
9219
9220static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9221 int __pyx_v_have_slices;
9222 PyObject *__pyx_v_indices = NULL;
9223 PyObject *__pyx_v_obj = NULL;
9224 struct __pyx_memoryview_obj *__pyx_v_target_slice = NULL;
9225 int __pyx_r;
9226 __Pyx_RefNannyDeclarations
9227 int __pyx_t_1;
9228 int __pyx_t_2;
9229 PyObject *__pyx_t_3 = NULL;
9230 PyObject *__pyx_t_4 = NULL;
9231 PyObject *__pyx_t_5 = NULL;
9232 int __pyx_lineno = 0;
9233 const char *__pyx_filename = NULL;
9234 int __pyx_clineno = 0;
9235 __Pyx_RefNannySetupContext("__setitem__", 0);
9236
9237 /* "View.MemoryView":449
9238 *
9239 * def __setitem__(memoryview self, object index, object value):
9240 * if self.view.readonly: # <<<<<<<<<<<<<<
9241 * raise TypeError, "Cannot assign to read-only memoryview"
9242 *
9243*/
9244 if (unlikely(__pyx_v_self->view.readonly)) {
9245
9246 /* "View.MemoryView":450
9247 * def __setitem__(memoryview self, object index, object value):
9248 * if self.view.readonly:
9249 * raise TypeError, "Cannot assign to read-only memoryview" # <<<<<<<<<<<<<<
9250 *
9251 * if self.view.ndim == 1 and isinstance(index, int):
9252*/
9253 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Cannot_assign_to_read_only_memor, 0, 0);
9254 __PYX_ERR(1, 450, __pyx_L1_error)
9255
9256 /* "View.MemoryView":449
9257 *
9258 * def __setitem__(memoryview self, object index, object value):
9259 * if self.view.readonly: # <<<<<<<<<<<<<<
9260 * raise TypeError, "Cannot assign to read-only memoryview"
9261 *
9262*/
9263 }
9264
9265 /* "View.MemoryView":452
9266 * raise TypeError, "Cannot assign to read-only memoryview"
9267 *
9268 * if self.view.ndim == 1 and isinstance(index, int): # <<<<<<<<<<<<<<
9269 * memoryview.setitem_indexed1(self, index, value)
9270 * return
9271*/
9272 __pyx_t_2 = (__pyx_v_self->view.ndim == 1);
9273
9274 if (__pyx_t_2) {
9275
9276 } else {
9277
9278 __pyx_t_1 = __pyx_t_2;
9279
9280 goto __pyx_L5_bool_binop_done;
9281 }
9282 __pyx_t_2 = PyLong_Check(__pyx_v_index);
9283
9284 __pyx_t_1 = __pyx_t_2;
9285
9286 __pyx_L5_bool_binop_done:;
9287 if (__pyx_t_1) {
9288
9289
9290 /* "View.MemoryView":453
9291 *
9292 * if self.view.ndim == 1 and isinstance(index, int):
9293 * memoryview.setitem_indexed1(self, index, value) # <<<<<<<<<<<<<<
9294 * return
9295 *
9296*/
9297 __pyx_t_3 = __pyx_memoryview_setitem_indexed1(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 453, __pyx_L1_error)
9298 __Pyx_GOTREF(__pyx_t_3);
9299 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9300
9301 /* "View.MemoryView":454
9302 * if self.view.ndim == 1 and isinstance(index, int):
9303 * memoryview.setitem_indexed1(self, index, value)
9304 * return # <<<<<<<<<<<<<<
9305 *
9306 * have_slices, indices = _unellipsify(index, self.view.ndim)
9307*/
9308 {
9309 __pyx_r = 0;
9310 }
9311 goto __pyx_L0;
9312
9313 /* "View.MemoryView":452
9314 * raise TypeError, "Cannot assign to read-only memoryview"
9315 *
9316 * if self.view.ndim == 1 and isinstance(index, int): # <<<<<<<<<<<<<<
9317 * memoryview.setitem_indexed1(self, index, value)
9318 * return
9319*/
9320 }
9321
9322 /* "View.MemoryView":456
9323 * return
9324 *
9325 * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
9326 *
9327 * if have_slices:
9328*/
9329 __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 456, __pyx_L1_error)
9330 __Pyx_GOTREF(__pyx_t_3);
9331 if (likely(__pyx_t_3 != Py_None)) {
9332 PyObject* sequence = __pyx_t_3;
9333 Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
9334 if (unlikely(size != 2)) {
9335 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9336 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9337 __PYX_ERR(1, 456, __pyx_L1_error)
9338 }
9339 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9340 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
9341 __Pyx_INCREF(__pyx_t_4);
9342 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
9343 __Pyx_INCREF(__pyx_t_5);
9344 #else
9345 __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 456, __pyx_L1_error)
9346 __Pyx_GOTREF(__pyx_t_4);
9347 __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 456, __pyx_L1_error)
9348 __Pyx_GOTREF(__pyx_t_5);
9349 #endif
9350 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9351 } else {
9352 __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 456, __pyx_L1_error)
9353 }
9354 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 456, __pyx_L1_error)
9355 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9356 if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(1, 456, __pyx_L1_error)
9357 __pyx_v_have_slices = __pyx_t_1;
9358 __pyx_v_indices = ((PyObject*)__pyx_t_5);
9359 __pyx_t_5 = 0;
9360
9361 /* "View.MemoryView":458
9362 * have_slices, indices = _unellipsify(index, self.view.ndim)
9363 *
9364 * if have_slices: # <<<<<<<<<<<<<<
9365 * obj = memoryview.is_slice(self, value)
9366 * target_slice = memview_slice(self, indices)
9367*/
9368 if (__pyx_v_have_slices) {
9369
9370 /* "View.MemoryView":459
9371 *
9372 * if have_slices:
9373 * obj = memoryview.is_slice(self, value) # <<<<<<<<<<<<<<
9374 * target_slice = memview_slice(self, indices)
9375 * if obj is not None:
9376*/
9377 __pyx_t_3 = __pyx_memoryview_is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error)
9378 __Pyx_GOTREF(__pyx_t_3);
9379 __pyx_v_obj = __pyx_t_3;
9380 __pyx_t_3 = 0;
9381
9382 /* "View.MemoryView":460
9383 * if have_slices:
9384 * obj = memoryview.is_slice(self, value)
9385 * target_slice = memview_slice(self, indices) # <<<<<<<<<<<<<<
9386 * if obj is not None:
9387 * memoryview.setitem_slice_assignment(self, target_slice, obj)
9388*/
9389 __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error)
9390 __Pyx_GOTREF(__pyx_t_3);
9391 __pyx_v_target_slice = ((struct __pyx_memoryview_obj *)__pyx_t_3);
9392 __pyx_t_3 = 0;
9393
9394 /* "View.MemoryView":461
9395 * obj = memoryview.is_slice(self, value)
9396 * target_slice = memview_slice(self, indices)
9397 * if obj is not None: # <<<<<<<<<<<<<<
9398 * memoryview.setitem_slice_assignment(self, target_slice, obj)
9399 * else:
9400*/
9401 __pyx_t_1 = (__pyx_v_obj != Py_None);
9402 if (__pyx_t_1) {
9403
9404
9405 /* "View.MemoryView":462
9406 * target_slice = memview_slice(self, indices)
9407 * if obj is not None:
9408 * memoryview.setitem_slice_assignment(self, target_slice, obj) # <<<<<<<<<<<<<<
9409 * else:
9410 * memoryview.setitem_slice_assign_scalar(self, target_slice, value)
9411*/
9412 __pyx_t_3 = __pyx_memoryview_setitem_slice_assignment(__pyx_v_self, ((PyObject *)__pyx_v_target_slice), __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 462, __pyx_L1_error)
9413 __Pyx_GOTREF(__pyx_t_3);
9414 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9415
9416 /* "View.MemoryView":461
9417 * obj = memoryview.is_slice(self, value)
9418 * target_slice = memview_slice(self, indices)
9419 * if obj is not None: # <<<<<<<<<<<<<<
9420 * memoryview.setitem_slice_assignment(self, target_slice, obj)
9421 * else:
9422*/
9423 goto __pyx_L8;
9424 }
9425
9426 /* "View.MemoryView":464
9427 * memoryview.setitem_slice_assignment(self, target_slice, obj)
9428 * else:
9429 * memoryview.setitem_slice_assign_scalar(self, target_slice, value) # <<<<<<<<<<<<<<
9430 * else:
9431 * memoryview.setitem_indexed(self, <tuple> indices, value)
9432*/
9433 /*else*/ {
9434 __pyx_t_3 = __pyx_memoryview_setitem_slice_assign_scalar(__pyx_v_self, __pyx_v_target_slice, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 464, __pyx_L1_error)
9435 __Pyx_GOTREF(__pyx_t_3);
9436 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9437 }
9438 __pyx_L8:;
9439
9440 /* "View.MemoryView":458
9441 * have_slices, indices = _unellipsify(index, self.view.ndim)
9442 *
9443 * if have_slices: # <<<<<<<<<<<<<<
9444 * obj = memoryview.is_slice(self, value)
9445 * target_slice = memview_slice(self, indices)
9446*/
9447 goto __pyx_L7;
9448 }
9449
9450 /* "View.MemoryView":466
9451 * memoryview.setitem_slice_assign_scalar(self, target_slice, value)
9452 * else:
9453 * memoryview.setitem_indexed(self, <tuple> indices, value) # <<<<<<<<<<<<<<
9454 *
9455 *
9456*/
9457 /*else*/ {
9458 if (unlikely(__pyx_v_indices == Py_None)) {
9459 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
9460 __PYX_ERR(1, 466, __pyx_L1_error)
9461 }
9462 __pyx_t_3 = __pyx_memoryview_setitem_indexed(__pyx_v_self, ((PyObject*)__pyx_v_indices), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 466, __pyx_L1_error)
9463 __Pyx_GOTREF(__pyx_t_3);
9464 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9465 }
9466 __pyx_L7:;
9467
9468 /* "View.MemoryView":448
9469 * return self.convert_item_to_object(itemp)
9470 *
9471 * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
9472 * if self.view.readonly:
9473 * raise TypeError, "Cannot assign to read-only memoryview"
9474*/
9475
9476 /* function exit code */
9477 __pyx_r = 0;
9478 goto __pyx_L0;
9479 __pyx_L1_error:;
9480 __Pyx_XDECREF(__pyx_t_3);
9481 __Pyx_XDECREF(__pyx_t_4);
9482 __Pyx_XDECREF(__pyx_t_5);
9483 __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9484 __pyx_r = -1;
9485 __pyx_L0:;
9486
9487 __Pyx_XDECREF(__pyx_v_indices);
9488 __Pyx_XDECREF(__pyx_v_obj);
9489 __Pyx_XDECREF((PyObject *)__pyx_v_target_slice);
9490
9491 __Pyx_RefNannyFinishContext();
9492 return __pyx_r;
9493}
9494
9495/* "View.MemoryView":469
9496 *
9497 *
9498 * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
9499 * if not isinstance(obj, memoryview):
9500 * try:
9501*/
9502
9503static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
9504 PyObject *__pyx_r = NULL;
9505 __Pyx_RefNannyDeclarations
9506 int __pyx_t_1;
9507 int __pyx_t_2;
9508 PyObject *__pyx_t_3 = NULL;
9509 PyObject *__pyx_t_4 = NULL;
9510 PyObject *__pyx_t_5 = NULL;
9511 PyObject *__pyx_t_6 = NULL;
9512 PyObject *__pyx_t_7 = NULL;
9513 PyObject *__pyx_t_8 = NULL;
9514 PyObject *__pyx_t_9 = NULL;
9515 size_t __pyx_t_10;
9516 int __pyx_t_11;
9517 int __pyx_lineno = 0;
9518 const char *__pyx_filename = NULL;
9519 int __pyx_clineno = 0;
9520 __Pyx_RefNannySetupContext("is_slice", 0);
9521 __Pyx_INCREF(__pyx_v_obj);
9522
9523 /* "View.MemoryView":470
9524 *
9525 * cdef is_slice(self, obj):
9526 * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
9527 * try:
9528 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9529*/
9530 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_memoryview_type);
9531 __pyx_t_2 = (!__pyx_t_1);
9532
9533
9534 if (__pyx_t_2) {
9535
9536
9537 /* "View.MemoryView":471
9538 * cdef is_slice(self, obj):
9539 * if not isinstance(obj, memoryview):
9540 * try: # <<<<<<<<<<<<<<
9541 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9542 * self.dtype_is_object)
9543*/
9544 {
9545 __Pyx_PyThreadState_declare
9546 __Pyx_PyThreadState_assign
9547 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
9548 __Pyx_XGOTREF(__pyx_t_3);
9549 __Pyx_XGOTREF(__pyx_t_4);
9550 __Pyx_XGOTREF(__pyx_t_5);
9551 /*try:*/ {
9552
9553 /* "View.MemoryView":472
9554 * if not isinstance(obj, memoryview):
9555 * try:
9556 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
9557 * self.dtype_is_object)
9558 * except TypeError:
9559*/
9560 __pyx_t_7 = NULL;
9561 __pyx_t_8 = __Pyx_PyLong_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 472, __pyx_L4_error)
9562 __Pyx_GOTREF(__pyx_t_8);
9563
9564 /* "View.MemoryView":473
9565 * try:
9566 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9567 * self.dtype_is_object) # <<<<<<<<<<<<<<
9568 * except TypeError:
9569 * return None
9570*/
9571 __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 473, __pyx_L4_error)
9572 __Pyx_GOTREF(__pyx_t_9);
9573 __pyx_t_10 = 1;
9574 {
9575 PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_obj, __pyx_t_8, __pyx_t_9};
9576 __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
9577 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9578 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9579 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9580 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 472, __pyx_L4_error)
9581 __Pyx_GOTREF((PyObject *)__pyx_t_6);
9582 }
9583 __Pyx_DECREF_SET(__pyx_v_obj, ((PyObject *)__pyx_t_6));
9584 __pyx_t_6 = 0;
9585
9586 /* "View.MemoryView":471
9587 * cdef is_slice(self, obj):
9588 * if not isinstance(obj, memoryview):
9589 * try: # <<<<<<<<<<<<<<
9590 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9591 * self.dtype_is_object)
9592*/
9593 }
9594 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9595 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9596 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9597 goto __pyx_L9_try_end;
9598 __pyx_L4_error:;
9599 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9600 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9601 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9602 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9603
9604 /* "View.MemoryView":474
9605 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9606 * self.dtype_is_object)
9607 * except TypeError: # <<<<<<<<<<<<<<
9608 * return None
9609 *
9610*/
9611 __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
9612 if (__pyx_t_11) {
9613 __Pyx_ErrRestore(0,0,0);
9614
9615 /* "View.MemoryView":475
9616 * self.dtype_is_object)
9617 * except TypeError:
9618 * return None # <<<<<<<<<<<<<<
9619 *
9620 * return obj
9621*/
9622 {
9623 PyObject *__pyx_temp;
9624 {
9625 __pyx_temp = __pyx_r;
9626 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9627 }
9628 __Pyx_XDECREF(__pyx_temp);
9629 }
9630 goto __pyx_L7_except_return;
9631 }
9632 goto __pyx_L6_except_error;
9633
9634 /* "View.MemoryView":471
9635 * cdef is_slice(self, obj):
9636 * if not isinstance(obj, memoryview):
9637 * try: # <<<<<<<<<<<<<<
9638 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9639 * self.dtype_is_object)
9640*/
9641 __pyx_L6_except_error:;
9642 __Pyx_XGIVEREF(__pyx_t_3);
9643 __Pyx_XGIVEREF(__pyx_t_4);
9644 __Pyx_XGIVEREF(__pyx_t_5);
9645 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
9646 goto __pyx_L1_error;
9647 __pyx_L7_except_return:;
9648 __Pyx_XGIVEREF(__pyx_t_3);
9649 __Pyx_XGIVEREF(__pyx_t_4);
9650 __Pyx_XGIVEREF(__pyx_t_5);
9651 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
9652 goto __pyx_L0;
9653 __pyx_L9_try_end:;
9654 }
9655
9656 /* "View.MemoryView":470
9657 *
9658 * cdef is_slice(self, obj):
9659 * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
9660 * try:
9661 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9662*/
9663 }
9664
9665 /* "View.MemoryView":477
9666 * return None
9667 *
9668 * return obj # <<<<<<<<<<<<<<
9669 *
9670 *
9671*/
9672 {
9673 PyObject *__pyx_temp;
9674 {
9675 __pyx_temp = __pyx_r;
9676 __Pyx_INCREF(__pyx_v_obj);
9677 __pyx_r = __pyx_v_obj;
9678 }
9679 __Pyx_XDECREF(__pyx_temp);
9680 }
9681 goto __pyx_L0;
9682
9683 /* "View.MemoryView":469
9684 *
9685 *
9686 * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
9687 * if not isinstance(obj, memoryview):
9688 * try:
9689*/
9690
9691 /* function exit code */
9692 __pyx_L1_error:;
9693 __Pyx_XDECREF(__pyx_t_6);
9694 __Pyx_XDECREF(__pyx_t_7);
9695 __Pyx_XDECREF(__pyx_t_8);
9696 __Pyx_XDECREF(__pyx_t_9);
9697 __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9698 __pyx_r = 0;
9699 __pyx_L0:;
9700 __Pyx_XDECREF(__pyx_v_obj);
9701 __Pyx_XGIVEREF(__pyx_r);
9702 __Pyx_RefNannyFinishContext();
9703 return __pyx_r;
9704}
9705
9706/* "View.MemoryView":480
9707 *
9708 *
9709 * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
9710 * cdef __Pyx_memviewslice dst_slice
9711 * cdef __Pyx_memviewslice src_slice
9712*/
9713
9714static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
9715 __Pyx_memviewslice __pyx_v_dst_slice;
9716 __Pyx_memviewslice __pyx_v_src_slice;
9717 __Pyx_memviewslice __pyx_v_msrc;
9718 __Pyx_memviewslice __pyx_v_mdst;
9719 PyObject *__pyx_r = NULL;
9720 __Pyx_RefNannyDeclarations
9721 __Pyx_memviewslice *__pyx_t_1;
9722 PyObject *__pyx_t_2 = NULL;
9723 int __pyx_t_3;
9724 int __pyx_t_4;
9725 int __pyx_t_5;
9726 int __pyx_lineno = 0;
9727 const char *__pyx_filename = NULL;
9728 int __pyx_clineno = 0;
9729 __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
9730
9731 /* "View.MemoryView":483
9732 * cdef __Pyx_memviewslice dst_slice
9733 * cdef __Pyx_memviewslice src_slice
9734 * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] # <<<<<<<<<<<<<<
9735 * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
9736 *
9737*/
9738 if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 483, __pyx_L1_error)
9739 __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 483, __pyx_L1_error)
9740 __pyx_v_msrc = (__pyx_t_1[0]);
9741
9742
9743 /* "View.MemoryView":484
9744 * cdef __Pyx_memviewslice src_slice
9745 * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
9746 * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] # <<<<<<<<<<<<<<
9747 *
9748 * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
9749*/
9750 if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 484, __pyx_L1_error)
9751 __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 484, __pyx_L1_error)
9752 __pyx_v_mdst = (__pyx_t_1[0]);
9753
9754
9755 /* "View.MemoryView":486
9756 * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
9757 *
9758 * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
9759 *
9760 *
9761*/
9762 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 486, __pyx_L1_error)
9763 __Pyx_GOTREF(__pyx_t_2);
9764 __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 486, __pyx_L1_error)
9765 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9766 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 486, __pyx_L1_error)
9767 __Pyx_GOTREF(__pyx_t_2);
9768 __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 486, __pyx_L1_error)
9769 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9770 __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 486, __pyx_L1_error)
9771
9772
9773
9774
9775 /* "View.MemoryView":480
9776 *
9777 *
9778 * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
9779 * cdef __Pyx_memviewslice dst_slice
9780 * cdef __Pyx_memviewslice src_slice
9781*/
9782
9783 /* function exit code */
9784 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9785 goto __pyx_L0;
9786 __pyx_L1_error:;
9787 __Pyx_XDECREF(__pyx_t_2);
9788 __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
9789 __pyx_r = 0;
9790 __pyx_L0:;
9791
9792
9793
9794
9795 __Pyx_XGIVEREF(__pyx_r);
9796 __Pyx_RefNannyFinishContext();
9797 return __pyx_r;
9798}
9799
9800/* "View.MemoryView":489
9801 *
9802 *
9803 * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
9804 * cdef int array[128]
9805 * cdef void *tmp = NULL
9806*/
9807
9808static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
9809 int __pyx_v_array[128];
9810 void *__pyx_v_tmp;
9811 void *__pyx_v_item;
9812 __Pyx_memviewslice *__pyx_v_dst_slice;
9813 __Pyx_memviewslice __pyx_v_tmp_slice;
9814 PyObject *__pyx_r = NULL;
9815 __Pyx_RefNannyDeclarations
9816 __Pyx_memviewslice *__pyx_t_1;
9817 int __pyx_t_2;
9818 PyObject *__pyx_t_3 = NULL;
9819 int __pyx_t_4;
9820 int __pyx_t_5;
9821 char const *__pyx_t_6;
9822 PyObject *__pyx_t_7 = NULL;
9823 PyObject *__pyx_t_8 = NULL;
9824 PyObject *__pyx_t_9 = NULL;
9825 PyObject *__pyx_t_10 = NULL;
9826 PyObject *__pyx_t_11 = NULL;
9827 PyObject *__pyx_t_12 = NULL;
9828 int __pyx_lineno = 0;
9829 const char *__pyx_filename = NULL;
9830 int __pyx_clineno = 0;
9831 __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
9832
9833 /* "View.MemoryView":491
9834 * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
9835 * cdef int array[128]
9836 * cdef void *tmp = NULL # <<<<<<<<<<<<<<
9837 * cdef void *item
9838 *
9839*/
9840 __pyx_v_tmp = NULL;
9841
9842 /* "View.MemoryView":496
9843 * cdef __Pyx_memviewslice *dst_slice
9844 * cdef __Pyx_memviewslice tmp_slice
9845 * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
9846 *
9847 * if <size_t>self.view.itemsize > sizeof(array):
9848*/
9849 __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 496, __pyx_L1_error)
9850 __pyx_v_dst_slice = __pyx_t_1;
9851
9852 /* "View.MemoryView":498
9853 * dst_slice = get_slice_from_memview(dst, &tmp_slice)
9854 *
9855 * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
9856 * tmp = PyMem_Malloc(<size_t> self.view.itemsize)
9857 * if tmp == NULL:
9858*/
9859 __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
9860
9861 if (__pyx_t_2) {
9862
9863
9864 /* "View.MemoryView":499
9865 *
9866 * if <size_t>self.view.itemsize > sizeof(array):
9867 * tmp = PyMem_Malloc(<size_t> self.view.itemsize) # <<<<<<<<<<<<<<
9868 * if tmp == NULL:
9869 * raise MemoryError
9870*/
9871 __pyx_v_tmp = PyMem_Malloc(((size_t)__pyx_v_self->view.itemsize));
9872
9873 /* "View.MemoryView":500
9874 * if <size_t>self.view.itemsize > sizeof(array):
9875 * tmp = PyMem_Malloc(<size_t> self.view.itemsize)
9876 * if tmp == NULL: # <<<<<<<<<<<<<<
9877 * raise MemoryError
9878 * item = tmp
9879*/
9880 __pyx_t_2 = (__pyx_v_tmp == NULL);
9881
9882 if (unlikely(__pyx_t_2)) {
9883
9884
9885 /* "View.MemoryView":501
9886 * tmp = PyMem_Malloc(<size_t> self.view.itemsize)
9887 * if tmp == NULL:
9888 * raise MemoryError # <<<<<<<<<<<<<<
9889 * item = tmp
9890 * else:
9891*/
9892 PyErr_NoMemory(); __PYX_ERR(1, 501, __pyx_L1_error)
9893
9894 /* "View.MemoryView":500
9895 * if <size_t>self.view.itemsize > sizeof(array):
9896 * tmp = PyMem_Malloc(<size_t> self.view.itemsize)
9897 * if tmp == NULL: # <<<<<<<<<<<<<<
9898 * raise MemoryError
9899 * item = tmp
9900*/
9901 }
9902
9903 /* "View.MemoryView":502
9904 * if tmp == NULL:
9905 * raise MemoryError
9906 * item = tmp # <<<<<<<<<<<<<<
9907 * else:
9908 * item = <void *> array
9909*/
9910 __pyx_v_item = __pyx_v_tmp;
9911
9912 /* "View.MemoryView":498
9913 * dst_slice = get_slice_from_memview(dst, &tmp_slice)
9914 *
9915 * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
9916 * tmp = PyMem_Malloc(<size_t> self.view.itemsize)
9917 * if tmp == NULL:
9918*/
9919 goto __pyx_L3;
9920 }
9921
9922 /* "View.MemoryView":504
9923 * item = tmp
9924 * else:
9925 * item = <void *> array # <<<<<<<<<<<<<<
9926 *
9927 * try:
9928*/
9929 /*else*/ {
9930 __pyx_v_item = ((void *)__pyx_v_array);
9931 }
9932 __pyx_L3:;
9933
9934 /* "View.MemoryView":506
9935 * item = <void *> array
9936 *
9937 * try: # <<<<<<<<<<<<<<
9938 * if self.dtype_is_object:
9939 * (<PyObject **> item)[0] = <PyObject *> value
9940*/
9941 /*try:*/ {
9942
9943 /* "View.MemoryView":507
9944 *
9945 * try:
9946 * if self.dtype_is_object: # <<<<<<<<<<<<<<
9947 * (<PyObject **> item)[0] = <PyObject *> value
9948 * else:
9949*/
9950 if (__pyx_v_self->dtype_is_object) {
9951
9952 /* "View.MemoryView":508
9953 * try:
9954 * if self.dtype_is_object:
9955 * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
9956 * else:
9957 * self.assign_item_from_object(<char *> item, value)
9958*/
9959 (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
9960
9961 /* "View.MemoryView":507
9962 *
9963 * try:
9964 * if self.dtype_is_object: # <<<<<<<<<<<<<<
9965 * (<PyObject **> item)[0] = <PyObject *> value
9966 * else:
9967*/
9968 goto __pyx_L8;
9969 }
9970
9971 /* "View.MemoryView":510
9972 * (<PyObject **> item)[0] = <PyObject *> value
9973 * else:
9974 * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
9975 *
9976 *
9977*/
9978 /*else*/ {
9979 __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 510, __pyx_L6_error)
9980 __Pyx_GOTREF(__pyx_t_3);
9981 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9982 }
9983 __pyx_L8:;
9984
9985 /* "View.MemoryView":514
9986 *
9987 *
9988 * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
9989 * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9990 * slice_assign_scalar(dst_slice, dst.view.ndim, <size_t> self.view.itemsize,
9991*/
9992 __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
9993
9994 if (__pyx_t_2) {
9995
9996
9997 /* "View.MemoryView":515
9998 *
9999 * if self.view.suboffsets != NULL:
10000 * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
10001 * slice_assign_scalar(dst_slice, dst.view.ndim, <size_t> self.view.itemsize,
10002 * item, self.dtype_is_object)
10003*/
10004 __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 515, __pyx_L6_error)
10005
10006
10007 /* "View.MemoryView":514
10008 *
10009 *
10010 * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
10011 * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10012 * slice_assign_scalar(dst_slice, dst.view.ndim, <size_t> self.view.itemsize,
10013*/
10014 }
10015
10016 /* "View.MemoryView":516
10017 * if self.view.suboffsets != NULL:
10018 * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10019 * slice_assign_scalar(dst_slice, dst.view.ndim, <size_t> self.view.itemsize, # <<<<<<<<<<<<<<
10020 * item, self.dtype_is_object)
10021 * finally:
10022*/
10023 __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, ((size_t)__pyx_v_self->view.itemsize), __pyx_v_item, __pyx_v_self->dtype_is_object);
10024 }
10025
10026 /* "View.MemoryView":519
10027 * item, self.dtype_is_object)
10028 * finally:
10029 * PyMem_Free(tmp) # <<<<<<<<<<<<<<
10030 *
10031 *
10032*/
10033 /*finally:*/ {
10034 /*normal exit:*/{
10035 PyMem_Free(__pyx_v_tmp);
10036 goto __pyx_L7;
10037 }
10038 __pyx_L6_error:;
10039 /*exception exit:*/{
10040 __Pyx_PyThreadState_declare
10041 __Pyx_PyThreadState_assign
10042 __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
10043 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10044 __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
10045 if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
10046 __Pyx_XGOTREF(__pyx_t_7);
10047 __Pyx_XGOTREF(__pyx_t_8);
10048 __Pyx_XGOTREF(__pyx_t_9);
10049 __Pyx_XGOTREF(__pyx_t_10);
10050 __Pyx_XGOTREF(__pyx_t_11);
10051 __Pyx_XGOTREF(__pyx_t_12);
10052 __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
10053 {
10054 PyMem_Free(__pyx_v_tmp);
10055 }
10056 __Pyx_XGIVEREF(__pyx_t_10);
10057 __Pyx_XGIVEREF(__pyx_t_11);
10058 __Pyx_XGIVEREF(__pyx_t_12);
10059 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
10060 __Pyx_XGIVEREF(__pyx_t_7);
10061 __Pyx_XGIVEREF(__pyx_t_8);
10062 __Pyx_XGIVEREF(__pyx_t_9);
10063 __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
10064 __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
10065 __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
10066 goto __pyx_L1_error;
10067 }
10068 __pyx_L7:;
10069 }
10070
10071 /* "View.MemoryView":489
10072 *
10073 *
10074 * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
10075 * cdef int array[128]
10076 * cdef void *tmp = NULL
10077*/
10078
10079 /* function exit code */
10080 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10081 goto __pyx_L0;
10082 __pyx_L1_error:;
10083 __Pyx_XDECREF(__pyx_t_3);
10084 __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10085 __pyx_r = 0;
10086 __pyx_L0:;
10087
10088
10089
10090
10091
10092 __Pyx_XGIVEREF(__pyx_r);
10093 __Pyx_RefNannyFinishContext();
10094 return __pyx_r;
10095}
10096
10097/* "View.MemoryView":522
10098 *
10099 *
10100 * cdef setitem_indexed(self, indices: tuple, value): # <<<<<<<<<<<<<<
10101 * cdef char *itemp = memoryview.get_item_pointer(self, indices)
10102 * self.assign_item_from_object(itemp, value)
10103*/
10104
10105static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_indices, PyObject *__pyx_v_value) {
10106 char *__pyx_v_itemp;
10107 PyObject *__pyx_r = NULL;
10108 __Pyx_RefNannyDeclarations
10109 char *__pyx_t_1;
10110 PyObject *__pyx_t_2 = NULL;
10111 int __pyx_lineno = 0;
10112 const char *__pyx_filename = NULL;
10113 int __pyx_clineno = 0;
10114 __Pyx_RefNannySetupContext("setitem_indexed", 0);
10115
10116 /* "View.MemoryView":523
10117 *
10118 * cdef setitem_indexed(self, indices: tuple, value):
10119 * cdef char *itemp = memoryview.get_item_pointer(self, indices) # <<<<<<<<<<<<<<
10120 * self.assign_item_from_object(itemp, value)
10121 *
10122*/
10123 __pyx_t_1 = __pyx_memoryview_get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 523, __pyx_L1_error)
10124 __pyx_v_itemp = __pyx_t_1;
10125
10126 /* "View.MemoryView":524
10127 * cdef setitem_indexed(self, indices: tuple, value):
10128 * cdef char *itemp = memoryview.get_item_pointer(self, indices)
10129 * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
10130 *
10131 *
10132*/
10133 __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 524, __pyx_L1_error)
10134 __Pyx_GOTREF(__pyx_t_2);
10135 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10136
10137 /* "View.MemoryView":522
10138 *
10139 *
10140 * cdef setitem_indexed(self, indices: tuple, value): # <<<<<<<<<<<<<<
10141 * cdef char *itemp = memoryview.get_item_pointer(self, indices)
10142 * self.assign_item_from_object(itemp, value)
10143*/
10144
10145 /* function exit code */
10146 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10147 goto __pyx_L0;
10148 __pyx_L1_error:;
10149 __Pyx_XDECREF(__pyx_t_2);
10150 __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
10151 __pyx_r = 0;
10152 __pyx_L0:;
10153
10154 __Pyx_XGIVEREF(__pyx_r);
10155 __Pyx_RefNannyFinishContext();
10156 return __pyx_r;
10157}
10158
10159/* "View.MemoryView":527
10160 *
10161 *
10162 * cdef setitem_indexed1(self, index, value): # <<<<<<<<<<<<<<
10163 * cdef char *buffer = <char *> self.view.buf
10164 * cdef char *itemp = pybuffer_index(&self.view, buffer, index, 0)
10165*/
10166
10167static PyObject *__pyx_memoryview_setitem_indexed1(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
10168 char *__pyx_v_buffer;
10169 char *__pyx_v_itemp;
10170 PyObject *__pyx_r = NULL;
10171 __Pyx_RefNannyDeclarations
10172 Py_ssize_t __pyx_t_1;
10173 char *__pyx_t_2;
10174 PyObject *__pyx_t_3 = NULL;
10175 int __pyx_lineno = 0;
10176 const char *__pyx_filename = NULL;
10177 int __pyx_clineno = 0;
10178 __Pyx_RefNannySetupContext("setitem_indexed1", 0);
10179
10180 /* "View.MemoryView":528
10181 *
10182 * cdef setitem_indexed1(self, index, value):
10183 * cdef char *buffer = <char *> self.view.buf # <<<<<<<<<<<<<<
10184 * cdef char *itemp = pybuffer_index(&self.view, buffer, index, 0)
10185 * self.assign_item_from_object(itemp, value)
10186*/
10187 __pyx_v_buffer = ((char *)__pyx_v_self->view.buf);
10188
10189 /* "View.MemoryView":529
10190 * cdef setitem_indexed1(self, index, value):
10191 * cdef char *buffer = <char *> self.view.buf
10192 * cdef char *itemp = pybuffer_index(&self.view, buffer, index, 0) # <<<<<<<<<<<<<<
10193 * self.assign_item_from_object(itemp, value)
10194 *
10195*/
10196 __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 529, __pyx_L1_error)
10197 __pyx_t_2 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_buffer, __pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((void *)NULL))) __PYX_ERR(1, 529, __pyx_L1_error)
10198 __pyx_v_itemp = __pyx_t_2;
10199
10200
10201 /* "View.MemoryView":530
10202 * cdef char *buffer = <char *> self.view.buf
10203 * cdef char *itemp = pybuffer_index(&self.view, buffer, index, 0)
10204 * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
10205 *
10206 * cdef convert_item_to_object(self, char *itemp):
10207*/
10208 __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 530, __pyx_L1_error)
10209 __Pyx_GOTREF(__pyx_t_3);
10210 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10211
10212 /* "View.MemoryView":527
10213 *
10214 *
10215 * cdef setitem_indexed1(self, index, value): # <<<<<<<<<<<<<<
10216 * cdef char *buffer = <char *> self.view.buf
10217 * cdef char *itemp = pybuffer_index(&self.view, buffer, index, 0)
10218*/
10219
10220 /* function exit code */
10221 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10222 goto __pyx_L0;
10223 __pyx_L1_error:;
10224 __Pyx_XDECREF(__pyx_t_3);
10225 __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed1", __pyx_clineno, __pyx_lineno, __pyx_filename);
10226 __pyx_r = 0;
10227 __pyx_L0:;
10228
10229
10230 __Pyx_XGIVEREF(__pyx_r);
10231 __Pyx_RefNannyFinishContext();
10232 return __pyx_r;
10233}
10234
10235/* "View.MemoryView":532
10236 * self.assign_item_from_object(itemp, value)
10237 *
10238 * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
10239 * """Only used if instantiated manually by the user, or if Cython doesn't
10240 * know how to convert the type"""
10241*/
10242
10243static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
10244 PyObject *__pyx_v_struct = NULL;
10245 PyObject *__pyx_v_bytesitem = 0;
10246 PyObject *__pyx_v_result = NULL;
10247 PyObject *__pyx_r = NULL;
10248 __Pyx_RefNannyDeclarations
10249 PyObject *__pyx_t_1 = NULL;
10250 PyObject *__pyx_t_2 = NULL;
10251 PyObject *__pyx_t_3 = NULL;
10252 PyObject *__pyx_t_4 = NULL;
10253 PyObject *__pyx_t_5 = NULL;
10254 PyObject *__pyx_t_6 = NULL;
10255 size_t __pyx_t_7;
10256 Py_ssize_t __pyx_t_8;
10257 int __pyx_t_9;
10258 PyObject *__pyx_t_10 = NULL;
10259 int __pyx_t_11;
10260 int __pyx_lineno = 0;
10261 const char *__pyx_filename = NULL;
10262 int __pyx_clineno = 0;
10263 __Pyx_RefNannySetupContext("convert_item_to_object", 0);
10264
10265 /* "View.MemoryView":535
10266 * """Only used if instantiated manually by the user, or if Cython doesn't
10267 * know how to convert the type"""
10268 * import struct # <<<<<<<<<<<<<<
10269 * cdef bytes bytesitem
10270 *
10271*/
10272 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 535, __pyx_L1_error)
10273 __pyx_t_1 = __pyx_t_2;
10274 __Pyx_GOTREF(__pyx_t_1);
10275 __pyx_v_struct = __pyx_t_1;
10276 __pyx_t_1 = 0;
10277
10278 /* "View.MemoryView":538
10279 * cdef bytes bytesitem
10280 *
10281 * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
10282 * try:
10283 * result = struct.unpack(self.view.format, bytesitem)
10284*/
10285 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 538, __pyx_L1_error)
10286 __Pyx_GOTREF(__pyx_t_1);
10287 __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
10288 __pyx_t_1 = 0;
10289
10290 /* "View.MemoryView":539
10291 *
10292 * bytesitem = itemp[:self.view.itemsize]
10293 * try: # <<<<<<<<<<<<<<
10294 * result = struct.unpack(self.view.format, bytesitem)
10295 * except struct.error:
10296*/
10297 {
10298 __Pyx_PyThreadState_declare
10299 __Pyx_PyThreadState_assign
10300 __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
10301 __Pyx_XGOTREF(__pyx_t_2);
10302 __Pyx_XGOTREF(__pyx_t_3);
10303 __Pyx_XGOTREF(__pyx_t_4);
10304 /*try:*/ {
10305
10306 /* "View.MemoryView":540
10307 * bytesitem = itemp[:self.view.itemsize]
10308 * try:
10309 * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
10310 * except struct.error:
10311 * _err_ValueError("Unable to convert item to object")
10312*/
10313 __pyx_t_5 = __pyx_v_struct;
10314 __Pyx_INCREF(__pyx_t_5);
10315 __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 540, __pyx_L3_error)
10316 __Pyx_GOTREF(__pyx_t_6);
10317 __pyx_t_7 = 0;
10318 {
10319 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_bytesitem};
10320 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unpack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
10321 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10322 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10323 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 540, __pyx_L3_error)
10324 __Pyx_GOTREF(__pyx_t_1);
10325 }
10326 __pyx_v_result = __pyx_t_1;
10327 __pyx_t_1 = 0;
10328
10329 /* "View.MemoryView":539
10330 *
10331 * bytesitem = itemp[:self.view.itemsize]
10332 * try: # <<<<<<<<<<<<<<
10333 * result = struct.unpack(self.view.format, bytesitem)
10334 * except struct.error:
10335*/
10336 }
10337
10338 /* "View.MemoryView":544
10339 * _err_ValueError("Unable to convert item to object")
10340 * else:
10341 * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
10342 * return result[0]
10343 * return result
10344*/
10345 /*else:*/ {
10346 __pyx_t_8 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 544, __pyx_L5_except_error)
10347 __pyx_t_9 = (__pyx_t_8 == 1);
10348
10349
10350 if (__pyx_t_9) {
10351
10352
10353 /* "View.MemoryView":545
10354 * else:
10355 * if len(self.view.format) == 1:
10356 * return result[0] # <<<<<<<<<<<<<<
10357 * return result
10358 *
10359*/
10360 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L5_except_error)
10361 __Pyx_GOTREF(__pyx_t_1);
10362 {
10363 PyObject *__pyx_temp;
10364 {
10365 __pyx_temp = __pyx_r;
10366 __pyx_r = __pyx_t_1;
10367 }
10368 __Pyx_XDECREF(__pyx_temp);
10369 }
10370 __pyx_t_1 = 0;
10371 goto __pyx_L6_except_return;
10372
10373 /* "View.MemoryView":544
10374 * _err_ValueError("Unable to convert item to object")
10375 * else:
10376 * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
10377 * return result[0]
10378 * return result
10379*/
10380 }
10381
10382 /* "View.MemoryView":546
10383 * if len(self.view.format) == 1:
10384 * return result[0]
10385 * return result # <<<<<<<<<<<<<<
10386 *
10387 * cdef assign_item_from_object(self, char *itemp, object value):
10388*/
10389 {
10390 PyObject *__pyx_temp;
10391 {
10392 __pyx_temp = __pyx_r;
10393 __Pyx_INCREF(__pyx_v_result);
10394 __pyx_r = __pyx_v_result;
10395 }
10396 __Pyx_XDECREF(__pyx_temp);
10397 }
10398 goto __pyx_L6_except_return;
10399 }
10400 __pyx_L3_error:;
10401 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10402 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10403 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10404
10405 /* "View.MemoryView":541
10406 * try:
10407 * result = struct.unpack(self.view.format, bytesitem)
10408 * except struct.error: # <<<<<<<<<<<<<<
10409 * _err_ValueError("Unable to convert item to object")
10410 * else:
10411*/
10412 __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_5);
10413 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 541, __pyx_L5_except_error)
10414 __Pyx_GOTREF(__pyx_t_10);
10415 __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10);
10416 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10417 __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_5);
10418 __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
10419 if (__pyx_t_11) {
10420 __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10421 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(1, 541, __pyx_L5_except_error)
10422 __Pyx_XGOTREF(__pyx_t_5);
10423 __Pyx_XGOTREF(__pyx_t_6);
10424 __Pyx_XGOTREF(__pyx_t_1);
10425
10426 /* "View.MemoryView":542
10427 * result = struct.unpack(self.view.format, bytesitem)
10428 * except struct.error:
10429 * _err_ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
10430 * else:
10431 * if len(self.view.format) == 1:
10432*/
10433 __pyx_t_11 = __pyx_memoryview_err_ValueError(__pyx_k_Unable_to_convert_item_to_object); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 542, __pyx_L5_except_error)
10434
10435 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10436 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10437 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10438 goto __pyx_L4_exception_handled;
10439 }
10440 goto __pyx_L5_except_error;
10441
10442 /* "View.MemoryView":539
10443 *
10444 * bytesitem = itemp[:self.view.itemsize]
10445 * try: # <<<<<<<<<<<<<<
10446 * result = struct.unpack(self.view.format, bytesitem)
10447 * except struct.error:
10448*/
10449 __pyx_L5_except_error:;
10450 __Pyx_XGIVEREF(__pyx_t_2);
10451 __Pyx_XGIVEREF(__pyx_t_3);
10452 __Pyx_XGIVEREF(__pyx_t_4);
10453 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
10454 goto __pyx_L1_error;
10455 __pyx_L6_except_return:;
10456 __Pyx_XGIVEREF(__pyx_t_2);
10457 __Pyx_XGIVEREF(__pyx_t_3);
10458 __Pyx_XGIVEREF(__pyx_t_4);
10459 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
10460 goto __pyx_L0;
10461 __pyx_L4_exception_handled:;
10462 __Pyx_XGIVEREF(__pyx_t_2);
10463 __Pyx_XGIVEREF(__pyx_t_3);
10464 __Pyx_XGIVEREF(__pyx_t_4);
10465 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
10466 }
10467
10468 /* "View.MemoryView":532
10469 * self.assign_item_from_object(itemp, value)
10470 *
10471 * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
10472 * """Only used if instantiated manually by the user, or if Cython doesn't
10473 * know how to convert the type"""
10474*/
10475
10476 /* function exit code */
10477 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10478 goto __pyx_L0;
10479 __pyx_L1_error:;
10480 __Pyx_XDECREF(__pyx_t_1);
10481 __Pyx_XDECREF(__pyx_t_5);
10482 __Pyx_XDECREF(__pyx_t_6);
10483 __Pyx_XDECREF(__pyx_t_10);
10484 __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10485 __pyx_r = 0;
10486 __pyx_L0:;
10487 __Pyx_XDECREF(__pyx_v_struct);
10488 __Pyx_XDECREF(__pyx_v_bytesitem);
10489 __Pyx_XDECREF(__pyx_v_result);
10490 __Pyx_XGIVEREF(__pyx_r);
10491 __Pyx_RefNannyFinishContext();
10492 return __pyx_r;
10493}
10494
10495/* "View.MemoryView":548
10496 * return result
10497 *
10498 * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
10499 * """Only used if instantiated manually by the user, or if Cython doesn't
10500 * know how to convert the type"""
10501*/
10502
10503static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
10504 PyObject *__pyx_v_struct = NULL;
10505 char __pyx_v_c;
10506 PyObject *__pyx_v_bytesvalue = 0;
10507 Py_ssize_t __pyx_v_i;
10508 PyObject *__pyx_r = NULL;
10509 __Pyx_RefNannyDeclarations
10510 PyObject *__pyx_t_1 = NULL;
10511 PyObject *__pyx_t_2 = NULL;
10512 int __pyx_t_3;
10513 PyObject *__pyx_t_4 = NULL;
10514 PyObject *__pyx_t_5 = NULL;
10515 PyObject *__pyx_t_6 = NULL;
10516 size_t __pyx_t_7;
10517 Py_ssize_t __pyx_t_8;
10518 PyObject *__pyx_t_9 = NULL;
10519 char *__pyx_t_10;
10520 char *__pyx_t_11;
10521 Py_ssize_t __pyx_t_12;
10522 char *__pyx_t_13;
10523 char *__pyx_t_14;
10524 int __pyx_lineno = 0;
10525 const char *__pyx_filename = NULL;
10526 int __pyx_clineno = 0;
10527 __Pyx_RefNannySetupContext("assign_item_from_object", 0);
10528
10529 /* "View.MemoryView":551
10530 * """Only used if instantiated manually by the user, or if Cython doesn't
10531 * know how to convert the type"""
10532 * import struct # <<<<<<<<<<<<<<
10533 * cdef char c
10534 * cdef bytes bytesvalue
10535*/
10536 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 551, __pyx_L1_error)
10537 __pyx_t_1 = __pyx_t_2;
10538 __Pyx_GOTREF(__pyx_t_1);
10539 __pyx_v_struct = __pyx_t_1;
10540 __pyx_t_1 = 0;
10541
10542 /* "View.MemoryView":556
10543 * cdef Py_ssize_t i
10544 *
10545 * if isinstance(value, tuple): # <<<<<<<<<<<<<<
10546 * bytesvalue = struct.pack(self.view.format, *value)
10547 * else:
10548*/
10549 __pyx_t_3 = PyTuple_Check(__pyx_v_value);
10550 if (__pyx_t_3) {
10551
10552
10553 /* "View.MemoryView":557
10554 *
10555 * if isinstance(value, tuple):
10556 * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
10557 * else:
10558 * bytesvalue = struct.pack(self.view.format, value)
10559*/
10560 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 557, __pyx_L1_error)
10561 __Pyx_GOTREF(__pyx_t_1);
10562 __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 557, __pyx_L1_error)
10563 __Pyx_GOTREF(__pyx_t_4);
10564 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 557, __pyx_L1_error)
10565 __Pyx_GOTREF(__pyx_t_5);
10566 __Pyx_GIVEREF(__pyx_t_4);
10567 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 557, __pyx_L1_error);
10568 __pyx_t_4 = 0;
10569 __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 557, __pyx_L1_error)
10570 __Pyx_GOTREF(__pyx_t_4);
10571 __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 557, __pyx_L1_error)
10572 __Pyx_GOTREF(__pyx_t_6);
10573 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10574 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10575 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 557, __pyx_L1_error)
10576 __Pyx_GOTREF(__pyx_t_4);
10577 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10578 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10579 if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 557, __pyx_L1_error)
10580 __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
10581 __pyx_t_4 = 0;
10582
10583 /* "View.MemoryView":556
10584 * cdef Py_ssize_t i
10585 *
10586 * if isinstance(value, tuple): # <<<<<<<<<<<<<<
10587 * bytesvalue = struct.pack(self.view.format, *value)
10588 * else:
10589*/
10590 goto __pyx_L3;
10591 }
10592
10593 /* "View.MemoryView":559
10594 * bytesvalue = struct.pack(self.view.format, *value)
10595 * else:
10596 * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
10597 *
10598 * for i, c in enumerate(bytesvalue):
10599*/
10600 /*else*/ {
10601 __pyx_t_6 = __pyx_v_struct;
10602 __Pyx_INCREF(__pyx_t_6);
10603 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 559, __pyx_L1_error)
10604 __Pyx_GOTREF(__pyx_t_1);
10605 __pyx_t_7 = 0;
10606 {
10607 PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_value};
10608 __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
10609 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10610 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10611 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 559, __pyx_L1_error)
10612 __Pyx_GOTREF(__pyx_t_4);
10613 }
10614 if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 559, __pyx_L1_error)
10615 __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
10616 __pyx_t_4 = 0;
10617 }
10618 __pyx_L3:;
10619
10620 /* "View.MemoryView":561
10621 * bytesvalue = struct.pack(self.view.format, value)
10622 *
10623 * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
10624 * itemp[i] = c
10625 *
10626*/
10627
10628 __pyx_t_8 = 0;
10629 if (unlikely(__pyx_v_bytesvalue == Py_None)) {
10630 PyErr_SetString(PyExc_TypeError, "\047NoneType\047 is not iterable");
10631 __PYX_ERR(1, 561, __pyx_L1_error)
10632 }
10633 __Pyx_INCREF(__pyx_v_bytesvalue);
10634 __pyx_t_9 = __pyx_v_bytesvalue;
10635 __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_9); if (unlikely(__pyx_t_11 == ((char *)NULL))) __PYX_ERR(1, 561, __pyx_L1_error)
10636 __pyx_t_12 = __Pyx_PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 561, __pyx_L1_error)
10637 __pyx_t_13 = (__pyx_t_11 + __pyx_t_12);
10638
10639 for (__pyx_t_14 = __pyx_t_11; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
10640 __pyx_t_10 = __pyx_t_14;
10641 __pyx_v_c = (__pyx_t_10[0]);
10642
10643 /* "View.MemoryView":562
10644 *
10645 * for i, c in enumerate(bytesvalue):
10646 * itemp[i] = c # <<<<<<<<<<<<<<
10647 *
10648 * @cname('getbuffer')
10649*/
10650 __pyx_v_i = __pyx_t_8;
10651
10652 /* "View.MemoryView":561
10653 * bytesvalue = struct.pack(self.view.format, value)
10654 *
10655 * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
10656 * itemp[i] = c
10657 *
10658*/
10659 __pyx_t_8 = (__pyx_t_8 + 1);
10660
10661 /* "View.MemoryView":562
10662 *
10663 * for i, c in enumerate(bytesvalue):
10664 * itemp[i] = c # <<<<<<<<<<<<<<
10665 *
10666 * @cname('getbuffer')
10667*/
10668 (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
10669 }
10670
10671
10672
10673 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10674
10675 /* "View.MemoryView":548
10676 * return result
10677 *
10678 * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
10679 * """Only used if instantiated manually by the user, or if Cython doesn't
10680 * know how to convert the type"""
10681*/
10682
10683 /* function exit code */
10684 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10685 goto __pyx_L0;
10686 __pyx_L1_error:;
10687 __Pyx_XDECREF(__pyx_t_1);
10688 __Pyx_XDECREF(__pyx_t_4);
10689 __Pyx_XDECREF(__pyx_t_5);
10690 __Pyx_XDECREF(__pyx_t_6);
10691 __Pyx_XDECREF(__pyx_t_9);
10692 __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10693 __pyx_r = 0;
10694 __pyx_L0:;
10695 __Pyx_XDECREF(__pyx_v_struct);
10696
10697 __Pyx_XDECREF(__pyx_v_bytesvalue);
10698
10699 __Pyx_XGIVEREF(__pyx_r);
10700 __Pyx_RefNannyFinishContext();
10701 return __pyx_r;
10702}
10703
10704/* "View.MemoryView":564
10705 * itemp[i] = c
10706 *
10707 * @cname('getbuffer') # <<<<<<<<<<<<<<
10708 * def __getbuffer__(self, Py_buffer *info, int flags):
10709 * if cython.unlikely(flags & PyBUF_WRITABLE and self.view.readonly):
10710*/
10711
10712/* Python wrapper */
10713CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
10714CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
10715 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10716 int __pyx_r;
10717 __Pyx_RefNannyDeclarations
10718 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
10719 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10720 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
10721
10722 /* function exit code */
10723
10724
10725 __Pyx_RefNannyFinishContext();
10726 return __pyx_r;
10727}
10728
10729static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
10730 int __pyx_r;
10731 __Pyx_RefNannyDeclarations
10732 int __pyx_t_1;
10733 int __pyx_t_2;
10734 int __pyx_t_3;
10735 Py_ssize_t *__pyx_t_4;
10736 char *__pyx_t_5;
10737 void *__pyx_t_6;
10738 Py_ssize_t __pyx_t_7;
10739 int __pyx_lineno = 0;
10740 const char *__pyx_filename = NULL;
10741 int __pyx_clineno = 0;
10742 if (unlikely(__pyx_v_info == NULL)) {
10743 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
10744 return -1;
10745 }
10746 __Pyx_RefNannySetupContext("__getbuffer__", 0);
10747 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
10748 __Pyx_GIVEREF(__pyx_v_info->obj);
10749
10750 /* "View.MemoryView":566
10751 * @cname('getbuffer')
10752 * def __getbuffer__(self, Py_buffer *info, int flags):
10753 * if cython.unlikely(flags & PyBUF_WRITABLE and self.view.readonly): # <<<<<<<<<<<<<<
10754 * _err_ValueError("Cannot create writable memory view from read-only memoryview")
10755 *
10756*/
10757 __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
10758
10759 if (__pyx_t_2) {
10760
10761 } else {
10762
10763 __pyx_t_1 = __pyx_t_2;
10764
10765 goto __pyx_L4_bool_binop_done;
10766 }
10767
10768 __pyx_t_1 = __pyx_v_self->view.readonly;
10769 __pyx_L4_bool_binop_done:;
10770 if (unlikely(__pyx_t_1)) {
10771
10772
10773 /* "View.MemoryView":567
10774 * def __getbuffer__(self, Py_buffer *info, int flags):
10775 * if cython.unlikely(flags & PyBUF_WRITABLE and self.view.readonly):
10776 * _err_ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
10777 *
10778 * if flags & PyBUF_ND:
10779*/
10780 __pyx_t_3 = __pyx_memoryview_err_ValueError(__pyx_k_Cannot_create_writable_memory_vi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 567, __pyx_L1_error)
10781
10782
10783 /* "View.MemoryView":566
10784 * @cname('getbuffer')
10785 * def __getbuffer__(self, Py_buffer *info, int flags):
10786 * if cython.unlikely(flags & PyBUF_WRITABLE and self.view.readonly): # <<<<<<<<<<<<<<
10787 * _err_ValueError("Cannot create writable memory view from read-only memoryview")
10788 *
10789*/
10790 }
10791
10792 /* "View.MemoryView":569
10793 * _err_ValueError("Cannot create writable memory view from read-only memoryview")
10794 *
10795 * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
10796 * info.shape = self.view.shape
10797 * else:
10798*/
10799 __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
10800
10801 if (__pyx_t_1) {
10802
10803
10804 /* "View.MemoryView":570
10805 *
10806 * if flags & PyBUF_ND:
10807 * info.shape = self.view.shape # <<<<<<<<<<<<<<
10808 * else:
10809 * info.shape = NULL
10810*/
10811 __pyx_t_4 = __pyx_v_self->view.shape;
10812
10813 __pyx_v_info->shape = __pyx_t_4;
10814
10815 /* "View.MemoryView":569
10816 * _err_ValueError("Cannot create writable memory view from read-only memoryview")
10817 *
10818 * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
10819 * info.shape = self.view.shape
10820 * else:
10821*/
10822 goto __pyx_L6;
10823 }
10824
10825 /* "View.MemoryView":572
10826 * info.shape = self.view.shape
10827 * else:
10828 * info.shape = NULL # <<<<<<<<<<<<<<
10829 *
10830 * if flags & PyBUF_STRIDES:
10831*/
10832 /*else*/ {
10833 __pyx_v_info->shape = NULL;
10834 }
10835 __pyx_L6:;
10836
10837 /* "View.MemoryView":574
10838 * info.shape = NULL
10839 *
10840 * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
10841 * info.strides = self.view.strides
10842 * else:
10843*/
10844 __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
10845
10846 if (__pyx_t_1) {
10847
10848
10849 /* "View.MemoryView":575
10850 *
10851 * if flags & PyBUF_STRIDES:
10852 * info.strides = self.view.strides # <<<<<<<<<<<<<<
10853 * else:
10854 * info.strides = NULL
10855*/
10856 __pyx_t_4 = __pyx_v_self->view.strides;
10857
10858 __pyx_v_info->strides = __pyx_t_4;
10859
10860 /* "View.MemoryView":574
10861 * info.shape = NULL
10862 *
10863 * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
10864 * info.strides = self.view.strides
10865 * else:
10866*/
10867 goto __pyx_L7;
10868 }
10869
10870 /* "View.MemoryView":577
10871 * info.strides = self.view.strides
10872 * else:
10873 * info.strides = NULL # <<<<<<<<<<<<<<
10874 *
10875 * if flags & PyBUF_INDIRECT:
10876*/
10877 /*else*/ {
10878 __pyx_v_info->strides = NULL;
10879 }
10880 __pyx_L7:;
10881
10882 /* "View.MemoryView":579
10883 * info.strides = NULL
10884 *
10885 * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
10886 * info.suboffsets = self.view.suboffsets
10887 * else:
10888*/
10889 __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
10890
10891 if (__pyx_t_1) {
10892
10893
10894 /* "View.MemoryView":580
10895 *
10896 * if flags & PyBUF_INDIRECT:
10897 * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
10898 * else:
10899 * info.suboffsets = NULL
10900*/
10901 __pyx_t_4 = __pyx_v_self->view.suboffsets;
10902
10903 __pyx_v_info->suboffsets = __pyx_t_4;
10904
10905 /* "View.MemoryView":579
10906 * info.strides = NULL
10907 *
10908 * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
10909 * info.suboffsets = self.view.suboffsets
10910 * else:
10911*/
10912 goto __pyx_L8;
10913 }
10914
10915 /* "View.MemoryView":582
10916 * info.suboffsets = self.view.suboffsets
10917 * else:
10918 * info.suboffsets = NULL # <<<<<<<<<<<<<<
10919 *
10920 * if flags & PyBUF_FORMAT:
10921*/
10922 /*else*/ {
10923 __pyx_v_info->suboffsets = NULL;
10924 }
10925 __pyx_L8:;
10926
10927 /* "View.MemoryView":584
10928 * info.suboffsets = NULL
10929 *
10930 * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
10931 * info.format = self.view.format
10932 * else:
10933*/
10934 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
10935
10936 if (__pyx_t_1) {
10937
10938
10939 /* "View.MemoryView":585
10940 *
10941 * if flags & PyBUF_FORMAT:
10942 * info.format = self.view.format # <<<<<<<<<<<<<<
10943 * else:
10944 * info.format = NULL
10945*/
10946 __pyx_t_5 = __pyx_v_self->view.format;
10947
10948 __pyx_v_info->format = __pyx_t_5;
10949
10950 /* "View.MemoryView":584
10951 * info.suboffsets = NULL
10952 *
10953 * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
10954 * info.format = self.view.format
10955 * else:
10956*/
10957 goto __pyx_L9;
10958 }
10959
10960 /* "View.MemoryView":587
10961 * info.format = self.view.format
10962 * else:
10963 * info.format = NULL # <<<<<<<<<<<<<<
10964 *
10965 * info.buf = self.view.buf
10966*/
10967 /*else*/ {
10968 __pyx_v_info->format = NULL;
10969 }
10970 __pyx_L9:;
10971
10972 /* "View.MemoryView":589
10973 * info.format = NULL
10974 *
10975 * info.buf = self.view.buf # <<<<<<<<<<<<<<
10976 * info.ndim = self.view.ndim
10977 * info.itemsize = self.view.itemsize
10978*/
10979 __pyx_t_6 = __pyx_v_self->view.buf;
10980
10981 __pyx_v_info->buf = __pyx_t_6;
10982
10983 /* "View.MemoryView":590
10984 *
10985 * info.buf = self.view.buf
10986 * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
10987 * info.itemsize = self.view.itemsize
10988 * info.len = self.view.len
10989*/
10990 __pyx_t_3 = __pyx_v_self->view.ndim;
10991
10992 __pyx_v_info->ndim = __pyx_t_3;
10993
10994 /* "View.MemoryView":591
10995 * info.buf = self.view.buf
10996 * info.ndim = self.view.ndim
10997 * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
10998 * info.len = self.view.len
10999 * info.readonly = self.view.readonly
11000*/
11001 __pyx_t_7 = __pyx_v_self->view.itemsize;
11002
11003 __pyx_v_info->itemsize = __pyx_t_7;
11004
11005 /* "View.MemoryView":592
11006 * info.ndim = self.view.ndim
11007 * info.itemsize = self.view.itemsize
11008 * info.len = self.view.len # <<<<<<<<<<<<<<
11009 * info.readonly = self.view.readonly
11010 * info.obj = self
11011*/
11012 __pyx_t_7 = __pyx_v_self->view.len;
11013
11014 __pyx_v_info->len = __pyx_t_7;
11015
11016 /* "View.MemoryView":593
11017 * info.itemsize = self.view.itemsize
11018 * info.len = self.view.len
11019 * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
11020 * info.obj = self
11021 *
11022*/
11023 __pyx_t_1 = __pyx_v_self->view.readonly;
11024
11025 __pyx_v_info->readonly = __pyx_t_1;
11026
11027 /* "View.MemoryView":594
11028 * info.len = self.view.len
11029 * info.readonly = self.view.readonly
11030 * info.obj = self # <<<<<<<<<<<<<<
11031 *
11032 *
11033*/
11034 __Pyx_INCREF((PyObject *)__pyx_v_self);
11035 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
11036 __Pyx_GOTREF(__pyx_v_info->obj);
11037 __Pyx_DECREF(__pyx_v_info->obj);
11038 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
11039
11040 /* "View.MemoryView":564
11041 * itemp[i] = c
11042 *
11043 * @cname('getbuffer') # <<<<<<<<<<<<<<
11044 * def __getbuffer__(self, Py_buffer *info, int flags):
11045 * if cython.unlikely(flags & PyBUF_WRITABLE and self.view.readonly):
11046*/
11047
11048 /* function exit code */
11049 __pyx_r = 0;
11050 goto __pyx_L0;
11051 __pyx_L1_error:;
11052 __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11053 __pyx_r = -1;
11054 if (__pyx_v_info->obj != NULL) {
11055 __Pyx_GOTREF(__pyx_v_info->obj);
11056 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
11057 }
11058 goto __pyx_L2;
11059 __pyx_L0:;
11060 if (__pyx_v_info->obj == Py_None) {
11061 __Pyx_GOTREF(__pyx_v_info->obj);
11062 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
11063 }
11064 __pyx_L2:;
11065
11066 __Pyx_RefNannyFinishContext();
11067 return __pyx_r;
11068}
11069
11070/* "View.MemoryView":597
11071 *
11072 *
11073 * @property # <<<<<<<<<<<<<<
11074 * def T(self):
11075 * cdef _memoryviewslice result = memoryview_copy(self)
11076*/
11077
11078/* Python wrapper */
11079static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
11080static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
11081 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11082 PyObject *__pyx_r = 0;
11083 __Pyx_RefNannyDeclarations
11084 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11085 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11086 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11087
11088 /* function exit code */
11089 __Pyx_RefNannyFinishContext();
11090 return __pyx_r;
11091}
11092
11093static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11094 struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
11095 PyObject *__pyx_r = NULL;
11096 __Pyx_RefNannyDeclarations
11097 PyObject *__pyx_t_1 = NULL;
11098 int __pyx_t_2;
11099 int __pyx_lineno = 0;
11100 const char *__pyx_filename = NULL;
11101 int __pyx_clineno = 0;
11102 __Pyx_RefNannySetupContext("__get__", 0);
11103
11104 /* "View.MemoryView":599
11105 * @property
11106 * def T(self):
11107 * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
11108 * transpose_memslice(&result.from_slice)
11109 * return result
11110*/
11111 __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 599, __pyx_L1_error)
11112 __Pyx_GOTREF(__pyx_t_1);
11113 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 599, __pyx_L1_error)
11114 __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
11115 __pyx_t_1 = 0;
11116
11117 /* "View.MemoryView":600
11118 * def T(self):
11119 * cdef _memoryviewslice result = memoryview_copy(self)
11120 * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
11121 * return result
11122 *
11123*/
11124 __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 600, __pyx_L1_error)
11125
11126
11127 /* "View.MemoryView":601
11128 * cdef _memoryviewslice result = memoryview_copy(self)
11129 * transpose_memslice(&result.from_slice)
11130 * return result # <<<<<<<<<<<<<<
11131 *
11132 * @property
11133*/
11134 {
11135 PyObject *__pyx_temp;
11136 {
11137 __pyx_temp = __pyx_r;
11138 __Pyx_INCREF((PyObject *)__pyx_v_result);
11139 __pyx_r = ((PyObject *)__pyx_v_result);
11140 }
11141 __Pyx_XDECREF(__pyx_temp);
11142 }
11143 goto __pyx_L0;
11144
11145 /* "View.MemoryView":597
11146 *
11147 *
11148 * @property # <<<<<<<<<<<<<<
11149 * def T(self):
11150 * cdef _memoryviewslice result = memoryview_copy(self)
11151*/
11152
11153 /* function exit code */
11154 __pyx_L1_error:;
11155 __Pyx_XDECREF(__pyx_t_1);
11156 __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11157 __pyx_r = NULL;
11158 __pyx_L0:;
11159 __Pyx_XDECREF((PyObject *)__pyx_v_result);
11160 __Pyx_XGIVEREF(__pyx_r);
11161 __Pyx_RefNannyFinishContext();
11162 return __pyx_r;
11163}
11164
11165/* "View.MemoryView":603
11166 * return result
11167 *
11168 * @property # <<<<<<<<<<<<<<
11169 * def base(self):
11170 * return self._get_base()
11171*/
11172
11173/* Python wrapper */
11174static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
11175static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
11176 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11177 PyObject *__pyx_r = 0;
11178 __Pyx_RefNannyDeclarations
11179 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11180 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11181 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11182
11183 /* function exit code */
11184 __Pyx_RefNannyFinishContext();
11185 return __pyx_r;
11186}
11187
11188static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11189 PyObject *__pyx_r = NULL;
11190 __Pyx_RefNannyDeclarations
11191 PyObject *__pyx_t_1 = NULL;
11192 int __pyx_lineno = 0;
11193 const char *__pyx_filename = NULL;
11194 int __pyx_clineno = 0;
11195 __Pyx_RefNannySetupContext("__get__", 0);
11196
11197 /* "View.MemoryView":605
11198 * @property
11199 * def base(self):
11200 * return self._get_base() # <<<<<<<<<<<<<<
11201 *
11202 * cdef _get_base(self):
11203*/
11204 __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 605, __pyx_L1_error)
11205 __Pyx_GOTREF(__pyx_t_1);
11206 {
11207 PyObject *__pyx_temp;
11208 {
11209 __pyx_temp = __pyx_r;
11210 __pyx_r = __pyx_t_1;
11211 }
11212 __Pyx_XDECREF(__pyx_temp);
11213 }
11214 __pyx_t_1 = 0;
11215 goto __pyx_L0;
11216
11217 /* "View.MemoryView":603
11218 * return result
11219 *
11220 * @property # <<<<<<<<<<<<<<
11221 * def base(self):
11222 * return self._get_base()
11223*/
11224
11225 /* function exit code */
11226 __pyx_L1_error:;
11227 __Pyx_XDECREF(__pyx_t_1);
11228 __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11229 __pyx_r = NULL;
11230 __pyx_L0:;
11231 __Pyx_XGIVEREF(__pyx_r);
11232 __Pyx_RefNannyFinishContext();
11233 return __pyx_r;
11234}
11235
11236/* "View.MemoryView":607
11237 * return self._get_base()
11238 *
11239 * cdef _get_base(self): # <<<<<<<<<<<<<<
11240 * return self.obj
11241 *
11242*/
11243
11244static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
11245 PyObject *__pyx_r = NULL;
11246 __Pyx_RefNannyDeclarations
11247 __Pyx_RefNannySetupContext("_get_base", 0);
11248
11249 /* "View.MemoryView":608
11250 *
11251 * cdef _get_base(self):
11252 * return self.obj # <<<<<<<<<<<<<<
11253 *
11254 * @property
11255*/
11256 {
11257 PyObject *__pyx_temp;
11258 {
11259 __pyx_temp = __pyx_r;
11260 __Pyx_INCREF(__pyx_v_self->obj);
11261 __pyx_r = __pyx_v_self->obj;
11262 }
11263 __Pyx_XDECREF(__pyx_temp);
11264 }
11265 goto __pyx_L0;
11266
11267 /* "View.MemoryView":607
11268 * return self._get_base()
11269 *
11270 * cdef _get_base(self): # <<<<<<<<<<<<<<
11271 * return self.obj
11272 *
11273*/
11274
11275 /* function exit code */
11276 __pyx_L0:;
11277 __Pyx_XGIVEREF(__pyx_r);
11278 __Pyx_RefNannyFinishContext();
11279 return __pyx_r;
11280}
11281
11282/* "View.MemoryView":610
11283 * return self.obj
11284 *
11285 * @property # <<<<<<<<<<<<<<
11286 * def shape(self):
11287 * return tuple([length for length in self.view.shape[:self.view.ndim]])
11288*/
11289
11290/* Python wrapper */
11291static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
11292static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
11293 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11294 PyObject *__pyx_r = 0;
11295 __Pyx_RefNannyDeclarations
11296 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11297 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11298 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11299
11300 /* function exit code */
11301 __Pyx_RefNannyFinishContext();
11302 return __pyx_r;
11303}
11304
11305static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11306 Py_ssize_t __pyx_7genexpr__pyx_v_length;
11307 PyObject *__pyx_r = NULL;
11308 __Pyx_RefNannyDeclarations
11309 PyObject *__pyx_t_1 = NULL;
11310 Py_ssize_t *__pyx_t_2;
11311 Py_ssize_t *__pyx_t_3;
11312 Py_ssize_t *__pyx_t_4;
11313 PyObject *__pyx_t_5 = NULL;
11314 int __pyx_lineno = 0;
11315 const char *__pyx_filename = NULL;
11316 int __pyx_clineno = 0;
11317 __Pyx_RefNannySetupContext("__get__", 0);
11318
11319 /* "View.MemoryView":612
11320 * @property
11321 * def shape(self):
11322 * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
11323 *
11324 * @property
11325*/
11326 { /* enter inner scope */
11327 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
11328 __Pyx_GOTREF(__pyx_t_1);
11329 __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
11330
11331 for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
11332 __pyx_t_2 = __pyx_t_4;
11333 __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
11334 __pyx_t_5 = PyLong_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 612, __pyx_L1_error)
11335 __Pyx_GOTREF(__pyx_t_5);
11336 __Pyx_GIVEREF(__pyx_t_5);
11337 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_1, __pyx_t_5))) __PYX_ERR(1, 612, __pyx_L1_error)
11338 __pyx_t_5 = 0;
11339 }
11340
11341 } /* exit inner scope */
11342 __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 612, __pyx_L1_error)
11343 __Pyx_GOTREF(__pyx_t_5);
11344 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11345 {
11346 PyObject *__pyx_temp;
11347 {
11348 __pyx_temp = __pyx_r;
11349 __pyx_r = __pyx_t_5;
11350 }
11351 __Pyx_XDECREF(__pyx_temp);
11352 }
11353 __pyx_t_5 = 0;
11354 goto __pyx_L0;
11355
11356 /* "View.MemoryView":610
11357 * return self.obj
11358 *
11359 * @property # <<<<<<<<<<<<<<
11360 * def shape(self):
11361 * return tuple([length for length in self.view.shape[:self.view.ndim]])
11362*/
11363
11364 /* function exit code */
11365 __pyx_L1_error:;
11366 __Pyx_XDECREF(__pyx_t_1);
11367 __Pyx_XDECREF(__pyx_t_5);
11368 __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11369 __pyx_r = NULL;
11370 __pyx_L0:;
11371
11372 __Pyx_XGIVEREF(__pyx_r);
11373 __Pyx_RefNannyFinishContext();
11374 return __pyx_r;
11375}
11376
11377/* "View.MemoryView":614
11378 * return tuple([length for length in self.view.shape[:self.view.ndim]])
11379 *
11380 * @property # <<<<<<<<<<<<<<
11381 * def strides(self):
11382 * if cython.unlikely(self.view.strides == NULL):
11383*/
11384
11385/* Python wrapper */
11386static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
11387static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
11388 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11389 PyObject *__pyx_r = 0;
11390 __Pyx_RefNannyDeclarations
11391 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11392 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11393 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11394
11395 /* function exit code */
11396 __Pyx_RefNannyFinishContext();
11397 return __pyx_r;
11398}
11399
11400static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11401 Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
11402 PyObject *__pyx_r = NULL;
11403 __Pyx_RefNannyDeclarations
11404 int __pyx_t_1;
11405 int __pyx_t_2;
11406 PyObject *__pyx_t_3 = NULL;
11407 Py_ssize_t *__pyx_t_4;
11408 Py_ssize_t *__pyx_t_5;
11409 Py_ssize_t *__pyx_t_6;
11410 PyObject *__pyx_t_7 = NULL;
11411 int __pyx_lineno = 0;
11412 const char *__pyx_filename = NULL;
11413 int __pyx_clineno = 0;
11414 __Pyx_RefNannySetupContext("__get__", 0);
11415
11416 /* "View.MemoryView":616
11417 * @property
11418 * def strides(self):
11419 * if cython.unlikely(self.view.strides == NULL): # <<<<<<<<<<<<<<
11420 *
11421 * _err_ValueError("Buffer view does not expose strides")
11422*/
11423 __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
11424
11425 if (unlikely(__pyx_t_1)) {
11426
11427
11428 /* "View.MemoryView":618
11429 * if cython.unlikely(self.view.strides == NULL):
11430 *
11431 * _err_ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
11432 *
11433 * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
11434*/
11435 __pyx_t_2 = __pyx_memoryview_err_ValueError(__pyx_k_Buffer_view_does_not_expose_stri); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 618, __pyx_L1_error)
11436
11437
11438 /* "View.MemoryView":616
11439 * @property
11440 * def strides(self):
11441 * if cython.unlikely(self.view.strides == NULL): # <<<<<<<<<<<<<<
11442 *
11443 * _err_ValueError("Buffer view does not expose strides")
11444*/
11445 }
11446
11447 /* "View.MemoryView":620
11448 * _err_ValueError("Buffer view does not expose strides")
11449 *
11450 * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
11451 *
11452 * @property
11453*/
11454 { /* enter inner scope */
11455 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 620, __pyx_L1_error)
11456 __Pyx_GOTREF(__pyx_t_3);
11457 __pyx_t_5 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
11458
11459 for (__pyx_t_6 = __pyx_v_self->view.strides; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
11460 __pyx_t_4 = __pyx_t_6;
11461 __pyx_8genexpr1__pyx_v_stride = (__pyx_t_4[0]);
11462 __pyx_t_7 = PyLong_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 620, __pyx_L1_error)
11463 __Pyx_GOTREF(__pyx_t_7);
11464 __Pyx_GIVEREF(__pyx_t_7);
11465 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_3, __pyx_t_7))) __PYX_ERR(1, 620, __pyx_L1_error)
11466 __pyx_t_7 = 0;
11467 }
11468
11469 } /* exit inner scope */
11470 __pyx_t_7 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 620, __pyx_L1_error)
11471 __Pyx_GOTREF(__pyx_t_7);
11472 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11473 {
11474 PyObject *__pyx_temp;
11475 {
11476 __pyx_temp = __pyx_r;
11477 __pyx_r = __pyx_t_7;
11478 }
11479 __Pyx_XDECREF(__pyx_temp);
11480 }
11481 __pyx_t_7 = 0;
11482 goto __pyx_L0;
11483
11484 /* "View.MemoryView":614
11485 * return tuple([length for length in self.view.shape[:self.view.ndim]])
11486 *
11487 * @property # <<<<<<<<<<<<<<
11488 * def strides(self):
11489 * if cython.unlikely(self.view.strides == NULL):
11490*/
11491
11492 /* function exit code */
11493 __pyx_L1_error:;
11494 __Pyx_XDECREF(__pyx_t_3);
11495 __Pyx_XDECREF(__pyx_t_7);
11496 __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11497 __pyx_r = NULL;
11498 __pyx_L0:;
11499
11500 __Pyx_XGIVEREF(__pyx_r);
11501 __Pyx_RefNannyFinishContext();
11502 return __pyx_r;
11503}
11504
11505/* "View.MemoryView":622
11506 * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
11507 *
11508 * @property # <<<<<<<<<<<<<<
11509 * def suboffsets(self):
11510 * if self.view.suboffsets == NULL:
11511*/
11512
11513/* Python wrapper */
11514static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
11515static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
11516 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11517 PyObject *__pyx_r = 0;
11518 __Pyx_RefNannyDeclarations
11519 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11520 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11521 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11522
11523 /* function exit code */
11524 __Pyx_RefNannyFinishContext();
11525 return __pyx_r;
11526}
11527
11528static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11529 Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
11530 PyObject *__pyx_r = NULL;
11531 __Pyx_RefNannyDeclarations
11532 int __pyx_t_1;
11533 PyObject *__pyx_t_2 = NULL;
11534 Py_ssize_t *__pyx_t_3;
11535 Py_ssize_t *__pyx_t_4;
11536 Py_ssize_t *__pyx_t_5;
11537 PyObject *__pyx_t_6 = NULL;
11538 int __pyx_lineno = 0;
11539 const char *__pyx_filename = NULL;
11540 int __pyx_clineno = 0;
11541 __Pyx_RefNannySetupContext("__get__", 0);
11542
11543 /* "View.MemoryView":624
11544 * @property
11545 * def suboffsets(self):
11546 * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
11547 * return (-1,) * self.view.ndim
11548 *
11549*/
11550 __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
11551
11552 if (__pyx_t_1) {
11553
11554
11555 /* "View.MemoryView":625
11556 * def suboffsets(self):
11557 * if self.view.suboffsets == NULL:
11558 * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
11559 *
11560 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
11561*/
11562 __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[0], __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 625, __pyx_L1_error)
11563 __Pyx_GOTREF(__pyx_t_2);
11564 {
11565 PyObject *__pyx_temp;
11566 {
11567 __pyx_temp = __pyx_r;
11568 __pyx_r = __pyx_t_2;
11569 }
11570 __Pyx_XDECREF(__pyx_temp);
11571 }
11572 __pyx_t_2 = 0;
11573 goto __pyx_L0;
11574
11575 /* "View.MemoryView":624
11576 * @property
11577 * def suboffsets(self):
11578 * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
11579 * return (-1,) * self.view.ndim
11580 *
11581*/
11582 }
11583
11584 /* "View.MemoryView":627
11585 * return (-1,) * self.view.ndim
11586 *
11587 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
11588 *
11589 * @property
11590*/
11591 { /* enter inner scope */
11592 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 627, __pyx_L1_error)
11593 __Pyx_GOTREF(__pyx_t_2);
11594 __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
11595
11596 for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
11597 __pyx_t_3 = __pyx_t_5;
11598 __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
11599 __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 627, __pyx_L1_error)
11600 __Pyx_GOTREF(__pyx_t_6);
11601 __Pyx_GIVEREF(__pyx_t_6);
11602 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_2, __pyx_t_6))) __PYX_ERR(1, 627, __pyx_L1_error)
11603 __pyx_t_6 = 0;
11604 }
11605
11606 } /* exit inner scope */
11607 __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 627, __pyx_L1_error)
11608 __Pyx_GOTREF(__pyx_t_6);
11609 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11610 {
11611 PyObject *__pyx_temp;
11612 {
11613 __pyx_temp = __pyx_r;
11614 __pyx_r = __pyx_t_6;
11615 }
11616 __Pyx_XDECREF(__pyx_temp);
11617 }
11618 __pyx_t_6 = 0;
11619 goto __pyx_L0;
11620
11621 /* "View.MemoryView":622
11622 * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
11623 *
11624 * @property # <<<<<<<<<<<<<<
11625 * def suboffsets(self):
11626 * if self.view.suboffsets == NULL:
11627*/
11628
11629 /* function exit code */
11630 __pyx_L1_error:;
11631 __Pyx_XDECREF(__pyx_t_2);
11632 __Pyx_XDECREF(__pyx_t_6);
11633 __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11634 __pyx_r = NULL;
11635 __pyx_L0:;
11636
11637 __Pyx_XGIVEREF(__pyx_r);
11638 __Pyx_RefNannyFinishContext();
11639 return __pyx_r;
11640}
11641
11642/* "View.MemoryView":629
11643 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
11644 *
11645 * @property # <<<<<<<<<<<<<<
11646 * def ndim(self):
11647 * return self.view.ndim
11648*/
11649
11650/* Python wrapper */
11651static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
11652static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
11653 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11654 PyObject *__pyx_r = 0;
11655 __Pyx_RefNannyDeclarations
11656 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11657 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11658 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11659
11660 /* function exit code */
11661 __Pyx_RefNannyFinishContext();
11662 return __pyx_r;
11663}
11664
11665static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11666 PyObject *__pyx_r = NULL;
11667 __Pyx_RefNannyDeclarations
11668 PyObject *__pyx_t_1 = NULL;
11669 int __pyx_lineno = 0;
11670 const char *__pyx_filename = NULL;
11671 int __pyx_clineno = 0;
11672 __Pyx_RefNannySetupContext("__get__", 0);
11673
11674 /* "View.MemoryView":631
11675 * @property
11676 * def ndim(self):
11677 * return self.view.ndim # <<<<<<<<<<<<<<
11678 *
11679 * @property
11680*/
11681 __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 631, __pyx_L1_error)
11682 __Pyx_GOTREF(__pyx_t_1);
11683 {
11684 PyObject *__pyx_temp;
11685 {
11686 __pyx_temp = __pyx_r;
11687 __pyx_r = __pyx_t_1;
11688 }
11689 __Pyx_XDECREF(__pyx_temp);
11690 }
11691 __pyx_t_1 = 0;
11692 goto __pyx_L0;
11693
11694 /* "View.MemoryView":629
11695 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
11696 *
11697 * @property # <<<<<<<<<<<<<<
11698 * def ndim(self):
11699 * return self.view.ndim
11700*/
11701
11702 /* function exit code */
11703 __pyx_L1_error:;
11704 __Pyx_XDECREF(__pyx_t_1);
11705 __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11706 __pyx_r = NULL;
11707 __pyx_L0:;
11708 __Pyx_XGIVEREF(__pyx_r);
11709 __Pyx_RefNannyFinishContext();
11710 return __pyx_r;
11711}
11712
11713/* "View.MemoryView":633
11714 * return self.view.ndim
11715 *
11716 * @property # <<<<<<<<<<<<<<
11717 * def itemsize(self):
11718 * return self.view.itemsize
11719*/
11720
11721/* Python wrapper */
11722static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
11723static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
11724 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11725 PyObject *__pyx_r = 0;
11726 __Pyx_RefNannyDeclarations
11727 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11728 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11729 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11730
11731 /* function exit code */
11732 __Pyx_RefNannyFinishContext();
11733 return __pyx_r;
11734}
11735
11736static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11737 PyObject *__pyx_r = NULL;
11738 __Pyx_RefNannyDeclarations
11739 PyObject *__pyx_t_1 = NULL;
11740 int __pyx_lineno = 0;
11741 const char *__pyx_filename = NULL;
11742 int __pyx_clineno = 0;
11743 __Pyx_RefNannySetupContext("__get__", 0);
11744
11745 /* "View.MemoryView":635
11746 * @property
11747 * def itemsize(self):
11748 * return self.view.itemsize # <<<<<<<<<<<<<<
11749 *
11750 * @property
11751*/
11752 __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 635, __pyx_L1_error)
11753 __Pyx_GOTREF(__pyx_t_1);
11754 {
11755 PyObject *__pyx_temp;
11756 {
11757 __pyx_temp = __pyx_r;
11758 __pyx_r = __pyx_t_1;
11759 }
11760 __Pyx_XDECREF(__pyx_temp);
11761 }
11762 __pyx_t_1 = 0;
11763 goto __pyx_L0;
11764
11765 /* "View.MemoryView":633
11766 * return self.view.ndim
11767 *
11768 * @property # <<<<<<<<<<<<<<
11769 * def itemsize(self):
11770 * return self.view.itemsize
11771*/
11772
11773 /* function exit code */
11774 __pyx_L1_error:;
11775 __Pyx_XDECREF(__pyx_t_1);
11776 __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11777 __pyx_r = NULL;
11778 __pyx_L0:;
11779 __Pyx_XGIVEREF(__pyx_r);
11780 __Pyx_RefNannyFinishContext();
11781 return __pyx_r;
11782}
11783
11784/* "View.MemoryView":637
11785 * return self.view.itemsize
11786 *
11787 * @property # <<<<<<<<<<<<<<
11788 * def nbytes(self):
11789 * return self.size * self.view.itemsize
11790*/
11791
11792/* Python wrapper */
11793static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
11794static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
11795 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11796 PyObject *__pyx_r = 0;
11797 __Pyx_RefNannyDeclarations
11798 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11799 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11800 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11801
11802 /* function exit code */
11803 __Pyx_RefNannyFinishContext();
11804 return __pyx_r;
11805}
11806
11807static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11808 PyObject *__pyx_r = NULL;
11809 __Pyx_RefNannyDeclarations
11810 PyObject *__pyx_t_1 = NULL;
11811 PyObject *__pyx_t_2 = NULL;
11812 PyObject *__pyx_t_3 = NULL;
11813 int __pyx_lineno = 0;
11814 const char *__pyx_filename = NULL;
11815 int __pyx_clineno = 0;
11816 __Pyx_RefNannySetupContext("__get__", 0);
11817
11818 /* "View.MemoryView":639
11819 * @property
11820 * def nbytes(self):
11821 * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
11822 *
11823 * @property
11824*/
11825 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 639, __pyx_L1_error)
11826 __Pyx_GOTREF(__pyx_t_1);
11827 __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 639, __pyx_L1_error)
11828 __Pyx_GOTREF(__pyx_t_2);
11829 __pyx_t_3 = __Pyx_PyNumber_Multiply_object_int(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 639, __pyx_L1_error)
11830 __Pyx_GOTREF(__pyx_t_3);
11831 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11832 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11833 {
11834 PyObject *__pyx_temp;
11835 {
11836 __pyx_temp = __pyx_r;
11837 __pyx_r = __pyx_t_3;
11838 }
11839 __Pyx_XDECREF(__pyx_temp);
11840 }
11841 __pyx_t_3 = 0;
11842 goto __pyx_L0;
11843
11844 /* "View.MemoryView":637
11845 * return self.view.itemsize
11846 *
11847 * @property # <<<<<<<<<<<<<<
11848 * def nbytes(self):
11849 * return self.size * self.view.itemsize
11850*/
11851
11852 /* function exit code */
11853 __pyx_L1_error:;
11854 __Pyx_XDECREF(__pyx_t_1);
11855 __Pyx_XDECREF(__pyx_t_2);
11856 __Pyx_XDECREF(__pyx_t_3);
11857 __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11858 __pyx_r = NULL;
11859 __pyx_L0:;
11860 __Pyx_XGIVEREF(__pyx_r);
11861 __Pyx_RefNannyFinishContext();
11862 return __pyx_r;
11863}
11864
11865/* "View.MemoryView":641
11866 * return self.size * self.view.itemsize
11867 *
11868 * @property # <<<<<<<<<<<<<<
11869 * def size(self):
11870 * cdef size_t result
11871*/
11872
11873/* Python wrapper */
11874static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
11875static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
11876 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11877 PyObject *__pyx_r = 0;
11878 __Pyx_RefNannyDeclarations
11879 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11880 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11881 __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11882
11883 /* function exit code */
11884 __Pyx_RefNannyFinishContext();
11885 return __pyx_r;
11886}
11887
11888static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11889 size_t __pyx_v_result;
11890 Py_ssize_t __pyx_v_length;
11891 PyObject *__pyx_r = NULL;
11892 __Pyx_RefNannyDeclarations
11893 int __pyx_t_1;
11894 Py_ssize_t *__pyx_t_2;
11895 Py_ssize_t *__pyx_t_3;
11896 Py_ssize_t *__pyx_t_4;
11897 PyObject *__pyx_t_5 = NULL;
11898 int __pyx_lineno = 0;
11899 const char *__pyx_filename = NULL;
11900 int __pyx_clineno = 0;
11901 __Pyx_RefNannySetupContext("__get__", 0);
11902
11903 /* "View.MemoryView":644
11904 * def size(self):
11905 * cdef size_t result
11906 * if self._size is None: # <<<<<<<<<<<<<<
11907 * result = 1
11908 *
11909*/
11910 __pyx_t_1 = (__pyx_v_self->_size == Py_None);
11911 if (__pyx_t_1) {
11912
11913
11914 /* "View.MemoryView":645
11915 * cdef size_t result
11916 * if self._size is None:
11917 * result = 1 # <<<<<<<<<<<<<<
11918 *
11919 * for length in self.view.shape[:self.view.ndim]:
11920*/
11921 __pyx_v_result = 1;
11922
11923 /* "View.MemoryView":647
11924 * result = 1
11925 *
11926 * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
11927 * result *= <size_t> length
11928 *
11929*/
11930 __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
11931
11932 for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
11933 __pyx_t_2 = __pyx_t_4;
11934 __pyx_v_length = (__pyx_t_2[0]);
11935
11936 /* "View.MemoryView":648
11937 *
11938 * for length in self.view.shape[:self.view.ndim]:
11939 * result *= <size_t> length # <<<<<<<<<<<<<<
11940 *
11941 * self._size = result
11942*/
11943 __pyx_v_result = (__pyx_v_result * ((size_t)__pyx_v_length));
11944 }
11945
11946
11947 /* "View.MemoryView":650
11948 * result *= <size_t> length
11949 *
11950 * self._size = result # <<<<<<<<<<<<<<
11951 *
11952 * return self._size
11953*/
11954 __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 650, __pyx_L1_error)
11955 __Pyx_GOTREF(__pyx_t_5);
11956 __Pyx_GIVEREF(__pyx_t_5);
11957 __Pyx_GOTREF(__pyx_v_self->_size);
11958 __Pyx_DECREF(__pyx_v_self->_size);
11959 __pyx_v_self->_size = __pyx_t_5;
11960 __pyx_t_5 = 0;
11961
11962 /* "View.MemoryView":644
11963 * def size(self):
11964 * cdef size_t result
11965 * if self._size is None: # <<<<<<<<<<<<<<
11966 * result = 1
11967 *
11968*/
11969 }
11970
11971 /* "View.MemoryView":652
11972 * self._size = result
11973 *
11974 * return self._size # <<<<<<<<<<<<<<
11975 *
11976 * def __len__(self):
11977*/
11978 {
11979 PyObject *__pyx_temp;
11980 {
11981 __pyx_temp = __pyx_r;
11982 __Pyx_INCREF(__pyx_v_self->_size);
11983 __pyx_r = __pyx_v_self->_size;
11984 }
11985 __Pyx_XDECREF(__pyx_temp);
11986 }
11987 goto __pyx_L0;
11988
11989 /* "View.MemoryView":641
11990 * return self.size * self.view.itemsize
11991 *
11992 * @property # <<<<<<<<<<<<<<
11993 * def size(self):
11994 * cdef size_t result
11995*/
11996
11997 /* function exit code */
11998 __pyx_L1_error:;
11999 __Pyx_XDECREF(__pyx_t_5);
12000 __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12001 __pyx_r = NULL;
12002 __pyx_L0:;
12003
12004
12005 __Pyx_XGIVEREF(__pyx_r);
12006 __Pyx_RefNannyFinishContext();
12007 return __pyx_r;
12008}
12009
12010/* "View.MemoryView":654
12011 * return self._size
12012 *
12013 * def __len__(self): # <<<<<<<<<<<<<<
12014 * if self.view.ndim >= 1:
12015 * return self.view.shape[0]
12016*/
12017
12018/* Python wrapper */
12019static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
12020static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
12021 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12022 Py_ssize_t __pyx_r;
12023 __Pyx_RefNannyDeclarations
12024 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
12025 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12026 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12027
12028 /* function exit code */
12029 __Pyx_RefNannyFinishContext();
12030 return __pyx_r;
12031}
12032
12033static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
12034 Py_ssize_t __pyx_r;
12035 int __pyx_t_1;
12036
12037 /* "View.MemoryView":655
12038 *
12039 * def __len__(self):
12040 * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
12041 * return self.view.shape[0]
12042 *
12043*/
12044 __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
12045
12046 if (__pyx_t_1) {
12047
12048
12049 /* "View.MemoryView":656
12050 * def __len__(self):
12051 * if self.view.ndim >= 1:
12052 * return self.view.shape[0] # <<<<<<<<<<<<<<
12053 *
12054 * return 0
12055*/
12056 {
12057
12058 __pyx_r = (__pyx_v_self->view.shape[0]);
12059 }
12060 goto __pyx_L0;
12061
12062 /* "View.MemoryView":655
12063 *
12064 * def __len__(self):
12065 * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
12066 * return self.view.shape[0]
12067 *
12068*/
12069 }
12070
12071 /* "View.MemoryView":658
12072 * return self.view.shape[0]
12073 *
12074 * return 0 # <<<<<<<<<<<<<<
12075 *
12076 * def __repr__(self):
12077*/
12078 {
12079
12080 __pyx_r = 0;
12081 }
12082 goto __pyx_L0;
12083
12084 /* "View.MemoryView":654
12085 * return self._size
12086 *
12087 * def __len__(self): # <<<<<<<<<<<<<<
12088 * if self.view.ndim >= 1:
12089 * return self.view.shape[0]
12090*/
12091
12092 /* function exit code */
12093 __pyx_L0:;
12094
12095 return __pyx_r;
12096}
12097
12098/* "View.MemoryView":660
12099 * return 0
12100 *
12101 * def __repr__(self): # <<<<<<<<<<<<<<
12102 * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12103 * id(self))
12104*/
12105
12106/* Python wrapper */
12107static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
12108static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
12109 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12110 PyObject *__pyx_r = 0;
12111 __Pyx_RefNannyDeclarations
12112 __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
12113 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12114 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12115
12116 /* function exit code */
12117 __Pyx_RefNannyFinishContext();
12118 return __pyx_r;
12119}
12120
12121static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
12122 PyObject *__pyx_r = NULL;
12123 __Pyx_RefNannyDeclarations
12124 PyObject *__pyx_t_1 = NULL;
12125 PyObject *__pyx_t_2 = NULL;
12126 PyObject *__pyx_t_3 = NULL;
12127 PyObject *__pyx_t_4[5];
12128 Py_ssize_t __pyx_t_5;
12129 int __pyx_t_6;
12130 int __pyx_lineno = 0;
12131 const char *__pyx_filename = NULL;
12132 int __pyx_clineno = 0;
12133 __Pyx_RefNannySetupContext("__repr__", 0);
12134
12135 /* "View.MemoryView":661
12136 *
12137 * def __repr__(self):
12138 * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
12139 * id(self))
12140 *
12141*/
12142 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 661, __pyx_L1_error)
12143 __Pyx_GOTREF(__pyx_t_1);
12144 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 661, __pyx_L1_error)
12145 __Pyx_GOTREF(__pyx_t_2);
12146 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12147 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 661, __pyx_L1_error)
12148 __Pyx_GOTREF(__pyx_t_1);
12149 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12150 __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 661, __pyx_L1_error)
12151 __Pyx_GOTREF(__pyx_t_2);
12152 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12153
12154 /* "View.MemoryView":662
12155 * def __repr__(self):
12156 * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12157 * id(self)) # <<<<<<<<<<<<<<
12158 *
12159 * def __str__(self):
12160*/
12161 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 662, __pyx_L1_error)
12162 __Pyx_GOTREF(__pyx_t_1);
12163 __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 662, __pyx_L1_error)
12164 __Pyx_GOTREF(__pyx_t_3);
12165 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12166 __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of;
12167 __pyx_t_4[1] = __pyx_t_2;
12168 __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at_0x;
12169 __pyx_t_4[3] = __pyx_t_3;
12170 __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__4;
12171
12172 /* "View.MemoryView":661
12173 *
12174 * def __repr__(self):
12175 * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
12176 * id(self))
12177 *
12178*/
12179 __pyx_t_5 = 22;
12180 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
12181 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4[1]) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4[3]);
12182 #endif
12183 __pyx_t_6 = 0;
12184 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
12185 __pyx_t_6 |= __Pyx_PyUnicode_KIND_04(__pyx_t_4[1]) | __Pyx_PyUnicode_KIND_04(__pyx_t_4[3]);
12186 #endif
12187 __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_5, __pyx_t_6);
12188 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 661, __pyx_L1_error)
12189 __Pyx_GOTREF(__pyx_t_1);
12190 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12191 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12192 {
12193 PyObject *__pyx_temp;
12194 {
12195 __pyx_temp = __pyx_r;
12196 __pyx_r = __pyx_t_1;
12197 }
12198 __Pyx_XDECREF(__pyx_temp);
12199 }
12200 __pyx_t_1 = 0;
12201 goto __pyx_L0;
12202
12203 /* "View.MemoryView":660
12204 * return 0
12205 *
12206 * def __repr__(self): # <<<<<<<<<<<<<<
12207 * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12208 * id(self))
12209*/
12210
12211 /* function exit code */
12212 __pyx_L1_error:;
12213 __Pyx_XDECREF(__pyx_t_1);
12214 __Pyx_XDECREF(__pyx_t_2);
12215 __Pyx_XDECREF(__pyx_t_3);
12216 __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12217 __pyx_r = NULL;
12218 __pyx_L0:;
12219 __Pyx_XGIVEREF(__pyx_r);
12220 __Pyx_RefNannyFinishContext();
12221 return __pyx_r;
12222}
12223
12224/* "View.MemoryView":664
12225 * id(self))
12226 *
12227 * def __str__(self): # <<<<<<<<<<<<<<
12228 * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
12229 *
12230*/
12231
12232/* Python wrapper */
12233static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
12234static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
12235 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12236 PyObject *__pyx_r = 0;
12237 __Pyx_RefNannyDeclarations
12238 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
12239 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12240 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12241
12242 /* function exit code */
12243 __Pyx_RefNannyFinishContext();
12244 return __pyx_r;
12245}
12246
12247static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
12248 PyObject *__pyx_r = NULL;
12249 __Pyx_RefNannyDeclarations
12250 PyObject *__pyx_t_1 = NULL;
12251 PyObject *__pyx_t_2 = NULL;
12252 PyObject *__pyx_t_3[3];
12253 Py_ssize_t __pyx_t_4;
12254 int __pyx_t_5;
12255 int __pyx_lineno = 0;
12256 const char *__pyx_filename = NULL;
12257 int __pyx_clineno = 0;
12258 __Pyx_RefNannySetupContext("__str__", 0);
12259
12260 /* "View.MemoryView":665
12261 *
12262 * def __str__(self):
12263 * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
12264 *
12265 *
12266*/
12267 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 665, __pyx_L1_error)
12268 __Pyx_GOTREF(__pyx_t_1);
12269 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L1_error)
12270 __Pyx_GOTREF(__pyx_t_2);
12271 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12272 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 665, __pyx_L1_error)
12273 __Pyx_GOTREF(__pyx_t_1);
12274 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12275 __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L1_error)
12276 __Pyx_GOTREF(__pyx_t_2);
12277 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12278 __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of;
12279 __pyx_t_3[1] = __pyx_t_2;
12280 __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_object;
12281 __pyx_t_4 = 23;
12282 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
12283 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3[1]);
12284 #endif
12285 __pyx_t_5 = 0;
12286 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
12287 __pyx_t_5 |= __Pyx_PyUnicode_KIND_04(__pyx_t_3[1]);
12288 #endif
12289 __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5);
12290 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 665, __pyx_L1_error)
12291 __Pyx_GOTREF(__pyx_t_1);
12292 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12293 {
12294 PyObject *__pyx_temp;
12295 {
12296 __pyx_temp = __pyx_r;
12297 __pyx_r = __pyx_t_1;
12298 }
12299 __Pyx_XDECREF(__pyx_temp);
12300 }
12301 __pyx_t_1 = 0;
12302 goto __pyx_L0;
12303
12304 /* "View.MemoryView":664
12305 * id(self))
12306 *
12307 * def __str__(self): # <<<<<<<<<<<<<<
12308 * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
12309 *
12310*/
12311
12312 /* function exit code */
12313 __pyx_L1_error:;
12314 __Pyx_XDECREF(__pyx_t_1);
12315 __Pyx_XDECREF(__pyx_t_2);
12316 __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12317 __pyx_r = NULL;
12318 __pyx_L0:;
12319 __Pyx_XGIVEREF(__pyx_r);
12320 __Pyx_RefNannyFinishContext();
12321 return __pyx_r;
12322}
12323
12324/* "View.MemoryView":668
12325 *
12326 *
12327 * def is_c_contig(self): # <<<<<<<<<<<<<<
12328 * cdef __Pyx_memviewslice *mslice
12329 * cdef __Pyx_memviewslice tmp
12330*/
12331
12332/* Python wrapper */
12333static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self,
12334#if CYTHON_VECTORCALL
12335PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12336#else
12337PyObject *__pyx_args, PyObject *__pyx_kwds
12338#endif
12339); /*proto*/
12340static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self,
12341#if CYTHON_VECTORCALL
12342PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12343#else
12344PyObject *__pyx_args, PyObject *__pyx_kwds
12345#endif
12346) {
12347 #if !CYTHON_VECTORCALL
12348 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12349 #endif
12350 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12351 PyObject *__pyx_r = 0;
12352 __Pyx_RefNannyDeclarations
12353 __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
12354 #if !CYTHON_VECTORCALL
12355 #if CYTHON_ASSUME_SAFE_SIZE
12356 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12357 #else
12358 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12359 #endif
12360 #endif
12361 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12362 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL; }
12363 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12364 if (unlikely(__pyx_kwds_len < 0)) return NULL;
12365 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_c_contig", __pyx_kwds); return NULL;}
12366 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
12367
12368 /* function exit code */
12369 __Pyx_RefNannyFinishContext();
12370 return __pyx_r;
12371}
12372
12373static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
12374 __Pyx_memviewslice *__pyx_v_mslice;
12375 __Pyx_memviewslice __pyx_v_tmp;
12376 PyObject *__pyx_r = NULL;
12377 __Pyx_RefNannyDeclarations
12378 __Pyx_memviewslice *__pyx_t_1;
12379 PyObject *__pyx_t_2 = NULL;
12380 int __pyx_lineno = 0;
12381 const char *__pyx_filename = NULL;
12382 int __pyx_clineno = 0;
12383 __Pyx_RefNannySetupContext("is_c_contig", 0);
12384
12385 /* "View.MemoryView":671
12386 * cdef __Pyx_memviewslice *mslice
12387 * cdef __Pyx_memviewslice tmp
12388 * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
12389 * return slice_is_contig(mslice[0], 'C', self.view.ndim)
12390 *
12391*/
12392 __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 671, __pyx_L1_error)
12393 __pyx_v_mslice = __pyx_t_1;
12394
12395 /* "View.MemoryView":672
12396 * cdef __Pyx_memviewslice tmp
12397 * mslice = get_slice_from_memview(self, &tmp)
12398 * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
12399 *
12400 * def is_f_contig(self):
12401*/
12402 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 672, __pyx_L1_error)
12403 __Pyx_GOTREF(__pyx_t_2);
12404 {
12405 PyObject *__pyx_temp;
12406 {
12407 __pyx_temp = __pyx_r;
12408 __pyx_r = __pyx_t_2;
12409 }
12410 __Pyx_XDECREF(__pyx_temp);
12411 }
12412 __pyx_t_2 = 0;
12413 goto __pyx_L0;
12414
12415 /* "View.MemoryView":668
12416 *
12417 *
12418 * def is_c_contig(self): # <<<<<<<<<<<<<<
12419 * cdef __Pyx_memviewslice *mslice
12420 * cdef __Pyx_memviewslice tmp
12421*/
12422
12423 /* function exit code */
12424 __pyx_L1_error:;
12425 __Pyx_XDECREF(__pyx_t_2);
12426 __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
12427 __pyx_r = NULL;
12428 __pyx_L0:;
12429
12430
12431 __Pyx_XGIVEREF(__pyx_r);
12432 __Pyx_RefNannyFinishContext();
12433 return __pyx_r;
12434}
12435
12436/* "View.MemoryView":674
12437 * return slice_is_contig(mslice[0], 'C', self.view.ndim)
12438 *
12439 * def is_f_contig(self): # <<<<<<<<<<<<<<
12440 * cdef __Pyx_memviewslice *mslice
12441 * cdef __Pyx_memviewslice tmp
12442*/
12443
12444/* Python wrapper */
12445static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self,
12446#if CYTHON_VECTORCALL
12447PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12448#else
12449PyObject *__pyx_args, PyObject *__pyx_kwds
12450#endif
12451); /*proto*/
12452static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self,
12453#if CYTHON_VECTORCALL
12454PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12455#else
12456PyObject *__pyx_args, PyObject *__pyx_kwds
12457#endif
12458) {
12459 #if !CYTHON_VECTORCALL
12460 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12461 #endif
12462 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12463 PyObject *__pyx_r = 0;
12464 __Pyx_RefNannyDeclarations
12465 __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
12466 #if !CYTHON_VECTORCALL
12467 #if CYTHON_ASSUME_SAFE_SIZE
12468 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12469 #else
12470 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12471 #endif
12472 #endif
12473 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12474 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL; }
12475 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12476 if (unlikely(__pyx_kwds_len < 0)) return NULL;
12477 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_f_contig", __pyx_kwds); return NULL;}
12478 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
12479
12480 /* function exit code */
12481 __Pyx_RefNannyFinishContext();
12482 return __pyx_r;
12483}
12484
12485static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
12486 __Pyx_memviewslice *__pyx_v_mslice;
12487 __Pyx_memviewslice __pyx_v_tmp;
12488 PyObject *__pyx_r = NULL;
12489 __Pyx_RefNannyDeclarations
12490 __Pyx_memviewslice *__pyx_t_1;
12491 PyObject *__pyx_t_2 = NULL;
12492 int __pyx_lineno = 0;
12493 const char *__pyx_filename = NULL;
12494 int __pyx_clineno = 0;
12495 __Pyx_RefNannySetupContext("is_f_contig", 0);
12496
12497 /* "View.MemoryView":677
12498 * cdef __Pyx_memviewslice *mslice
12499 * cdef __Pyx_memviewslice tmp
12500 * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
12501 * return slice_is_contig(mslice[0], 'F', self.view.ndim)
12502 *
12503*/
12504 __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 677, __pyx_L1_error)
12505 __pyx_v_mslice = __pyx_t_1;
12506
12507 /* "View.MemoryView":678
12508 * cdef __Pyx_memviewslice tmp
12509 * mslice = get_slice_from_memview(self, &tmp)
12510 * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
12511 *
12512 * def copy(self):
12513*/
12514 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 678, __pyx_L1_error)
12515 __Pyx_GOTREF(__pyx_t_2);
12516 {
12517 PyObject *__pyx_temp;
12518 {
12519 __pyx_temp = __pyx_r;
12520 __pyx_r = __pyx_t_2;
12521 }
12522 __Pyx_XDECREF(__pyx_temp);
12523 }
12524 __pyx_t_2 = 0;
12525 goto __pyx_L0;
12526
12527 /* "View.MemoryView":674
12528 * return slice_is_contig(mslice[0], 'C', self.view.ndim)
12529 *
12530 * def is_f_contig(self): # <<<<<<<<<<<<<<
12531 * cdef __Pyx_memviewslice *mslice
12532 * cdef __Pyx_memviewslice tmp
12533*/
12534
12535 /* function exit code */
12536 __pyx_L1_error:;
12537 __Pyx_XDECREF(__pyx_t_2);
12538 __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
12539 __pyx_r = NULL;
12540 __pyx_L0:;
12541
12542
12543 __Pyx_XGIVEREF(__pyx_r);
12544 __Pyx_RefNannyFinishContext();
12545 return __pyx_r;
12546}
12547
12548/* "View.MemoryView":680
12549 * return slice_is_contig(mslice[0], 'F', self.view.ndim)
12550 *
12551 * def copy(self): # <<<<<<<<<<<<<<
12552 * cdef __Pyx_memviewslice mslice
12553 * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
12554*/
12555
12556/* Python wrapper */
12557static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self,
12558#if CYTHON_VECTORCALL
12559PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12560#else
12561PyObject *__pyx_args, PyObject *__pyx_kwds
12562#endif
12563); /*proto*/
12564static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self,
12565#if CYTHON_VECTORCALL
12566PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12567#else
12568PyObject *__pyx_args, PyObject *__pyx_kwds
12569#endif
12570) {
12571 #if !CYTHON_VECTORCALL
12572 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12573 #endif
12574 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12575 PyObject *__pyx_r = 0;
12576 __Pyx_RefNannyDeclarations
12577 __Pyx_RefNannySetupContext("copy (wrapper)", 0);
12578 #if !CYTHON_VECTORCALL
12579 #if CYTHON_ASSUME_SAFE_SIZE
12580 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12581 #else
12582 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12583 #endif
12584 #endif
12585 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12586 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; }
12587 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12588 if (unlikely(__pyx_kwds_len < 0)) return NULL;
12589 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;}
12590 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
12591
12592 /* function exit code */
12593 __Pyx_RefNannyFinishContext();
12594 return __pyx_r;
12595}
12596
12597static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
12598 __Pyx_memviewslice __pyx_v_mslice;
12599 int __pyx_v_flags;
12600 PyObject *__pyx_r = NULL;
12601 __Pyx_RefNannyDeclarations
12602 __Pyx_memviewslice __pyx_t_1;
12603 PyObject *__pyx_t_2 = NULL;
12604 int __pyx_lineno = 0;
12605 const char *__pyx_filename = NULL;
12606 int __pyx_clineno = 0;
12607 __Pyx_RefNannySetupContext("copy", 0);
12608
12609 /* "View.MemoryView":682
12610 * def copy(self):
12611 * cdef __Pyx_memviewslice mslice
12612 * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
12613 *
12614 * slice_copy(self, &mslice)
12615*/
12616 __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
12617
12618 /* "View.MemoryView":684
12619 * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
12620 *
12621 * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
12622 * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
12623 * self.view.itemsize,
12624*/
12625 __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
12626
12627 /* "View.MemoryView":685
12628 *
12629 * slice_copy(self, &mslice)
12630 * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
12631 * self.view.itemsize,
12632 * flags|PyBUF_C_CONTIGUOUS,
12633*/
12634 __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), __pyx_k_c, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 685, __pyx_L1_error)
12635 __pyx_v_mslice = __pyx_t_1;
12636
12637 /* "View.MemoryView":690
12638 * self.dtype_is_object)
12639 *
12640 * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
12641 *
12642 * def copy_fortran(self):
12643*/
12644 __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L1_error)
12645 __Pyx_GOTREF(__pyx_t_2);
12646 {
12647 PyObject *__pyx_temp;
12648 {
12649 __pyx_temp = __pyx_r;
12650 __pyx_r = __pyx_t_2;
12651 }
12652 __Pyx_XDECREF(__pyx_temp);
12653 }
12654 __pyx_t_2 = 0;
12655 goto __pyx_L0;
12656
12657 /* "View.MemoryView":680
12658 * return slice_is_contig(mslice[0], 'F', self.view.ndim)
12659 *
12660 * def copy(self): # <<<<<<<<<<<<<<
12661 * cdef __Pyx_memviewslice mslice
12662 * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
12663*/
12664
12665 /* function exit code */
12666 __pyx_L1_error:;
12667 __Pyx_XDECREF(__pyx_t_2);
12668 __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
12669 __pyx_r = NULL;
12670 __pyx_L0:;
12671
12672
12673 __Pyx_XGIVEREF(__pyx_r);
12674 __Pyx_RefNannyFinishContext();
12675 return __pyx_r;
12676}
12677
12678/* "View.MemoryView":692
12679 * return memoryview_copy_from_slice(self, &mslice)
12680 *
12681 * def copy_fortran(self): # <<<<<<<<<<<<<<
12682 * cdef __Pyx_memviewslice src, dst
12683 * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12684*/
12685
12686/* Python wrapper */
12687static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self,
12688#if CYTHON_VECTORCALL
12689PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12690#else
12691PyObject *__pyx_args, PyObject *__pyx_kwds
12692#endif
12693); /*proto*/
12694static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self,
12695#if CYTHON_VECTORCALL
12696PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12697#else
12698PyObject *__pyx_args, PyObject *__pyx_kwds
12699#endif
12700) {
12701 #if !CYTHON_VECTORCALL
12702 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12703 #endif
12704 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12705 PyObject *__pyx_r = 0;
12706 __Pyx_RefNannyDeclarations
12707 __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
12708 #if !CYTHON_VECTORCALL
12709 #if CYTHON_ASSUME_SAFE_SIZE
12710 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12711 #else
12712 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12713 #endif
12714 #endif
12715 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12716 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL; }
12717 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12718 if (unlikely(__pyx_kwds_len < 0)) return NULL;
12719 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy_fortran", __pyx_kwds); return NULL;}
12720 __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
12721
12722 /* function exit code */
12723 __Pyx_RefNannyFinishContext();
12724 return __pyx_r;
12725}
12726
12727static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
12728 __Pyx_memviewslice __pyx_v_src;
12729 __Pyx_memviewslice __pyx_v_dst;
12730 int __pyx_v_flags;
12731 PyObject *__pyx_r = NULL;
12732 __Pyx_RefNannyDeclarations
12733 __Pyx_memviewslice __pyx_t_1;
12734 PyObject *__pyx_t_2 = NULL;
12735 int __pyx_lineno = 0;
12736 const char *__pyx_filename = NULL;
12737 int __pyx_clineno = 0;
12738 __Pyx_RefNannySetupContext("copy_fortran", 0);
12739
12740 /* "View.MemoryView":694
12741 * def copy_fortran(self):
12742 * cdef __Pyx_memviewslice src, dst
12743 * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
12744 *
12745 * slice_copy(self, &src)
12746*/
12747 __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
12748
12749 /* "View.MemoryView":696
12750 * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12751 *
12752 * slice_copy(self, &src) # <<<<<<<<<<<<<<
12753 * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
12754 * self.view.itemsize,
12755*/
12756 __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
12757
12758 /* "View.MemoryView":697
12759 *
12760 * slice_copy(self, &src)
12761 * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
12762 * self.view.itemsize,
12763 * flags|PyBUF_F_CONTIGUOUS,
12764*/
12765 __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), __pyx_k_fortran, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 697, __pyx_L1_error)
12766 __pyx_v_dst = __pyx_t_1;
12767
12768 /* "View.MemoryView":702
12769 * self.dtype_is_object)
12770 *
12771 * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
12772 *
12773 *
12774*/
12775 __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 702, __pyx_L1_error)
12776 __Pyx_GOTREF(__pyx_t_2);
12777 {
12778 PyObject *__pyx_temp;
12779 {
12780 __pyx_temp = __pyx_r;
12781 __pyx_r = __pyx_t_2;
12782 }
12783 __Pyx_XDECREF(__pyx_temp);
12784 }
12785 __pyx_t_2 = 0;
12786 goto __pyx_L0;
12787
12788 /* "View.MemoryView":692
12789 * return memoryview_copy_from_slice(self, &mslice)
12790 *
12791 * def copy_fortran(self): # <<<<<<<<<<<<<<
12792 * cdef __Pyx_memviewslice src, dst
12793 * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12794*/
12795
12796 /* function exit code */
12797 __pyx_L1_error:;
12798 __Pyx_XDECREF(__pyx_t_2);
12799 __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
12800 __pyx_r = NULL;
12801 __pyx_L0:;
12802
12803
12804
12805 __Pyx_XGIVEREF(__pyx_r);
12806 __Pyx_RefNannyFinishContext();
12807 return __pyx_r;
12808}
12809
12810/* "(tree fragment)":1
12811 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12812 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12813 * def __setstate_cython__(self, __pyx_state):
12814*/
12815
12816/* Python wrapper */
12817static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self,
12818#if CYTHON_VECTORCALL
12819PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12820#else
12821PyObject *__pyx_args, PyObject *__pyx_kwds
12822#endif
12823); /*proto*/
12824static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self,
12825#if CYTHON_VECTORCALL
12826PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12827#else
12828PyObject *__pyx_args, PyObject *__pyx_kwds
12829#endif
12830) {
12831 #if !CYTHON_VECTORCALL
12832 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12833 #endif
12834 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12835 PyObject *__pyx_r = 0;
12836 __Pyx_RefNannyDeclarations
12837 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
12838 #if !CYTHON_VECTORCALL
12839 #if CYTHON_ASSUME_SAFE_SIZE
12840 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12841 #else
12842 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12843 #endif
12844 #endif
12845 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12846 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
12847 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12848 if (unlikely(__pyx_kwds_len < 0)) return NULL;
12849 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
12850 __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12851
12852 /* function exit code */
12853 __Pyx_RefNannyFinishContext();
12854 return __pyx_r;
12855}
12856
12857static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
12858 PyObject *__pyx_r = NULL;
12859 __Pyx_RefNannyDeclarations
12860 int __pyx_lineno = 0;
12861 const char *__pyx_filename = NULL;
12862 int __pyx_clineno = 0;
12863 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
12864
12865 /* "(tree fragment)":2
12866 * def __reduce_cython__(self):
12867 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
12868 * def __setstate_cython__(self, __pyx_state):
12869 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12870*/
12871 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
12872 __PYX_ERR(1, 2, __pyx_L1_error)
12873
12874 /* "(tree fragment)":1
12875 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12876 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12877 * def __setstate_cython__(self, __pyx_state):
12878*/
12879
12880 /* function exit code */
12881 __pyx_L1_error:;
12882 __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12883 __pyx_r = NULL;
12884 __Pyx_XGIVEREF(__pyx_r);
12885 __Pyx_RefNannyFinishContext();
12886 return __pyx_r;
12887}
12888
12889/* "(tree fragment)":3
12890 * def __reduce_cython__(self):
12891 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12892 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
12893 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12894*/
12895
12896/* Python wrapper */
12897static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self,
12898#if CYTHON_VECTORCALL
12899PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12900#else
12901PyObject *__pyx_args, PyObject *__pyx_kwds
12902#endif
12903); /*proto*/
12904static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self,
12905#if CYTHON_VECTORCALL
12906PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12907#else
12908PyObject *__pyx_args, PyObject *__pyx_kwds
12909#endif
12910) {
12911 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
12912 #if !CYTHON_VECTORCALL
12913 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12914 #endif
12915 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12916 PyObject* values[1] = {0};
12917 int __pyx_lineno = 0;
12918 const char *__pyx_filename = NULL;
12919 int __pyx_clineno = 0;
12920 PyObject *__pyx_r = 0;
12921 __Pyx_RefNannyDeclarations
12922 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
12923 #if !CYTHON_VECTORCALL
12924 #if CYTHON_ASSUME_SAFE_SIZE
12925 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12926 #else
12927 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12928 #endif
12929 #endif
12930 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12931 {
12932 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
12933 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12934 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
12935 if (__pyx_kwds_len > 0) {
12936 switch (__pyx_nargs) {
12937 case 1:
12938 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
12939 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
12940 CYTHON_FALLTHROUGH;
12941 case 0: break;
12942 default: goto __pyx_L5_argtuple_error;
12943 }
12944 const Py_ssize_t kwd_pos_args = __pyx_nargs;
12945 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
12946 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
12947 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
12948 }
12949 } else if (unlikely(__pyx_nargs != 1)) {
12950 goto __pyx_L5_argtuple_error;
12951 } else {
12952 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
12953 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
12954 }
12955 __pyx_v___pyx_state = values[0];
12956 }
12957 goto __pyx_L6_skip;
12958 __pyx_L5_argtuple_error:;
12959 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
12960 __pyx_L6_skip:;
12961 goto __pyx_L4_argument_unpacking_done;
12962 __pyx_L3_error:;
12963 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12964 Py_XDECREF(values[__pyx_temp]);
12965 }
12966 __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12967 __Pyx_RefNannyFinishContext();
12968 return NULL;
12969 __pyx_L4_argument_unpacking_done:;
12970 __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);
12971
12972 /* function exit code */
12973 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12974 Py_XDECREF(values[__pyx_temp]);
12975 }
12976 __Pyx_RefNannyFinishContext();
12977 return __pyx_r;
12978}
12979
12980static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
12981 PyObject *__pyx_r = NULL;
12982 __Pyx_RefNannyDeclarations
12983 int __pyx_lineno = 0;
12984 const char *__pyx_filename = NULL;
12985 int __pyx_clineno = 0;
12986 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
12987
12988 /* "(tree fragment)":4
12989 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12990 * def __setstate_cython__(self, __pyx_state):
12991 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
12992*/
12993 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
12994 __PYX_ERR(1, 4, __pyx_L1_error)
12995
12996 /* "(tree fragment)":3
12997 * def __reduce_cython__(self):
12998 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12999 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13000 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
13001*/
13002
13003 /* function exit code */
13004 __pyx_L1_error:;
13005 __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13006 __pyx_r = NULL;
13007 __Pyx_XGIVEREF(__pyx_r);
13008 __Pyx_RefNannyFinishContext();
13009 return __pyx_r;
13010}
13011
13012/* "View.MemoryView":705
13013 *
13014 *
13015 * @cname('__pyx_memoryview_new') # <<<<<<<<<<<<<<
13016 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
13017 * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13018*/
13019
13020static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo const *__pyx_v_typeinfo) {
13021 struct __pyx_memoryview_obj *__pyx_v_result = 0;
13022 PyObject *__pyx_r = NULL;
13023 __Pyx_RefNannyDeclarations
13024 PyObject *__pyx_t_1 = NULL;
13025 PyObject *__pyx_t_2 = NULL;
13026 PyObject *__pyx_t_3 = NULL;
13027 PyObject *__pyx_t_4 = NULL;
13028 size_t __pyx_t_5;
13029 int __pyx_lineno = 0;
13030 const char *__pyx_filename = NULL;
13031 int __pyx_clineno = 0;
13032 __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
13033
13034 /* "View.MemoryView":707
13035 * @cname('__pyx_memoryview_new')
13036 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
13037 * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
13038 * result.typeinfo = typeinfo
13039 * return result
13040*/
13041 __pyx_t_2 = NULL;
13042 __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 707, __pyx_L1_error)
13043 __Pyx_GOTREF(__pyx_t_3);
13044 __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 707, __pyx_L1_error)
13045 __Pyx_GOTREF(__pyx_t_4);
13046 __pyx_t_5 = 1;
13047 {
13048 PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_o, __pyx_t_3, __pyx_t_4};
13049 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
13050 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13051 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13052 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13053 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 707, __pyx_L1_error)
13054 __Pyx_GOTREF((PyObject *)__pyx_t_1);
13055 }
13056 __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_1);
13057 __pyx_t_1 = 0;
13058
13059 /* "View.MemoryView":708
13060 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
13061 * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13062 * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
13063 * return result
13064 *
13065*/
13066 __pyx_v_result->typeinfo = __pyx_v_typeinfo;
13067
13068 /* "View.MemoryView":709
13069 * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13070 * result.typeinfo = typeinfo
13071 * return result # <<<<<<<<<<<<<<
13072 *
13073 * @cname('__pyx_memoryview_check')
13074*/
13075 {
13076 PyObject *__pyx_temp;
13077 {
13078 __pyx_temp = __pyx_r;
13079 __Pyx_INCREF((PyObject *)__pyx_v_result);
13080 __pyx_r = ((PyObject *)__pyx_v_result);
13081 }
13082 __Pyx_XDECREF(__pyx_temp);
13083 }
13084 goto __pyx_L0;
13085
13086 /* "View.MemoryView":705
13087 *
13088 *
13089 * @cname('__pyx_memoryview_new') # <<<<<<<<<<<<<<
13090 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
13091 * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13092*/
13093
13094 /* function exit code */
13095 __pyx_L1_error:;
13096 __Pyx_XDECREF(__pyx_t_1);
13097 __Pyx_XDECREF(__pyx_t_2);
13098 __Pyx_XDECREF(__pyx_t_3);
13099 __Pyx_XDECREF(__pyx_t_4);
13100 __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
13101 __pyx_r = 0;
13102 __pyx_L0:;
13103 __Pyx_XDECREF((PyObject *)__pyx_v_result);
13104 __Pyx_XGIVEREF(__pyx_r);
13105 __Pyx_RefNannyFinishContext();
13106 return __pyx_r;
13107}
13108
13109/* "View.MemoryView":711
13110 * return result
13111 *
13112 * @cname('__pyx_memoryview_check') # <<<<<<<<<<<<<<
13113 * cdef inline bint memoryview_check(object o) noexcept:
13114 * return isinstance(o, memoryview)
13115*/
13116
13117static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
13118 int __pyx_r;
13119 int __pyx_t_1;
13120
13121 /* "View.MemoryView":713
13122 * @cname('__pyx_memoryview_check')
13123 * cdef inline bint memoryview_check(object o) noexcept:
13124 * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
13125 *
13126 *
13127*/
13128 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_memoryview_type);
13129 {
13130 __pyx_r = __pyx_t_1;
13131 }
13132 goto __pyx_L0;
13133
13134 /* "View.MemoryView":711
13135 * return result
13136 *
13137 * @cname('__pyx_memoryview_check') # <<<<<<<<<<<<<<
13138 * cdef inline bint memoryview_check(object o) noexcept:
13139 * return isinstance(o, memoryview)
13140*/
13141
13142 /* function exit code */
13143 __pyx_L0:;
13144
13145 return __pyx_r;
13146}
13147
13148/* "View.MemoryView":716
13149 *
13150 *
13151 * @cname('__pyx_memoryview_err_invalid_index') # <<<<<<<<<<<<<<
13152 * cdef int _err_invalid_index(item) except -1:
13153 * type_name = str(type(item))
13154*/
13155
13156static int __pyx_memoryview_err_invalid_index(PyObject *__pyx_v_item) {
13157 PyObject *__pyx_v_type_name = NULL;
13158 int __pyx_r;
13159 __Pyx_RefNannyDeclarations
13160 PyObject *__pyx_t_1 = NULL;
13161 int __pyx_lineno = 0;
13162 const char *__pyx_filename = NULL;
13163 int __pyx_clineno = 0;
13164 __Pyx_RefNannySetupContext("_err_invalid_index", 0);
13165
13166 /* "View.MemoryView":718
13167 * @cname('__pyx_memoryview_err_invalid_index')
13168 * cdef int _err_invalid_index(item) except -1:
13169 * type_name = str(type(item)) # <<<<<<<<<<<<<<
13170 * PyErr_Format(PyExc_TypeError, "Cannot index with type '%.200U'", <PyObject*> type_name)
13171 * return -1
13172*/
13173 __pyx_t_1 = __Pyx_PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 718, __pyx_L1_error)
13174 __Pyx_GOTREF(__pyx_t_1);
13175 __pyx_v_type_name = ((PyObject*)__pyx_t_1);
13176 __pyx_t_1 = 0;
13177
13178 /* "View.MemoryView":719
13179 * cdef int _err_invalid_index(item) except -1:
13180 * type_name = str(type(item))
13181 * PyErr_Format(PyExc_TypeError, "Cannot index with type '%.200U'", <PyObject*> type_name) # <<<<<<<<<<<<<<
13182 * return -1
13183 *
13184*/
13185 (void)(PyErr_Format(PyExc_TypeError, __pyx_k_Cannot_index_with_type_200U, ((PyObject *)__pyx_v_type_name)));
13186
13187 /* "View.MemoryView":720
13188 * type_name = str(type(item))
13189 * PyErr_Format(PyExc_TypeError, "Cannot index with type '%.200U'", <PyObject*> type_name)
13190 * return -1 # <<<<<<<<<<<<<<
13191 *
13192 *
13193*/
13194 {
13195
13196 __pyx_r = -1;
13197 }
13198 goto __pyx_L0;
13199
13200 /* "View.MemoryView":716
13201 *
13202 *
13203 * @cname('__pyx_memoryview_err_invalid_index') # <<<<<<<<<<<<<<
13204 * cdef int _err_invalid_index(item) except -1:
13205 * type_name = str(type(item))
13206*/
13207
13208 /* function exit code */
13209 __pyx_L1_error:;
13210 __Pyx_XDECREF(__pyx_t_1);
13211 __Pyx_AddTraceback("View.MemoryView._err_invalid_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
13212 __pyx_r = -1;
13213 __pyx_L0:;
13214 __Pyx_XDECREF(__pyx_v_type_name);
13215
13216 __Pyx_RefNannyFinishContext();
13217 return __pyx_r;
13218}
13219
13220/* "View.MemoryView":723
13221 *
13222 *
13223 * cdef tuple[bint, tuple] _unellipsify_index_tuple(index_tuple: tuple, int ndim): # <<<<<<<<<<<<<<
13224 * """
13225 * Replace all ellipses with full slices and fill incomplete indices with full slices.
13226*/
13227
13228static PyObject *_unellipsify_index_tuple(PyObject *__pyx_v_index_tuple, int __pyx_v_ndim) {
13229 Py_ssize_t __pyx_v_first_ellipsis_index;
13230 Py_ssize_t __pyx_v_idx;
13231 Py_ssize_t __pyx_v_ellipsis_end;
13232 Py_ssize_t __pyx_v_indices_from_ellipsis;
13233 int __pyx_v_have_slices;
13234 PyObject *__pyx_v_item = NULL;
13235 PyObject *__pyx_v_result = NULL;
13236 PyObject *__pyx_r = NULL;
13237 __Pyx_RefNannyDeclarations
13238 PyObject *__pyx_t_1 = NULL;
13239 Py_ssize_t __pyx_t_2;
13240 PyObject *__pyx_t_3 = NULL;
13241 int __pyx_t_4;
13242 int __pyx_t_5;
13243 Py_ssize_t __pyx_t_6;
13244 Py_ssize_t __pyx_t_7;
13245 Py_ssize_t __pyx_t_8;
13246 int __pyx_lineno = 0;
13247 const char *__pyx_filename = NULL;
13248 int __pyx_clineno = 0;
13249 __Pyx_RefNannySetupContext("_unellipsify_index_tuple", 0);
13250 __Pyx_INCREF(__pyx_v_index_tuple);
13251
13252 /* "View.MemoryView":727
13253 * Replace all ellipses with full slices and fill incomplete indices with full slices.
13254 * """
13255 * cdef Py_ssize_t first_ellipsis_index = -1 # <<<<<<<<<<<<<<
13256 * cdef Py_ssize_t idx, ellipsis_end, indices_from_ellipsis
13257 *
13258*/
13259 __pyx_v_first_ellipsis_index = -1L;
13260
13261 /* "View.MemoryView":730
13262 * cdef Py_ssize_t idx, ellipsis_end, indices_from_ellipsis
13263 *
13264 * have_slices = False # <<<<<<<<<<<<<<
13265 *
13266 * idx = 0
13267*/
13268 __pyx_v_have_slices = 0;
13269
13270 /* "View.MemoryView":732
13271 * have_slices = False
13272 *
13273 * idx = 0 # <<<<<<<<<<<<<<
13274 * for item in index_tuple:
13275 * if item is Ellipsis:
13276*/
13277 __pyx_v_idx = 0;
13278
13279 /* "View.MemoryView":733
13280 *
13281 * idx = 0
13282 * for item in index_tuple: # <<<<<<<<<<<<<<
13283 * if item is Ellipsis:
13284 * have_slices = True
13285*/
13286 __pyx_t_1 = __pyx_v_index_tuple; __Pyx_INCREF(__pyx_t_1);
13287 __pyx_t_2 = 0;
13288 for (;;) {
13289 {
13290 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
13291 #if !CYTHON_ASSUME_SAFE_SIZE
13292 if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 733, __pyx_L1_error)
13293 #endif
13294 if (__pyx_t_2 >= __pyx_temp) break;
13295 }
13296 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13297 __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
13298 #else
13299 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
13300 #endif
13301 ++__pyx_t_2;
13302 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 733, __pyx_L1_error)
13303 __Pyx_GOTREF(__pyx_t_3);
13304 __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
13305 __pyx_t_3 = 0;
13306
13307 /* "View.MemoryView":734
13308 * idx = 0
13309 * for item in index_tuple:
13310 * if item is Ellipsis: # <<<<<<<<<<<<<<
13311 * have_slices = True
13312 * if first_ellipsis_index == -1:
13313*/
13314 __pyx_t_4 = (__pyx_v_item == __pyx_builtin_Ellipsis);
13315 if (__pyx_t_4) {
13316
13317
13318 /* "View.MemoryView":735
13319 * for item in index_tuple:
13320 * if item is Ellipsis:
13321 * have_slices = True # <<<<<<<<<<<<<<
13322 * if first_ellipsis_index == -1:
13323 * first_ellipsis_index = idx
13324*/
13325 __pyx_v_have_slices = 1;
13326
13327 /* "View.MemoryView":736
13328 * if item is Ellipsis:
13329 * have_slices = True
13330 * if first_ellipsis_index == -1: # <<<<<<<<<<<<<<
13331 * first_ellipsis_index = idx
13332 * elif isinstance(item, slice):
13333*/
13334 __pyx_t_4 = (__pyx_v_first_ellipsis_index == -1L);
13335
13336 if (__pyx_t_4) {
13337
13338
13339 /* "View.MemoryView":737
13340 * have_slices = True
13341 * if first_ellipsis_index == -1:
13342 * first_ellipsis_index = idx # <<<<<<<<<<<<<<
13343 * elif isinstance(item, slice):
13344 * have_slices = True
13345*/
13346 __pyx_v_first_ellipsis_index = __pyx_v_idx;
13347
13348 /* "View.MemoryView":736
13349 * if item is Ellipsis:
13350 * have_slices = True
13351 * if first_ellipsis_index == -1: # <<<<<<<<<<<<<<
13352 * first_ellipsis_index = idx
13353 * elif isinstance(item, slice):
13354*/
13355 }
13356
13357 /* "View.MemoryView":734
13358 * idx = 0
13359 * for item in index_tuple:
13360 * if item is Ellipsis: # <<<<<<<<<<<<<<
13361 * have_slices = True
13362 * if first_ellipsis_index == -1:
13363*/
13364 goto __pyx_L5;
13365 }
13366
13367 /* "View.MemoryView":738
13368 * if first_ellipsis_index == -1:
13369 * first_ellipsis_index = idx
13370 * elif isinstance(item, slice): # <<<<<<<<<<<<<<
13371 * have_slices = True
13372 * elif cython.unlikely(not PyIndex_Check(item)):
13373*/
13374 __pyx_t_4 = PySlice_Check(__pyx_v_item);
13375 if (__pyx_t_4) {
13376
13377
13378 /* "View.MemoryView":739
13379 * first_ellipsis_index = idx
13380 * elif isinstance(item, slice):
13381 * have_slices = True # <<<<<<<<<<<<<<
13382 * elif cython.unlikely(not PyIndex_Check(item)):
13383 * _err_invalid_index(item)
13384*/
13385 __pyx_v_have_slices = 1;
13386
13387 /* "View.MemoryView":738
13388 * if first_ellipsis_index == -1:
13389 * first_ellipsis_index = idx
13390 * elif isinstance(item, slice): # <<<<<<<<<<<<<<
13391 * have_slices = True
13392 * elif cython.unlikely(not PyIndex_Check(item)):
13393*/
13394 goto __pyx_L5;
13395 }
13396
13397 /* "View.MemoryView":740
13398 * elif isinstance(item, slice):
13399 * have_slices = True
13400 * elif cython.unlikely(not PyIndex_Check(item)): # <<<<<<<<<<<<<<
13401 * _err_invalid_index(item)
13402 * idx += 1
13403*/
13404 __pyx_t_4 = (!(PyIndex_Check(__pyx_v_item) != 0));
13405
13406 if (unlikely(__pyx_t_4)) {
13407
13408
13409 /* "View.MemoryView":741
13410 * have_slices = True
13411 * elif cython.unlikely(not PyIndex_Check(item)):
13412 * _err_invalid_index(item) # <<<<<<<<<<<<<<
13413 * idx += 1
13414 *
13415*/
13416 __pyx_t_5 = __pyx_memoryview_err_invalid_index(__pyx_v_item); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 741, __pyx_L1_error)
13417
13418
13419 /* "View.MemoryView":740
13420 * elif isinstance(item, slice):
13421 * have_slices = True
13422 * elif cython.unlikely(not PyIndex_Check(item)): # <<<<<<<<<<<<<<
13423 * _err_invalid_index(item)
13424 * idx += 1
13425*/
13426 }
13427 __pyx_L5:;
13428
13429 /* "View.MemoryView":742
13430 * elif cython.unlikely(not PyIndex_Check(item)):
13431 * _err_invalid_index(item)
13432 * idx += 1 # <<<<<<<<<<<<<<
13433 *
13434 * if first_ellipsis_index >= 0:
13435*/
13436 __pyx_v_idx = (__pyx_v_idx + 1);
13437
13438 /* "View.MemoryView":733
13439 *
13440 * idx = 0
13441 * for item in index_tuple: # <<<<<<<<<<<<<<
13442 * if item is Ellipsis:
13443 * have_slices = True
13444*/
13445 }
13446 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13447
13448 /* "View.MemoryView":744
13449 * idx += 1
13450 *
13451 * if first_ellipsis_index >= 0: # <<<<<<<<<<<<<<
13452 * result = [slice(None)] * ndim
13453 *
13454*/
13455 __pyx_t_4 = (__pyx_v_first_ellipsis_index >= 0);
13456
13457 if (__pyx_t_4) {
13458
13459
13460 /* "View.MemoryView":745
13461 *
13462 * if first_ellipsis_index >= 0:
13463 * result = [slice(None)] * ndim # <<<<<<<<<<<<<<
13464 *
13465 * for idx in range(first_ellipsis_index):
13466*/
13467 __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error)
13468 __Pyx_GOTREF(__pyx_t_1);
13469 { Py_ssize_t __pyx_temp;
13470 for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
13471 __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
13472 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
13473 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 745, __pyx_L1_error);
13474 }
13475 }
13476 __pyx_v_result = ((PyObject*)__pyx_t_1);
13477 __pyx_t_1 = 0;
13478
13479 /* "View.MemoryView":747
13480 * result = [slice(None)] * ndim
13481 *
13482 * for idx in range(first_ellipsis_index): # <<<<<<<<<<<<<<
13483 * result[idx] = index_tuple[idx]
13484 *
13485*/
13486
13487 __pyx_t_2 = __pyx_v_first_ellipsis_index;
13488 __pyx_t_6 = __pyx_t_2;
13489
13490 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
13491 __pyx_v_idx = __pyx_t_7;
13492
13493 /* "View.MemoryView":748
13494 *
13495 * for idx in range(first_ellipsis_index):
13496 * result[idx] = index_tuple[idx] # <<<<<<<<<<<<<<
13497 *
13498 * indices_from_ellipsis = len(index_tuple) - first_ellipsis_index
13499*/
13500 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_index_tuple, __pyx_v_idx, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error)
13501 __Pyx_GOTREF(__pyx_t_1);
13502 if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_t_1, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(1, 748, __pyx_L1_error)
13503 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13504 }
13505
13506
13507 /* "View.MemoryView":750
13508 * result[idx] = index_tuple[idx]
13509 *
13510 * indices_from_ellipsis = len(index_tuple) - first_ellipsis_index # <<<<<<<<<<<<<<
13511 * ellipsis_end = ndim - indices_from_ellipsis
13512 *
13513*/
13514 __pyx_t_2 = __Pyx_PyTuple_GET_SIZE(__pyx_v_index_tuple); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
13515 __pyx_v_indices_from_ellipsis = (__pyx_t_2 - __pyx_v_first_ellipsis_index);
13516
13517
13518 /* "View.MemoryView":751
13519 *
13520 * indices_from_ellipsis = len(index_tuple) - first_ellipsis_index
13521 * ellipsis_end = ndim - indices_from_ellipsis # <<<<<<<<<<<<<<
13522 *
13523 * for idx in range(1, indices_from_ellipsis):
13524*/
13525 __pyx_v_ellipsis_end = (__pyx_v_ndim - __pyx_v_indices_from_ellipsis);
13526
13527 /* "View.MemoryView":753
13528 * ellipsis_end = ndim - indices_from_ellipsis
13529 *
13530 * for idx in range(1, indices_from_ellipsis): # <<<<<<<<<<<<<<
13531 * item = index_tuple[first_ellipsis_index + idx]
13532 * if item is not Ellipsis:
13533*/
13534
13535 __pyx_t_2 = __pyx_v_indices_from_ellipsis;
13536 __pyx_t_6 = __pyx_t_2;
13537
13538 for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
13539 __pyx_v_idx = __pyx_t_7;
13540
13541 /* "View.MemoryView":754
13542 *
13543 * for idx in range(1, indices_from_ellipsis):
13544 * item = index_tuple[first_ellipsis_index + idx] # <<<<<<<<<<<<<<
13545 * if item is not Ellipsis:
13546 * result[ellipsis_end + idx] = item
13547*/
13548 __pyx_t_8 = (__pyx_v_first_ellipsis_index + __pyx_v_idx);
13549
13550 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_index_tuple, __pyx_t_8, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 754, __pyx_L1_error)
13551 __Pyx_GOTREF(__pyx_t_1);
13552
13553 __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
13554 __pyx_t_1 = 0;
13555
13556 /* "View.MemoryView":755
13557 * for idx in range(1, indices_from_ellipsis):
13558 * item = index_tuple[first_ellipsis_index + idx]
13559 * if item is not Ellipsis: # <<<<<<<<<<<<<<
13560 * result[ellipsis_end + idx] = item
13561 *
13562*/
13563 __pyx_t_4 = (__pyx_v_item != __pyx_builtin_Ellipsis);
13564 if (__pyx_t_4) {
13565
13566
13567 /* "View.MemoryView":756
13568 * item = index_tuple[first_ellipsis_index + idx]
13569 * if item is not Ellipsis:
13570 * result[ellipsis_end + idx] = item # <<<<<<<<<<<<<<
13571 *
13572 * index_tuple = tuple(result)
13573*/
13574 __pyx_t_8 = (__pyx_v_ellipsis_end + __pyx_v_idx);
13575
13576 if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_t_8, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(1, 756, __pyx_L1_error)
13577
13578
13579 /* "View.MemoryView":755
13580 * for idx in range(1, indices_from_ellipsis):
13581 * item = index_tuple[first_ellipsis_index + idx]
13582 * if item is not Ellipsis: # <<<<<<<<<<<<<<
13583 * result[ellipsis_end + idx] = item
13584 *
13585*/
13586 }
13587 }
13588
13589
13590 /* "View.MemoryView":758
13591 * result[ellipsis_end + idx] = item
13592 *
13593 * index_tuple = tuple(result) # <<<<<<<<<<<<<<
13594 *
13595 * elif ndim > idx:
13596*/
13597 __pyx_t_1 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 758, __pyx_L1_error)
13598 __Pyx_GOTREF(__pyx_t_1);
13599 __Pyx_DECREF_SET(__pyx_v_index_tuple, ((PyObject*)__pyx_t_1));
13600 __pyx_t_1 = 0;
13601
13602 /* "View.MemoryView":744
13603 * idx += 1
13604 *
13605 * if first_ellipsis_index >= 0: # <<<<<<<<<<<<<<
13606 * result = [slice(None)] * ndim
13607 *
13608*/
13609 goto __pyx_L8;
13610 }
13611
13612 /* "View.MemoryView":760
13613 * index_tuple = tuple(result)
13614 *
13615 * elif ndim > idx: # <<<<<<<<<<<<<<
13616 *
13617 * have_slices = True
13618*/
13619 __pyx_t_4 = (__pyx_v_ndim > __pyx_v_idx);
13620
13621 if (__pyx_t_4) {
13622
13623
13624 /* "View.MemoryView":762
13625 * elif ndim > idx:
13626 *
13627 * have_slices = True # <<<<<<<<<<<<<<
13628 * index_tuple += (slice(None),) * (ndim - idx)
13629 *
13630*/
13631 __pyx_v_have_slices = 1;
13632
13633 /* "View.MemoryView":763
13634 *
13635 * have_slices = True
13636 * index_tuple += (slice(None),) * (ndim - idx) # <<<<<<<<<<<<<<
13637 *
13638 * return have_slices, index_tuple
13639*/
13640 __pyx_t_2 = (__pyx_v_ndim - __pyx_v_idx);
13641
13642 __pyx_t_1 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[1], __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 763, __pyx_L1_error)
13643 __Pyx_GOTREF(__pyx_t_1);
13644
13645 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_index_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L1_error)
13646 __Pyx_GOTREF(__pyx_t_3);
13647 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13648 __Pyx_DECREF_SET(__pyx_v_index_tuple, ((PyObject*)__pyx_t_3));
13649 __pyx_t_3 = 0;
13650
13651 /* "View.MemoryView":760
13652 * index_tuple = tuple(result)
13653 *
13654 * elif ndim > idx: # <<<<<<<<<<<<<<
13655 *
13656 * have_slices = True
13657*/
13658 }
13659 __pyx_L8:;
13660
13661 /* "View.MemoryView":765
13662 * index_tuple += (slice(None),) * (ndim - idx)
13663 *
13664 * return have_slices, index_tuple # <<<<<<<<<<<<<<
13665 *
13666 *
13667*/
13668 __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 765, __pyx_L1_error)
13669 __Pyx_GOTREF(__pyx_t_3);
13670 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 765, __pyx_L1_error)
13671 __Pyx_GOTREF(__pyx_t_1);
13672 __Pyx_GIVEREF(__pyx_t_3);
13673 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(1, 765, __pyx_L1_error);
13674 __Pyx_INCREF(__pyx_v_index_tuple);
13675 __Pyx_GIVEREF(__pyx_v_index_tuple);
13676 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_index_tuple) != (0)) __PYX_ERR(1, 765, __pyx_L1_error);
13677 __pyx_t_3 = 0;
13678 {
13679 PyObject *__pyx_temp;
13680 {
13681 __pyx_temp = __pyx_r;
13682 __pyx_r = ((PyObject*)__pyx_t_1);
13683 }
13684 __Pyx_XDECREF(__pyx_temp);
13685 }
13686 __pyx_t_1 = 0;
13687 goto __pyx_L0;
13688
13689 /* "View.MemoryView":723
13690 *
13691 *
13692 * cdef tuple[bint, tuple] _unellipsify_index_tuple(index_tuple: tuple, int ndim): # <<<<<<<<<<<<<<
13693 * """
13694 * Replace all ellipses with full slices and fill incomplete indices with full slices.
13695*/
13696
13697 /* function exit code */
13698 __pyx_L1_error:;
13699 __Pyx_XDECREF(__pyx_t_1);
13700 __Pyx_XDECREF(__pyx_t_3);
13701 __Pyx_AddTraceback("View.MemoryView._unellipsify_index_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
13702 __pyx_r = 0;
13703 __pyx_L0:;
13704
13705
13706
13707
13708
13709 __Pyx_XDECREF(__pyx_v_item);
13710 __Pyx_XDECREF(__pyx_v_result);
13711 __Pyx_XDECREF(__pyx_v_index_tuple);
13712 __Pyx_XGIVEREF(__pyx_r);
13713 __Pyx_RefNannyFinishContext();
13714 return __pyx_r;
13715}
13716
13717/* "View.MemoryView":768
13718 *
13719 *
13720 * cdef tuple[bint, tuple] _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
13721 * """
13722 * Replace all ellipses with full slices and fill incomplete indices with full slices.
13723*/
13724
13725static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
13726 PyObject *__pyx_v_result = 0;
13727 int __pyx_v_have_slices;
13728 PyObject *__pyx_r = NULL;
13729 __Pyx_RefNannyDeclarations
13730 int __pyx_t_1;
13731 PyObject *__pyx_t_2 = NULL;
13732 int __pyx_t_3;
13733 long __pyx_t_4;
13734 PyObject *__pyx_t_5 = NULL;
13735 PyObject *__pyx_t_6 = NULL;
13736 int __pyx_lineno = 0;
13737 const char *__pyx_filename = NULL;
13738 int __pyx_clineno = 0;
13739 __Pyx_RefNannySetupContext("_unellipsify", 0);
13740
13741 /* "View.MemoryView":773
13742 * """
13743 * result: tuple
13744 * have_slices = False # <<<<<<<<<<<<<<
13745 *
13746 * if index is Ellipsis:
13747*/
13748 __pyx_v_have_slices = 0;
13749
13750 /* "View.MemoryView":775
13751 * have_slices = False
13752 *
13753 * if index is Ellipsis: # <<<<<<<<<<<<<<
13754 * have_slices = True
13755 * result = (slice(None),) * ndim
13756*/
13757 __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
13758 if (__pyx_t_1) {
13759
13760
13761 /* "View.MemoryView":776
13762 *
13763 * if index is Ellipsis:
13764 * have_slices = True # <<<<<<<<<<<<<<
13765 * result = (slice(None),) * ndim
13766 *
13767*/
13768 __pyx_v_have_slices = 1;
13769
13770 /* "View.MemoryView":777
13771 * if index is Ellipsis:
13772 * have_slices = True
13773 * result = (slice(None),) * ndim # <<<<<<<<<<<<<<
13774 *
13775 * elif isinstance(index, tuple):
13776*/
13777 __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[1], __pyx_v_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 777, __pyx_L1_error)
13778 __Pyx_GOTREF(__pyx_t_2);
13779 __pyx_v_result = ((PyObject*)__pyx_t_2);
13780 __pyx_t_2 = 0;
13781
13782 /* "View.MemoryView":775
13783 * have_slices = False
13784 *
13785 * if index is Ellipsis: # <<<<<<<<<<<<<<
13786 * have_slices = True
13787 * result = (slice(None),) * ndim
13788*/
13789 goto __pyx_L3;
13790 }
13791
13792 /* "View.MemoryView":779
13793 * result = (slice(None),) * ndim
13794 *
13795 * elif isinstance(index, tuple): # <<<<<<<<<<<<<<
13796 * return _unellipsify_index_tuple(<tuple> index, ndim)
13797 *
13798*/
13799 __pyx_t_1 = PyTuple_Check(__pyx_v_index);
13800 if (__pyx_t_1) {
13801
13802
13803 /* "View.MemoryView":780
13804 *
13805 * elif isinstance(index, tuple):
13806 * return _unellipsify_index_tuple(<tuple> index, ndim) # <<<<<<<<<<<<<<
13807 *
13808 * else:
13809*/
13810 if (unlikely(__pyx_v_index == Py_None)) {
13811 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
13812 __PYX_ERR(1, 780, __pyx_L1_error)
13813 }
13814 __pyx_t_2 = _unellipsify_index_tuple(((PyObject*)__pyx_v_index), __pyx_v_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 780, __pyx_L1_error)
13815 __Pyx_GOTREF(__pyx_t_2);
13816 {
13817 PyObject *__pyx_temp;
13818 {
13819 __pyx_temp = __pyx_r;
13820 __pyx_r = ((PyObject*)__pyx_t_2);
13821 }
13822 __Pyx_XDECREF(__pyx_temp);
13823 }
13824 __pyx_t_2 = 0;
13825 goto __pyx_L0;
13826
13827 /* "View.MemoryView":779
13828 * result = (slice(None),) * ndim
13829 *
13830 * elif isinstance(index, tuple): # <<<<<<<<<<<<<<
13831 * return _unellipsify_index_tuple(<tuple> index, ndim)
13832 *
13833*/
13834 }
13835
13836 /* "View.MemoryView":783
13837 *
13838 * else:
13839 * if isinstance(index, slice): # <<<<<<<<<<<<<<
13840 * have_slices = True
13841 * elif cython.unlikely(not PyIndex_Check(index)):
13842*/
13843 /*else*/ {
13844 __pyx_t_1 = PySlice_Check(__pyx_v_index);
13845 if (__pyx_t_1) {
13846
13847
13848 /* "View.MemoryView":784
13849 * else:
13850 * if isinstance(index, slice):
13851 * have_slices = True # <<<<<<<<<<<<<<
13852 * elif cython.unlikely(not PyIndex_Check(index)):
13853 * _err_invalid_index(index)
13854*/
13855 __pyx_v_have_slices = 1;
13856
13857 /* "View.MemoryView":783
13858 *
13859 * else:
13860 * if isinstance(index, slice): # <<<<<<<<<<<<<<
13861 * have_slices = True
13862 * elif cython.unlikely(not PyIndex_Check(index)):
13863*/
13864 goto __pyx_L4;
13865 }
13866
13867 /* "View.MemoryView":785
13868 * if isinstance(index, slice):
13869 * have_slices = True
13870 * elif cython.unlikely(not PyIndex_Check(index)): # <<<<<<<<<<<<<<
13871 * _err_invalid_index(index)
13872 *
13873*/
13874 __pyx_t_1 = (!(PyIndex_Check(__pyx_v_index) != 0));
13875
13876 if (unlikely(__pyx_t_1)) {
13877
13878
13879 /* "View.MemoryView":786
13880 * have_slices = True
13881 * elif cython.unlikely(not PyIndex_Check(index)):
13882 * _err_invalid_index(index) # <<<<<<<<<<<<<<
13883 *
13884 *
13885*/
13886 __pyx_t_3 = __pyx_memoryview_err_invalid_index(__pyx_v_index); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 786, __pyx_L1_error)
13887
13888
13889 /* "View.MemoryView":785
13890 * if isinstance(index, slice):
13891 * have_slices = True
13892 * elif cython.unlikely(not PyIndex_Check(index)): # <<<<<<<<<<<<<<
13893 * _err_invalid_index(index)
13894 *
13895*/
13896 }
13897 __pyx_L4:;
13898
13899 /* "View.MemoryView":789
13900 *
13901 *
13902 * if ndim == 1: # <<<<<<<<<<<<<<
13903 * result = (index,)
13904 * elif ndim == 2:
13905*/
13906 switch (__pyx_v_ndim) {
13907 case 1:
13908
13909 /* "View.MemoryView":790
13910 *
13911 * if ndim == 1:
13912 * result = (index,) # <<<<<<<<<<<<<<
13913 * elif ndim == 2:
13914 * have_slices = True
13915*/
13916 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 790, __pyx_L1_error)
13917 __Pyx_GOTREF(__pyx_t_2);
13918 __Pyx_INCREF(__pyx_v_index);
13919 __Pyx_GIVEREF(__pyx_v_index);
13920 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 790, __pyx_L1_error);
13921 __pyx_v_result = ((PyObject*)__pyx_t_2);
13922 __pyx_t_2 = 0;
13923
13924 /* "View.MemoryView":789
13925 *
13926 *
13927 * if ndim == 1: # <<<<<<<<<<<<<<
13928 * result = (index,)
13929 * elif ndim == 2:
13930*/
13931 break;
13932 case 2:
13933
13934 /* "View.MemoryView":792
13935 * result = (index,)
13936 * elif ndim == 2:
13937 * have_slices = True # <<<<<<<<<<<<<<
13938 * result = (index, slice(None))
13939 * else:
13940*/
13941 __pyx_v_have_slices = 1;
13942
13943 /* "View.MemoryView":793
13944 * elif ndim == 2:
13945 * have_slices = True
13946 * result = (index, slice(None)) # <<<<<<<<<<<<<<
13947 * else:
13948 * have_slices = True
13949*/
13950 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 793, __pyx_L1_error)
13951 __Pyx_GOTREF(__pyx_t_2);
13952 __Pyx_INCREF(__pyx_v_index);
13953 __Pyx_GIVEREF(__pyx_v_index);
13954 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 793, __pyx_L1_error);
13955 __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
13956 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
13957 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 793, __pyx_L1_error);
13958 __pyx_v_result = ((PyObject*)__pyx_t_2);
13959 __pyx_t_2 = 0;
13960
13961 /* "View.MemoryView":791
13962 * if ndim == 1:
13963 * result = (index,)
13964 * elif ndim == 2: # <<<<<<<<<<<<<<
13965 * have_slices = True
13966 * result = (index, slice(None))
13967*/
13968 break;
13969 default:
13970
13971 /* "View.MemoryView":795
13972 * result = (index, slice(None))
13973 * else:
13974 * have_slices = True # <<<<<<<<<<<<<<
13975 * result = (index,) + (slice(None),) * (ndim - 1)
13976 *
13977*/
13978 __pyx_v_have_slices = 1;
13979
13980 /* "View.MemoryView":796
13981 * else:
13982 * have_slices = True
13983 * result = (index,) + (slice(None),) * (ndim - 1) # <<<<<<<<<<<<<<
13984 *
13985 * return have_slices, result
13986*/
13987 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 796, __pyx_L1_error)
13988 __Pyx_GOTREF(__pyx_t_2);
13989 __Pyx_INCREF(__pyx_v_index);
13990 __Pyx_GIVEREF(__pyx_v_index);
13991 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 796, __pyx_L1_error);
13992 __pyx_t_4 = (__pyx_v_ndim - 1);
13993
13994 __pyx_t_5 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[1], __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 796, __pyx_L1_error)
13995 __Pyx_GOTREF(__pyx_t_5);
13996
13997 __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 796, __pyx_L1_error)
13998 __Pyx_GOTREF(__pyx_t_6);
13999 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14000 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14001 __pyx_v_result = ((PyObject*)__pyx_t_6);
14002 __pyx_t_6 = 0;
14003 break;
14004 }
14005 }
14006 __pyx_L3:;
14007
14008 /* "View.MemoryView":798
14009 * result = (index,) + (slice(None),) * (ndim - 1)
14010 *
14011 * return have_slices, result # <<<<<<<<<<<<<<
14012 *
14013 *
14014*/
14015 __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 798, __pyx_L1_error)
14016 __Pyx_GOTREF(__pyx_t_6);
14017 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 798, __pyx_L1_error)
14018 __Pyx_GOTREF(__pyx_t_5);
14019 __Pyx_GIVEREF(__pyx_t_6);
14020 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6) != (0)) __PYX_ERR(1, 798, __pyx_L1_error);
14021 __Pyx_INCREF(__pyx_v_result);
14022 __Pyx_GIVEREF(__pyx_v_result);
14023 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_result) != (0)) __PYX_ERR(1, 798, __pyx_L1_error);
14024 __pyx_t_6 = 0;
14025 {
14026 PyObject *__pyx_temp;
14027 {
14028 __pyx_temp = __pyx_r;
14029 __pyx_r = ((PyObject*)__pyx_t_5);
14030 }
14031 __Pyx_XDECREF(__pyx_temp);
14032 }
14033 __pyx_t_5 = 0;
14034 goto __pyx_L0;
14035
14036 /* "View.MemoryView":768
14037 *
14038 *
14039 * cdef tuple[bint, tuple] _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
14040 * """
14041 * Replace all ellipses with full slices and fill incomplete indices with full slices.
14042*/
14043
14044 /* function exit code */
14045 __pyx_L1_error:;
14046 __Pyx_XDECREF(__pyx_t_2);
14047 __Pyx_XDECREF(__pyx_t_5);
14048 __Pyx_XDECREF(__pyx_t_6);
14049 __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
14050 __pyx_r = 0;
14051 __pyx_L0:;
14052 __Pyx_XDECREF(__pyx_v_result);
14053
14054 __Pyx_XGIVEREF(__pyx_r);
14055 __Pyx_RefNannyFinishContext();
14056 return __pyx_r;
14057}
14058
14059/* "View.MemoryView":801
14060 *
14061 *
14062 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<<
14063 * for suboffset in suboffsets[:ndim]:
14064 * if cython.unlikely(suboffset >= 0):
14065*/
14066
14067static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
14068 Py_ssize_t __pyx_v_suboffset;
14069 int __pyx_r;
14070 Py_ssize_t *__pyx_t_1;
14071 Py_ssize_t *__pyx_t_2;
14072 Py_ssize_t *__pyx_t_3;
14073 int __pyx_t_4;
14074 int __pyx_t_5;
14075 int __pyx_lineno = 0;
14076 const char *__pyx_filename = NULL;
14077 int __pyx_clineno = 0;
14078
14079 /* "View.MemoryView":802
14080 *
14081 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
14082 * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
14083 * if cython.unlikely(suboffset >= 0):
14084 * _err_ValueError("Indirect dimensions not supported")
14085*/
14086 __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
14087
14088 for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
14089 __pyx_t_1 = __pyx_t_3;
14090 __pyx_v_suboffset = (__pyx_t_1[0]);
14091
14092 /* "View.MemoryView":803
14093 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
14094 * for suboffset in suboffsets[:ndim]:
14095 * if cython.unlikely(suboffset >= 0): # <<<<<<<<<<<<<<
14096 * _err_ValueError("Indirect dimensions not supported")
14097 * return 0 # return type just used as an error flag
14098*/
14099 __pyx_t_4 = (__pyx_v_suboffset >= 0);
14100
14101 if (unlikely(__pyx_t_4)) {
14102
14103
14104 /* "View.MemoryView":804
14105 * for suboffset in suboffsets[:ndim]:
14106 * if cython.unlikely(suboffset >= 0):
14107 * _err_ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
14108 * return 0 # return type just used as an error flag
14109 *
14110*/
14111 __pyx_t_5 = __pyx_memoryview_err_ValueError(__pyx_k_Indirect_dimensions_not_supporte); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 804, __pyx_L1_error)
14112
14113
14114 /* "View.MemoryView":803
14115 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
14116 * for suboffset in suboffsets[:ndim]:
14117 * if cython.unlikely(suboffset >= 0): # <<<<<<<<<<<<<<
14118 * _err_ValueError("Indirect dimensions not supported")
14119 * return 0 # return type just used as an error flag
14120*/
14121 }
14122 }
14123
14124
14125 /* "View.MemoryView":805
14126 * if cython.unlikely(suboffset >= 0):
14127 * _err_ValueError("Indirect dimensions not supported")
14128 * return 0 # return type just used as an error flag # <<<<<<<<<<<<<<
14129 *
14130 *
14131*/
14132 {
14133
14134 __pyx_r = 0;
14135 }
14136 goto __pyx_L0;
14137
14138 /* "View.MemoryView":801
14139 *
14140 *
14141 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<<
14142 * for suboffset in suboffsets[:ndim]:
14143 * if cython.unlikely(suboffset >= 0):
14144*/
14145
14146 /* function exit code */
14147 __pyx_L1_error:;
14148 __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
14149 __pyx_r = -1;
14150 __pyx_L0:;
14151
14152
14153 return __pyx_r;
14154}
14155
14156/* "View.MemoryView":811
14157 *
14158 *
14159 * @cname('__pyx_memview_slice') # <<<<<<<<<<<<<<
14160 * cdef memoryview memview_slice(memoryview memview, tuple indices):
14161 * cdef int new_ndim = 0, suboffset_dim = -1, dim
14162*/
14163
14164static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
14165 int __pyx_v_new_ndim;
14166 int __pyx_v_suboffset_dim;
14167 int __pyx_v_dim;
14168 __Pyx_memviewslice __pyx_v_src;
14169 __Pyx_memviewslice __pyx_v_dst;
14170 __Pyx_memviewslice *__pyx_v_p_src;
14171 struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
14172 __Pyx_memviewslice *__pyx_v_p_dst;
14173 int *__pyx_v_p_suboffset_dim;
14174 Py_ssize_t __pyx_v_start;
14175 Py_ssize_t __pyx_v_stop;
14176 Py_ssize_t __pyx_v_step;
14177 Py_ssize_t __pyx_v_cindex;
14178 int __pyx_v_have_start;
14179 int __pyx_v_have_stop;
14180 int __pyx_v_have_step;
14181 PyObject *__pyx_v_index = NULL;
14182 struct __pyx_memoryview_obj *__pyx_r = NULL;
14183 __Pyx_RefNannyDeclarations
14184 int __pyx_t_1;
14185 PyObject *__pyx_t_2 = NULL;
14186 struct __pyx_memoryview_obj *__pyx_t_3;
14187 char *__pyx_t_4;
14188 int __pyx_t_5;
14189 Py_ssize_t __pyx_t_6;
14190 PyObject *__pyx_t_7 = NULL;
14191 Py_ssize_t __pyx_t_8;
14192 int __pyx_t_9;
14193 Py_ssize_t __pyx_t_10;
14194 int __pyx_lineno = 0;
14195 const char *__pyx_filename = NULL;
14196 int __pyx_clineno = 0;
14197 __Pyx_RefNannySetupContext("memview_slice", 0);
14198
14199 /* "View.MemoryView":813
14200 * @cname('__pyx_memview_slice')
14201 * cdef memoryview memview_slice(memoryview memview, tuple indices):
14202 * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
14203 * cdef bint negative_step
14204 * cdef __Pyx_memviewslice src, dst
14205*/
14206 __pyx_v_new_ndim = 0;
14207 __pyx_v_suboffset_dim = -1;
14208
14209 /* "View.MemoryView":820
14210 *
14211 *
14212 * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
14213 *
14214 * cdef _memoryviewslice memviewsliceobj
14215*/
14216 (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
14217
14218 /* "View.MemoryView":824
14219 * cdef _memoryviewslice memviewsliceobj
14220 *
14221 * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
14222 *
14223 * if isinstance(memview, _memoryviewslice):
14224*/
14225 #ifndef CYTHON_WITHOUT_ASSERTIONS
14226 if (unlikely(__pyx_assertions_enabled())) {
14227 __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
14228
14229 if (unlikely(!__pyx_t_1)) {
14230 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
14231 __PYX_ERR(1, 824, __pyx_L1_error)
14232 }
14233
14234 }
14235 #else
14236 if ((1)); else __PYX_ERR(1, 824, __pyx_L1_error)
14237 #endif
14238
14239 /* "View.MemoryView":826
14240 * assert memview.view.ndim > 0
14241 *
14242 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14243 * memviewsliceobj = memview
14244 * p_src = &memviewsliceobj.from_slice
14245*/
14246 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
14247 if (__pyx_t_1) {
14248
14249
14250 /* "View.MemoryView":827
14251 *
14252 * if isinstance(memview, _memoryviewslice):
14253 * memviewsliceobj = memview # <<<<<<<<<<<<<<
14254 * p_src = &memviewsliceobj.from_slice
14255 * else:
14256*/
14257 __pyx_t_2 = ((PyObject *)__pyx_v_memview);
14258 __Pyx_INCREF(__pyx_t_2);
14259 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 827, __pyx_L1_error)
14260 __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
14261 __pyx_t_2 = 0;
14262
14263 /* "View.MemoryView":828
14264 * if isinstance(memview, _memoryviewslice):
14265 * memviewsliceobj = memview
14266 * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
14267 * else:
14268 * slice_copy(memview, &src)
14269*/
14270 __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
14271
14272 /* "View.MemoryView":826
14273 * assert memview.view.ndim > 0
14274 *
14275 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14276 * memviewsliceobj = memview
14277 * p_src = &memviewsliceobj.from_slice
14278*/
14279 goto __pyx_L3;
14280 }
14281
14282 /* "View.MemoryView":830
14283 * p_src = &memviewsliceobj.from_slice
14284 * else:
14285 * slice_copy(memview, &src) # <<<<<<<<<<<<<<
14286 * p_src = &src
14287 *
14288*/
14289 /*else*/ {
14290 __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
14291
14292 /* "View.MemoryView":831
14293 * else:
14294 * slice_copy(memview, &src)
14295 * p_src = &src # <<<<<<<<<<<<<<
14296 *
14297 *
14298*/
14299 __pyx_v_p_src = (&__pyx_v_src);
14300 }
14301 __pyx_L3:;
14302
14303 /* "View.MemoryView":837
14304 *
14305 *
14306 * dst.memview = p_src.memview # <<<<<<<<<<<<<<
14307 * dst.data = p_src.data
14308 *
14309*/
14310 __pyx_t_3 = __pyx_v_p_src->memview;
14311
14312 __pyx_v_dst.memview = __pyx_t_3;
14313
14314 /* "View.MemoryView":838
14315 *
14316 * dst.memview = p_src.memview
14317 * dst.data = p_src.data # <<<<<<<<<<<<<<
14318 *
14319 *
14320*/
14321 __pyx_t_4 = __pyx_v_p_src->data;
14322
14323 __pyx_v_dst.data = __pyx_t_4;
14324
14325 /* "View.MemoryView":843
14326 *
14327 *
14328 * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
14329 * cdef int *p_suboffset_dim = &suboffset_dim
14330 * cdef Py_ssize_t start, stop, step, cindex
14331*/
14332 __pyx_v_p_dst = (&__pyx_v_dst);
14333
14334 /* "View.MemoryView":844
14335 *
14336 * cdef __Pyx_memviewslice *p_dst = &dst
14337 * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
14338 * cdef Py_ssize_t start, stop, step, cindex
14339 * cdef bint have_start, have_stop, have_step
14340*/
14341 __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
14342
14343 /* "View.MemoryView":848
14344 * cdef bint have_start, have_stop, have_step
14345 *
14346 * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
14347 * if PyIndex_Check(index):
14348 * cindex = index
14349*/
14350
14351 __pyx_t_5 = 0;
14352 __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
14353 __pyx_t_6 = 0;
14354 for (;;) {
14355 {
14356 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
14357 #if !CYTHON_ASSUME_SAFE_SIZE
14358 if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 848, __pyx_L1_error)
14359 #endif
14360 if (__pyx_t_6 >= __pyx_temp) break;
14361 }
14362 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14363 __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6));
14364 #else
14365 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6);
14366 #endif
14367 ++__pyx_t_6;
14368 if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 848, __pyx_L1_error)
14369 __Pyx_GOTREF(__pyx_t_7);
14370 __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_7);
14371 __pyx_t_7 = 0;
14372 __pyx_v_dim = __pyx_t_5;
14373 __pyx_t_5 = (__pyx_t_5 + 1);
14374
14375 /* "View.MemoryView":849
14376 *
14377 * for dim, index in enumerate(indices):
14378 * if PyIndex_Check(index): # <<<<<<<<<<<<<<
14379 * cindex = index
14380 * slice_memviewslice(
14381*/
14382 __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
14383
14384 if (__pyx_t_1) {
14385
14386
14387 /* "View.MemoryView":850
14388 * for dim, index in enumerate(indices):
14389 * if PyIndex_Check(index):
14390 * cindex = index # <<<<<<<<<<<<<<
14391 * slice_memviewslice(
14392 * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14393*/
14394 __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 850, __pyx_L1_error)
14395 __pyx_v_cindex = __pyx_t_8;
14396
14397 /* "View.MemoryView":851
14398 * if PyIndex_Check(index):
14399 * cindex = index
14400 * slice_memviewslice( # <<<<<<<<<<<<<<
14401 * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14402 * dim, new_ndim, p_suboffset_dim,
14403*/
14404 __pyx_t_9 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 851, __pyx_L1_error)
14405
14406
14407 /* "View.MemoryView":849
14408 *
14409 * for dim, index in enumerate(indices):
14410 * if PyIndex_Check(index): # <<<<<<<<<<<<<<
14411 * cindex = index
14412 * slice_memviewslice(
14413*/
14414 goto __pyx_L6;
14415 }
14416
14417 /* "View.MemoryView":857
14418 * 0, 0, 0, # have_{start,stop,step}
14419 * False)
14420 * elif index is None: # <<<<<<<<<<<<<<
14421 * p_dst.shape[new_ndim] = 1
14422 * p_dst.strides[new_ndim] = 0
14423*/
14424 __pyx_t_1 = (__pyx_v_index == Py_None);
14425 if (__pyx_t_1) {
14426
14427
14428 /* "View.MemoryView":858
14429 * False)
14430 * elif index is None:
14431 * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
14432 * p_dst.strides[new_ndim] = 0
14433 * p_dst.suboffsets[new_ndim] = -1
14434*/
14435 (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
14436
14437 /* "View.MemoryView":859
14438 * elif index is None:
14439 * p_dst.shape[new_ndim] = 1
14440 * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
14441 * p_dst.suboffsets[new_ndim] = -1
14442 * new_ndim += 1
14443*/
14444 (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
14445
14446 /* "View.MemoryView":860
14447 * p_dst.shape[new_ndim] = 1
14448 * p_dst.strides[new_ndim] = 0
14449 * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
14450 * new_ndim += 1
14451 * else:
14452*/
14453 (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
14454
14455 /* "View.MemoryView":861
14456 * p_dst.strides[new_ndim] = 0
14457 * p_dst.suboffsets[new_ndim] = -1
14458 * new_ndim += 1 # <<<<<<<<<<<<<<
14459 * else:
14460 * start = index.start or 0
14461*/
14462 __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14463
14464 /* "View.MemoryView":857
14465 * 0, 0, 0, # have_{start,stop,step}
14466 * False)
14467 * elif index is None: # <<<<<<<<<<<<<<
14468 * p_dst.shape[new_ndim] = 1
14469 * p_dst.strides[new_ndim] = 0
14470*/
14471 goto __pyx_L6;
14472 }
14473
14474 /* "View.MemoryView":863
14475 * new_ndim += 1
14476 * else:
14477 * start = index.start or 0 # <<<<<<<<<<<<<<
14478 * stop = index.stop or 0
14479 * step = index.step or 0
14480*/
14481 /*else*/ {
14482 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 863, __pyx_L1_error)
14483 __Pyx_GOTREF(__pyx_t_7);
14484 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 863, __pyx_L1_error)
14485 if (!__pyx_t_1) {
14486 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14487 } else {
14488 __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 863, __pyx_L1_error)
14489 __pyx_t_8 = __pyx_t_10;
14490 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14491 goto __pyx_L7_bool_binop_done;
14492 }
14493
14494 __pyx_t_8 = 0;
14495 __pyx_L7_bool_binop_done:;
14496 __pyx_v_start = __pyx_t_8;
14497
14498 /* "View.MemoryView":864
14499 * else:
14500 * start = index.start or 0
14501 * stop = index.stop or 0 # <<<<<<<<<<<<<<
14502 * step = index.step or 0
14503 *
14504*/
14505 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 864, __pyx_L1_error)
14506 __Pyx_GOTREF(__pyx_t_7);
14507 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 864, __pyx_L1_error)
14508 if (!__pyx_t_1) {
14509 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14510 } else {
14511 __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 864, __pyx_L1_error)
14512 __pyx_t_8 = __pyx_t_10;
14513 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14514 goto __pyx_L9_bool_binop_done;
14515 }
14516
14517 __pyx_t_8 = 0;
14518 __pyx_L9_bool_binop_done:;
14519 __pyx_v_stop = __pyx_t_8;
14520
14521 /* "View.MemoryView":865
14522 * start = index.start or 0
14523 * stop = index.stop or 0
14524 * step = index.step or 0 # <<<<<<<<<<<<<<
14525 *
14526 * have_start = index.start is not None
14527*/
14528 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 865, __pyx_L1_error)
14529 __Pyx_GOTREF(__pyx_t_7);
14530 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 865, __pyx_L1_error)
14531 if (!__pyx_t_1) {
14532 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14533 } else {
14534 __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 865, __pyx_L1_error)
14535 __pyx_t_8 = __pyx_t_10;
14536 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14537 goto __pyx_L11_bool_binop_done;
14538 }
14539
14540 __pyx_t_8 = 0;
14541 __pyx_L11_bool_binop_done:;
14542 __pyx_v_step = __pyx_t_8;
14543
14544 /* "View.MemoryView":867
14545 * step = index.step or 0
14546 *
14547 * have_start = index.start is not None # <<<<<<<<<<<<<<
14548 * have_stop = index.stop is not None
14549 * have_step = index.step is not None
14550*/
14551 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 867, __pyx_L1_error)
14552 __Pyx_GOTREF(__pyx_t_7);
14553 __pyx_t_1 = (__pyx_t_7 != Py_None);
14554 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14555 __pyx_v_have_start = __pyx_t_1;
14556
14557 /* "View.MemoryView":868
14558 *
14559 * have_start = index.start is not None
14560 * have_stop = index.stop is not None # <<<<<<<<<<<<<<
14561 * have_step = index.step is not None
14562 *
14563*/
14564 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 868, __pyx_L1_error)
14565 __Pyx_GOTREF(__pyx_t_7);
14566 __pyx_t_1 = (__pyx_t_7 != Py_None);
14567 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14568 __pyx_v_have_stop = __pyx_t_1;
14569
14570 /* "View.MemoryView":869
14571 * have_start = index.start is not None
14572 * have_stop = index.stop is not None
14573 * have_step = index.step is not None # <<<<<<<<<<<<<<
14574 *
14575 * slice_memviewslice(
14576*/
14577 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 869, __pyx_L1_error)
14578 __Pyx_GOTREF(__pyx_t_7);
14579 __pyx_t_1 = (__pyx_t_7 != Py_None);
14580 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14581 __pyx_v_have_step = __pyx_t_1;
14582
14583 /* "View.MemoryView":871
14584 * have_step = index.step is not None
14585 *
14586 * slice_memviewslice( # <<<<<<<<<<<<<<
14587 * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14588 * dim, new_ndim, p_suboffset_dim,
14589*/
14590 __pyx_t_9 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 871, __pyx_L1_error)
14591
14592
14593 /* "View.MemoryView":877
14594 * have_start, have_stop, have_step,
14595 * True)
14596 * new_ndim += 1 # <<<<<<<<<<<<<<
14597 *
14598 * if isinstance(memview, _memoryviewslice):
14599*/
14600 __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14601 }
14602 __pyx_L6:;
14603
14604 /* "View.MemoryView":848
14605 * cdef bint have_start, have_stop, have_step
14606 *
14607 * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
14608 * if PyIndex_Check(index):
14609 * cindex = index
14610*/
14611 }
14612 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14613
14614 /* "View.MemoryView":879
14615 * new_ndim += 1
14616 *
14617 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14618 * return memoryview_fromslice(dst, new_ndim,
14619 * memviewsliceobj.to_object_func,
14620*/
14621 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
14622 if (__pyx_t_1) {
14623
14624
14625 /* "View.MemoryView":881
14626 * if isinstance(memview, _memoryviewslice):
14627 * return memoryview_fromslice(dst, new_ndim,
14628 * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
14629 * memviewsliceobj.to_dtype_func,
14630 * memview.dtype_is_object)
14631*/
14632 if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 881, __pyx_L1_error) }
14633
14634 /* "View.MemoryView":882
14635 * return memoryview_fromslice(dst, new_ndim,
14636 * memviewsliceobj.to_object_func,
14637 * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
14638 * memview.dtype_is_object)
14639 * else:
14640*/
14641 if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 882, __pyx_L1_error) }
14642
14643 /* "View.MemoryView":880
14644 *
14645 * if isinstance(memview, _memoryviewslice):
14646 * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
14647 * memviewsliceobj.to_object_func,
14648 * memviewsliceobj.to_dtype_func,
14649*/
14650 __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 880, __pyx_L1_error)
14651 __Pyx_GOTREF(__pyx_t_2);
14652 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 880, __pyx_L1_error)
14653 {
14654 struct __pyx_memoryview_obj *__pyx_temp;
14655 {
14656 __pyx_temp = __pyx_r;
14657 __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
14658 }
14659 __Pyx_XDECREF((PyObject *)__pyx_temp);
14660 }
14661 __pyx_t_2 = 0;
14662 goto __pyx_L0;
14663
14664 /* "View.MemoryView":879
14665 * new_ndim += 1
14666 *
14667 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14668 * return memoryview_fromslice(dst, new_ndim,
14669 * memviewsliceobj.to_object_func,
14670*/
14671 }
14672
14673 /* "View.MemoryView":885
14674 * memview.dtype_is_object)
14675 * else:
14676 * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
14677 * memview.dtype_is_object)
14678 *
14679*/
14680 /*else*/ {
14681
14682 /* "View.MemoryView":886
14683 * else:
14684 * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
14685 * memview.dtype_is_object) # <<<<<<<<<<<<<<
14686 *
14687 *
14688*/
14689 __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 885, __pyx_L1_error)
14690 __Pyx_GOTREF(__pyx_t_2);
14691
14692 /* "View.MemoryView":885
14693 * memview.dtype_is_object)
14694 * else:
14695 * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
14696 * memview.dtype_is_object)
14697 *
14698*/
14699 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 885, __pyx_L1_error)
14700 {
14701 struct __pyx_memoryview_obj *__pyx_temp;
14702 {
14703 __pyx_temp = __pyx_r;
14704 __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
14705 }
14706 __Pyx_XDECREF((PyObject *)__pyx_temp);
14707 }
14708 __pyx_t_2 = 0;
14709 goto __pyx_L0;
14710 }
14711
14712 /* "View.MemoryView":811
14713 *
14714 *
14715 * @cname('__pyx_memview_slice') # <<<<<<<<<<<<<<
14716 * cdef memoryview memview_slice(memoryview memview, tuple indices):
14717 * cdef int new_ndim = 0, suboffset_dim = -1, dim
14718*/
14719
14720 /* function exit code */
14721 __pyx_L1_error:;
14722 __Pyx_XDECREF(__pyx_t_2);
14723 __Pyx_XDECREF(__pyx_t_7);
14724 __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14725 __pyx_r = 0;
14726 __pyx_L0:;
14727
14728
14729
14730
14731
14732
14733 __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743 __Pyx_XDECREF(__pyx_v_index);
14744 __Pyx_XGIVEREF((PyObject *)__pyx_r);
14745 __Pyx_RefNannyFinishContext();
14746 return __pyx_r;
14747}
14748
14749/* "View.MemoryView":892
14750 *
14751 *
14752 * @cname('__pyx_pybuffer_index') # <<<<<<<<<<<<<<
14753 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
14754 * Py_ssize_t dim) except NULL:
14755*/
14756
14757static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
14758 Py_ssize_t __pyx_v_shape;
14759 Py_ssize_t __pyx_v_stride;
14760 Py_ssize_t __pyx_v_suboffset;
14761 Py_ssize_t __pyx_v_itemsize;
14762 char *__pyx_v_resultp;
14763 char *__pyx_r;
14764 Py_ssize_t __pyx_t_1;
14765 int __pyx_t_2;
14766 int __pyx_t_3;
14767 int __pyx_lineno = 0;
14768 const char *__pyx_filename = NULL;
14769 int __pyx_clineno = 0;
14770
14771
14772 /* "View.MemoryView":895
14773 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
14774 * Py_ssize_t dim) except NULL:
14775 * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
14776 * cdef Py_ssize_t itemsize = view.itemsize
14777 * cdef char *resultp
14778*/
14779 __pyx_v_suboffset = -1L;
14780
14781 /* "View.MemoryView":896
14782 * Py_ssize_t dim) except NULL:
14783 * cdef Py_ssize_t shape, stride, suboffset = -1
14784 * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
14785 * cdef char *resultp
14786 *
14787*/
14788 __pyx_t_1 = __pyx_v_view->itemsize;
14789
14790 __pyx_v_itemsize = __pyx_t_1;
14791
14792 /* "View.MemoryView":899
14793 * cdef char *resultp
14794 *
14795 * if view.ndim == 0: # <<<<<<<<<<<<<<
14796 * shape = view.len // itemsize
14797 * stride = itemsize
14798*/
14799 __pyx_t_2 = (__pyx_v_view->ndim == 0);
14800
14801 if (__pyx_t_2) {
14802
14803
14804 /* "View.MemoryView":900
14805 *
14806 * if view.ndim == 0:
14807 * shape = view.len // itemsize # <<<<<<<<<<<<<<
14808 * stride = itemsize
14809 * else:
14810*/
14811 if (unlikely(__pyx_v_itemsize == 0)) {
14812 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
14813 __PYX_ERR(1, 900, __pyx_L1_error)
14814 }
14815 else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
14816 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
14817 __PYX_ERR(1, 900, __pyx_L1_error)
14818 }
14819 __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize, 0);
14820
14821 /* "View.MemoryView":901
14822 * if view.ndim == 0:
14823 * shape = view.len // itemsize
14824 * stride = itemsize # <<<<<<<<<<<<<<
14825 * else:
14826 * shape = view.shape[dim]
14827*/
14828 __pyx_v_stride = __pyx_v_itemsize;
14829
14830 /* "View.MemoryView":899
14831 * cdef char *resultp
14832 *
14833 * if view.ndim == 0: # <<<<<<<<<<<<<<
14834 * shape = view.len // itemsize
14835 * stride = itemsize
14836*/
14837 goto __pyx_L3;
14838 }
14839
14840 /* "View.MemoryView":903
14841 * stride = itemsize
14842 * else:
14843 * shape = view.shape[dim] # <<<<<<<<<<<<<<
14844 * stride = view.strides[dim]
14845 * if view.suboffsets != NULL:
14846*/
14847 /*else*/ {
14848 __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
14849
14850 /* "View.MemoryView":904
14851 * else:
14852 * shape = view.shape[dim]
14853 * stride = view.strides[dim] # <<<<<<<<<<<<<<
14854 * if view.suboffsets != NULL:
14855 * suboffset = view.suboffsets[dim]
14856*/
14857 __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
14858
14859 /* "View.MemoryView":905
14860 * shape = view.shape[dim]
14861 * stride = view.strides[dim]
14862 * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
14863 * suboffset = view.suboffsets[dim]
14864 *
14865*/
14866 __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
14867
14868 if (__pyx_t_2) {
14869
14870
14871 /* "View.MemoryView":906
14872 * stride = view.strides[dim]
14873 * if view.suboffsets != NULL:
14874 * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
14875 *
14876 * if index < 0:
14877*/
14878 __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
14879
14880 /* "View.MemoryView":905
14881 * shape = view.shape[dim]
14882 * stride = view.strides[dim]
14883 * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
14884 * suboffset = view.suboffsets[dim]
14885 *
14886*/
14887 }
14888 }
14889 __pyx_L3:;
14890
14891 /* "View.MemoryView":908
14892 * suboffset = view.suboffsets[dim]
14893 *
14894 * if index < 0: # <<<<<<<<<<<<<<
14895 * index += view.shape[dim]
14896 * if cython.unlikely(index < 0):
14897*/
14898 __pyx_t_2 = (__pyx_v_index < 0);
14899
14900 if (__pyx_t_2) {
14901
14902
14903 /* "View.MemoryView":909
14904 *
14905 * if index < 0:
14906 * index += view.shape[dim] # <<<<<<<<<<<<<<
14907 * if cython.unlikely(index < 0):
14908 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14909*/
14910 __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
14911
14912 /* "View.MemoryView":910
14913 * if index < 0:
14914 * index += view.shape[dim]
14915 * if cython.unlikely(index < 0): # <<<<<<<<<<<<<<
14916 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14917 *
14918*/
14919 __pyx_t_2 = (__pyx_v_index < 0);
14920
14921 if (unlikely(__pyx_t_2)) {
14922
14923
14924 /* "View.MemoryView":911
14925 * index += view.shape[dim]
14926 * if cython.unlikely(index < 0):
14927 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim) # <<<<<<<<<<<<<<
14928 *
14929 * if cython.unlikely(index >= shape):
14930*/
14931 __pyx_t_3 = __pyx_memoryview_err_IndexError(__pyx_k_Out_of_bounds_on_buffer_access_a, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 911, __pyx_L1_error)
14932
14933
14934 /* "View.MemoryView":910
14935 * if index < 0:
14936 * index += view.shape[dim]
14937 * if cython.unlikely(index < 0): # <<<<<<<<<<<<<<
14938 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14939 *
14940*/
14941 }
14942
14943 /* "View.MemoryView":908
14944 * suboffset = view.suboffsets[dim]
14945 *
14946 * if index < 0: # <<<<<<<<<<<<<<
14947 * index += view.shape[dim]
14948 * if cython.unlikely(index < 0):
14949*/
14950 }
14951
14952 /* "View.MemoryView":913
14953 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14954 *
14955 * if cython.unlikely(index >= shape): # <<<<<<<<<<<<<<
14956 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14957 *
14958*/
14959 __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
14960
14961 if (unlikely(__pyx_t_2)) {
14962
14963
14964 /* "View.MemoryView":914
14965 *
14966 * if cython.unlikely(index >= shape):
14967 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim) # <<<<<<<<<<<<<<
14968 *
14969 * resultp = bufp + index * stride
14970*/
14971 __pyx_t_3 = __pyx_memoryview_err_IndexError(__pyx_k_Out_of_bounds_on_buffer_access_a, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 914, __pyx_L1_error)
14972
14973
14974 /* "View.MemoryView":913
14975 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14976 *
14977 * if cython.unlikely(index >= shape): # <<<<<<<<<<<<<<
14978 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14979 *
14980*/
14981 }
14982
14983 /* "View.MemoryView":916
14984 * _err_IndexError("Out of bounds on buffer access (axis %zd)", dim)
14985 *
14986 * resultp = bufp + index * stride # <<<<<<<<<<<<<<
14987 * if suboffset >= 0:
14988 * resultp = (<char **> resultp)[0] + suboffset
14989*/
14990 __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
14991
14992 /* "View.MemoryView":917
14993 *
14994 * resultp = bufp + index * stride
14995 * if suboffset >= 0: # <<<<<<<<<<<<<<
14996 * resultp = (<char **> resultp)[0] + suboffset
14997 *
14998*/
14999 __pyx_t_2 = (__pyx_v_suboffset >= 0);
15000
15001 if (__pyx_t_2) {
15002
15003
15004 /* "View.MemoryView":918
15005 * resultp = bufp + index * stride
15006 * if suboffset >= 0:
15007 * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
15008 *
15009 * return resultp
15010*/
15011 __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
15012
15013 /* "View.MemoryView":917
15014 *
15015 * resultp = bufp + index * stride
15016 * if suboffset >= 0: # <<<<<<<<<<<<<<
15017 * resultp = (<char **> resultp)[0] + suboffset
15018 *
15019*/
15020 }
15021
15022 /* "View.MemoryView":920
15023 * resultp = (<char **> resultp)[0] + suboffset
15024 *
15025 * return resultp # <<<<<<<<<<<<<<
15026 *
15027 *
15028*/
15029 {
15030
15031 __pyx_r = __pyx_v_resultp;
15032 }
15033 goto __pyx_L0;
15034
15035 /* "View.MemoryView":892
15036 *
15037 *
15038 * @cname('__pyx_pybuffer_index') # <<<<<<<<<<<<<<
15039 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
15040 * Py_ssize_t dim) except NULL:
15041*/
15042
15043 /* function exit code */
15044 __pyx_L1_error:;
15045 __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
15046 __pyx_r = NULL;
15047 __pyx_L0:;
15048
15049
15050
15051
15052
15053
15054
15055 return __pyx_r;
15056}
15057
15058/* "View.MemoryView":925
15059 *
15060 *
15061 * @cname('__pyx_memslice_transpose') # <<<<<<<<<<<<<<
15062 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
15063 * cdef int ndim = memslice.memview.view.ndim
15064*/
15065
15066static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
15067 int __pyx_v_ndim;
15068 Py_ssize_t *__pyx_v_shape;
15069 Py_ssize_t *__pyx_v_strides;
15070 int __pyx_v_i;
15071 int __pyx_v_j;
15072 int __pyx_r;
15073 int __pyx_t_1;
15074 Py_ssize_t *__pyx_t_2;
15075 long __pyx_t_3;
15076 long __pyx_t_4;
15077 Py_ssize_t __pyx_t_5;
15078 Py_ssize_t __pyx_t_6;
15079 int __pyx_t_7;
15080 int __pyx_t_8;
15081 int __pyx_t_9;
15082 int __pyx_lineno = 0;
15083 const char *__pyx_filename = NULL;
15084 int __pyx_clineno = 0;
15085 PyGILState_STATE __pyx_gilstate_save;
15086
15087 /* "View.MemoryView":927
15088 * @cname('__pyx_memslice_transpose')
15089 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
15090 * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
15091 *
15092 * cdef Py_ssize_t *shape = memslice.shape
15093*/
15094 __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
15095
15096 __pyx_v_ndim = __pyx_t_1;
15097
15098 /* "View.MemoryView":929
15099 * cdef int ndim = memslice.memview.view.ndim
15100 *
15101 * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
15102 * cdef Py_ssize_t *strides = memslice.strides
15103 *
15104*/
15105 __pyx_t_2 = __pyx_v_memslice->shape;
15106
15107 __pyx_v_shape = __pyx_t_2;
15108
15109 /* "View.MemoryView":930
15110 *
15111 * cdef Py_ssize_t *shape = memslice.shape
15112 * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
15113 *
15114 *
15115*/
15116 __pyx_t_2 = __pyx_v_memslice->strides;
15117
15118 __pyx_v_strides = __pyx_t_2;
15119
15120 /* "View.MemoryView":934
15121 *
15122 * cdef int i, j
15123 * for i in range(ndim // 2): # <<<<<<<<<<<<<<
15124 * j = ndim - 1 - i
15125 * strides[i], strides[j] = strides[j], strides[i]
15126*/
15127
15128 __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2, 1);
15129 __pyx_t_4 = __pyx_t_3;
15130
15131 for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
15132 __pyx_v_i = __pyx_t_1;
15133
15134 /* "View.MemoryView":935
15135 * cdef int i, j
15136 * for i in range(ndim // 2):
15137 * j = ndim - 1 - i # <<<<<<<<<<<<<<
15138 * strides[i], strides[j] = strides[j], strides[i]
15139 * shape[i], shape[j] = shape[j], shape[i]
15140*/
15141 __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
15142
15143 /* "View.MemoryView":936
15144 * for i in range(ndim // 2):
15145 * j = ndim - 1 - i
15146 * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
15147 * shape[i], shape[j] = shape[j], shape[i]
15148 *
15149*/
15150 __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
15151
15152 __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
15153
15154 (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
15155
15156 (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
15157
15158
15159 /* "View.MemoryView":937
15160 * j = ndim - 1 - i
15161 * strides[i], strides[j] = strides[j], strides[i]
15162 * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
15163 *
15164 * if cython.unlikely(memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0):
15165*/
15166 __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
15167
15168 __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
15169
15170 (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
15171
15172 (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
15173
15174
15175 /* "View.MemoryView":939
15176 * shape[i], shape[j] = shape[j], shape[i]
15177 *
15178 * if cython.unlikely(memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0): # <<<<<<<<<<<<<<
15179 * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
15180 *
15181*/
15182 __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
15183
15184 if (!__pyx_t_8) {
15185
15186 } else {
15187
15188 __pyx_t_7 = __pyx_t_8;
15189
15190 goto __pyx_L6_bool_binop_done;
15191 }
15192 __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
15193
15194
15195 __pyx_t_7 = __pyx_t_8;
15196
15197 __pyx_L6_bool_binop_done:;
15198 if (unlikely(__pyx_t_7)) {
15199
15200
15201 /* "View.MemoryView":940
15202 *
15203 * if cython.unlikely(memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0):
15204 * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
15205 *
15206 * return 0
15207*/
15208 __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_k_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 940, __pyx_L1_error)
15209
15210
15211 /* "View.MemoryView":939
15212 * shape[i], shape[j] = shape[j], shape[i]
15213 *
15214 * if cython.unlikely(memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0): # <<<<<<<<<<<<<<
15215 * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
15216 *
15217*/
15218 }
15219 }
15220
15221
15222 /* "View.MemoryView":942
15223 * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
15224 *
15225 * return 0 # <<<<<<<<<<<<<<
15226 *
15227 *
15228*/
15229 {
15230
15231 __pyx_r = 0;
15232 }
15233 goto __pyx_L0;
15234
15235 /* "View.MemoryView":925
15236 *
15237 *
15238 * @cname('__pyx_memslice_transpose') # <<<<<<<<<<<<<<
15239 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
15240 * cdef int ndim = memslice.memview.view.ndim
15241*/
15242
15243 /* function exit code */
15244 __pyx_L1_error:;
15245 __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
15246 __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15247 __pyx_r = -1;
15248 __Pyx_PyGILState_Release(__pyx_gilstate_save);
15249 __pyx_L0:;
15250
15251
15252
15253
15254
15255 return __pyx_r;
15256}
15257
15258/* "View.MemoryView":960
15259 * cdef to_dtype_func_type to_dtype_func
15260 *
15261 * def __dealloc__(self): # <<<<<<<<<<<<<<
15262 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
15263 *
15264*/
15265
15266/* Python wrapper */
15267static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
15268static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
15269 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
15270 __Pyx_RefNannyDeclarations
15271 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
15272 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
15273 __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
15274
15275 /* function exit code */
15276 __Pyx_RefNannyFinishContext();
15277}
15278
15279static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
15280
15281 /* "View.MemoryView":961
15282 *
15283 * def __dealloc__(self):
15284 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
15285 *
15286 * cdef convert_item_to_object(self, char *itemp):
15287*/
15288 __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
15289
15290 /* "View.MemoryView":960
15291 * cdef to_dtype_func_type to_dtype_func
15292 *
15293 * def __dealloc__(self): # <<<<<<<<<<<<<<
15294 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
15295 *
15296*/
15297
15298 /* function exit code */
15299
15300}
15301
15302/* "View.MemoryView":963
15303 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
15304 *
15305 * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
15306 * if self.to_object_func != NULL:
15307 * return self.to_object_func(itemp)
15308*/
15309
15310static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
15311 PyObject *__pyx_r = NULL;
15312 __Pyx_RefNannyDeclarations
15313 int __pyx_t_1;
15314 PyObject *__pyx_t_2 = NULL;
15315 int __pyx_lineno = 0;
15316 const char *__pyx_filename = NULL;
15317 int __pyx_clineno = 0;
15318 __Pyx_RefNannySetupContext("convert_item_to_object", 0);
15319
15320 /* "View.MemoryView":964
15321 *
15322 * cdef convert_item_to_object(self, char *itemp):
15323 * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
15324 * return self.to_object_func(itemp)
15325 * else:
15326*/
15327 __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
15328
15329 if (__pyx_t_1) {
15330
15331
15332 /* "View.MemoryView":965
15333 * cdef convert_item_to_object(self, char *itemp):
15334 * if self.to_object_func != NULL:
15335 * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
15336 * else:
15337 * return memoryview.convert_item_to_object(self, itemp)
15338*/
15339 __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 965, __pyx_L1_error)
15340 __Pyx_GOTREF(__pyx_t_2);
15341 {
15342 PyObject *__pyx_temp;
15343 {
15344 __pyx_temp = __pyx_r;
15345 __pyx_r = __pyx_t_2;
15346 }
15347 __Pyx_XDECREF(__pyx_temp);
15348 }
15349 __pyx_t_2 = 0;
15350 goto __pyx_L0;
15351
15352 /* "View.MemoryView":964
15353 *
15354 * cdef convert_item_to_object(self, char *itemp):
15355 * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
15356 * return self.to_object_func(itemp)
15357 * else:
15358*/
15359 }
15360
15361 /* "View.MemoryView":967
15362 * return self.to_object_func(itemp)
15363 * else:
15364 * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
15365 *
15366 * cdef assign_item_from_object(self, char *itemp, object value):
15367*/
15368 /*else*/ {
15369 __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 967, __pyx_L1_error)
15370 __Pyx_GOTREF(__pyx_t_2);
15371 {
15372 PyObject *__pyx_temp;
15373 {
15374 __pyx_temp = __pyx_r;
15375 __pyx_r = __pyx_t_2;
15376 }
15377 __Pyx_XDECREF(__pyx_temp);
15378 }
15379 __pyx_t_2 = 0;
15380 goto __pyx_L0;
15381 }
15382
15383 /* "View.MemoryView":963
15384 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
15385 *
15386 * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
15387 * if self.to_object_func != NULL:
15388 * return self.to_object_func(itemp)
15389*/
15390
15391 /* function exit code */
15392 __pyx_L1_error:;
15393 __Pyx_XDECREF(__pyx_t_2);
15394 __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
15395 __pyx_r = 0;
15396 __pyx_L0:;
15397 __Pyx_XGIVEREF(__pyx_r);
15398 __Pyx_RefNannyFinishContext();
15399 return __pyx_r;
15400}
15401
15402/* "View.MemoryView":969
15403 * return memoryview.convert_item_to_object(self, itemp)
15404 *
15405 * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
15406 * if self.to_dtype_func != NULL:
15407 * self.to_dtype_func(itemp, value)
15408*/
15409
15410static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
15411 PyObject *__pyx_r = NULL;
15412 __Pyx_RefNannyDeclarations
15413 int __pyx_t_1;
15414 int __pyx_t_2;
15415 PyObject *__pyx_t_3 = NULL;
15416 int __pyx_lineno = 0;
15417 const char *__pyx_filename = NULL;
15418 int __pyx_clineno = 0;
15419 __Pyx_RefNannySetupContext("assign_item_from_object", 0);
15420
15421 /* "View.MemoryView":970
15422 *
15423 * cdef assign_item_from_object(self, char *itemp, object value):
15424 * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
15425 * self.to_dtype_func(itemp, value)
15426 * else:
15427*/
15428 __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
15429
15430 if (__pyx_t_1) {
15431
15432
15433 /* "View.MemoryView":971
15434 * cdef assign_item_from_object(self, char *itemp, object value):
15435 * if self.to_dtype_func != NULL:
15436 * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
15437 * else:
15438 * memoryview.assign_item_from_object(self, itemp, value)
15439*/
15440 __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 971, __pyx_L1_error)
15441
15442
15443 /* "View.MemoryView":970
15444 *
15445 * cdef assign_item_from_object(self, char *itemp, object value):
15446 * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
15447 * self.to_dtype_func(itemp, value)
15448 * else:
15449*/
15450 goto __pyx_L3;
15451 }
15452
15453 /* "View.MemoryView":973
15454 * self.to_dtype_func(itemp, value)
15455 * else:
15456 * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
15457 *
15458 * cdef _get_base(self):
15459*/
15460 /*else*/ {
15461 __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 973, __pyx_L1_error)
15462 __Pyx_GOTREF(__pyx_t_3);
15463 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15464 }
15465 __pyx_L3:;
15466
15467 /* "View.MemoryView":969
15468 * return memoryview.convert_item_to_object(self, itemp)
15469 *
15470 * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
15471 * if self.to_dtype_func != NULL:
15472 * self.to_dtype_func(itemp, value)
15473*/
15474
15475 /* function exit code */
15476 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15477 goto __pyx_L0;
15478 __pyx_L1_error:;
15479 __Pyx_XDECREF(__pyx_t_3);
15480 __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
15481 __pyx_r = 0;
15482 __pyx_L0:;
15483 __Pyx_XGIVEREF(__pyx_r);
15484 __Pyx_RefNannyFinishContext();
15485 return __pyx_r;
15486}
15487
15488/* "View.MemoryView":975
15489 * memoryview.assign_item_from_object(self, itemp, value)
15490 *
15491 * cdef _get_base(self): # <<<<<<<<<<<<<<
15492 * return self.from_object
15493 *
15494*/
15495
15496static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
15497 PyObject *__pyx_r = NULL;
15498 __Pyx_RefNannyDeclarations
15499 __Pyx_RefNannySetupContext("_get_base", 0);
15500
15501 /* "View.MemoryView":976
15502 *
15503 * cdef _get_base(self):
15504 * return self.from_object # <<<<<<<<<<<<<<
15505 *
15506 *
15507*/
15508 {
15509 PyObject *__pyx_temp;
15510 {
15511 __pyx_temp = __pyx_r;
15512 __Pyx_INCREF(__pyx_v_self->from_object);
15513 __pyx_r = __pyx_v_self->from_object;
15514 }
15515 __Pyx_XDECREF(__pyx_temp);
15516 }
15517 goto __pyx_L0;
15518
15519 /* "View.MemoryView":975
15520 * memoryview.assign_item_from_object(self, itemp, value)
15521 *
15522 * cdef _get_base(self): # <<<<<<<<<<<<<<
15523 * return self.from_object
15524 *
15525*/
15526
15527 /* function exit code */
15528 __pyx_L0:;
15529 __Pyx_XGIVEREF(__pyx_r);
15530 __Pyx_RefNannyFinishContext();
15531 return __pyx_r;
15532}
15533
15534/* "(tree fragment)":1
15535 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
15536 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15537 * def __setstate_cython__(self, __pyx_state):
15538*/
15539
15540/* Python wrapper */
15541static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self,
15542#if CYTHON_VECTORCALL
15543PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15544#else
15545PyObject *__pyx_args, PyObject *__pyx_kwds
15546#endif
15547); /*proto*/
15548static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self,
15549#if CYTHON_VECTORCALL
15550PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15551#else
15552PyObject *__pyx_args, PyObject *__pyx_kwds
15553#endif
15554) {
15555 #if !CYTHON_VECTORCALL
15556 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15557 #endif
15558 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
15559 PyObject *__pyx_r = 0;
15560 __Pyx_RefNannyDeclarations
15561 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
15562 #if !CYTHON_VECTORCALL
15563 #if CYTHON_ASSUME_SAFE_SIZE
15564 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15565 #else
15566 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
15567 #endif
15568 #endif
15569 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15570 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
15571 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
15572 if (unlikely(__pyx_kwds_len < 0)) return NULL;
15573 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
15574 __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
15575
15576 /* function exit code */
15577 __Pyx_RefNannyFinishContext();
15578 return __pyx_r;
15579}
15580
15581static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
15582 PyObject *__pyx_r = NULL;
15583 __Pyx_RefNannyDeclarations
15584 int __pyx_lineno = 0;
15585 const char *__pyx_filename = NULL;
15586 int __pyx_clineno = 0;
15587 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
15588
15589 /* "(tree fragment)":2
15590 * def __reduce_cython__(self):
15591 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
15592 * def __setstate_cython__(self, __pyx_state):
15593 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15594*/
15595 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
15596 __PYX_ERR(1, 2, __pyx_L1_error)
15597
15598 /* "(tree fragment)":1
15599 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
15600 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15601 * def __setstate_cython__(self, __pyx_state):
15602*/
15603
15604 /* function exit code */
15605 __pyx_L1_error:;
15606 __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15607 __pyx_r = NULL;
15608 __Pyx_XGIVEREF(__pyx_r);
15609 __Pyx_RefNannyFinishContext();
15610 return __pyx_r;
15611}
15612
15613/* "(tree fragment)":3
15614 * def __reduce_cython__(self):
15615 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15616 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
15617 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15618*/
15619
15620/* Python wrapper */
15621static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self,
15622#if CYTHON_VECTORCALL
15623PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15624#else
15625PyObject *__pyx_args, PyObject *__pyx_kwds
15626#endif
15627); /*proto*/
15628static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self,
15629#if CYTHON_VECTORCALL
15630PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15631#else
15632PyObject *__pyx_args, PyObject *__pyx_kwds
15633#endif
15634) {
15635 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
15636 #if !CYTHON_VECTORCALL
15637 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15638 #endif
15639 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
15640 PyObject* values[1] = {0};
15641 int __pyx_lineno = 0;
15642 const char *__pyx_filename = NULL;
15643 int __pyx_clineno = 0;
15644 PyObject *__pyx_r = 0;
15645 __Pyx_RefNannyDeclarations
15646 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
15647 #if !CYTHON_VECTORCALL
15648 #if CYTHON_ASSUME_SAFE_SIZE
15649 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15650 #else
15651 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
15652 #endif
15653 #endif
15654 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15655 {
15656 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
15657 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
15658 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
15659 if (__pyx_kwds_len > 0) {
15660 switch (__pyx_nargs) {
15661 case 1:
15662 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
15663 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
15664 CYTHON_FALLTHROUGH;
15665 case 0: break;
15666 default: goto __pyx_L5_argtuple_error;
15667 }
15668 const Py_ssize_t kwd_pos_args = __pyx_nargs;
15669 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
15670 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
15671 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
15672 }
15673 } else if (unlikely(__pyx_nargs != 1)) {
15674 goto __pyx_L5_argtuple_error;
15675 } else {
15676 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
15677 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
15678 }
15679 __pyx_v___pyx_state = values[0];
15680 }
15681 goto __pyx_L6_skip;
15682 __pyx_L5_argtuple_error:;
15683 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
15684 __pyx_L6_skip:;
15685 goto __pyx_L4_argument_unpacking_done;
15686 __pyx_L3_error:;
15687 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
15688 Py_XDECREF(values[__pyx_temp]);
15689 }
15690 __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15691 __Pyx_RefNannyFinishContext();
15692 return NULL;
15693 __pyx_L4_argument_unpacking_done:;
15694 __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);
15695
15696 /* function exit code */
15697 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
15698 Py_XDECREF(values[__pyx_temp]);
15699 }
15700 __Pyx_RefNannyFinishContext();
15701 return __pyx_r;
15702}
15703
15704static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
15705 PyObject *__pyx_r = NULL;
15706 __Pyx_RefNannyDeclarations
15707 int __pyx_lineno = 0;
15708 const char *__pyx_filename = NULL;
15709 int __pyx_clineno = 0;
15710 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
15711
15712 /* "(tree fragment)":4
15713 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15714 * def __setstate_cython__(self, __pyx_state):
15715 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
15716*/
15717 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
15718 __PYX_ERR(1, 4, __pyx_L1_error)
15719
15720 /* "(tree fragment)":3
15721 * def __reduce_cython__(self):
15722 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15723 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
15724 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15725*/
15726
15727 /* function exit code */
15728 __pyx_L1_error:;
15729 __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15730 __pyx_r = NULL;
15731 __Pyx_XGIVEREF(__pyx_r);
15732 __Pyx_RefNannyFinishContext();
15733 return __pyx_r;
15734}
15735
15736/* "View.MemoryView":995
15737 * pass # ignore failure, it's a minor issue
15738 *
15739 * @cname('__pyx_memoryview_fromslice') # <<<<<<<<<<<<<<
15740 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,
15741 * int ndim,
15742*/
15743
15744static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), __pyx_memoryview_to_dtype_func_type __pyx_v_to_dtype_func, int __pyx_v_dtype_is_object) {
15745 struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
15746 Py_ssize_t __pyx_v_suboffset;
15747 Py_ssize_t __pyx_v_length;
15748 PyObject *__pyx_r = NULL;
15749 __Pyx_RefNannyDeclarations
15750 int __pyx_t_1;
15751 PyObject *__pyx_t_2 = NULL;
15752 PyObject *__pyx_t_3 = NULL;
15753 __Pyx_TypeInfo const *__pyx_t_4;
15754 Py_buffer __pyx_t_5;
15755 Py_ssize_t *__pyx_t_6;
15756 Py_ssize_t *__pyx_t_7;
15757 Py_ssize_t *__pyx_t_8;
15758 Py_ssize_t __pyx_t_9;
15759 int __pyx_lineno = 0;
15760 const char *__pyx_filename = NULL;
15761 int __pyx_clineno = 0;
15762 __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
15763
15764 /* "View.MemoryView":1004
15765 * cdef _memoryviewslice result
15766 *
15767 * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
15768 * return None
15769 *
15770*/
15771 __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
15772
15773 if (__pyx_t_1) {
15774
15775
15776 /* "View.MemoryView":1005
15777 *
15778 * if <PyObject *> memviewslice.memview == Py_None:
15779 * return None # <<<<<<<<<<<<<<
15780 *
15781 *
15782*/
15783 {
15784 PyObject *__pyx_temp;
15785 {
15786 __pyx_temp = __pyx_r;
15787 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15788 }
15789 __Pyx_XDECREF(__pyx_temp);
15790 }
15791 goto __pyx_L0;
15792
15793 /* "View.MemoryView":1004
15794 * cdef _memoryviewslice result
15795 *
15796 * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
15797 * return None
15798 *
15799*/
15800 }
15801
15802 /* "View.MemoryView":1010
15803 *
15804 *
15805 * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) # <<<<<<<<<<<<<<
15806 *
15807 * result.from_slice = memviewslice
15808*/
15809 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1010, __pyx_L1_error)
15810 __Pyx_GOTREF(__pyx_t_2);
15811 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1010, __pyx_L1_error)
15812 __Pyx_GOTREF(__pyx_t_3);
15813 __Pyx_INCREF(Py_None);
15814 __Pyx_GIVEREF(Py_None);
15815 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None) != (0)) __PYX_ERR(1, 1010, __pyx_L1_error);
15816 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
15817 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
15818 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(1, 1010, __pyx_L1_error);
15819 __Pyx_GIVEREF(__pyx_t_2);
15820 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 1010, __pyx_L1_error);
15821 __pyx_t_2 = 0;
15822 __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_mstate_global->__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1010, __pyx_L1_error)
15823 __Pyx_GOTREF(__pyx_t_2);
15824 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15825 __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
15826 __pyx_t_2 = 0;
15827
15828 /* "View.MemoryView":1012
15829 * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
15830 *
15831 * result.from_slice = memviewslice # <<<<<<<<<<<<<<
15832 * __PYX_INC_MEMVIEW(&memviewslice, 1)
15833 *
15834*/
15835 __pyx_v_result->from_slice = __pyx_v_memviewslice;
15836
15837 /* "View.MemoryView":1013
15838 *
15839 * result.from_slice = memviewslice
15840 * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
15841 *
15842 * result.from_object = (<memoryview> memviewslice.memview)._get_base()
15843*/
15844 __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
15845
15846 /* "View.MemoryView":1015
15847 * __PYX_INC_MEMVIEW(&memviewslice, 1)
15848 *
15849 * result.from_object = (<memoryview> memviewslice.memview)._get_base() # <<<<<<<<<<<<<<
15850 * result.typeinfo = memviewslice.memview.typeinfo
15851 *
15852*/
15853 __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
15854 __Pyx_GOTREF(__pyx_t_2);
15855 __Pyx_GIVEREF(__pyx_t_2);
15856 __Pyx_GOTREF(__pyx_v_result->from_object);
15857 __Pyx_DECREF(__pyx_v_result->from_object);
15858 __pyx_v_result->from_object = __pyx_t_2;
15859 __pyx_t_2 = 0;
15860
15861 /* "View.MemoryView":1016
15862 *
15863 * result.from_object = (<memoryview> memviewslice.memview)._get_base()
15864 * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
15865 *
15866 * result.view = memviewslice.memview.view
15867*/
15868 __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
15869
15870 __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
15871
15872 /* "View.MemoryView":1018
15873 * result.typeinfo = memviewslice.memview.typeinfo
15874 *
15875 * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
15876 * result.view.buf = <void *> memviewslice.data
15877 * result.view.ndim = ndim
15878*/
15879 __pyx_t_5 = __pyx_v_memviewslice.memview->view;
15880
15881 __pyx_v_result->__pyx_base.view = __pyx_t_5;
15882
15883 /* "View.MemoryView":1019
15884 *
15885 * result.view = memviewslice.memview.view
15886 * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
15887 * result.view.ndim = ndim
15888 * (<__pyx_buffer *> &result.view).obj = Py_None
15889*/
15890 __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
15891
15892 /* "View.MemoryView":1020
15893 * result.view = memviewslice.memview.view
15894 * result.view.buf = <void *> memviewslice.data
15895 * result.view.ndim = ndim # <<<<<<<<<<<<<<
15896 * (<__pyx_buffer *> &result.view).obj = Py_None
15897 * Py_INCREF(Py_None)
15898*/
15899 __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
15900
15901 /* "View.MemoryView":1021
15902 * result.view.buf = <void *> memviewslice.data
15903 * result.view.ndim = ndim
15904 * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
15905 * Py_INCREF(Py_None)
15906 *
15907*/
15908 ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
15909
15910 /* "View.MemoryView":1022
15911 * result.view.ndim = ndim
15912 * (<__pyx_buffer *> &result.view).obj = Py_None
15913 * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
15914 *
15915 * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
15916*/
15917 Py_INCREF(Py_None);
15918
15919 /* "View.MemoryView":1024
15920 * Py_INCREF(Py_None)
15921 *
15922 * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
15923 * result.flags = PyBUF_RECORDS
15924 * else:
15925*/
15926 __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
15927
15928 if (__pyx_t_1) {
15929
15930
15931 /* "View.MemoryView":1025
15932 *
15933 * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
15934 * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
15935 * else:
15936 * result.flags = PyBUF_RECORDS_RO
15937*/
15938 __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
15939
15940 /* "View.MemoryView":1024
15941 * Py_INCREF(Py_None)
15942 *
15943 * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
15944 * result.flags = PyBUF_RECORDS
15945 * else:
15946*/
15947 goto __pyx_L4;
15948 }
15949
15950 /* "View.MemoryView":1027
15951 * result.flags = PyBUF_RECORDS
15952 * else:
15953 * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
15954 *
15955 * result.view.shape = <Py_ssize_t *> result.from_slice.shape
15956*/
15957 /*else*/ {
15958 __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
15959 }
15960 __pyx_L4:;
15961
15962 /* "View.MemoryView":1029
15963 * result.flags = PyBUF_RECORDS_RO
15964 *
15965 * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
15966 * result.view.strides = <Py_ssize_t *> result.from_slice.strides
15967 *
15968*/
15969 __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
15970
15971 /* "View.MemoryView":1030
15972 *
15973 * result.view.shape = <Py_ssize_t *> result.from_slice.shape
15974 * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
15975 *
15976 *
15977*/
15978 __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
15979
15980 /* "View.MemoryView":1033
15981 *
15982 *
15983 * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
15984 * for suboffset in result.from_slice.suboffsets[:ndim]:
15985 * if suboffset >= 0:
15986*/
15987 __pyx_v_result->__pyx_base.view.suboffsets = NULL;
15988
15989 /* "View.MemoryView":1034
15990 *
15991 * result.view.suboffsets = NULL
15992 * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
15993 * if suboffset >= 0:
15994 * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15995*/
15996 __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
15997
15998 for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
15999 __pyx_t_6 = __pyx_t_8;
16000 __pyx_v_suboffset = (__pyx_t_6[0]);
16001
16002 /* "View.MemoryView":1035
16003 * result.view.suboffsets = NULL
16004 * for suboffset in result.from_slice.suboffsets[:ndim]:
16005 * if suboffset >= 0: # <<<<<<<<<<<<<<
16006 * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16007 * break
16008*/
16009 __pyx_t_1 = (__pyx_v_suboffset >= 0);
16010
16011 if (__pyx_t_1) {
16012
16013
16014 /* "View.MemoryView":1036
16015 * for suboffset in result.from_slice.suboffsets[:ndim]:
16016 * if suboffset >= 0:
16017 * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
16018 * break
16019 *
16020*/
16021 __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
16022
16023 /* "View.MemoryView":1037
16024 * if suboffset >= 0:
16025 * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16026 * break # <<<<<<<<<<<<<<
16027 *
16028 * cdef Py_ssize_t length
16029*/
16030 goto __pyx_L6_break;
16031
16032 /* "View.MemoryView":1035
16033 * result.view.suboffsets = NULL
16034 * for suboffset in result.from_slice.suboffsets[:ndim]:
16035 * if suboffset >= 0: # <<<<<<<<<<<<<<
16036 * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16037 * break
16038*/
16039 }
16040 }
16041 __pyx_L6_break:;
16042
16043
16044 /* "View.MemoryView":1040
16045 *
16046 * cdef Py_ssize_t length
16047 * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
16048 * for length in result.view.shape[:ndim]:
16049 * result.view.len *= length
16050*/
16051 __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
16052
16053 __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
16054
16055 /* "View.MemoryView":1041
16056 * cdef Py_ssize_t length
16057 * result.view.len = result.view.itemsize
16058 * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
16059 * result.view.len *= length
16060 *
16061*/
16062 __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
16063
16064 for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
16065 __pyx_t_6 = __pyx_t_8;
16066 __pyx_v_length = (__pyx_t_6[0]);
16067
16068 /* "View.MemoryView":1042
16069 * result.view.len = result.view.itemsize
16070 * for length in result.view.shape[:ndim]:
16071 * result.view.len *= length # <<<<<<<<<<<<<<
16072 *
16073 * result.to_object_func = to_object_func
16074*/
16075 __pyx_v_result->__pyx_base.view.len = (__pyx_v_result->__pyx_base.view.len * __pyx_v_length);
16076 }
16077
16078
16079 /* "View.MemoryView":1044
16080 * result.view.len *= length
16081 *
16082 * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
16083 * result.to_dtype_func = to_dtype_func
16084 *
16085*/
16086 __pyx_v_result->to_object_func = __pyx_v_to_object_func;
16087
16088 /* "View.MemoryView":1045
16089 *
16090 * result.to_object_func = to_object_func
16091 * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
16092 *
16093 * return result
16094*/
16095 __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
16096
16097 /* "View.MemoryView":1047
16098 * result.to_dtype_func = to_dtype_func
16099 *
16100 * return result # <<<<<<<<<<<<<<
16101 *
16102 * @cname('__pyx_memoryview_get_slice_from_memoryview')
16103*/
16104 {
16105 PyObject *__pyx_temp;
16106 {
16107 __pyx_temp = __pyx_r;
16108 __Pyx_INCREF((PyObject *)__pyx_v_result);
16109 __pyx_r = ((PyObject *)__pyx_v_result);
16110 }
16111 __Pyx_XDECREF(__pyx_temp);
16112 }
16113 goto __pyx_L0;
16114
16115 /* "View.MemoryView":995
16116 * pass # ignore failure, it's a minor issue
16117 *
16118 * @cname('__pyx_memoryview_fromslice') # <<<<<<<<<<<<<<
16119 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,
16120 * int ndim,
16121*/
16122
16123 /* function exit code */
16124 __pyx_L1_error:;
16125 __Pyx_XDECREF(__pyx_t_2);
16126 __Pyx_XDECREF(__pyx_t_3);
16127 __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16128 __pyx_r = 0;
16129 __pyx_L0:;
16130 __Pyx_XDECREF((PyObject *)__pyx_v_result);
16131
16132
16133 __Pyx_XGIVEREF(__pyx_r);
16134 __Pyx_RefNannyFinishContext();
16135 return __pyx_r;
16136}
16137
16138/* "View.MemoryView":1049
16139 * return result
16140 *
16141 * @cname('__pyx_memoryview_get_slice_from_memoryview') # <<<<<<<<<<<<<<
16142 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,
16143 * __Pyx_memviewslice *mslice) except NULL:
16144*/
16145
16146static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
16147 struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
16148 __Pyx_memviewslice *__pyx_r;
16149 __Pyx_RefNannyDeclarations
16150 int __pyx_t_1;
16151 PyObject *__pyx_t_2 = NULL;
16152 int __pyx_lineno = 0;
16153 const char *__pyx_filename = NULL;
16154 int __pyx_clineno = 0;
16155 __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
16156
16157 /* "View.MemoryView":1053
16158 * __Pyx_memviewslice *mslice) except NULL:
16159 * cdef _memoryviewslice obj
16160 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
16161 * obj = memview
16162 * return &obj.from_slice
16163*/
16164 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
16165 if (__pyx_t_1) {
16166
16167
16168 /* "View.MemoryView":1054
16169 * cdef _memoryviewslice obj
16170 * if isinstance(memview, _memoryviewslice):
16171 * obj = memview # <<<<<<<<<<<<<<
16172 * return &obj.from_slice
16173 * else:
16174*/
16175 __pyx_t_2 = ((PyObject *)__pyx_v_memview);
16176 __Pyx_INCREF(__pyx_t_2);
16177 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 1054, __pyx_L1_error)
16178 __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
16179 __pyx_t_2 = 0;
16180
16181 /* "View.MemoryView":1055
16182 * if isinstance(memview, _memoryviewslice):
16183 * obj = memview
16184 * return &obj.from_slice # <<<<<<<<<<<<<<
16185 * else:
16186 * slice_copy(memview, mslice)
16187*/
16188 {
16189
16190 __pyx_r = (&__pyx_v_obj->from_slice);
16191 }
16192 goto __pyx_L0;
16193
16194 /* "View.MemoryView":1053
16195 * __Pyx_memviewslice *mslice) except NULL:
16196 * cdef _memoryviewslice obj
16197 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
16198 * obj = memview
16199 * return &obj.from_slice
16200*/
16201 }
16202
16203 /* "View.MemoryView":1057
16204 * return &obj.from_slice
16205 * else:
16206 * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
16207 * return mslice
16208 *
16209*/
16210 /*else*/ {
16211 __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
16212
16213 /* "View.MemoryView":1058
16214 * else:
16215 * slice_copy(memview, mslice)
16216 * return mslice # <<<<<<<<<<<<<<
16217 *
16218 * @cname('__pyx_memoryview_slice_copy')
16219*/
16220 {
16221
16222 __pyx_r = __pyx_v_mslice;
16223 }
16224 goto __pyx_L0;
16225 }
16226
16227 /* "View.MemoryView":1049
16228 * return result
16229 *
16230 * @cname('__pyx_memoryview_get_slice_from_memoryview') # <<<<<<<<<<<<<<
16231 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,
16232 * __Pyx_memviewslice *mslice) except NULL:
16233*/
16234
16235 /* function exit code */
16236 __pyx_L1_error:;
16237 __Pyx_XDECREF(__pyx_t_2);
16238 __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
16239 __pyx_r = NULL;
16240 __pyx_L0:;
16241 __Pyx_XDECREF((PyObject *)__pyx_v_obj);
16242
16243 __Pyx_RefNannyFinishContext();
16244 return __pyx_r;
16245}
16246
16247/* "View.MemoryView":1060
16248 * return mslice
16249 *
16250 * @cname('__pyx_memoryview_slice_copy') # <<<<<<<<<<<<<<
16251 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:
16252 * cdef int dim
16253*/
16254
16255static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
16256 int __pyx_v_dim;
16257 Py_ssize_t *__pyx_v_shape;
16258 Py_ssize_t *__pyx_v_strides;
16259 Py_ssize_t *__pyx_v_suboffsets;
16260 Py_ssize_t *__pyx_t_1;
16261 int __pyx_t_2;
16262 int __pyx_t_3;
16263 int __pyx_t_4;
16264 Py_ssize_t __pyx_t_5;
16265 int __pyx_t_6;
16266
16267 /* "View.MemoryView":1065
16268 * cdef (Py_ssize_t*) shape, strides, suboffsets
16269 *
16270 * shape = memview.view.shape # <<<<<<<<<<<<<<
16271 * strides = memview.view.strides
16272 * suboffsets = memview.view.suboffsets
16273*/
16274 __pyx_t_1 = __pyx_v_memview->view.shape;
16275
16276 __pyx_v_shape = __pyx_t_1;
16277
16278 /* "View.MemoryView":1066
16279 *
16280 * shape = memview.view.shape
16281 * strides = memview.view.strides # <<<<<<<<<<<<<<
16282 * suboffsets = memview.view.suboffsets
16283 *
16284*/
16285 __pyx_t_1 = __pyx_v_memview->view.strides;
16286
16287 __pyx_v_strides = __pyx_t_1;
16288
16289 /* "View.MemoryView":1067
16290 * shape = memview.view.shape
16291 * strides = memview.view.strides
16292 * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
16293 *
16294 * dst.memview = <__pyx_memoryview *> memview
16295*/
16296 __pyx_t_1 = __pyx_v_memview->view.suboffsets;
16297
16298 __pyx_v_suboffsets = __pyx_t_1;
16299
16300 /* "View.MemoryView":1069
16301 * suboffsets = memview.view.suboffsets
16302 *
16303 * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
16304 * dst.data = <char *> memview.view.buf
16305 *
16306*/
16307 __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
16308
16309 /* "View.MemoryView":1070
16310 *
16311 * dst.memview = <__pyx_memoryview *> memview
16312 * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
16313 *
16314 * for dim in range(memview.view.ndim):
16315*/
16316 __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
16317
16318 /* "View.MemoryView":1072
16319 * dst.data = <char *> memview.view.buf
16320 *
16321 * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
16322 * dst.shape[dim] = shape[dim]
16323 * dst.strides[dim] = strides[dim]
16324*/
16325
16326 __pyx_t_2 = __pyx_v_memview->view.ndim;
16327 __pyx_t_3 = __pyx_t_2;
16328
16329 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16330 __pyx_v_dim = __pyx_t_4;
16331
16332 /* "View.MemoryView":1073
16333 *
16334 * for dim in range(memview.view.ndim):
16335 * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
16336 * dst.strides[dim] = strides[dim]
16337 * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
16338*/
16339 (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
16340
16341 /* "View.MemoryView":1074
16342 * for dim in range(memview.view.ndim):
16343 * dst.shape[dim] = shape[dim]
16344 * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
16345 * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
16346 *
16347*/
16348 (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
16349
16350 /* "View.MemoryView":1075
16351 * dst.shape[dim] = shape[dim]
16352 * dst.strides[dim] = strides[dim]
16353 * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
16354 *
16355 * @cname('__pyx_memoryview_copy_object')
16356*/
16357 __pyx_t_6 = (__pyx_v_suboffsets != 0);
16358
16359 if (__pyx_t_6) {
16360
16361 __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
16362 } else {
16363
16364 __pyx_t_5 = -1L;
16365 }
16366
16367 (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
16368
16369 }
16370
16371
16372 /* "View.MemoryView":1060
16373 * return mslice
16374 *
16375 * @cname('__pyx_memoryview_slice_copy') # <<<<<<<<<<<<<<
16376 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:
16377 * cdef int dim
16378*/
16379
16380 /* function exit code */
16381
16382
16383
16384
16385
16386}
16387
16388/* "View.MemoryView":1077
16389 * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
16390 *
16391 * @cname('__pyx_memoryview_copy_object') # <<<<<<<<<<<<<<
16392 * cdef memoryview_copy(memoryview memview):
16393 * "Create a new memoryview object"
16394*/
16395
16396static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
16397 __Pyx_memviewslice __pyx_v_memviewslice;
16398 PyObject *__pyx_r = NULL;
16399 __Pyx_RefNannyDeclarations
16400 PyObject *__pyx_t_1 = NULL;
16401 int __pyx_lineno = 0;
16402 const char *__pyx_filename = NULL;
16403 int __pyx_clineno = 0;
16404 __Pyx_RefNannySetupContext("memoryview_copy", 0);
16405
16406 /* "View.MemoryView":1081
16407 * "Create a new memoryview object"
16408 * cdef __Pyx_memviewslice memviewslice
16409 * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
16410 * return memoryview_copy_from_slice(memview, &memviewslice)
16411 *
16412*/
16413 __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
16414
16415 /* "View.MemoryView":1082
16416 * cdef __Pyx_memviewslice memviewslice
16417 * slice_copy(memview, &memviewslice)
16418 * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
16419 *
16420 * @cname('__pyx_memoryview_copy_object_from_slice')
16421*/
16422 __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1082, __pyx_L1_error)
16423 __Pyx_GOTREF(__pyx_t_1);
16424 {
16425 PyObject *__pyx_temp;
16426 {
16427 __pyx_temp = __pyx_r;
16428 __pyx_r = __pyx_t_1;
16429 }
16430 __Pyx_XDECREF(__pyx_temp);
16431 }
16432 __pyx_t_1 = 0;
16433 goto __pyx_L0;
16434
16435 /* "View.MemoryView":1077
16436 * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
16437 *
16438 * @cname('__pyx_memoryview_copy_object') # <<<<<<<<<<<<<<
16439 * cdef memoryview_copy(memoryview memview):
16440 * "Create a new memoryview object"
16441*/
16442
16443 /* function exit code */
16444 __pyx_L1_error:;
16445 __Pyx_XDECREF(__pyx_t_1);
16446 __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
16447 __pyx_r = 0;
16448 __pyx_L0:;
16449
16450 __Pyx_XGIVEREF(__pyx_r);
16451 __Pyx_RefNannyFinishContext();
16452 return __pyx_r;
16453}
16454
16455/* "View.MemoryView":1084
16456 * return memoryview_copy_from_slice(memview, &memviewslice)
16457 *
16458 * @cname('__pyx_memoryview_copy_object_from_slice') # <<<<<<<<<<<<<<
16459 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):
16460 * """
16461*/
16462
16463static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
16464 PyObject *(*__pyx_v_to_object_func)(char *);
16465 __pyx_memoryview_to_dtype_func_type __pyx_v_to_dtype_func;
16466 PyObject *__pyx_r = NULL;
16467 __Pyx_RefNannyDeclarations
16468 int __pyx_t_1;
16469 PyObject *(*__pyx_t_2)(char *);
16470 __pyx_memoryview_to_dtype_func_type __pyx_t_3;
16471 PyObject *__pyx_t_4 = NULL;
16472 int __pyx_lineno = 0;
16473 const char *__pyx_filename = NULL;
16474 int __pyx_clineno = 0;
16475 __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
16476
16477 /* "View.MemoryView":1092
16478 * cdef to_dtype_func_type to_dtype_func
16479 *
16480 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
16481 * to_object_func = (<_memoryviewslice> memview).to_object_func
16482 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
16483*/
16484 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
16485 if (__pyx_t_1) {
16486
16487
16488 /* "View.MemoryView":1093
16489 *
16490 * if isinstance(memview, _memoryviewslice):
16491 * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
16492 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
16493 * else:
16494*/
16495 __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
16496
16497 __pyx_v_to_object_func = __pyx_t_2;
16498
16499 /* "View.MemoryView":1094
16500 * if isinstance(memview, _memoryviewslice):
16501 * to_object_func = (<_memoryviewslice> memview).to_object_func
16502 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
16503 * else:
16504 * to_object_func = NULL
16505*/
16506 __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
16507
16508 __pyx_v_to_dtype_func = __pyx_t_3;
16509
16510 /* "View.MemoryView":1092
16511 * cdef to_dtype_func_type to_dtype_func
16512 *
16513 * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
16514 * to_object_func = (<_memoryviewslice> memview).to_object_func
16515 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
16516*/
16517 goto __pyx_L3;
16518 }
16519
16520 /* "View.MemoryView":1096
16521 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
16522 * else:
16523 * to_object_func = NULL # <<<<<<<<<<<<<<
16524 * to_dtype_func = NULL
16525 *
16526*/
16527 /*else*/ {
16528 __pyx_v_to_object_func = NULL;
16529
16530 /* "View.MemoryView":1097
16531 * else:
16532 * to_object_func = NULL
16533 * to_dtype_func = NULL # <<<<<<<<<<<<<<
16534 *
16535 * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
16536*/
16537 __pyx_v_to_dtype_func = NULL;
16538 }
16539 __pyx_L3:;
16540
16541 /* "View.MemoryView":1099
16542 * to_dtype_func = NULL
16543 *
16544 * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
16545 * to_object_func, to_dtype_func,
16546 * memview.dtype_is_object)
16547*/
16548 __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1099, __pyx_L1_error)
16549 __Pyx_GOTREF(__pyx_t_4);
16550 {
16551 PyObject *__pyx_temp;
16552 {
16553 __pyx_temp = __pyx_r;
16554 __pyx_r = __pyx_t_4;
16555 }
16556 __Pyx_XDECREF(__pyx_temp);
16557 }
16558 __pyx_t_4 = 0;
16559 goto __pyx_L0;
16560
16561 /* "View.MemoryView":1084
16562 * return memoryview_copy_from_slice(memview, &memviewslice)
16563 *
16564 * @cname('__pyx_memoryview_copy_object_from_slice') # <<<<<<<<<<<<<<
16565 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):
16566 * """
16567*/
16568
16569 /* function exit code */
16570 __pyx_L1_error:;
16571 __Pyx_XDECREF(__pyx_t_4);
16572 __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16573 __pyx_r = 0;
16574 __pyx_L0:;
16575
16576
16577 __Pyx_XGIVEREF(__pyx_r);
16578 __Pyx_RefNannyFinishContext();
16579 return __pyx_r;
16580}
16581
16582/* "View.MemoryView":1107
16583 *
16584 *
16585 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<<
16586 * return -arg if arg < 0 else arg
16587 *
16588*/
16589
16590static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
16591 Py_ssize_t __pyx_r;
16592 Py_ssize_t __pyx_t_1;
16593 int __pyx_t_2;
16594
16595 /* "View.MemoryView":1108
16596 *
16597 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
16598 * return -arg if arg < 0 else arg # <<<<<<<<<<<<<<
16599 *
16600 * @cname('__pyx_get_best_slice_order')
16601*/
16602 __pyx_t_2 = (__pyx_v_arg < 0);
16603
16604 if (__pyx_t_2) {
16605
16606 __pyx_t_1 = (-__pyx_v_arg);
16607 } else {
16608
16609 __pyx_t_1 = __pyx_v_arg;
16610 }
16611
16612 {
16613 __pyx_r = __pyx_t_1;
16614 }
16615 goto __pyx_L0;
16616
16617 /* "View.MemoryView":1107
16618 *
16619 *
16620 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<<
16621 * return -arg if arg < 0 else arg
16622 *
16623*/
16624
16625 /* function exit code */
16626 __pyx_L0:;
16627 return __pyx_r;
16628}
16629
16630/* "View.MemoryView":1110
16631 * return -arg if arg < 0 else arg
16632 *
16633 * @cname('__pyx_get_best_slice_order') # <<<<<<<<<<<<<<
16634 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:
16635 * """
16636*/
16637
16638static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
16639 int __pyx_v_i;
16640 Py_ssize_t __pyx_v_c_stride;
16641 Py_ssize_t __pyx_v_f_stride;
16642 char __pyx_r;
16643 int __pyx_t_1;
16644 int __pyx_t_2;
16645 int __pyx_t_3;
16646 int __pyx_t_4;
16647
16648 /* "View.MemoryView":1116
16649 * """
16650 * cdef int i
16651 * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
16652 * cdef Py_ssize_t f_stride = 0
16653 *
16654*/
16655 __pyx_v_c_stride = 0;
16656
16657 /* "View.MemoryView":1117
16658 * cdef int i
16659 * cdef Py_ssize_t c_stride = 0
16660 * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
16661 *
16662 * for i in range(ndim - 1, -1, -1):
16663*/
16664 __pyx_v_f_stride = 0;
16665
16666 /* "View.MemoryView":1119
16667 * cdef Py_ssize_t f_stride = 0
16668 *
16669 * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
16670 * if mslice.shape[i] > 1:
16671 * c_stride = mslice.strides[i]
16672*/
16673 for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
16674 __pyx_v_i = __pyx_t_1;
16675
16676 /* "View.MemoryView":1120
16677 *
16678 * for i in range(ndim - 1, -1, -1):
16679 * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16680 * c_stride = mslice.strides[i]
16681 * break
16682*/
16683 __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
16684
16685 if (__pyx_t_2) {
16686
16687
16688 /* "View.MemoryView":1121
16689 * for i in range(ndim - 1, -1, -1):
16690 * if mslice.shape[i] > 1:
16691 * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
16692 * break
16693 *
16694*/
16695 __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16696
16697 /* "View.MemoryView":1122
16698 * if mslice.shape[i] > 1:
16699 * c_stride = mslice.strides[i]
16700 * break # <<<<<<<<<<<<<<
16701 *
16702 * for i in range(ndim):
16703*/
16704 goto __pyx_L4_break;
16705
16706 /* "View.MemoryView":1120
16707 *
16708 * for i in range(ndim - 1, -1, -1):
16709 * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16710 * c_stride = mslice.strides[i]
16711 * break
16712*/
16713 }
16714 }
16715 __pyx_L4_break:;
16716
16717 /* "View.MemoryView":1124
16718 * break
16719 *
16720 * for i in range(ndim): # <<<<<<<<<<<<<<
16721 * if mslice.shape[i] > 1:
16722 * f_stride = mslice.strides[i]
16723*/
16724
16725 __pyx_t_1 = __pyx_v_ndim;
16726 __pyx_t_3 = __pyx_t_1;
16727
16728 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16729 __pyx_v_i = __pyx_t_4;
16730
16731 /* "View.MemoryView":1125
16732 *
16733 * for i in range(ndim):
16734 * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16735 * f_stride = mslice.strides[i]
16736 * break
16737*/
16738 __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
16739
16740 if (__pyx_t_2) {
16741
16742
16743 /* "View.MemoryView":1126
16744 * for i in range(ndim):
16745 * if mslice.shape[i] > 1:
16746 * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
16747 * break
16748 *
16749*/
16750 __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16751
16752 /* "View.MemoryView":1127
16753 * if mslice.shape[i] > 1:
16754 * f_stride = mslice.strides[i]
16755 * break # <<<<<<<<<<<<<<
16756 *
16757 * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
16758*/
16759 goto __pyx_L7_break;
16760
16761 /* "View.MemoryView":1125
16762 *
16763 * for i in range(ndim):
16764 * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16765 * f_stride = mslice.strides[i]
16766 * break
16767*/
16768 }
16769 }
16770 __pyx_L7_break:;
16771
16772
16773 /* "View.MemoryView":1129
16774 * break
16775 *
16776 * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
16777 * return 'C'
16778 * else:
16779*/
16780 __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
16781
16782 if (__pyx_t_2) {
16783
16784
16785 /* "View.MemoryView":1130
16786 *
16787 * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
16788 * return 'C' # <<<<<<<<<<<<<<
16789 * else:
16790 * return 'F'
16791*/
16792 {
16793
16794 __pyx_r = 'C';
16795 }
16796 goto __pyx_L0;
16797
16798 /* "View.MemoryView":1129
16799 * break
16800 *
16801 * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
16802 * return 'C'
16803 * else:
16804*/
16805 }
16806
16807 /* "View.MemoryView":1132
16808 * return 'C'
16809 * else:
16810 * return 'F' # <<<<<<<<<<<<<<
16811 *
16812 * @cython.cdivision(True)
16813*/
16814 /*else*/ {
16815 {
16816
16817 __pyx_r = 'F';
16818 }
16819 goto __pyx_L0;
16820 }
16821
16822 /* "View.MemoryView":1110
16823 * return -arg if arg < 0 else arg
16824 *
16825 * @cname('__pyx_get_best_slice_order') # <<<<<<<<<<<<<<
16826 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:
16827 * """
16828*/
16829
16830 /* function exit code */
16831 __pyx_L0:;
16832
16833
16834
16835 return __pyx_r;
16836}
16837
16838/* "View.MemoryView":1134
16839 * return 'F'
16840 *
16841 * @cython.cdivision(True) # <<<<<<<<<<<<<<
16842 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,
16843 * char *dst_data, Py_ssize_t *dst_strides,
16844*/
16845
16846static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
16847 CYTHON_UNUSED Py_ssize_t __pyx_v_i;
16848 CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
16849 Py_ssize_t __pyx_v_dst_extent;
16850 Py_ssize_t __pyx_v_src_stride;
16851 Py_ssize_t __pyx_v_dst_stride;
16852 int __pyx_t_1;
16853 int __pyx_t_2;
16854 Py_ssize_t __pyx_t_3;
16855 Py_ssize_t __pyx_t_4;
16856 Py_ssize_t __pyx_t_5;
16857
16858
16859
16860 /* "View.MemoryView":1142
16861 *
16862 * cdef Py_ssize_t i
16863 * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
16864 * cdef Py_ssize_t dst_extent = dst_shape[0]
16865 * cdef Py_ssize_t src_stride = src_strides[0]
16866*/
16867 __pyx_v_src_extent = (__pyx_v_src_shape[0]);
16868
16869 /* "View.MemoryView":1143
16870 * cdef Py_ssize_t i
16871 * cdef Py_ssize_t src_extent = src_shape[0]
16872 * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
16873 * cdef Py_ssize_t src_stride = src_strides[0]
16874 * cdef Py_ssize_t dst_stride = dst_strides[0]
16875*/
16876 __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
16877
16878 /* "View.MemoryView":1144
16879 * cdef Py_ssize_t src_extent = src_shape[0]
16880 * cdef Py_ssize_t dst_extent = dst_shape[0]
16881 * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
16882 * cdef Py_ssize_t dst_stride = dst_strides[0]
16883 *
16884*/
16885 __pyx_v_src_stride = (__pyx_v_src_strides[0]);
16886
16887 /* "View.MemoryView":1145
16888 * cdef Py_ssize_t dst_extent = dst_shape[0]
16889 * cdef Py_ssize_t src_stride = src_strides[0]
16890 * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
16891 *
16892 * if ndim == 1:
16893*/
16894 __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
16895
16896 /* "View.MemoryView":1147
16897 * cdef Py_ssize_t dst_stride = dst_strides[0]
16898 *
16899 * if ndim == 1: # <<<<<<<<<<<<<<
16900 * if (src_stride > 0 and dst_stride > 0 and
16901 * <size_t> src_stride == itemsize == <size_t> dst_stride):
16902*/
16903 __pyx_t_1 = (__pyx_v_ndim == 1);
16904
16905 if (__pyx_t_1) {
16906
16907
16908 /* "View.MemoryView":1148
16909 *
16910 * if ndim == 1:
16911 * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16912 * <size_t> src_stride == itemsize == <size_t> dst_stride):
16913 * memcpy(dst_data, src_data, itemsize * <size_t> dst_extent)
16914*/
16915 __pyx_t_2 = (__pyx_v_src_stride > 0);
16916
16917 if (__pyx_t_2) {
16918
16919 } else {
16920
16921 __pyx_t_1 = __pyx_t_2;
16922
16923 goto __pyx_L5_bool_binop_done;
16924 }
16925 __pyx_t_2 = (__pyx_v_dst_stride > 0);
16926
16927 if (__pyx_t_2) {
16928
16929 } else {
16930
16931 __pyx_t_1 = __pyx_t_2;
16932
16933 goto __pyx_L5_bool_binop_done;
16934 }
16935
16936 /* "View.MemoryView":1149
16937 * if ndim == 1:
16938 * if (src_stride > 0 and dst_stride > 0 and
16939 * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
16940 * memcpy(dst_data, src_data, itemsize * <size_t> dst_extent)
16941 * else:
16942*/
16943 __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
16944 if (__pyx_t_2) {
16945 __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
16946 }
16947
16948 __pyx_t_1 = __pyx_t_2;
16949
16950 __pyx_L5_bool_binop_done:;
16951
16952 /* "View.MemoryView":1148
16953 *
16954 * if ndim == 1:
16955 * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16956 * <size_t> src_stride == itemsize == <size_t> dst_stride):
16957 * memcpy(dst_data, src_data, itemsize * <size_t> dst_extent)
16958*/
16959 if (__pyx_t_1) {
16960
16961
16962 /* "View.MemoryView":1150
16963 * if (src_stride > 0 and dst_stride > 0 and
16964 * <size_t> src_stride == itemsize == <size_t> dst_stride):
16965 * memcpy(dst_data, src_data, itemsize * <size_t> dst_extent) # <<<<<<<<<<<<<<
16966 * else:
16967 * for i in range(dst_extent):
16968*/
16969 (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * ((size_t)__pyx_v_dst_extent))));
16970
16971 /* "View.MemoryView":1148
16972 *
16973 * if ndim == 1:
16974 * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16975 * <size_t> src_stride == itemsize == <size_t> dst_stride):
16976 * memcpy(dst_data, src_data, itemsize * <size_t> dst_extent)
16977*/
16978 goto __pyx_L4;
16979 }
16980
16981 /* "View.MemoryView":1152
16982 * memcpy(dst_data, src_data, itemsize * <size_t> dst_extent)
16983 * else:
16984 * for i in range(dst_extent): # <<<<<<<<<<<<<<
16985 * memcpy(dst_data, src_data, itemsize)
16986 * src_data += src_stride
16987*/
16988 /*else*/ {
16989
16990 __pyx_t_3 = __pyx_v_dst_extent;
16991 __pyx_t_4 = __pyx_t_3;
16992
16993 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
16994 __pyx_v_i = __pyx_t_5;
16995
16996 /* "View.MemoryView":1153
16997 * else:
16998 * for i in range(dst_extent):
16999 * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
17000 * src_data += src_stride
17001 * dst_data += dst_stride
17002*/
17003 (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
17004
17005 /* "View.MemoryView":1154
17006 * for i in range(dst_extent):
17007 * memcpy(dst_data, src_data, itemsize)
17008 * src_data += src_stride # <<<<<<<<<<<<<<
17009 * dst_data += dst_stride
17010 * else:
17011*/
17012 __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17013
17014 /* "View.MemoryView":1155
17015 * memcpy(dst_data, src_data, itemsize)
17016 * src_data += src_stride
17017 * dst_data += dst_stride # <<<<<<<<<<<<<<
17018 * else:
17019 * for i in range(dst_extent):
17020*/
17021 __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17022 }
17023
17024 }
17025 __pyx_L4:;
17026
17027 /* "View.MemoryView":1147
17028 * cdef Py_ssize_t dst_stride = dst_strides[0]
17029 *
17030 * if ndim == 1: # <<<<<<<<<<<<<<
17031 * if (src_stride > 0 and dst_stride > 0 and
17032 * <size_t> src_stride == itemsize == <size_t> dst_stride):
17033*/
17034 goto __pyx_L3;
17035 }
17036
17037 /* "View.MemoryView":1157
17038 * dst_data += dst_stride
17039 * else:
17040 * for i in range(dst_extent): # <<<<<<<<<<<<<<
17041 * _copy_strided_to_strided(src_data, src_strides + 1,
17042 * dst_data, dst_strides + 1,
17043*/
17044 /*else*/ {
17045
17046 __pyx_t_3 = __pyx_v_dst_extent;
17047 __pyx_t_4 = __pyx_t_3;
17048
17049 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
17050 __pyx_v_i = __pyx_t_5;
17051
17052 /* "View.MemoryView":1158
17053 * else:
17054 * for i in range(dst_extent):
17055 * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
17056 * dst_data, dst_strides + 1,
17057 * src_shape + 1, dst_shape + 1,
17058*/
17059 _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
17060
17061 /* "View.MemoryView":1162
17062 * src_shape + 1, dst_shape + 1,
17063 * ndim - 1, itemsize)
17064 * src_data += src_stride # <<<<<<<<<<<<<<
17065 * dst_data += dst_stride
17066 *
17067*/
17068 __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17069
17070 /* "View.MemoryView":1163
17071 * ndim - 1, itemsize)
17072 * src_data += src_stride
17073 * dst_data += dst_stride # <<<<<<<<<<<<<<
17074 *
17075 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
17076*/
17077 __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17078 }
17079
17080 }
17081 __pyx_L3:;
17082
17083 /* "View.MemoryView":1134
17084 * return 'F'
17085 *
17086 * @cython.cdivision(True) # <<<<<<<<<<<<<<
17087 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,
17088 * char *dst_data, Py_ssize_t *dst_strides,
17089*/
17090
17091 /* function exit code */
17092
17093
17094
17095
17096
17097
17098
17099}
17100
17101/* "View.MemoryView":1165
17102 * dst_data += dst_stride
17103 *
17104 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
17105 * __Pyx_memviewslice *dst,
17106 * int ndim, size_t itemsize) noexcept nogil:
17107*/
17108
17109static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
17110
17111 /* "View.MemoryView":1168
17112 * __Pyx_memviewslice *dst,
17113 * int ndim, size_t itemsize) noexcept nogil:
17114 * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
17115 * src.shape, dst.shape, ndim, itemsize)
17116 *
17117*/
17118 _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
17119
17120 /* "View.MemoryView":1165
17121 * dst_data += dst_stride
17122 *
17123 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
17124 * __Pyx_memviewslice *dst,
17125 * int ndim, size_t itemsize) noexcept nogil:
17126*/
17127
17128 /* function exit code */
17129}
17130
17131/* "View.MemoryView":1171
17132 * src.shape, dst.shape, ndim, itemsize)
17133 *
17134 * @cname('__pyx_memoryview_slice_get_size') # <<<<<<<<<<<<<<
17135 * cdef size_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
17136 * "Return the size of the memory occupied by the slice in number of bytes"
17137*/
17138
17139static size_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
17140 Py_ssize_t __pyx_v_shape;
17141 size_t __pyx_v_size;
17142 size_t __pyx_r;
17143 Py_ssize_t *__pyx_t_1;
17144 Py_ssize_t *__pyx_t_2;
17145 Py_ssize_t *__pyx_t_3;
17146
17147 /* "View.MemoryView":1175
17148 * "Return the size of the memory occupied by the slice in number of bytes"
17149 * cdef Py_ssize_t shape
17150 * cdef size_t size = <size_t> src.memview.view.itemsize # <<<<<<<<<<<<<<
17151 *
17152 * for shape in src.shape[:ndim]:
17153*/
17154 __pyx_v_size = ((size_t)__pyx_v_src->memview->view.itemsize);
17155
17156 /* "View.MemoryView":1177
17157 * cdef size_t size = <size_t> src.memview.view.itemsize
17158 *
17159 * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
17160 * size *= <size_t> shape
17161 *
17162*/
17163 __pyx_t_2 = (__pyx_v_src->shape + __pyx_v_ndim);
17164
17165 for (__pyx_t_3 = __pyx_v_src->shape; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
17166 __pyx_t_1 = __pyx_t_3;
17167 __pyx_v_shape = (__pyx_t_1[0]);
17168
17169 /* "View.MemoryView":1178
17170 *
17171 * for shape in src.shape[:ndim]:
17172 * size *= <size_t> shape # <<<<<<<<<<<<<<
17173 *
17174 * return size
17175*/
17176 __pyx_v_size = (__pyx_v_size * ((size_t)__pyx_v_shape));
17177 }
17178
17179
17180 /* "View.MemoryView":1180
17181 * size *= <size_t> shape
17182 *
17183 * return size # <<<<<<<<<<<<<<
17184 *
17185 * @cname('__pyx_fill_contig_strides_array')
17186*/
17187 {
17188
17189 __pyx_r = __pyx_v_size;
17190 }
17191 goto __pyx_L0;
17192
17193 /* "View.MemoryView":1171
17194 * src.shape, dst.shape, ndim, itemsize)
17195 *
17196 * @cname('__pyx_memoryview_slice_get_size') # <<<<<<<<<<<<<<
17197 * cdef size_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
17198 * "Return the size of the memory occupied by the slice in number of bytes"
17199*/
17200
17201 /* function exit code */
17202 __pyx_L0:;
17203
17204
17205 return __pyx_r;
17206}
17207
17208/* "View.MemoryView":1182
17209 * return size
17210 *
17211 * @cname('__pyx_fill_contig_strides_array') # <<<<<<<<<<<<<<
17212 * cdef Py_ssize_t fill_contig_strides_array(
17213 * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
17214*/
17215
17216static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
17217 int __pyx_v_idx;
17218 Py_ssize_t __pyx_r;
17219 int __pyx_t_1;
17220 int __pyx_t_2;
17221 int __pyx_t_3;
17222 int __pyx_t_4;
17223
17224
17225 /* "View.MemoryView":1192
17226 * cdef int idx
17227 *
17228 * if order == 'F': # <<<<<<<<<<<<<<
17229 * for idx in range(ndim):
17230 * strides[idx] = stride
17231*/
17232 __pyx_t_1 = (__pyx_v_order == 'F');
17233
17234 if (__pyx_t_1) {
17235
17236
17237 /* "View.MemoryView":1193
17238 *
17239 * if order == 'F':
17240 * for idx in range(ndim): # <<<<<<<<<<<<<<
17241 * strides[idx] = stride
17242 * stride *= shape[idx]
17243*/
17244
17245 __pyx_t_2 = __pyx_v_ndim;
17246 __pyx_t_3 = __pyx_t_2;
17247
17248 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17249 __pyx_v_idx = __pyx_t_4;
17250
17251 /* "View.MemoryView":1194
17252 * if order == 'F':
17253 * for idx in range(ndim):
17254 * strides[idx] = stride # <<<<<<<<<<<<<<
17255 * stride *= shape[idx]
17256 * else:
17257*/
17258 (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
17259
17260 /* "View.MemoryView":1195
17261 * for idx in range(ndim):
17262 * strides[idx] = stride
17263 * stride *= shape[idx] # <<<<<<<<<<<<<<
17264 * else:
17265 * for idx in range(ndim - 1, -1, -1):
17266*/
17267 __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
17268 }
17269
17270
17271 /* "View.MemoryView":1192
17272 * cdef int idx
17273 *
17274 * if order == 'F': # <<<<<<<<<<<<<<
17275 * for idx in range(ndim):
17276 * strides[idx] = stride
17277*/
17278 goto __pyx_L3;
17279 }
17280
17281 /* "View.MemoryView":1197
17282 * stride *= shape[idx]
17283 * else:
17284 * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
17285 * strides[idx] = stride
17286 * stride *= shape[idx]
17287*/
17288 /*else*/ {
17289 for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
17290 __pyx_v_idx = __pyx_t_2;
17291
17292 /* "View.MemoryView":1198
17293 * else:
17294 * for idx in range(ndim - 1, -1, -1):
17295 * strides[idx] = stride # <<<<<<<<<<<<<<
17296 * stride *= shape[idx]
17297 *
17298*/
17299 (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
17300
17301 /* "View.MemoryView":1199
17302 * for idx in range(ndim - 1, -1, -1):
17303 * strides[idx] = stride
17304 * stride *= shape[idx] # <<<<<<<<<<<<<<
17305 *
17306 * return stride
17307*/
17308 __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
17309 }
17310 }
17311 __pyx_L3:;
17312
17313 /* "View.MemoryView":1201
17314 * stride *= shape[idx]
17315 *
17316 * return stride # <<<<<<<<<<<<<<
17317 *
17318 * @cname('__pyx_memoryview_copy_data_to_temp')
17319*/
17320 {
17321
17322 __pyx_r = __pyx_v_stride;
17323 }
17324 goto __pyx_L0;
17325
17326 /* "View.MemoryView":1182
17327 * return size
17328 *
17329 * @cname('__pyx_fill_contig_strides_array') # <<<<<<<<<<<<<<
17330 * cdef Py_ssize_t fill_contig_strides_array(
17331 * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
17332*/
17333
17334 /* function exit code */
17335 __pyx_L0:;
17336
17337
17338 return __pyx_r;
17339}
17340
17341/* "View.MemoryView":1203
17342 * return stride
17343 *
17344 * @cname('__pyx_memoryview_copy_data_to_temp') # <<<<<<<<<<<<<<
17345 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,
17346 * __Pyx_memviewslice *tmpslice,
17347*/
17348
17349static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
17350 int __pyx_v_i;
17351 void *__pyx_v_result;
17352 size_t __pyx_v_itemsize;
17353 size_t __pyx_v_size;
17354 void *__pyx_r;
17355 int __pyx_t_1;
17356 int __pyx_t_2;
17357 struct __pyx_memoryview_obj *__pyx_t_3;
17358 int __pyx_t_4;
17359 int __pyx_t_5;
17360 int __pyx_lineno = 0;
17361 const char *__pyx_filename = NULL;
17362 int __pyx_clineno = 0;
17363 PyGILState_STATE __pyx_gilstate_save;
17364
17365 /* "View.MemoryView":1215
17366 * cdef void *result
17367 *
17368 * cdef size_t itemsize = <size_t> src.memview.view.itemsize # <<<<<<<<<<<<<<
17369 * cdef size_t size = slice_get_size(src, ndim)
17370 *
17371*/
17372 __pyx_v_itemsize = ((size_t)__pyx_v_src->memview->view.itemsize);
17373
17374 /* "View.MemoryView":1216
17375 *
17376 * cdef size_t itemsize = <size_t> src.memview.view.itemsize
17377 * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
17378 *
17379 * result = malloc(size)
17380*/
17381 __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
17382
17383 /* "View.MemoryView":1218
17384 * cdef size_t size = slice_get_size(src, ndim)
17385 *
17386 * result = malloc(size) # <<<<<<<<<<<<<<
17387 * if cython.unlikely(not result):
17388 * _err_no_memory()
17389*/
17390 __pyx_v_result = malloc(__pyx_v_size);
17391
17392 /* "View.MemoryView":1219
17393 *
17394 * result = malloc(size)
17395 * if cython.unlikely(not result): # <<<<<<<<<<<<<<
17396 * _err_no_memory()
17397 *
17398*/
17399 __pyx_t_1 = (!(__pyx_v_result != 0));
17400
17401 if (unlikely(__pyx_t_1)) {
17402
17403
17404 /* "View.MemoryView":1220
17405 * result = malloc(size)
17406 * if cython.unlikely(not result):
17407 * _err_no_memory() # <<<<<<<<<<<<<<
17408 *
17409 *
17410*/
17411 __pyx_t_2 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1220, __pyx_L1_error)
17412
17413
17414 /* "View.MemoryView":1219
17415 *
17416 * result = malloc(size)
17417 * if cython.unlikely(not result): # <<<<<<<<<<<<<<
17418 * _err_no_memory()
17419 *
17420*/
17421 }
17422
17423 /* "View.MemoryView":1223
17424 *
17425 *
17426 * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
17427 * tmpslice.memview = src.memview
17428 * for i in range(ndim):
17429*/
17430 __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
17431
17432 /* "View.MemoryView":1224
17433 *
17434 * tmpslice.data = <char *> result
17435 * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
17436 * for i in range(ndim):
17437 * tmpslice.shape[i] = src.shape[i]
17438*/
17439 __pyx_t_3 = __pyx_v_src->memview;
17440
17441 __pyx_v_tmpslice->memview = __pyx_t_3;
17442
17443 /* "View.MemoryView":1225
17444 * tmpslice.data = <char *> result
17445 * tmpslice.memview = src.memview
17446 * for i in range(ndim): # <<<<<<<<<<<<<<
17447 * tmpslice.shape[i] = src.shape[i]
17448 * tmpslice.suboffsets[i] = -1
17449*/
17450
17451 __pyx_t_2 = __pyx_v_ndim;
17452 __pyx_t_4 = __pyx_t_2;
17453
17454 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
17455 __pyx_v_i = __pyx_t_5;
17456
17457 /* "View.MemoryView":1226
17458 * tmpslice.memview = src.memview
17459 * for i in range(ndim):
17460 * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
17461 * tmpslice.suboffsets[i] = -1
17462 *
17463*/
17464 (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
17465
17466 /* "View.MemoryView":1227
17467 * for i in range(ndim):
17468 * tmpslice.shape[i] = src.shape[i]
17469 * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
17470 *
17471 * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], <Py_ssize_t> itemsize, ndim, order)
17472*/
17473 (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
17474 }
17475
17476
17477 /* "View.MemoryView":1229
17478 * tmpslice.suboffsets[i] = -1
17479 *
17480 * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], <Py_ssize_t> itemsize, ndim, order) # <<<<<<<<<<<<<<
17481 *
17482 *
17483*/
17484 (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), ((Py_ssize_t)__pyx_v_itemsize), __pyx_v_ndim, __pyx_v_order));
17485
17486 /* "View.MemoryView":1232
17487 *
17488 *
17489 * for i in range(ndim): # <<<<<<<<<<<<<<
17490 * if tmpslice.shape[i] == 1:
17491 * tmpslice.strides[i] = 0
17492*/
17493
17494 __pyx_t_2 = __pyx_v_ndim;
17495 __pyx_t_4 = __pyx_t_2;
17496
17497 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
17498 __pyx_v_i = __pyx_t_5;
17499
17500 /* "View.MemoryView":1233
17501 *
17502 * for i in range(ndim):
17503 * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
17504 * tmpslice.strides[i] = 0
17505 *
17506*/
17507 __pyx_t_1 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
17508
17509 if (__pyx_t_1) {
17510
17511
17512 /* "View.MemoryView":1234
17513 * for i in range(ndim):
17514 * if tmpslice.shape[i] == 1:
17515 * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
17516 *
17517 * if slice_is_contig(src[0], order, ndim):
17518*/
17519 (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
17520
17521 /* "View.MemoryView":1233
17522 *
17523 * for i in range(ndim):
17524 * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
17525 * tmpslice.strides[i] = 0
17526 *
17527*/
17528 }
17529 }
17530
17531
17532 /* "View.MemoryView":1236
17533 * tmpslice.strides[i] = 0
17534 *
17535 * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
17536 * memcpy(result, src.data, size)
17537 * else:
17538*/
17539 __pyx_t_1 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
17540
17541 if (__pyx_t_1) {
17542
17543
17544 /* "View.MemoryView":1237
17545 *
17546 * if slice_is_contig(src[0], order, ndim):
17547 * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
17548 * else:
17549 * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
17550*/
17551 (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
17552
17553 /* "View.MemoryView":1236
17554 * tmpslice.strides[i] = 0
17555 *
17556 * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
17557 * memcpy(result, src.data, size)
17558 * else:
17559*/
17560 goto __pyx_L9;
17561 }
17562
17563 /* "View.MemoryView":1239
17564 * memcpy(result, src.data, size)
17565 * else:
17566 * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
17567 *
17568 * return result
17569*/
17570 /*else*/ {
17571 copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
17572 }
17573 __pyx_L9:;
17574
17575 /* "View.MemoryView":1241
17576 * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
17577 *
17578 * return result # <<<<<<<<<<<<<<
17579 *
17580 *
17581*/
17582 {
17583
17584 __pyx_r = __pyx_v_result;
17585 }
17586 goto __pyx_L0;
17587
17588 /* "View.MemoryView":1203
17589 * return stride
17590 *
17591 * @cname('__pyx_memoryview_copy_data_to_temp') # <<<<<<<<<<<<<<
17592 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,
17593 * __Pyx_memviewslice *tmpslice,
17594*/
17595
17596 /* function exit code */
17597 __pyx_L1_error:;
17598 __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17599 __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
17600 __pyx_r = NULL;
17601 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17602 __pyx_L0:;
17603
17604
17605
17606
17607 return __pyx_r;
17608}
17609
17610/* "View.MemoryView":1246
17611 *
17612 *
17613 * @cname('__pyx_memoryview_err_extents') # <<<<<<<<<<<<<<
17614 * cdef int _err_extents(int i, Py_ssize_t extent1,
17615 * Py_ssize_t extent2) except -1 with gil:
17616*/
17617
17618static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
17619 int __pyx_r;
17620 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17621
17622
17623
17624
17625 /* "View.MemoryView":1249
17626 * cdef int _err_extents(int i, Py_ssize_t extent1,
17627 * Py_ssize_t extent2) except -1 with gil:
17628 * PyErr_Format( # <<<<<<<<<<<<<<
17629 * PyExc_ValueError,
17630 * "got differing extents in dimension %d (got %zd and %zd)",
17631*/
17632 (void)(PyErr_Format(PyExc_ValueError, __pyx_k_got_differing_extents_in_dimensi, __pyx_v_i, __pyx_v_extent1, __pyx_v_extent2));
17633
17634 /* "View.MemoryView":1253
17635 * "got differing extents in dimension %d (got %zd and %zd)",
17636 * i, extent1, extent2)
17637 * return -1 # <<<<<<<<<<<<<<
17638 *
17639 * @cname('__pyx_memoryview_err_dim')
17640*/
17641 {
17642
17643 __pyx_r = -1;
17644 }
17645 goto __pyx_L0;
17646
17647 /* "View.MemoryView":1246
17648 *
17649 *
17650 * @cname('__pyx_memoryview_err_extents') # <<<<<<<<<<<<<<
17651 * cdef int _err_extents(int i, Py_ssize_t extent1,
17652 * Py_ssize_t extent2) except -1 with gil:
17653*/
17654
17655 /* function exit code */
17656 __pyx_L0:;
17657
17658
17659
17660
17661 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17662 return __pyx_r;
17663}
17664
17665/* "View.MemoryView":1255
17666 * return -1
17667 *
17668 * @cname('__pyx_memoryview_err_dim') # <<<<<<<<<<<<<<
17669 * cdef int _err_dim(PyObject *error, const char* msg, int dim) except -1 with gil:
17670 * PyErr_Format(error, msg, dim)
17671*/
17672
17673static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char const *__pyx_v_msg, int __pyx_v_dim) {
17674 int __pyx_r;
17675 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17676
17677
17678
17679
17680 /* "View.MemoryView":1257
17681 * @cname('__pyx_memoryview_err_dim')
17682 * cdef int _err_dim(PyObject *error, const char* msg, int dim) except -1 with gil:
17683 * PyErr_Format(error, msg, dim) # <<<<<<<<<<<<<<
17684 * return -1
17685 *
17686*/
17687 (void)(PyErr_Format(__pyx_v_error, __pyx_v_msg, __pyx_v_dim));
17688
17689 /* "View.MemoryView":1258
17690 * cdef int _err_dim(PyObject *error, const char* msg, int dim) except -1 with gil:
17691 * PyErr_Format(error, msg, dim)
17692 * return -1 # <<<<<<<<<<<<<<
17693 *
17694 * @cname('__pyx_memoryview_err')
17695*/
17696 {
17697
17698 __pyx_r = -1;
17699 }
17700 goto __pyx_L0;
17701
17702 /* "View.MemoryView":1255
17703 * return -1
17704 *
17705 * @cname('__pyx_memoryview_err_dim') # <<<<<<<<<<<<<<
17706 * cdef int _err_dim(PyObject *error, const char* msg, int dim) except -1 with gil:
17707 * PyErr_Format(error, msg, dim)
17708*/
17709
17710 /* function exit code */
17711 __pyx_L0:;
17712
17713
17714
17715
17716 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17717 return __pyx_r;
17718}
17719
17720/* "View.MemoryView":1260
17721 * return -1
17722 *
17723 * @cname('__pyx_memoryview_err') # <<<<<<<<<<<<<<
17724 * cdef int _err(PyObject *error, const char* msg) except -1 with gil:
17725 * PyErr_SetString(error, msg)
17726*/
17727
17728static int __pyx_memoryview_err(PyObject *__pyx_v_error, char const *__pyx_v_msg) {
17729 int __pyx_r;
17730 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17731
17732
17733
17734 /* "View.MemoryView":1262
17735 * @cname('__pyx_memoryview_err')
17736 * cdef int _err(PyObject *error, const char* msg) except -1 with gil:
17737 * PyErr_SetString(error, msg) # <<<<<<<<<<<<<<
17738 * return -1
17739 *
17740*/
17741 (void)(PyErr_SetString(__pyx_v_error, __pyx_v_msg));
17742
17743 /* "View.MemoryView":1263
17744 * cdef int _err(PyObject *error, const char* msg) except -1 with gil:
17745 * PyErr_SetString(error, msg)
17746 * return -1 # <<<<<<<<<<<<<<
17747 *
17748 * @cname('__pyx_memoryview_err_no_memory')
17749*/
17750 {
17751
17752 __pyx_r = -1;
17753 }
17754 goto __pyx_L0;
17755
17756 /* "View.MemoryView":1260
17757 * return -1
17758 *
17759 * @cname('__pyx_memoryview_err') # <<<<<<<<<<<<<<
17760 * cdef int _err(PyObject *error, const char* msg) except -1 with gil:
17761 * PyErr_SetString(error, msg)
17762*/
17763
17764 /* function exit code */
17765 __pyx_L0:;
17766
17767
17768
17769 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17770 return __pyx_r;
17771}
17772
17773/* "View.MemoryView":1265
17774 * return -1
17775 *
17776 * @cname('__pyx_memoryview_err_no_memory') # <<<<<<<<<<<<<<
17777 * cdef int _err_no_memory() except -1 with gil:
17778 * raise MemoryError
17779*/
17780
17781static int __pyx_memoryview_err_no_memory(void) {
17782 int __pyx_r;
17783 int __pyx_lineno = 0;
17784 const char *__pyx_filename = NULL;
17785 int __pyx_clineno = 0;
17786 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17787
17788 /* "View.MemoryView":1267
17789 * @cname('__pyx_memoryview_err_no_memory')
17790 * cdef int _err_no_memory() except -1 with gil:
17791 * raise MemoryError # <<<<<<<<<<<<<<
17792 *
17793 *
17794*/
17795 PyErr_NoMemory(); __PYX_ERR(1, 1267, __pyx_L1_error)
17796
17797 /* "View.MemoryView":1265
17798 * return -1
17799 *
17800 * @cname('__pyx_memoryview_err_no_memory') # <<<<<<<<<<<<<<
17801 * cdef int _err_no_memory() except -1 with gil:
17802 * raise MemoryError
17803*/
17804
17805 /* function exit code */
17806 __pyx_L1_error:;
17807 __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
17808 __pyx_r = -1;
17809
17810 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17811 return __pyx_r;
17812}
17813
17814/* "View.MemoryView":1271
17815 *
17816 *
17817 * @cname('__pyx_memoryview_err_ValueError') # <<<<<<<<<<<<<<
17818 * cdef int _err_ValueError(const char* msg) except -1:
17819 * PyErr_SetString(PyExc_ValueError, msg)
17820*/
17821
17822static int __pyx_memoryview_err_ValueError(char const *__pyx_v_msg) {
17823 int __pyx_r;
17824
17825 /* "View.MemoryView":1273
17826 * @cname('__pyx_memoryview_err_ValueError')
17827 * cdef int _err_ValueError(const char* msg) except -1:
17828 * PyErr_SetString(PyExc_ValueError, msg) # <<<<<<<<<<<<<<
17829 * return -1
17830 *
17831*/
17832 (void)(PyErr_SetString(PyExc_ValueError, __pyx_v_msg));
17833
17834 /* "View.MemoryView":1274
17835 * cdef int _err_ValueError(const char* msg) except -1:
17836 * PyErr_SetString(PyExc_ValueError, msg)
17837 * return -1 # <<<<<<<<<<<<<<
17838 *
17839 * @cname('__pyx_memoryview_err_IndexError')
17840*/
17841 {
17842
17843 __pyx_r = -1;
17844 }
17845 goto __pyx_L0;
17846
17847 /* "View.MemoryView":1271
17848 *
17849 *
17850 * @cname('__pyx_memoryview_err_ValueError') # <<<<<<<<<<<<<<
17851 * cdef int _err_ValueError(const char* msg) except -1:
17852 * PyErr_SetString(PyExc_ValueError, msg)
17853*/
17854
17855 /* function exit code */
17856 __pyx_L0:;
17857
17858 return __pyx_r;
17859}
17860
17861/* "View.MemoryView":1276
17862 * return -1
17863 *
17864 * @cname('__pyx_memoryview_err_IndexError') # <<<<<<<<<<<<<<
17865 * cdef int _err_IndexError(const char* msg, Py_ssize_t index) except -1:
17866 * PyErr_Format(PyExc_IndexError, msg, index)
17867*/
17868
17869static int __pyx_memoryview_err_IndexError(char const *__pyx_v_msg, Py_ssize_t __pyx_v_index) {
17870 int __pyx_r;
17871
17872 /* "View.MemoryView":1278
17873 * @cname('__pyx_memoryview_err_IndexError')
17874 * cdef int _err_IndexError(const char* msg, Py_ssize_t index) except -1:
17875 * PyErr_Format(PyExc_IndexError, msg, index) # <<<<<<<<<<<<<<
17876 * return -1
17877 *
17878*/
17879 (void)(PyErr_Format(PyExc_IndexError, __pyx_v_msg, __pyx_v_index));
17880
17881 /* "View.MemoryView":1279
17882 * cdef int _err_IndexError(const char* msg, Py_ssize_t index) except -1:
17883 * PyErr_Format(PyExc_IndexError, msg, index)
17884 * return -1 # <<<<<<<<<<<<<<
17885 *
17886 *
17887*/
17888 {
17889
17890 __pyx_r = -1;
17891 }
17892 goto __pyx_L0;
17893
17894 /* "View.MemoryView":1276
17895 * return -1
17896 *
17897 * @cname('__pyx_memoryview_err_IndexError') # <<<<<<<<<<<<<<
17898 * cdef int _err_IndexError(const char* msg, Py_ssize_t index) except -1:
17899 * PyErr_Format(PyExc_IndexError, msg, index)
17900*/
17901
17902 /* function exit code */
17903 __pyx_L0:;
17904
17905 return __pyx_r;
17906}
17907
17908/* "View.MemoryView":1282
17909 *
17910 *
17911 * @cname('__pyx_memoryview_copy_contents') # <<<<<<<<<<<<<<
17912 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,
17913 * __Pyx_memviewslice dst,
17914*/
17915
17916static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
17917 void *__pyx_v_tmpdata;
17918 size_t __pyx_v_itemsize;
17919 int __pyx_v_i;
17920 char __pyx_v_order;
17921 int __pyx_v_broadcasting;
17922 int __pyx_v_direct_copy;
17923 __Pyx_memviewslice __pyx_v_tmp;
17924 int __pyx_v_ndim;
17925 int __pyx_r;
17926 int __pyx_t_1;
17927 int __pyx_t_2;
17928 int __pyx_t_3;
17929 int __pyx_t_4;
17930 int __pyx_t_5;
17931 void *__pyx_t_6;
17932 int __pyx_lineno = 0;
17933 const char *__pyx_filename = NULL;
17934 int __pyx_clineno = 0;
17935 PyGILState_STATE __pyx_gilstate_save;
17936
17937
17938 /* "View.MemoryView":1291
17939 * Check for overlapping memory and verify the shapes.
17940 * """
17941 * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
17942 * cdef size_t itemsize = <size_t> src.memview.view.itemsize
17943 * cdef int i
17944*/
17945 __pyx_v_tmpdata = NULL;
17946
17947 /* "View.MemoryView":1292
17948 * """
17949 * cdef void *tmpdata = NULL
17950 * cdef size_t itemsize = <size_t> src.memview.view.itemsize # <<<<<<<<<<<<<<
17951 * cdef int i
17952 * cdef char order = get_best_order(&src, src_ndim)
17953*/
17954 __pyx_v_itemsize = ((size_t)__pyx_v_src.memview->view.itemsize);
17955
17956 /* "View.MemoryView":1294
17957 * cdef size_t itemsize = <size_t> src.memview.view.itemsize
17958 * cdef int i
17959 * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
17960 * cdef bint broadcasting = False
17961 * cdef bint direct_copy = False
17962*/
17963 __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
17964
17965 /* "View.MemoryView":1295
17966 * cdef int i
17967 * cdef char order = get_best_order(&src, src_ndim)
17968 * cdef bint broadcasting = False # <<<<<<<<<<<<<<
17969 * cdef bint direct_copy = False
17970 * cdef __Pyx_memviewslice tmp
17971*/
17972 __pyx_v_broadcasting = 0;
17973
17974 /* "View.MemoryView":1296
17975 * cdef char order = get_best_order(&src, src_ndim)
17976 * cdef bint broadcasting = False
17977 * cdef bint direct_copy = False # <<<<<<<<<<<<<<
17978 * cdef __Pyx_memviewslice tmp
17979 *
17980*/
17981 __pyx_v_direct_copy = 0;
17982
17983 /* "View.MemoryView":1299
17984 * cdef __Pyx_memviewslice tmp
17985 *
17986 * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
17987 * broadcast_leading(&src, src_ndim, dst_ndim)
17988 * elif dst_ndim < src_ndim:
17989*/
17990 __pyx_t_1 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
17991
17992 if (__pyx_t_1) {
17993
17994
17995 /* "View.MemoryView":1300
17996 *
17997 * if src_ndim < dst_ndim:
17998 * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
17999 * elif dst_ndim < src_ndim:
18000 * broadcast_leading(&dst, dst_ndim, src_ndim)
18001*/
18002 __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
18003
18004 /* "View.MemoryView":1299
18005 * cdef __Pyx_memviewslice tmp
18006 *
18007 * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
18008 * broadcast_leading(&src, src_ndim, dst_ndim)
18009 * elif dst_ndim < src_ndim:
18010*/
18011 goto __pyx_L3;
18012 }
18013
18014 /* "View.MemoryView":1301
18015 * if src_ndim < dst_ndim:
18016 * broadcast_leading(&src, src_ndim, dst_ndim)
18017 * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
18018 * broadcast_leading(&dst, dst_ndim, src_ndim)
18019 *
18020*/
18021 __pyx_t_1 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
18022
18023 if (__pyx_t_1) {
18024
18025
18026 /* "View.MemoryView":1302
18027 * broadcast_leading(&src, src_ndim, dst_ndim)
18028 * elif dst_ndim < src_ndim:
18029 * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
18030 *
18031 * cdef int ndim = max(src_ndim, dst_ndim)
18032*/
18033 __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
18034
18035 /* "View.MemoryView":1301
18036 * if src_ndim < dst_ndim:
18037 * broadcast_leading(&src, src_ndim, dst_ndim)
18038 * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
18039 * broadcast_leading(&dst, dst_ndim, src_ndim)
18040 *
18041*/
18042 }
18043 __pyx_L3:;
18044
18045 /* "View.MemoryView":1304
18046 * broadcast_leading(&dst, dst_ndim, src_ndim)
18047 *
18048 * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
18049 *
18050 * for i in range(ndim):
18051*/
18052
18053 __pyx_t_2 = __pyx_v_dst_ndim;
18054
18055 __pyx_t_3 = __pyx_v_src_ndim;
18056 __pyx_t_1 = (__pyx_t_2 > __pyx_t_3);
18057
18058 if (__pyx_t_1) {
18059
18060 __pyx_t_4 = __pyx_t_2;
18061 } else {
18062
18063 __pyx_t_4 = __pyx_t_3;
18064 }
18065
18066 __pyx_v_ndim = __pyx_t_4;
18067
18068
18069 /* "View.MemoryView":1306
18070 * cdef int ndim = max(src_ndim, dst_ndim)
18071 *
18072 * for i in range(ndim): # <<<<<<<<<<<<<<
18073 * if src.shape[i] != dst.shape[i]:
18074 * if cython.likely(src.shape[i] == 1):
18075*/
18076
18077 __pyx_t_4 = __pyx_v_ndim;
18078 __pyx_t_2 = __pyx_t_4;
18079
18080 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18081 __pyx_v_i = __pyx_t_3;
18082
18083 /* "View.MemoryView":1307
18084 *
18085 * for i in range(ndim):
18086 * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
18087 * if cython.likely(src.shape[i] == 1):
18088 * broadcasting = True
18089*/
18090 __pyx_t_1 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
18091
18092 if (__pyx_t_1) {
18093
18094
18095 /* "View.MemoryView":1308
18096 * for i in range(ndim):
18097 * if src.shape[i] != dst.shape[i]:
18098 * if cython.likely(src.shape[i] == 1): # <<<<<<<<<<<<<<
18099 * broadcasting = True
18100 * src.strides[i] = 0
18101*/
18102 __pyx_t_1 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
18103
18104 if (likely(__pyx_t_1)) {
18105
18106
18107 /* "View.MemoryView":1309
18108 * if src.shape[i] != dst.shape[i]:
18109 * if cython.likely(src.shape[i] == 1):
18110 * broadcasting = True # <<<<<<<<<<<<<<
18111 * src.strides[i] = 0
18112 * else:
18113*/
18114 __pyx_v_broadcasting = 1;
18115
18116 /* "View.MemoryView":1310
18117 * if cython.likely(src.shape[i] == 1):
18118 * broadcasting = True
18119 * src.strides[i] = 0 # <<<<<<<<<<<<<<
18120 * else:
18121 * _err_extents(i, dst.shape[i], src.shape[i])
18122*/
18123 (__pyx_v_src.strides[__pyx_v_i]) = 0;
18124
18125 /* "View.MemoryView":1308
18126 * for i in range(ndim):
18127 * if src.shape[i] != dst.shape[i]:
18128 * if cython.likely(src.shape[i] == 1): # <<<<<<<<<<<<<<
18129 * broadcasting = True
18130 * src.strides[i] = 0
18131*/
18132 goto __pyx_L7;
18133 }
18134
18135 /* "View.MemoryView":1312
18136 * src.strides[i] = 0
18137 * else:
18138 * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
18139 *
18140 * if cython.unlikely(src.suboffsets[i] >= 0):
18141*/
18142 /*else*/ {
18143 __pyx_t_5 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1312, __pyx_L1_error)
18144
18145 }
18146 __pyx_L7:;
18147
18148 /* "View.MemoryView":1307
18149 *
18150 * for i in range(ndim):
18151 * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
18152 * if cython.likely(src.shape[i] == 1):
18153 * broadcasting = True
18154*/
18155 }
18156
18157 /* "View.MemoryView":1314
18158 * _err_extents(i, dst.shape[i], src.shape[i])
18159 *
18160 * if cython.unlikely(src.suboffsets[i] >= 0): # <<<<<<<<<<<<<<
18161 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
18162 *
18163*/
18164 __pyx_t_1 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
18165
18166 if (unlikely(__pyx_t_1)) {
18167
18168
18169 /* "View.MemoryView":1315
18170 *
18171 * if cython.unlikely(src.suboffsets[i] >= 0):
18172 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
18173 *
18174 * if slices_overlap(&src, &dst, ndim, itemsize):
18175*/
18176 __pyx_t_5 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_k_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1315, __pyx_L1_error)
18177
18178
18179 /* "View.MemoryView":1314
18180 * _err_extents(i, dst.shape[i], src.shape[i])
18181 *
18182 * if cython.unlikely(src.suboffsets[i] >= 0): # <<<<<<<<<<<<<<
18183 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
18184 *
18185*/
18186 }
18187 }
18188
18189
18190 /* "View.MemoryView":1317
18191 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
18192 *
18193 * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
18194 *
18195 * if not slice_is_contig(src, order, ndim):
18196*/
18197 __pyx_t_1 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
18198
18199 if (__pyx_t_1) {
18200
18201
18202 /* "View.MemoryView":1319
18203 * if slices_overlap(&src, &dst, ndim, itemsize):
18204 *
18205 * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
18206 * order = get_best_order(&dst, ndim)
18207 *
18208*/
18209 __pyx_t_1 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
18210
18211 if (__pyx_t_1) {
18212
18213
18214 /* "View.MemoryView":1320
18215 *
18216 * if not slice_is_contig(src, order, ndim):
18217 * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
18218 *
18219 * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
18220*/
18221 __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
18222
18223 /* "View.MemoryView":1319
18224 * if slices_overlap(&src, &dst, ndim, itemsize):
18225 *
18226 * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
18227 * order = get_best_order(&dst, ndim)
18228 *
18229*/
18230 }
18231
18232 /* "View.MemoryView":1322
18233 * order = get_best_order(&dst, ndim)
18234 *
18235 * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
18236 * src = tmp
18237 *
18238*/
18239 __pyx_t_6 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_6 == ((void *)NULL))) __PYX_ERR(1, 1322, __pyx_L1_error)
18240 __pyx_v_tmpdata = __pyx_t_6;
18241
18242 /* "View.MemoryView":1323
18243 *
18244 * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
18245 * src = tmp # <<<<<<<<<<<<<<
18246 *
18247 * if not broadcasting:
18248*/
18249 __pyx_v_src = __pyx_v_tmp;
18250
18251 /* "View.MemoryView":1317
18252 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
18253 *
18254 * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
18255 *
18256 * if not slice_is_contig(src, order, ndim):
18257*/
18258 }
18259
18260 /* "View.MemoryView":1325
18261 * src = tmp
18262 *
18263 * if not broadcasting: # <<<<<<<<<<<<<<
18264 *
18265 *
18266*/
18267 __pyx_t_1 = (!__pyx_v_broadcasting);
18268
18269 if (__pyx_t_1) {
18270
18271
18272 /* "View.MemoryView":1328
18273 *
18274 *
18275 * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
18276 * direct_copy = slice_is_contig(dst, 'C', ndim)
18277 * elif slice_is_contig(src, 'F', ndim):
18278*/
18279 __pyx_t_1 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
18280
18281 if (__pyx_t_1) {
18282
18283
18284 /* "View.MemoryView":1329
18285 *
18286 * if slice_is_contig(src, 'C', ndim):
18287 * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
18288 * elif slice_is_contig(src, 'F', ndim):
18289 * direct_copy = slice_is_contig(dst, 'F', ndim)
18290*/
18291 __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
18292
18293 /* "View.MemoryView":1328
18294 *
18295 *
18296 * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
18297 * direct_copy = slice_is_contig(dst, 'C', ndim)
18298 * elif slice_is_contig(src, 'F', ndim):
18299*/
18300 goto __pyx_L12;
18301 }
18302
18303 /* "View.MemoryView":1330
18304 * if slice_is_contig(src, 'C', ndim):
18305 * direct_copy = slice_is_contig(dst, 'C', ndim)
18306 * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
18307 * direct_copy = slice_is_contig(dst, 'F', ndim)
18308 *
18309*/
18310 __pyx_t_1 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
18311
18312 if (__pyx_t_1) {
18313
18314
18315 /* "View.MemoryView":1331
18316 * direct_copy = slice_is_contig(dst, 'C', ndim)
18317 * elif slice_is_contig(src, 'F', ndim):
18318 * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
18319 *
18320 * if direct_copy:
18321*/
18322 __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
18323
18324 /* "View.MemoryView":1330
18325 * if slice_is_contig(src, 'C', ndim):
18326 * direct_copy = slice_is_contig(dst, 'C', ndim)
18327 * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
18328 * direct_copy = slice_is_contig(dst, 'F', ndim)
18329 *
18330*/
18331 }
18332 __pyx_L12:;
18333
18334 /* "View.MemoryView":1333
18335 * direct_copy = slice_is_contig(dst, 'F', ndim)
18336 *
18337 * if direct_copy: # <<<<<<<<<<<<<<
18338 *
18339 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18340*/
18341 if (__pyx_v_direct_copy) {
18342
18343 /* "View.MemoryView":1335
18344 * if direct_copy:
18345 *
18346 * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<<
18347 * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
18348 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18349*/
18350 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18351
18352 /* "View.MemoryView":1336
18353 *
18354 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18355 * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
18356 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18357 * free(tmpdata)
18358*/
18359 (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
18360
18361 /* "View.MemoryView":1337
18362 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18363 * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
18364 * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<<
18365 * free(tmpdata)
18366 * return 0
18367*/
18368 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18369
18370 /* "View.MemoryView":1338
18371 * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
18372 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18373 * free(tmpdata) # <<<<<<<<<<<<<<
18374 * return 0
18375 *
18376*/
18377 free(__pyx_v_tmpdata);
18378
18379 /* "View.MemoryView":1339
18380 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18381 * free(tmpdata)
18382 * return 0 # <<<<<<<<<<<<<<
18383 *
18384 * if order == 'F' == get_best_order(&dst, ndim):
18385*/
18386 {
18387
18388 __pyx_r = 0;
18389 }
18390 goto __pyx_L0;
18391
18392 /* "View.MemoryView":1333
18393 * direct_copy = slice_is_contig(dst, 'F', ndim)
18394 *
18395 * if direct_copy: # <<<<<<<<<<<<<<
18396 *
18397 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18398*/
18399 }
18400
18401 /* "View.MemoryView":1325
18402 * src = tmp
18403 *
18404 * if not broadcasting: # <<<<<<<<<<<<<<
18405 *
18406 *
18407*/
18408 }
18409
18410 /* "View.MemoryView":1341
18411 * return 0
18412 *
18413 * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
18414 *
18415 *
18416*/
18417 __pyx_t_1 = (__pyx_v_order == 'F');
18418 if (__pyx_t_1) {
18419 __pyx_t_1 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
18420 }
18421 if (__pyx_t_1) {
18422
18423
18424 /* "View.MemoryView":1344
18425 *
18426 *
18427 * transpose_memslice(&src) # <<<<<<<<<<<<<<
18428 * transpose_memslice(&dst)
18429 *
18430*/
18431 __pyx_t_4 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1344, __pyx_L1_error)
18432
18433
18434 /* "View.MemoryView":1345
18435 *
18436 * transpose_memslice(&src)
18437 * transpose_memslice(&dst) # <<<<<<<<<<<<<<
18438 *
18439 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18440*/
18441 __pyx_t_4 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1345, __pyx_L1_error)
18442
18443
18444 /* "View.MemoryView":1341
18445 * return 0
18446 *
18447 * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
18448 *
18449 *
18450*/
18451 }
18452
18453 /* "View.MemoryView":1347
18454 * transpose_memslice(&dst)
18455 *
18456 * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<<
18457 * copy_strided_to_strided(&src, &dst, ndim, itemsize)
18458 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18459*/
18460 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18461
18462 /* "View.MemoryView":1348
18463 *
18464 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18465 * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
18466 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18467 *
18468*/
18469 copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
18470
18471 /* "View.MemoryView":1349
18472 * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
18473 * copy_strided_to_strided(&src, &dst, ndim, itemsize)
18474 * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<<
18475 *
18476 * free(tmpdata)
18477*/
18478 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18479
18480 /* "View.MemoryView":1351
18481 * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
18482 *
18483 * free(tmpdata) # <<<<<<<<<<<<<<
18484 * return 0
18485 *
18486*/
18487 free(__pyx_v_tmpdata);
18488
18489 /* "View.MemoryView":1352
18490 *
18491 * free(tmpdata)
18492 * return 0 # <<<<<<<<<<<<<<
18493 *
18494 * @cname('__pyx_memoryview_broadcast_leading')
18495*/
18496 {
18497
18498 __pyx_r = 0;
18499 }
18500 goto __pyx_L0;
18501
18502 /* "View.MemoryView":1282
18503 *
18504 *
18505 * @cname('__pyx_memoryview_copy_contents') # <<<<<<<<<<<<<<
18506 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,
18507 * __Pyx_memviewslice dst,
18508*/
18509
18510 /* function exit code */
18511 __pyx_L1_error:;
18512 __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18513 __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
18514 __pyx_r = -1;
18515 __Pyx_PyGILState_Release(__pyx_gilstate_save);
18516 __pyx_L0:;
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526 return __pyx_r;
18527}
18528
18529/* "View.MemoryView":1354
18530 * return 0
18531 *
18532 * @cname('__pyx_memoryview_broadcast_leading') # <<<<<<<<<<<<<<
18533 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,
18534 * int ndim,
18535*/
18536
18537static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
18538 int __pyx_v_i;
18539 int __pyx_v_offset;
18540 int __pyx_t_1;
18541 int __pyx_t_2;
18542 int __pyx_t_3;
18543
18544 /* "View.MemoryView":1359
18545 * int ndim_other) noexcept nogil:
18546 * cdef int i
18547 * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
18548 *
18549 * for i in range(ndim - 1, -1, -1):
18550*/
18551 __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
18552
18553 /* "View.MemoryView":1361
18554 * cdef int offset = ndim_other - ndim
18555 *
18556 * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
18557 * mslice.shape[i + offset] = mslice.shape[i]
18558 * mslice.strides[i + offset] = mslice.strides[i]
18559*/
18560 for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
18561 __pyx_v_i = __pyx_t_1;
18562
18563 /* "View.MemoryView":1362
18564 *
18565 * for i in range(ndim - 1, -1, -1):
18566 * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
18567 * mslice.strides[i + offset] = mslice.strides[i]
18568 * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
18569*/
18570 (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
18571
18572 /* "View.MemoryView":1363
18573 * for i in range(ndim - 1, -1, -1):
18574 * mslice.shape[i + offset] = mslice.shape[i]
18575 * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
18576 * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
18577 *
18578*/
18579 (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
18580
18581 /* "View.MemoryView":1364
18582 * mslice.shape[i + offset] = mslice.shape[i]
18583 * mslice.strides[i + offset] = mslice.strides[i]
18584 * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
18585 *
18586 * for i in range(offset):
18587*/
18588 (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
18589 }
18590
18591 /* "View.MemoryView":1366
18592 * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
18593 *
18594 * for i in range(offset): # <<<<<<<<<<<<<<
18595 * mslice.shape[i] = 1
18596 * mslice.strides[i] = mslice.strides[0]
18597*/
18598
18599 __pyx_t_1 = __pyx_v_offset;
18600 __pyx_t_2 = __pyx_t_1;
18601
18602 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18603 __pyx_v_i = __pyx_t_3;
18604
18605 /* "View.MemoryView":1367
18606 *
18607 * for i in range(offset):
18608 * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
18609 * mslice.strides[i] = mslice.strides[0]
18610 * mslice.suboffsets[i] = -1
18611*/
18612 (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
18613
18614 /* "View.MemoryView":1368
18615 * for i in range(offset):
18616 * mslice.shape[i] = 1
18617 * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
18618 * mslice.suboffsets[i] = -1
18619 *
18620*/
18621 (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
18622
18623 /* "View.MemoryView":1369
18624 * mslice.shape[i] = 1
18625 * mslice.strides[i] = mslice.strides[0]
18626 * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
18627 *
18628 *
18629*/
18630 (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
18631 }
18632
18633
18634 /* "View.MemoryView":1354
18635 * return 0
18636 *
18637 * @cname('__pyx_memoryview_broadcast_leading') # <<<<<<<<<<<<<<
18638 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,
18639 * int ndim,
18640*/
18641
18642 /* function exit code */
18643
18644
18645}
18646
18647/* "View.MemoryView":1376
18648 *
18649 *
18650 * @cname('__pyx_memoryview_refcount_copying') # <<<<<<<<<<<<<<
18651 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
18652 *
18653*/
18654
18655static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
18656
18657 /* "View.MemoryView":1379
18658 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
18659 *
18660 * if dtype_is_object: # <<<<<<<<<<<<<<
18661 * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
18662 *
18663*/
18664 if (__pyx_v_dtype_is_object) {
18665
18666 /* "View.MemoryView":1380
18667 *
18668 * if dtype_is_object:
18669 * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) # <<<<<<<<<<<<<<
18670 *
18671 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
18672*/
18673 __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
18674
18675 /* "View.MemoryView":1379
18676 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
18677 *
18678 * if dtype_is_object: # <<<<<<<<<<<<<<
18679 * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
18680 *
18681*/
18682 }
18683
18684 /* "View.MemoryView":1376
18685 *
18686 *
18687 * @cname('__pyx_memoryview_refcount_copying') # <<<<<<<<<<<<<<
18688 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
18689 *
18690*/
18691
18692 /* function exit code */
18693}
18694
18695/* "View.MemoryView":1382
18696 * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
18697 *
18698 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') # <<<<<<<<<<<<<<
18699 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,
18700 * Py_ssize_t *strides, int ndim,
18701*/
18702
18703static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
18704 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18705
18706
18707
18708
18709
18710
18711 /* "View.MemoryView":1386
18712 * Py_ssize_t *strides, int ndim,
18713 * bint inc) noexcept with gil:
18714 * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
18715 *
18716 * @cname('__pyx_memoryview_refcount_objects_in_slice')
18717*/
18718 __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
18719
18720 /* "View.MemoryView":1382
18721 * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
18722 *
18723 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') # <<<<<<<<<<<<<<
18724 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,
18725 * Py_ssize_t *strides, int ndim,
18726*/
18727
18728 /* function exit code */
18729
18730
18731
18732
18733
18734
18735 __Pyx_PyGILState_Release(__pyx_gilstate_save);
18736}
18737
18738/* "View.MemoryView":1388
18739 * refcount_objects_in_slice(data, shape, strides, ndim, inc)
18740 *
18741 * @cname('__pyx_memoryview_refcount_objects_in_slice') # <<<<<<<<<<<<<<
18742 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,
18743 * Py_ssize_t *strides, int ndim, bint inc) noexcept:
18744*/
18745
18746static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
18747 CYTHON_UNUSED Py_ssize_t __pyx_v_i;
18748 Py_ssize_t __pyx_v_stride;
18749 Py_ssize_t __pyx_t_1;
18750 Py_ssize_t __pyx_t_2;
18751 Py_ssize_t __pyx_t_3;
18752 int __pyx_t_4;
18753
18754
18755 /* "View.MemoryView":1392
18756 * Py_ssize_t *strides, int ndim, bint inc) noexcept:
18757 * cdef Py_ssize_t i
18758 * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
18759 *
18760 * for i in range(shape[0]):
18761*/
18762 __pyx_v_stride = (__pyx_v_strides[0]);
18763
18764 /* "View.MemoryView":1394
18765 * cdef Py_ssize_t stride = strides[0]
18766 *
18767 * for i in range(shape[0]): # <<<<<<<<<<<<<<
18768 * if ndim == 1:
18769 * if inc:
18770*/
18771
18772 __pyx_t_1 = (__pyx_v_shape[0]);
18773 __pyx_t_2 = __pyx_t_1;
18774
18775 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18776 __pyx_v_i = __pyx_t_3;
18777
18778 /* "View.MemoryView":1395
18779 *
18780 * for i in range(shape[0]):
18781 * if ndim == 1: # <<<<<<<<<<<<<<
18782 * if inc:
18783 * Py_INCREF((<PyObject **> data)[0])
18784*/
18785 __pyx_t_4 = (__pyx_v_ndim == 1);
18786
18787 if (__pyx_t_4) {
18788
18789
18790 /* "View.MemoryView":1396
18791 * for i in range(shape[0]):
18792 * if ndim == 1:
18793 * if inc: # <<<<<<<<<<<<<<
18794 * Py_INCREF((<PyObject **> data)[0])
18795 * else:
18796*/
18797 if (__pyx_v_inc) {
18798
18799 /* "View.MemoryView":1397
18800 * if ndim == 1:
18801 * if inc:
18802 * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
18803 * else:
18804 * Py_DECREF((<PyObject **> data)[0])
18805*/
18806 Py_INCREF((((PyObject **)__pyx_v_data)[0]));
18807
18808 /* "View.MemoryView":1396
18809 * for i in range(shape[0]):
18810 * if ndim == 1:
18811 * if inc: # <<<<<<<<<<<<<<
18812 * Py_INCREF((<PyObject **> data)[0])
18813 * else:
18814*/
18815 goto __pyx_L6;
18816 }
18817
18818 /* "View.MemoryView":1399
18819 * Py_INCREF((<PyObject **> data)[0])
18820 * else:
18821 * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
18822 * else:
18823 * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
18824*/
18825 /*else*/ {
18826 Py_DECREF((((PyObject **)__pyx_v_data)[0]));
18827 }
18828 __pyx_L6:;
18829
18830 /* "View.MemoryView":1395
18831 *
18832 * for i in range(shape[0]):
18833 * if ndim == 1: # <<<<<<<<<<<<<<
18834 * if inc:
18835 * Py_INCREF((<PyObject **> data)[0])
18836*/
18837 goto __pyx_L5;
18838 }
18839
18840 /* "View.MemoryView":1401
18841 * Py_DECREF((<PyObject **> data)[0])
18842 * else:
18843 * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) # <<<<<<<<<<<<<<
18844 *
18845 * data += stride
18846*/
18847 /*else*/ {
18848 __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
18849 }
18850 __pyx_L5:;
18851
18852 /* "View.MemoryView":1403
18853 * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
18854 *
18855 * data += stride # <<<<<<<<<<<<<<
18856 *
18857 *
18858*/
18859 __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
18860 }
18861
18862
18863 /* "View.MemoryView":1388
18864 * refcount_objects_in_slice(data, shape, strides, ndim, inc)
18865 *
18866 * @cname('__pyx_memoryview_refcount_objects_in_slice') # <<<<<<<<<<<<<<
18867 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,
18868 * Py_ssize_t *strides, int ndim, bint inc) noexcept:
18869*/
18870
18871 /* function exit code */
18872
18873
18874
18875
18876}
18877
18878/* "View.MemoryView":1408
18879 *
18880 *
18881 * @cname('__pyx_memoryview_slice_assign_scalar') # <<<<<<<<<<<<<<
18882 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,
18883 * size_t itemsize, void *item,
18884*/
18885
18886static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
18887
18888 /* "View.MemoryView":1412
18889 * size_t itemsize, void *item,
18890 * bint dtype_is_object) noexcept nogil:
18891 * refcount_copying(dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<<
18892 * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
18893 * refcount_copying(dst, dtype_is_object, ndim, inc=True)
18894*/
18895 __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18896
18897 /* "View.MemoryView":1413
18898 * bint dtype_is_object) noexcept nogil:
18899 * refcount_copying(dst, dtype_is_object, ndim, inc=False)
18900 * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) # <<<<<<<<<<<<<<
18901 * refcount_copying(dst, dtype_is_object, ndim, inc=True)
18902 *
18903*/
18904 __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
18905
18906 /* "View.MemoryView":1414
18907 * refcount_copying(dst, dtype_is_object, ndim, inc=False)
18908 * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
18909 * refcount_copying(dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<<
18910 *
18911 *
18912*/
18913 __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18914
18915 /* "View.MemoryView":1408
18916 *
18917 *
18918 * @cname('__pyx_memoryview_slice_assign_scalar') # <<<<<<<<<<<<<<
18919 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,
18920 * size_t itemsize, void *item,
18921*/
18922
18923 /* function exit code */
18924}
18925
18926/* "View.MemoryView":1417
18927 *
18928 *
18929 * @cname('__pyx_memoryview__slice_assign_scalar') # <<<<<<<<<<<<<<
18930 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,
18931 * Py_ssize_t *strides, int ndim,
18932*/
18933
18934static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
18935 CYTHON_UNUSED Py_ssize_t __pyx_v_i;
18936 Py_ssize_t __pyx_v_stride;
18937 Py_ssize_t __pyx_v_extent;
18938 int __pyx_t_1;
18939 Py_ssize_t __pyx_t_2;
18940 Py_ssize_t __pyx_t_3;
18941 Py_ssize_t __pyx_t_4;
18942
18943
18944 /* "View.MemoryView":1422
18945 * size_t itemsize, void *item) noexcept nogil:
18946 * cdef Py_ssize_t i
18947 * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
18948 * cdef Py_ssize_t extent = shape[0]
18949 *
18950*/
18951 __pyx_v_stride = (__pyx_v_strides[0]);
18952
18953 /* "View.MemoryView":1423
18954 * cdef Py_ssize_t i
18955 * cdef Py_ssize_t stride = strides[0]
18956 * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
18957 *
18958 * if ndim == 1:
18959*/
18960 __pyx_v_extent = (__pyx_v_shape[0]);
18961
18962 /* "View.MemoryView":1425
18963 * cdef Py_ssize_t extent = shape[0]
18964 *
18965 * if ndim == 1: # <<<<<<<<<<<<<<
18966 * for i in range(extent):
18967 * memcpy(data, item, itemsize)
18968*/
18969 __pyx_t_1 = (__pyx_v_ndim == 1);
18970
18971 if (__pyx_t_1) {
18972
18973
18974 /* "View.MemoryView":1426
18975 *
18976 * if ndim == 1:
18977 * for i in range(extent): # <<<<<<<<<<<<<<
18978 * memcpy(data, item, itemsize)
18979 * data += stride
18980*/
18981
18982 __pyx_t_2 = __pyx_v_extent;
18983 __pyx_t_3 = __pyx_t_2;
18984
18985 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18986 __pyx_v_i = __pyx_t_4;
18987
18988 /* "View.MemoryView":1427
18989 * if ndim == 1:
18990 * for i in range(extent):
18991 * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
18992 * data += stride
18993 * else:
18994*/
18995 (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
18996
18997 /* "View.MemoryView":1428
18998 * for i in range(extent):
18999 * memcpy(data, item, itemsize)
19000 * data += stride # <<<<<<<<<<<<<<
19001 * else:
19002 * for i in range(extent):
19003*/
19004 __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
19005 }
19006
19007
19008 /* "View.MemoryView":1425
19009 * cdef Py_ssize_t extent = shape[0]
19010 *
19011 * if ndim == 1: # <<<<<<<<<<<<<<
19012 * for i in range(extent):
19013 * memcpy(data, item, itemsize)
19014*/
19015 goto __pyx_L3;
19016 }
19017
19018 /* "View.MemoryView":1430
19019 * data += stride
19020 * else:
19021 * for i in range(extent): # <<<<<<<<<<<<<<
19022 * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
19023 * data += stride
19024*/
19025 /*else*/ {
19026
19027 __pyx_t_2 = __pyx_v_extent;
19028 __pyx_t_3 = __pyx_t_2;
19029
19030 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
19031 __pyx_v_i = __pyx_t_4;
19032
19033 /* "View.MemoryView":1431
19034 * else:
19035 * for i in range(extent):
19036 * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) # <<<<<<<<<<<<<<
19037 * data += stride
19038 *
19039*/
19040 __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
19041
19042 /* "View.MemoryView":1432
19043 * for i in range(extent):
19044 * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
19045 * data += stride # <<<<<<<<<<<<<<
19046 *
19047*/
19048 __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
19049 }
19050
19051 }
19052 __pyx_L3:;
19053
19054 /* "View.MemoryView":1417
19055 *
19056 *
19057 * @cname('__pyx_memoryview__slice_assign_scalar') # <<<<<<<<<<<<<<
19058 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,
19059 * Py_ssize_t *strides, int ndim,
19060*/
19061
19062 /* function exit code */
19063
19064
19065
19066
19067}
19068
19069/* "(tree fragment)":4
19070 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
19071 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
19072 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<<
19073 * cdef object __pyx_result
19074 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
19075*/
19076
19077/* Python wrapper */
19078static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self,
19079#if CYTHON_VECTORCALL
19080PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19081#else
19082PyObject *__pyx_args, PyObject *__pyx_kwds
19083#endif
19084); /*proto*/
19085static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
19086static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self,
19087#if CYTHON_VECTORCALL
19088PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19089#else
19090PyObject *__pyx_args, PyObject *__pyx_kwds
19091#endif
19092) {
19093 PyObject *__pyx_v___pyx_type = 0;
19094 long __pyx_v___pyx_checksum;
19095 PyObject *__pyx_v___pyx_state = 0;
19096 #if !CYTHON_VECTORCALL
19097 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
19098 #endif
19099 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
19100 PyObject* values[3] = {0,0,0};
19101 int __pyx_lineno = 0;
19102 const char *__pyx_filename = NULL;
19103 int __pyx_clineno = 0;
19104 PyObject *__pyx_r = 0;
19105 __Pyx_RefNannyDeclarations
19106 __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
19107 #if !CYTHON_VECTORCALL
19108 #if CYTHON_ASSUME_SAFE_SIZE
19109 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
19110 #else
19111 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
19112 #endif
19113 #endif
19114 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
19115 {
19116 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
19117 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
19118 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 4, __pyx_L3_error)
19119 if (__pyx_kwds_len > 0) {
19120 switch (__pyx_nargs) {
19121 case 3:
19122 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
19123 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
19124 CYTHON_FALLTHROUGH;
19125 case 2:
19126 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
19127 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
19128 CYTHON_FALLTHROUGH;
19129 case 1:
19130 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
19131 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
19132 CYTHON_FALLTHROUGH;
19133 case 0: break;
19134 default: goto __pyx_L5_argtuple_error;
19135 }
19136 const Py_ssize_t kwd_pos_args = __pyx_nargs;
19137 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error)
19138 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
19139 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) }
19140 }
19141 } else if (unlikely(__pyx_nargs != 3)) {
19142 goto __pyx_L5_argtuple_error;
19143 } else {
19144 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
19145 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
19146 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
19147 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
19148 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
19149 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
19150 }
19151 __pyx_v___pyx_type = values[0];
19152 __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error)
19153 __pyx_v___pyx_state = ((PyObject*)values[2]);
19154 }
19155 goto __pyx_L6_skip;
19156 __pyx_L5_argtuple_error:;
19157 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error)
19158 __pyx_L6_skip:;
19159 goto __pyx_L4_argument_unpacking_done;
19160 __pyx_L3_error:;
19161 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
19162 Py_XDECREF(values[__pyx_temp]);
19163 }
19164 __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
19165 __Pyx_RefNannyFinishContext();
19166 return NULL;
19167 __pyx_L4_argument_unpacking_done:;
19168 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error)
19169 __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
19170
19171 /* function exit code */
19172 goto __pyx_L0;
19173 __pyx_L1_error:;
19174 __pyx_r = NULL;
19175 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
19176 Py_XDECREF(values[__pyx_temp]);
19177 }
19178 goto __pyx_L7_cleaned_up;
19179 __pyx_L0:;
19180 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
19181 Py_XDECREF(values[__pyx_temp]);
19182 }
19183 __pyx_L7_cleaned_up:;
19184
19185 __Pyx_RefNannyFinishContext();
19186 return __pyx_r;
19187}
19188
19189static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
19190 PyObject *__pyx_v___pyx_result = 0;
19191 PyObject *__pyx_r = NULL;
19192 __Pyx_RefNannyDeclarations
19193 int __pyx_t_1;
19194 PyObject *__pyx_t_2 = NULL;
19195 PyObject *__pyx_t_3 = NULL;
19196 size_t __pyx_t_4;
19197 int __pyx_t_5;
19198 int __pyx_lineno = 0;
19199 const char *__pyx_filename = NULL;
19200 int __pyx_clineno = 0;
19201 __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
19202
19203 /* "(tree fragment)":6
19204 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):
19205 * cdef object __pyx_result
19206 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') # <<<<<<<<<<<<<<
19207 * __pyx_result = Enum.__new__(__pyx_type)
19208 * if __pyx_state is not None:
19209*/
19210 __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, __pyx_k_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error)
19211
19212
19213 /* "(tree fragment)":7
19214 * cdef object __pyx_result
19215 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
19216 * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
19217 * if __pyx_state is not None:
19218 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
19219*/
19220 __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_MemviewEnum_type);
19221 __Pyx_INCREF(__pyx_t_3);
19222 __pyx_t_4 = 0;
19223 {
19224 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
19225 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
19226 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19227 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
19228 __Pyx_GOTREF(__pyx_t_2);
19229 }
19230 __pyx_v___pyx_result = __pyx_t_2;
19231 __pyx_t_2 = 0;
19232
19233 /* "(tree fragment)":8
19234 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
19235 * __pyx_result = Enum.__new__(__pyx_type)
19236 * if __pyx_state is not None: # <<<<<<<<<<<<<<
19237 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
19238 * return __pyx_result
19239*/
19240 __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
19241 if (__pyx_t_5) {
19242
19243
19244 /* "(tree fragment)":9
19245 * __pyx_result = Enum.__new__(__pyx_type)
19246 * if __pyx_state is not None:
19247 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
19248 * return __pyx_result
19249 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
19250*/
19251 if (unlikely(__pyx_v___pyx_state == Py_None)) {
19252 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
19253 __PYX_ERR(1, 9, __pyx_L1_error)
19254 }
19255 __pyx_t_2 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
19256 __Pyx_GOTREF(__pyx_t_2);
19257 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19258
19259 /* "(tree fragment)":8
19260 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
19261 * __pyx_result = Enum.__new__(__pyx_type)
19262 * if __pyx_state is not None: # <<<<<<<<<<<<<<
19263 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
19264 * return __pyx_result
19265*/
19266 }
19267
19268 /* "(tree fragment)":10
19269 * if __pyx_state is not None:
19270 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
19271 * return __pyx_result # <<<<<<<<<<<<<<
19272 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
19273 * __pyx_result.name = __pyx_state[0]
19274*/
19275 {
19276 PyObject *__pyx_temp;
19277 {
19278 __pyx_temp = __pyx_r;
19279 __Pyx_INCREF(__pyx_v___pyx_result);
19280 __pyx_r = __pyx_v___pyx_result;
19281 }
19282 __Pyx_XDECREF(__pyx_temp);
19283 }
19284 goto __pyx_L0;
19285
19286 /* "(tree fragment)":4
19287 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
19288 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
19289 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<<
19290 * cdef object __pyx_result
19291 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
19292*/
19293
19294 /* function exit code */
19295 __pyx_L1_error:;
19296 __Pyx_XDECREF(__pyx_t_2);
19297 __Pyx_XDECREF(__pyx_t_3);
19298 __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
19299 __pyx_r = NULL;
19300 __pyx_L0:;
19301 __Pyx_XDECREF(__pyx_v___pyx_result);
19302 __Pyx_XGIVEREF(__pyx_r);
19303 __Pyx_RefNannyFinishContext();
19304 return __pyx_r;
19305}
19306
19307/* "(tree fragment)":11
19308 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
19309 * return __pyx_result
19310 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<<
19311 * __pyx_result.name = __pyx_state[0]
19312 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
19313*/
19314
19315static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
19316 PyObject *__pyx_r = NULL;
19317 __Pyx_RefNannyDeclarations
19318 PyObject *__pyx_t_1 = NULL;
19319 int __pyx_t_2;
19320 int __pyx_lineno = 0;
19321 const char *__pyx_filename = NULL;
19322 int __pyx_clineno = 0;
19323 __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
19324
19325 /* "(tree fragment)":12
19326 * return __pyx_result
19327 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
19328 * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
19329 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
19330*/
19331 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
19332 __Pyx_GOTREF(__pyx_t_1);
19333 __Pyx_GIVEREF(__pyx_t_1);
19334 __Pyx_GOTREF(__pyx_v___pyx_result->name);
19335 __Pyx_DECREF(__pyx_v___pyx_result->name);
19336 __pyx_v___pyx_result->name = __pyx_t_1;
19337 __pyx_t_1 = 0;
19338
19339 /* "(tree fragment)":13
19340 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
19341 * __pyx_result.name = __pyx_state[0]
19342 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<<
19343*/
19344 __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
19345
19346
19347 /* "(tree fragment)":11
19348 * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
19349 * return __pyx_result
19350 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<<
19351 * __pyx_result.name = __pyx_state[0]
19352 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
19353*/
19354
19355 /* function exit code */
19356 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19357 goto __pyx_L0;
19358 __pyx_L1_error:;
19359 __Pyx_XDECREF(__pyx_t_1);
19360 __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
19361 __pyx_r = 0;
19362 __pyx_L0:;
19363 __Pyx_XGIVEREF(__pyx_r);
19364 __Pyx_RefNannyFinishContext();
19365 return __pyx_r;
19366}
19367
19368/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
19369 *
19370 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
19371 * @property # <<<<<<<<<<<<<<
19372 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
19373 * return PyDataType_TYPEOBJ(self)
19374*/
19375
19376static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
19377 PyTypeObject *__pyx_r;
19378
19379 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":232
19380 * @property
19381 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
19382 * return PyDataType_TYPEOBJ(self) # <<<<<<<<<<<<<<
19383 *
19384 * @property
19385*/
19386 {
19387
19388 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
19389 }
19390 goto __pyx_L0;
19391
19392 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
19393 *
19394 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
19395 * @property # <<<<<<<<<<<<<<
19396 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
19397 * return PyDataType_TYPEOBJ(self)
19398*/
19399
19400 /* function exit code */
19401 __pyx_L0:;
19402 return __pyx_r;
19403}
19404
19405/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
19406 * return PyDataType_TYPEOBJ(self)
19407 *
19408 * @property # <<<<<<<<<<<<<<
19409 * cdef inline char kind(self) noexcept nogil:
19410 * return PyDataType_KIND(self)
19411*/
19412
19413static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
19414 char __pyx_r;
19415
19416 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":236
19417 * @property
19418 * cdef inline char kind(self) noexcept nogil:
19419 * return PyDataType_KIND(self) # <<<<<<<<<<<<<<
19420 *
19421 * @property
19422*/
19423 {
19424
19425 __pyx_r = PyDataType_KIND(__pyx_v_self);
19426 }
19427 goto __pyx_L0;
19428
19429 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
19430 * return PyDataType_TYPEOBJ(self)
19431 *
19432 * @property # <<<<<<<<<<<<<<
19433 * cdef inline char kind(self) noexcept nogil:
19434 * return PyDataType_KIND(self)
19435*/
19436
19437 /* function exit code */
19438 __pyx_L0:;
19439 return __pyx_r;
19440}
19441
19442/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
19443 * return PyDataType_KIND(self)
19444 *
19445 * @property # <<<<<<<<<<<<<<
19446 * cdef inline char type(self) noexcept nogil:
19447 * return PyDataType_TYPE(self)
19448*/
19449
19450static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
19451 char __pyx_r;
19452
19453 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":240
19454 * @property
19455 * cdef inline char type(self) noexcept nogil:
19456 * return PyDataType_TYPE(self) # <<<<<<<<<<<<<<
19457 *
19458 * # Numpy sometimes mutates this without warning (e.g. it'll
19459*/
19460 {
19461
19462 __pyx_r = PyDataType_TYPE(__pyx_v_self);
19463 }
19464 goto __pyx_L0;
19465
19466 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
19467 * return PyDataType_KIND(self)
19468 *
19469 * @property # <<<<<<<<<<<<<<
19470 * cdef inline char type(self) noexcept nogil:
19471 * return PyDataType_TYPE(self)
19472*/
19473
19474 /* function exit code */
19475 __pyx_L0:;
19476 return __pyx_r;
19477}
19478
19479/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
19480 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
19481 * # directly accessing this field.
19482 * @property # <<<<<<<<<<<<<<
19483 * cdef inline char byteorder(self) noexcept nogil:
19484 * return PyDataType_BYTEORDER(self)
19485*/
19486
19487static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
19488 char __pyx_r;
19489
19490 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":249
19491 * @property
19492 * cdef inline char byteorder(self) noexcept nogil:
19493 * return PyDataType_BYTEORDER(self) # <<<<<<<<<<<<<<
19494 *
19495 * @property
19496*/
19497 {
19498
19499 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
19500 }
19501 goto __pyx_L0;
19502
19503 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
19504 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
19505 * # directly accessing this field.
19506 * @property # <<<<<<<<<<<<<<
19507 * cdef inline char byteorder(self) noexcept nogil:
19508 * return PyDataType_BYTEORDER(self)
19509*/
19510
19511 /* function exit code */
19512 __pyx_L0:;
19513 return __pyx_r;
19514}
19515
19516/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
19517 * return PyDataType_BYTEORDER(self)
19518 *
19519 * @property # <<<<<<<<<<<<<<
19520 * cdef inline int type_num(self) noexcept nogil:
19521 * return PyDataType_TYPENUM(self)
19522*/
19523
19524static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
19525 int __pyx_r;
19526
19527 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":253
19528 * @property
19529 * cdef inline int type_num(self) noexcept nogil:
19530 * return PyDataType_TYPENUM(self) # <<<<<<<<<<<<<<
19531 *
19532 * @property
19533*/
19534 {
19535
19536 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
19537 }
19538 goto __pyx_L0;
19539
19540 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
19541 * return PyDataType_BYTEORDER(self)
19542 *
19543 * @property # <<<<<<<<<<<<<<
19544 * cdef inline int type_num(self) noexcept nogil:
19545 * return PyDataType_TYPENUM(self)
19546*/
19547
19548 /* function exit code */
19549 __pyx_L0:;
19550 return __pyx_r;
19551}
19552
19553/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
19554 * return PyDataType_TYPENUM(self)
19555 *
19556 * @property # <<<<<<<<<<<<<<
19557 * cdef inline npy_intp itemsize(self) noexcept nogil:
19558 * return PyDataType_ELSIZE(self)
19559*/
19560
19561static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
19562 npy_intp __pyx_r;
19563
19564 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":257
19565 * @property
19566 * cdef inline npy_intp itemsize(self) noexcept nogil:
19567 * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<<
19568 *
19569 * @property
19570*/
19571 {
19572
19573 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
19574 }
19575 goto __pyx_L0;
19576
19577 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
19578 * return PyDataType_TYPENUM(self)
19579 *
19580 * @property # <<<<<<<<<<<<<<
19581 * cdef inline npy_intp itemsize(self) noexcept nogil:
19582 * return PyDataType_ELSIZE(self)
19583*/
19584
19585 /* function exit code */
19586 __pyx_L0:;
19587 return __pyx_r;
19588}
19589
19590/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
19591 * return PyDataType_ELSIZE(self)
19592 *
19593 * @property # <<<<<<<<<<<<<<
19594 * cdef inline npy_intp alignment(self) noexcept nogil:
19595 * return PyDataType_ALIGNMENT(self)
19596*/
19597
19598static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
19599 npy_intp __pyx_r;
19600
19601 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":261
19602 * @property
19603 * cdef inline npy_intp alignment(self) noexcept nogil:
19604 * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<<
19605 *
19606 * # Use fields/names with care as they may be NULL. You must check
19607*/
19608 {
19609
19610 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
19611 }
19612 goto __pyx_L0;
19613
19614 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
19615 * return PyDataType_ELSIZE(self)
19616 *
19617 * @property # <<<<<<<<<<<<<<
19618 * cdef inline npy_intp alignment(self) noexcept nogil:
19619 * return PyDataType_ALIGNMENT(self)
19620*/
19621
19622 /* function exit code */
19623 __pyx_L0:;
19624 return __pyx_r;
19625}
19626
19627/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
19628 * # Use fields/names with care as they may be NULL. You must check
19629 * # for this using PyDataType_HASFIELDS.
19630 * @property # <<<<<<<<<<<<<<
19631 * cdef inline object fields(self):
19632 * return <object>PyDataType_FIELDS(self)
19633*/
19634
19635static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self) {
19636 PyObject *__pyx_r = NULL;
19637 __Pyx_RefNannyDeclarations
19638 PyObject *__pyx_t_1;
19639 __Pyx_RefNannySetupContext("__get__", 0);
19640
19641 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":267
19642 * @property
19643 * cdef inline object fields(self):
19644 * return <object>PyDataType_FIELDS(self) # <<<<<<<<<<<<<<
19645 *
19646 * @property
19647*/
19648 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
19649
19650 {
19651 PyObject *__pyx_temp;
19652 {
19653 __pyx_temp = __pyx_r;
19654 __Pyx_INCREF(((PyObject *)__pyx_t_1));
19655 __pyx_r = ((PyObject *)__pyx_t_1);
19656 }
19657 __Pyx_XDECREF(__pyx_temp);
19658 }
19659
19660 goto __pyx_L0;
19661
19662 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
19663 * # Use fields/names with care as they may be NULL. You must check
19664 * # for this using PyDataType_HASFIELDS.
19665 * @property # <<<<<<<<<<<<<<
19666 * cdef inline object fields(self):
19667 * return <object>PyDataType_FIELDS(self)
19668*/
19669
19670 /* function exit code */
19671 __pyx_L0:;
19672 __Pyx_XGIVEREF(__pyx_r);
19673 __Pyx_RefNannyFinishContext();
19674 return __pyx_r;
19675}
19676
19677/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
19678 * return <object>PyDataType_FIELDS(self)
19679 *
19680 * @property # <<<<<<<<<<<<<<
19681 * cdef inline tuple names(self):
19682 * return <tuple>PyDataType_NAMES(self)
19683*/
19684
19685static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self) {
19686 PyObject *__pyx_r = NULL;
19687 __Pyx_RefNannyDeclarations
19688 PyObject *__pyx_t_1;
19689 __Pyx_RefNannySetupContext("__get__", 0);
19690
19691 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":271
19692 * @property
19693 * cdef inline tuple names(self):
19694 * return <tuple>PyDataType_NAMES(self) # <<<<<<<<<<<<<<
19695 *
19696 * # Use PyDataType_HASSUBARRAY to test whether this field is
19697*/
19698 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
19699
19700 {
19701 PyObject *__pyx_temp;
19702 {
19703 __pyx_temp = __pyx_r;
19704 __Pyx_INCREF(((PyObject*)__pyx_t_1));
19705 __pyx_r = ((PyObject*)__pyx_t_1);
19706 }
19707 __Pyx_XDECREF(__pyx_temp);
19708 }
19709
19710 goto __pyx_L0;
19711
19712 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
19713 * return <object>PyDataType_FIELDS(self)
19714 *
19715 * @property # <<<<<<<<<<<<<<
19716 * cdef inline tuple names(self):
19717 * return <tuple>PyDataType_NAMES(self)
19718*/
19719
19720 /* function exit code */
19721 __pyx_L0:;
19722 __Pyx_XGIVEREF(__pyx_r);
19723 __Pyx_RefNannyFinishContext();
19724 return __pyx_r;
19725}
19726
19727/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
19728 * # valid (the pointer can be NULL). Most users should access
19729 * # this field via the inline helper method PyDataType_SHAPE.
19730 * @property # <<<<<<<<<<<<<<
19731 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
19732 * return PyDataType_SUBARRAY(self)
19733*/
19734
19735static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
19736 PyArray_ArrayDescr *__pyx_r;
19737
19738 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":278
19739 * @property
19740 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
19741 * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<<
19742 *
19743 * @property
19744*/
19745 {
19746
19747 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
19748 }
19749 goto __pyx_L0;
19750
19751 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
19752 * # valid (the pointer can be NULL). Most users should access
19753 * # this field via the inline helper method PyDataType_SHAPE.
19754 * @property # <<<<<<<<<<<<<<
19755 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
19756 * return PyDataType_SUBARRAY(self)
19757*/
19758
19759 /* function exit code */
19760 __pyx_L0:;
19761 return __pyx_r;
19762}
19763
19764/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
19765 * return PyDataType_SUBARRAY(self)
19766 *
19767 * @property # <<<<<<<<<<<<<<
19768 * cdef inline npy_uint64 flags(self) noexcept nogil:
19769 * """The data types flags."""
19770*/
19771
19772static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
19773 npy_uint64 __pyx_r;
19774
19775 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":283
19776 * cdef inline npy_uint64 flags(self) noexcept nogil:
19777 * """The data types flags."""
19778 * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<<
19779 *
19780 *
19781*/
19782 {
19783
19784 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
19785 }
19786 goto __pyx_L0;
19787
19788 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
19789 * return PyDataType_SUBARRAY(self)
19790 *
19791 * @property # <<<<<<<<<<<<<<
19792 * cdef inline npy_uint64 flags(self) noexcept nogil:
19793 * """The data types flags."""
19794*/
19795
19796 /* function exit code */
19797 __pyx_L0:;
19798 return __pyx_r;
19799}
19800
19801/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
19802 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
19803 *
19804 * @property # <<<<<<<<<<<<<<
19805 * cdef inline int numiter(self) noexcept nogil:
19806 * """The number of arrays that need to be broadcast to the same shape."""
19807*/
19808
19809static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
19810 int __pyx_r;
19811
19812 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":295
19813 * cdef inline int numiter(self) noexcept nogil:
19814 * """The number of arrays that need to be broadcast to the same shape."""
19815 * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<<
19816 *
19817 * @property
19818*/
19819 {
19820
19821 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
19822 }
19823 goto __pyx_L0;
19824
19825 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
19826 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
19827 *
19828 * @property # <<<<<<<<<<<<<<
19829 * cdef inline int numiter(self) noexcept nogil:
19830 * """The number of arrays that need to be broadcast to the same shape."""
19831*/
19832
19833 /* function exit code */
19834 __pyx_L0:;
19835 return __pyx_r;
19836}
19837
19838/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
19839 * return PyArray_MultiIter_NUMITER(self)
19840 *
19841 * @property # <<<<<<<<<<<<<<
19842 * cdef inline npy_intp size(self) noexcept nogil:
19843 * """The total broadcasted size."""
19844*/
19845
19846static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
19847 npy_intp __pyx_r;
19848
19849 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":300
19850 * cdef inline npy_intp size(self) noexcept nogil:
19851 * """The total broadcasted size."""
19852 * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<<
19853 *
19854 * @property
19855*/
19856 {
19857
19858 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
19859 }
19860 goto __pyx_L0;
19861
19862 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
19863 * return PyArray_MultiIter_NUMITER(self)
19864 *
19865 * @property # <<<<<<<<<<<<<<
19866 * cdef inline npy_intp size(self) noexcept nogil:
19867 * """The total broadcasted size."""
19868*/
19869
19870 /* function exit code */
19871 __pyx_L0:;
19872 return __pyx_r;
19873}
19874
19875/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
19876 * return PyArray_MultiIter_SIZE(self)
19877 *
19878 * @property # <<<<<<<<<<<<<<
19879 * cdef inline npy_intp index(self) noexcept nogil:
19880 * """The current (1-d) index into the broadcasted result."""
19881*/
19882
19883static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
19884 npy_intp __pyx_r;
19885
19886 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":305
19887 * cdef inline npy_intp index(self) noexcept nogil:
19888 * """The current (1-d) index into the broadcasted result."""
19889 * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<<
19890 *
19891 * @property
19892*/
19893 {
19894
19895 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
19896 }
19897 goto __pyx_L0;
19898
19899 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
19900 * return PyArray_MultiIter_SIZE(self)
19901 *
19902 * @property # <<<<<<<<<<<<<<
19903 * cdef inline npy_intp index(self) noexcept nogil:
19904 * """The current (1-d) index into the broadcasted result."""
19905*/
19906
19907 /* function exit code */
19908 __pyx_L0:;
19909 return __pyx_r;
19910}
19911
19912/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
19913 * return PyArray_MultiIter_INDEX(self)
19914 *
19915 * @property # <<<<<<<<<<<<<<
19916 * cdef inline int nd(self) noexcept nogil:
19917 * """The number of dimensions in the broadcasted result."""
19918*/
19919
19920static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
19921 int __pyx_r;
19922
19923 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":310
19924 * cdef inline int nd(self) noexcept nogil:
19925 * """The number of dimensions in the broadcasted result."""
19926 * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<<
19927 *
19928 * @property
19929*/
19930 {
19931
19932 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
19933 }
19934 goto __pyx_L0;
19935
19936 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
19937 * return PyArray_MultiIter_INDEX(self)
19938 *
19939 * @property # <<<<<<<<<<<<<<
19940 * cdef inline int nd(self) noexcept nogil:
19941 * """The number of dimensions in the broadcasted result."""
19942*/
19943
19944 /* function exit code */
19945 __pyx_L0:;
19946 return __pyx_r;
19947}
19948
19949/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
19950 * return PyArray_MultiIter_NDIM(self)
19951 *
19952 * @property # <<<<<<<<<<<<<<
19953 * cdef inline npy_intp* dimensions(self) noexcept nogil:
19954 * """The shape of the broadcasted result."""
19955*/
19956
19957static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
19958 npy_intp *__pyx_r;
19959
19960 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":315
19961 * cdef inline npy_intp* dimensions(self) noexcept nogil:
19962 * """The shape of the broadcasted result."""
19963 * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<<
19964 *
19965 * @property
19966*/
19967 {
19968
19969 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
19970 }
19971 goto __pyx_L0;
19972
19973 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
19974 * return PyArray_MultiIter_NDIM(self)
19975 *
19976 * @property # <<<<<<<<<<<<<<
19977 * cdef inline npy_intp* dimensions(self) noexcept nogil:
19978 * """The shape of the broadcasted result."""
19979*/
19980
19981 /* function exit code */
19982 __pyx_L0:;
19983 return __pyx_r;
19984}
19985
19986/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
19987 * return PyArray_MultiIter_DIMS(self)
19988 *
19989 * @property # <<<<<<<<<<<<<<
19990 * cdef inline void** iters(self) noexcept nogil:
19991 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
19992*/
19993
19994static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
19995 void **__pyx_r;
19996
19997 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":321
19998 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
19999 * On return, the iterators are adjusted for broadcasting."""
20000 * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<<
20001 *
20002 *
20003*/
20004 {
20005
20006 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
20007 }
20008 goto __pyx_L0;
20009
20010 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
20011 * return PyArray_MultiIter_DIMS(self)
20012 *
20013 * @property # <<<<<<<<<<<<<<
20014 * cdef inline void** iters(self) noexcept nogil:
20015 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
20016*/
20017
20018 /* function exit code */
20019 __pyx_L0:;
20020 return __pyx_r;
20021}
20022
20023/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
20024 * # Instead, we use properties that map to the corresponding C-API functions.
20025 *
20026 * @property # <<<<<<<<<<<<<<
20027 * cdef inline PyObject* base(self) noexcept nogil:
20028 * """Returns a borrowed reference to the object owning the data/memory.
20029*/
20030
20031static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
20032 PyObject *__pyx_r;
20033
20034 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":339
20035 * """Returns a borrowed reference to the object owning the data/memory.
20036 * """
20037 * return PyArray_BASE(self) # <<<<<<<<<<<<<<
20038 *
20039 * @property
20040*/
20041 {
20042
20043 __pyx_r = PyArray_BASE(__pyx_v_self);
20044 }
20045 goto __pyx_L0;
20046
20047 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
20048 * # Instead, we use properties that map to the corresponding C-API functions.
20049 *
20050 * @property # <<<<<<<<<<<<<<
20051 * cdef inline PyObject* base(self) noexcept nogil:
20052 * """Returns a borrowed reference to the object owning the data/memory.
20053*/
20054
20055 /* function exit code */
20056 __pyx_L0:;
20057 return __pyx_r;
20058}
20059
20060/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
20061 * return PyArray_BASE(self)
20062 *
20063 * @property # <<<<<<<<<<<<<<
20064 * cdef inline dtype descr(self):
20065 * """Returns an owned reference to the dtype of the array.
20066*/
20067
20068static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self) {
20069 PyArray_Descr *__pyx_r = NULL;
20070 __Pyx_RefNannyDeclarations
20071 PyArray_Descr *__pyx_t_1;
20072 __Pyx_RefNannySetupContext("__get__", 0);
20073
20074 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":345
20075 * """Returns an owned reference to the dtype of the array.
20076 * """
20077 * return <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
20078 *
20079 * @property
20080*/
20081 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
20082
20083 {
20084 PyArray_Descr *__pyx_temp;
20085 {
20086 __pyx_temp = __pyx_r;
20087 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
20088 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
20089 }
20090 __Pyx_XDECREF((PyObject *)__pyx_temp);
20091 }
20092
20093 goto __pyx_L0;
20094
20095 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
20096 * return PyArray_BASE(self)
20097 *
20098 * @property # <<<<<<<<<<<<<<
20099 * cdef inline dtype descr(self):
20100 * """Returns an owned reference to the dtype of the array.
20101*/
20102
20103 /* function exit code */
20104 __pyx_L0:;
20105 __Pyx_XGIVEREF((PyObject *)__pyx_r);
20106 __Pyx_RefNannyFinishContext();
20107 return __pyx_r;
20108}
20109
20110/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
20111 * return <dtype>PyArray_DESCR(self)
20112 *
20113 * @property # <<<<<<<<<<<<<<
20114 * cdef inline int ndim(self) noexcept nogil:
20115 * """Returns the number of dimensions in the array.
20116*/
20117
20118static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
20119 int __pyx_r;
20120
20121 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":351
20122 * """Returns the number of dimensions in the array.
20123 * """
20124 * return PyArray_NDIM(self) # <<<<<<<<<<<<<<
20125 *
20126 * @property
20127*/
20128 {
20129
20130 __pyx_r = PyArray_NDIM(__pyx_v_self);
20131 }
20132 goto __pyx_L0;
20133
20134 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
20135 * return <dtype>PyArray_DESCR(self)
20136 *
20137 * @property # <<<<<<<<<<<<<<
20138 * cdef inline int ndim(self) noexcept nogil:
20139 * """Returns the number of dimensions in the array.
20140*/
20141
20142 /* function exit code */
20143 __pyx_L0:;
20144 return __pyx_r;
20145}
20146
20147/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
20148 * return PyArray_NDIM(self)
20149 *
20150 * @property # <<<<<<<<<<<<<<
20151 * cdef inline npy_intp *shape(self) noexcept nogil:
20152 * """Returns a pointer to the dimensions/shape of the array.
20153*/
20154
20155static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
20156 npy_intp *__pyx_r;
20157
20158 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":359
20159 * Can return NULL for 0-dimensional arrays.
20160 * """
20161 * return PyArray_DIMS(self) # <<<<<<<<<<<<<<
20162 *
20163 * @property
20164*/
20165 {
20166
20167 __pyx_r = PyArray_DIMS(__pyx_v_self);
20168 }
20169 goto __pyx_L0;
20170
20171 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
20172 * return PyArray_NDIM(self)
20173 *
20174 * @property # <<<<<<<<<<<<<<
20175 * cdef inline npy_intp *shape(self) noexcept nogil:
20176 * """Returns a pointer to the dimensions/shape of the array.
20177*/
20178
20179 /* function exit code */
20180 __pyx_L0:;
20181 return __pyx_r;
20182}
20183
20184/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
20185 * return PyArray_DIMS(self)
20186 *
20187 * @property # <<<<<<<<<<<<<<
20188 * cdef inline npy_intp *strides(self) noexcept nogil:
20189 * """Returns a pointer to the strides of the array.
20190*/
20191
20192static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
20193 npy_intp *__pyx_r;
20194
20195 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":366
20196 * The number of elements matches the number of dimensions of the array (ndim).
20197 * """
20198 * return PyArray_STRIDES(self) # <<<<<<<<<<<<<<
20199 *
20200 * @property
20201*/
20202 {
20203
20204 __pyx_r = PyArray_STRIDES(__pyx_v_self);
20205 }
20206 goto __pyx_L0;
20207
20208 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
20209 * return PyArray_DIMS(self)
20210 *
20211 * @property # <<<<<<<<<<<<<<
20212 * cdef inline npy_intp *strides(self) noexcept nogil:
20213 * """Returns a pointer to the strides of the array.
20214*/
20215
20216 /* function exit code */
20217 __pyx_L0:;
20218 return __pyx_r;
20219}
20220
20221/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
20222 * return PyArray_STRIDES(self)
20223 *
20224 * @property # <<<<<<<<<<<<<<
20225 * cdef inline npy_intp size(self) noexcept nogil:
20226 * """Returns the total size (in number of elements) of the array.
20227*/
20228
20229static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
20230 npy_intp __pyx_r;
20231
20232 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":372
20233 * """Returns the total size (in number of elements) of the array.
20234 * """
20235 * return PyArray_SIZE(self) # <<<<<<<<<<<<<<
20236 *
20237 * @property
20238*/
20239 {
20240
20241 __pyx_r = PyArray_SIZE(__pyx_v_self);
20242 }
20243 goto __pyx_L0;
20244
20245 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
20246 * return PyArray_STRIDES(self)
20247 *
20248 * @property # <<<<<<<<<<<<<<
20249 * cdef inline npy_intp size(self) noexcept nogil:
20250 * """Returns the total size (in number of elements) of the array.
20251*/
20252
20253 /* function exit code */
20254 __pyx_L0:;
20255 return __pyx_r;
20256}
20257
20258/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
20259 * return PyArray_SIZE(self)
20260 *
20261 * @property # <<<<<<<<<<<<<<
20262 * cdef inline char* data(self) noexcept nogil:
20263 * """The pointer to the data buffer as a char*.
20264*/
20265
20266static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
20267 char *__pyx_r;
20268
20269 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":381
20270 * of `PyArray_DATA()` instead, which returns a 'void*'.
20271 * """
20272 * return PyArray_BYTES(self) # <<<<<<<<<<<<<<
20273 *
20274 *
20275*/
20276 {
20277
20278 __pyx_r = PyArray_BYTES(__pyx_v_self);
20279 }
20280 goto __pyx_L0;
20281
20282 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
20283 * return PyArray_SIZE(self)
20284 *
20285 * @property # <<<<<<<<<<<<<<
20286 * cdef inline char* data(self) noexcept nogil:
20287 * """The pointer to the data buffer as a char*.
20288*/
20289
20290 /* function exit code */
20291 __pyx_L0:;
20292 return __pyx_r;
20293}
20294
20295/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
20296 * ctypedef long double complex clongdouble_t
20297 *
20298 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
20299 * return PyArray_MultiIterNew(1, <void*>a)
20300 *
20301*/
20302
20303static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
20304 PyObject *__pyx_r = NULL;
20305 __Pyx_RefNannyDeclarations
20306 PyObject *__pyx_t_1 = NULL;
20307 int __pyx_lineno = 0;
20308 const char *__pyx_filename = NULL;
20309 int __pyx_clineno = 0;
20310 __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
20311
20312 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":795
20313 *
20314 * cdef inline object PyArray_MultiIterNew1(a):
20315 * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
20316 *
20317 * cdef inline object PyArray_MultiIterNew2(a, b):
20318*/
20319 __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 795, __pyx_L1_error)
20320 __Pyx_GOTREF(__pyx_t_1);
20321 {
20322 PyObject *__pyx_temp;
20323 {
20324 __pyx_temp = __pyx_r;
20325 __pyx_r = __pyx_t_1;
20326 }
20327 __Pyx_XDECREF(__pyx_temp);
20328 }
20329 __pyx_t_1 = 0;
20330 goto __pyx_L0;
20331
20332 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
20333 * ctypedef long double complex clongdouble_t
20334 *
20335 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
20336 * return PyArray_MultiIterNew(1, <void*>a)
20337 *
20338*/
20339
20340 /* function exit code */
20341 __pyx_L1_error:;
20342 __Pyx_XDECREF(__pyx_t_1);
20343 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
20344 __pyx_r = 0;
20345 __pyx_L0:;
20346 __Pyx_XGIVEREF(__pyx_r);
20347 __Pyx_RefNannyFinishContext();
20348 return __pyx_r;
20349}
20350
20351/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
20352 * return PyArray_MultiIterNew(1, <void*>a)
20353 *
20354 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
20355 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
20356 *
20357*/
20358
20359static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
20360 PyObject *__pyx_r = NULL;
20361 __Pyx_RefNannyDeclarations
20362 PyObject *__pyx_t_1 = NULL;
20363 int __pyx_lineno = 0;
20364 const char *__pyx_filename = NULL;
20365 int __pyx_clineno = 0;
20366 __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
20367
20368 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":798
20369 *
20370 * cdef inline object PyArray_MultiIterNew2(a, b):
20371 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
20372 *
20373 * cdef inline object PyArray_MultiIterNew3(a, b, c):
20374*/
20375 __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 798, __pyx_L1_error)
20376 __Pyx_GOTREF(__pyx_t_1);
20377 {
20378 PyObject *__pyx_temp;
20379 {
20380 __pyx_temp = __pyx_r;
20381 __pyx_r = __pyx_t_1;
20382 }
20383 __Pyx_XDECREF(__pyx_temp);
20384 }
20385 __pyx_t_1 = 0;
20386 goto __pyx_L0;
20387
20388 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
20389 * return PyArray_MultiIterNew(1, <void*>a)
20390 *
20391 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
20392 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
20393 *
20394*/
20395
20396 /* function exit code */
20397 __pyx_L1_error:;
20398 __Pyx_XDECREF(__pyx_t_1);
20399 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
20400 __pyx_r = 0;
20401 __pyx_L0:;
20402 __Pyx_XGIVEREF(__pyx_r);
20403 __Pyx_RefNannyFinishContext();
20404 return __pyx_r;
20405}
20406
20407/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
20408 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
20409 *
20410 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
20411 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
20412 *
20413*/
20414
20415static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
20416 PyObject *__pyx_r = NULL;
20417 __Pyx_RefNannyDeclarations
20418 PyObject *__pyx_t_1 = NULL;
20419 int __pyx_lineno = 0;
20420 const char *__pyx_filename = NULL;
20421 int __pyx_clineno = 0;
20422 __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
20423
20424 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":801
20425 *
20426 * cdef inline object PyArray_MultiIterNew3(a, b, c):
20427 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
20428 *
20429 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
20430*/
20431 __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 801, __pyx_L1_error)
20432 __Pyx_GOTREF(__pyx_t_1);
20433 {
20434 PyObject *__pyx_temp;
20435 {
20436 __pyx_temp = __pyx_r;
20437 __pyx_r = __pyx_t_1;
20438 }
20439 __Pyx_XDECREF(__pyx_temp);
20440 }
20441 __pyx_t_1 = 0;
20442 goto __pyx_L0;
20443
20444 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
20445 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
20446 *
20447 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
20448 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
20449 *
20450*/
20451
20452 /* function exit code */
20453 __pyx_L1_error:;
20454 __Pyx_XDECREF(__pyx_t_1);
20455 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
20456 __pyx_r = 0;
20457 __pyx_L0:;
20458 __Pyx_XGIVEREF(__pyx_r);
20459 __Pyx_RefNannyFinishContext();
20460 return __pyx_r;
20461}
20462
20463/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
20464 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
20465 *
20466 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
20467 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
20468 *
20469*/
20470
20471static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
20472 PyObject *__pyx_r = NULL;
20473 __Pyx_RefNannyDeclarations
20474 PyObject *__pyx_t_1 = NULL;
20475 int __pyx_lineno = 0;
20476 const char *__pyx_filename = NULL;
20477 int __pyx_clineno = 0;
20478 __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
20479
20480 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":804
20481 *
20482 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
20483 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
20484 *
20485 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
20486*/
20487 __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 804, __pyx_L1_error)
20488 __Pyx_GOTREF(__pyx_t_1);
20489 {
20490 PyObject *__pyx_temp;
20491 {
20492 __pyx_temp = __pyx_r;
20493 __pyx_r = __pyx_t_1;
20494 }
20495 __Pyx_XDECREF(__pyx_temp);
20496 }
20497 __pyx_t_1 = 0;
20498 goto __pyx_L0;
20499
20500 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
20501 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
20502 *
20503 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
20504 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
20505 *
20506*/
20507
20508 /* function exit code */
20509 __pyx_L1_error:;
20510 __Pyx_XDECREF(__pyx_t_1);
20511 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
20512 __pyx_r = 0;
20513 __pyx_L0:;
20514 __Pyx_XGIVEREF(__pyx_r);
20515 __Pyx_RefNannyFinishContext();
20516 return __pyx_r;
20517}
20518
20519/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
20520 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
20521 *
20522 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
20523 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
20524 *
20525*/
20526
20527static 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) {
20528 PyObject *__pyx_r = NULL;
20529 __Pyx_RefNannyDeclarations
20530 PyObject *__pyx_t_1 = NULL;
20531 int __pyx_lineno = 0;
20532 const char *__pyx_filename = NULL;
20533 int __pyx_clineno = 0;
20534 __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
20535
20536 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":807
20537 *
20538 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
20539 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
20540 *
20541 * cdef inline tuple PyDataType_SHAPE(dtype d):
20542*/
20543 __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error)
20544 __Pyx_GOTREF(__pyx_t_1);
20545 {
20546 PyObject *__pyx_temp;
20547 {
20548 __pyx_temp = __pyx_r;
20549 __pyx_r = __pyx_t_1;
20550 }
20551 __Pyx_XDECREF(__pyx_temp);
20552 }
20553 __pyx_t_1 = 0;
20554 goto __pyx_L0;
20555
20556 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
20557 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
20558 *
20559 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
20560 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
20561 *
20562*/
20563
20564 /* function exit code */
20565 __pyx_L1_error:;
20566 __Pyx_XDECREF(__pyx_t_1);
20567 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
20568 __pyx_r = 0;
20569 __pyx_L0:;
20570 __Pyx_XGIVEREF(__pyx_r);
20571 __Pyx_RefNannyFinishContext();
20572 return __pyx_r;
20573}
20574
20575/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
20576 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
20577 *
20578 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
20579 * if PyDataType_HASSUBARRAY(d):
20580 * return <tuple>d.subarray.shape
20581*/
20582
20583static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
20584 PyObject *__pyx_r = NULL;
20585 __Pyx_RefNannyDeclarations
20586 int __pyx_t_1;
20587 PyObject *__pyx_t_2;
20588 __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
20589
20590 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
20591 *
20592 * cdef inline tuple PyDataType_SHAPE(dtype d):
20593 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
20594 * return <tuple>d.subarray.shape
20595 * else:
20596*/
20597 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
20598
20599 if (__pyx_t_1) {
20600
20601
20602 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":811
20603 * cdef inline tuple PyDataType_SHAPE(dtype d):
20604 * if PyDataType_HASSUBARRAY(d):
20605 * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
20606 * else:
20607 * return ()
20608*/
20609 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
20610
20611 {
20612 PyObject *__pyx_temp;
20613 {
20614 __pyx_temp = __pyx_r;
20615 __Pyx_INCREF(((PyObject*)__pyx_t_2));
20616 __pyx_r = ((PyObject*)__pyx_t_2);
20617 }
20618 __Pyx_XDECREF(__pyx_temp);
20619 }
20620
20621 goto __pyx_L0;
20622
20623 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
20624 *
20625 * cdef inline tuple PyDataType_SHAPE(dtype d):
20626 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
20627 * return <tuple>d.subarray.shape
20628 * else:
20629*/
20630 }
20631
20632 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":813
20633 * return <tuple>d.subarray.shape
20634 * else:
20635 * return () # <<<<<<<<<<<<<<
20636 *
20637 *
20638*/
20639 /*else*/ {
20640 {
20641 PyObject *__pyx_temp;
20642 {
20643 __pyx_temp = __pyx_r;
20644 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
20645 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
20646 }
20647 __Pyx_XDECREF(__pyx_temp);
20648 }
20649 goto __pyx_L0;
20650 }
20651
20652 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
20653 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
20654 *
20655 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
20656 * if PyDataType_HASSUBARRAY(d):
20657 * return <tuple>d.subarray.shape
20658*/
20659
20660 /* function exit code */
20661 __pyx_L0:;
20662 __Pyx_XGIVEREF(__pyx_r);
20663 __Pyx_RefNannyFinishContext();
20664 return __pyx_r;
20665}
20666
20667/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
20668 *
20669 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
20670 * @property # <<<<<<<<<<<<<<
20671 * cdef inline int nin(self) noexcept nogil:
20672 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
20673*/
20674
20675static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
20676 int __pyx_r;
20677
20678 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":949
20679 * @property
20680 * cdef inline int nin(self) noexcept nogil:
20681 * return _PyUFuncObject_GET_ITEM_DATA(self).nin # <<<<<<<<<<<<<<
20682 *
20683 * @property
20684*/
20685 {
20686
20687 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
20688 }
20689 goto __pyx_L0;
20690
20691 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
20692 *
20693 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
20694 * @property # <<<<<<<<<<<<<<
20695 * cdef inline int nin(self) noexcept nogil:
20696 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
20697*/
20698
20699 /* function exit code */
20700 __pyx_L0:;
20701 return __pyx_r;
20702}
20703
20704/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
20705 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
20706 *
20707 * @property # <<<<<<<<<<<<<<
20708 * cdef inline int nout(self) noexcept nogil:
20709 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
20710*/
20711
20712static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
20713 int __pyx_r;
20714
20715 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":953
20716 * @property
20717 * cdef inline int nout(self) noexcept nogil:
20718 * return _PyUFuncObject_GET_ITEM_DATA(self).nout # <<<<<<<<<<<<<<
20719 *
20720 * @property
20721*/
20722 {
20723
20724 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
20725 }
20726 goto __pyx_L0;
20727
20728 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
20729 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
20730 *
20731 * @property # <<<<<<<<<<<<<<
20732 * cdef inline int nout(self) noexcept nogil:
20733 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
20734*/
20735
20736 /* function exit code */
20737 __pyx_L0:;
20738 return __pyx_r;
20739}
20740
20741/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
20742 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
20743 *
20744 * @property # <<<<<<<<<<<<<<
20745 * cdef inline int nargs(self) noexcept nogil:
20746 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
20747*/
20748
20749static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
20750 int __pyx_r;
20751
20752 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":957
20753 * @property
20754 * cdef inline int nargs(self) noexcept nogil:
20755 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs # <<<<<<<<<<<<<<
20756 *
20757 * @property
20758*/
20759 {
20760
20761 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
20762 }
20763 goto __pyx_L0;
20764
20765 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
20766 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
20767 *
20768 * @property # <<<<<<<<<<<<<<
20769 * cdef inline int nargs(self) noexcept nogil:
20770 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
20771*/
20772
20773 /* function exit code */
20774 __pyx_L0:;
20775 return __pyx_r;
20776}
20777
20778/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
20779 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
20780 *
20781 * @property # <<<<<<<<<<<<<<
20782 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
20783 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
20784*/
20785
20786static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
20787 PyUFuncGenericFunction *__pyx_r;
20788
20789 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":961
20790 * @property
20791 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
20792 * return _PyUFuncObject_GET_ITEM_DATA(self).functions # <<<<<<<<<<<<<<
20793 *
20794 * @property
20795*/
20796 {
20797
20798 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
20799 }
20800 goto __pyx_L0;
20801
20802 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
20803 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
20804 *
20805 * @property # <<<<<<<<<<<<<<
20806 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
20807 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
20808*/
20809
20810 /* function exit code */
20811 __pyx_L0:;
20812 return __pyx_r;
20813}
20814
20815/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
20816 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
20817 *
20818 * @property # <<<<<<<<<<<<<<
20819 * cdef inline void ** data(self) noexcept nogil:
20820 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
20821*/
20822
20823static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
20824 void **__pyx_r;
20825
20826 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":965
20827 * @property
20828 * cdef inline void ** data(self) noexcept nogil:
20829 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data # <<<<<<<<<<<<<<
20830 *
20831 * @property
20832*/
20833 {
20834
20835 __pyx_r = ((void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
20836 }
20837 goto __pyx_L0;
20838
20839 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
20840 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
20841 *
20842 * @property # <<<<<<<<<<<<<<
20843 * cdef inline void ** data(self) noexcept nogil:
20844 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
20845*/
20846
20847 /* function exit code */
20848 __pyx_L0:;
20849 return __pyx_r;
20850}
20851
20852/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
20853 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
20854 *
20855 * @property # <<<<<<<<<<<<<<
20856 * cdef inline int ntypes(self) noexcept nogil:
20857 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
20858*/
20859
20860static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
20861 int __pyx_r;
20862
20863 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":969
20864 * @property
20865 * cdef inline int ntypes(self) noexcept nogil:
20866 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes # <<<<<<<<<<<<<<
20867 *
20868 * @property
20869*/
20870 {
20871
20872 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
20873 }
20874 goto __pyx_L0;
20875
20876 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
20877 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
20878 *
20879 * @property # <<<<<<<<<<<<<<
20880 * cdef inline int ntypes(self) noexcept nogil:
20881 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
20882*/
20883
20884 /* function exit code */
20885 __pyx_L0:;
20886 return __pyx_r;
20887}
20888
20889/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
20890 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
20891 *
20892 * @property # <<<<<<<<<<<<<<
20893 * cdef inline const char* name(self) noexcept nogil:
20894 * return _PyUFuncObject_GET_ITEM_DATA(self).name
20895*/
20896
20897static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
20898 char const *__pyx_r;
20899
20900 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":973
20901 * @property
20902 * cdef inline const char* name(self) noexcept nogil:
20903 * return _PyUFuncObject_GET_ITEM_DATA(self).name # <<<<<<<<<<<<<<
20904 *
20905 * @property
20906*/
20907 {
20908
20909 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
20910 }
20911 goto __pyx_L0;
20912
20913 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
20914 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
20915 *
20916 * @property # <<<<<<<<<<<<<<
20917 * cdef inline const char* name(self) noexcept nogil:
20918 * return _PyUFuncObject_GET_ITEM_DATA(self).name
20919*/
20920
20921 /* function exit code */
20922 __pyx_L0:;
20923 return __pyx_r;
20924}
20925
20926/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
20927 * return _PyUFuncObject_GET_ITEM_DATA(self).name
20928 *
20929 * @property # <<<<<<<<<<<<<<
20930 * cdef inline const char* doc(self) noexcept nogil:
20931 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
20932*/
20933
20934static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
20935 char const *__pyx_r;
20936
20937 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":977
20938 * @property
20939 * cdef inline const char* doc(self) noexcept nogil:
20940 * return _PyUFuncObject_GET_ITEM_DATA(self).doc # <<<<<<<<<<<<<<
20941 *
20942 * @property
20943*/
20944 {
20945
20946 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
20947 }
20948 goto __pyx_L0;
20949
20950 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
20951 * return _PyUFuncObject_GET_ITEM_DATA(self).name
20952 *
20953 * @property # <<<<<<<<<<<<<<
20954 * cdef inline const char* doc(self) noexcept nogil:
20955 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
20956*/
20957
20958 /* function exit code */
20959 __pyx_L0:;
20960 return __pyx_r;
20961}
20962
20963/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
20964 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
20965 *
20966 * @property # <<<<<<<<<<<<<<
20967 * cdef inline void* ptr(self) noexcept nogil:
20968 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
20969*/
20970
20971static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
20972 void *__pyx_r;
20973
20974 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":981
20975 * @property
20976 * cdef inline void* ptr(self) noexcept nogil:
20977 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr # <<<<<<<<<<<<<<
20978 *
20979 * @property
20980*/
20981 {
20982
20983 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
20984 }
20985 goto __pyx_L0;
20986
20987 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
20988 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
20989 *
20990 * @property # <<<<<<<<<<<<<<
20991 * cdef inline void* ptr(self) noexcept nogil:
20992 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
20993*/
20994
20995 /* function exit code */
20996 __pyx_L0:;
20997 return __pyx_r;
20998}
20999
21000/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
21001 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
21002 *
21003 * @property # <<<<<<<<<<<<<<
21004 * cdef inline PyObject* obj(self) noexcept nogil:
21005 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
21006*/
21007
21008static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
21009 PyObject *__pyx_r;
21010
21011 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":985
21012 * @property
21013 * cdef inline PyObject* obj(self) noexcept nogil:
21014 * return _PyUFuncObject_GET_ITEM_DATA(self).obj # <<<<<<<<<<<<<<
21015 *
21016 * @property
21017*/
21018 {
21019
21020 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
21021 }
21022 goto __pyx_L0;
21023
21024 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
21025 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
21026 *
21027 * @property # <<<<<<<<<<<<<<
21028 * cdef inline PyObject* obj(self) noexcept nogil:
21029 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
21030*/
21031
21032 /* function exit code */
21033 __pyx_L0:;
21034 return __pyx_r;
21035}
21036
21037/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
21038 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
21039 *
21040 * @property # <<<<<<<<<<<<<<
21041 * cdef inline PyObject* userloops(self) noexcept nogil:
21042 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
21043*/
21044
21045static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
21046 PyObject *__pyx_r;
21047
21048 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":989
21049 * @property
21050 * cdef inline PyObject* userloops(self) noexcept nogil:
21051 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops # <<<<<<<<<<<<<<
21052 *
21053 * PyUFuncObject_fields *_PyUFuncObject_GET_ITEM_DATA(ufunc) nogil
21054*/
21055 {
21056
21057 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
21058 }
21059 goto __pyx_L0;
21060
21061 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
21062 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
21063 *
21064 * @property # <<<<<<<<<<<<<<
21065 * cdef inline PyObject* userloops(self) noexcept nogil:
21066 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
21067*/
21068
21069 /* function exit code */
21070 __pyx_L0:;
21071 return __pyx_r;
21072}
21073
21074/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
21075 * int _import_umath() except -1
21076 *
21077 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
21078 * Py_INCREF(base) # important to do this before stealing the reference below!
21079 * PyArray_SetBaseObject(arr, base)
21080*/
21081
21082static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
21083 int __pyx_t_1;
21084 int __pyx_lineno = 0;
21085 const char *__pyx_filename = NULL;
21086 int __pyx_clineno = 0;
21087
21088 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1066
21089 *
21090 * cdef inline void set_array_base(ndarray arr, object base) except *:
21091 * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
21092 * PyArray_SetBaseObject(arr, base)
21093 *
21094*/
21095 Py_INCREF(__pyx_v_base);
21096
21097 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1067
21098 * cdef inline void set_array_base(ndarray arr, object base) except *:
21099 * Py_INCREF(base) # important to do this before stealing the reference below!
21100 * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
21101 *
21102 * cdef inline object get_array_base(ndarray arr):
21103*/
21104 __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1067, __pyx_L1_error)
21105
21106
21107 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
21108 * int _import_umath() except -1
21109 *
21110 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
21111 * Py_INCREF(base) # important to do this before stealing the reference below!
21112 * PyArray_SetBaseObject(arr, base)
21113*/
21114
21115 /* function exit code */
21116 goto __pyx_L0;
21117 __pyx_L1_error:;
21118 __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
21119 __pyx_L0:;
21120
21121}
21122
21123/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
21124 * PyArray_SetBaseObject(arr, base)
21125 *
21126 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
21127 * base = PyArray_BASE(arr)
21128 * if base is NULL:
21129*/
21130
21131static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
21132 PyObject *__pyx_v_base;
21133 PyObject *__pyx_r = NULL;
21134 __Pyx_RefNannyDeclarations
21135 int __pyx_t_1;
21136 __Pyx_RefNannySetupContext("get_array_base", 0);
21137
21138 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1070
21139 *
21140 * cdef inline object get_array_base(ndarray arr):
21141 * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
21142 * if base is NULL:
21143 * return None
21144*/
21145 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
21146
21147 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
21148 * cdef inline object get_array_base(ndarray arr):
21149 * base = PyArray_BASE(arr)
21150 * if base is NULL: # <<<<<<<<<<<<<<
21151 * return None
21152 * return <object>base
21153*/
21154 __pyx_t_1 = (__pyx_v_base == NULL);
21155
21156 if (__pyx_t_1) {
21157
21158
21159 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1072
21160 * base = PyArray_BASE(arr)
21161 * if base is NULL:
21162 * return None # <<<<<<<<<<<<<<
21163 * return <object>base
21164 *
21165*/
21166 {
21167 PyObject *__pyx_temp;
21168 {
21169 __pyx_temp = __pyx_r;
21170 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21171 }
21172 __Pyx_XDECREF(__pyx_temp);
21173 }
21174 goto __pyx_L0;
21175
21176 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
21177 * cdef inline object get_array_base(ndarray arr):
21178 * base = PyArray_BASE(arr)
21179 * if base is NULL: # <<<<<<<<<<<<<<
21180 * return None
21181 * return <object>base
21182*/
21183 }
21184
21185 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1073
21186 * if base is NULL:
21187 * return None
21188 * return <object>base # <<<<<<<<<<<<<<
21189 *
21190 * # Versions of the import_* functions which are more suitable for
21191*/
21192 {
21193 PyObject *__pyx_temp;
21194 {
21195 __pyx_temp = __pyx_r;
21196 __Pyx_INCREF(((PyObject *)__pyx_v_base));
21197 __pyx_r = ((PyObject *)__pyx_v_base);
21198 }
21199 __Pyx_XDECREF(__pyx_temp);
21200 }
21201 goto __pyx_L0;
21202
21203 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
21204 * PyArray_SetBaseObject(arr, base)
21205 *
21206 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
21207 * base = PyArray_BASE(arr)
21208 * if base is NULL:
21209*/
21210
21211 /* function exit code */
21212 __pyx_L0:;
21213
21214 __Pyx_XGIVEREF(__pyx_r);
21215 __Pyx_RefNannyFinishContext();
21216 return __pyx_r;
21217}
21218
21219/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
21220 * # Versions of the import_* functions which are more suitable for
21221 * # Cython code.
21222 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
21223 * try:
21224 * __pyx_import_array()
21225*/
21226
21227static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
21228 int __pyx_r;
21229 __Pyx_RefNannyDeclarations
21230 PyObject *__pyx_t_1 = NULL;
21231 PyObject *__pyx_t_2 = NULL;
21232 PyObject *__pyx_t_3 = NULL;
21233 int __pyx_t_4;
21234 PyObject *__pyx_t_5 = NULL;
21235 PyObject *__pyx_t_6 = NULL;
21236 PyObject *__pyx_t_7 = NULL;
21237 PyObject *__pyx_t_8 = NULL;
21238 PyObject *__pyx_t_9 = NULL;
21239 size_t __pyx_t_10;
21240 int __pyx_lineno = 0;
21241 const char *__pyx_filename = NULL;
21242 int __pyx_clineno = 0;
21243 __Pyx_RefNannySetupContext("import_array", 0);
21244
21245 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
21246 * # Cython code.
21247 * cdef inline int import_array() except -1:
21248 * try: # <<<<<<<<<<<<<<
21249 * __pyx_import_array()
21250 * except Exception:
21251*/
21252 {
21253 __Pyx_PyThreadState_declare
21254 __Pyx_PyThreadState_assign
21255 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
21256 __Pyx_XGOTREF(__pyx_t_1);
21257 __Pyx_XGOTREF(__pyx_t_2);
21258 __Pyx_XGOTREF(__pyx_t_3);
21259 /*try:*/ {
21260
21261 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1079
21262 * cdef inline int import_array() except -1:
21263 * try:
21264 * __pyx_import_array() # <<<<<<<<<<<<<<
21265 * except Exception:
21266 * raise ImportError("numpy._core.multiarray failed to import")
21267*/
21268 __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1079, __pyx_L3_error)
21269
21270
21271 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
21272 * # Cython code.
21273 * cdef inline int import_array() except -1:
21274 * try: # <<<<<<<<<<<<<<
21275 * __pyx_import_array()
21276 * except Exception:
21277*/
21278 }
21279 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21280 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21281 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21282 goto __pyx_L8_try_end;
21283 __pyx_L3_error:;
21284
21285 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1080
21286 * try:
21287 * __pyx_import_array()
21288 * except Exception: # <<<<<<<<<<<<<<
21289 * raise ImportError("numpy._core.multiarray failed to import")
21290 *
21291*/
21292 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
21293 if (__pyx_t_4) {
21294 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
21295 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1080, __pyx_L5_except_error)
21296 __Pyx_XGOTREF(__pyx_t_5);
21297 __Pyx_XGOTREF(__pyx_t_6);
21298 __Pyx_XGOTREF(__pyx_t_7);
21299
21300 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1081
21301 * __pyx_import_array()
21302 * except Exception:
21303 * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<<
21304 *
21305 * cdef inline int import_umath() except -1:
21306*/
21307 __pyx_t_9 = NULL;
21308 __pyx_t_10 = 1;
21309 {
21310 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
21311 __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));
21312 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
21313 if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1081, __pyx_L5_except_error)
21314 __Pyx_GOTREF(__pyx_t_8);
21315 }
21316 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
21317 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21318 __PYX_ERR(2, 1081, __pyx_L5_except_error)
21319 }
21320 goto __pyx_L5_except_error;
21321
21322 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
21323 * # Cython code.
21324 * cdef inline int import_array() except -1:
21325 * try: # <<<<<<<<<<<<<<
21326 * __pyx_import_array()
21327 * except Exception:
21328*/
21329 __pyx_L5_except_error:;
21330 __Pyx_XGIVEREF(__pyx_t_1);
21331 __Pyx_XGIVEREF(__pyx_t_2);
21332 __Pyx_XGIVEREF(__pyx_t_3);
21333 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21334 goto __pyx_L1_error;
21335 __pyx_L8_try_end:;
21336 }
21337
21338 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
21339 * # Versions of the import_* functions which are more suitable for
21340 * # Cython code.
21341 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
21342 * try:
21343 * __pyx_import_array()
21344*/
21345
21346 /* function exit code */
21347 __pyx_r = 0;
21348 goto __pyx_L0;
21349 __pyx_L1_error:;
21350 __Pyx_XDECREF(__pyx_t_5);
21351 __Pyx_XDECREF(__pyx_t_6);
21352 __Pyx_XDECREF(__pyx_t_7);
21353 __Pyx_XDECREF(__pyx_t_8);
21354 __Pyx_XDECREF(__pyx_t_9);
21355 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
21356 __pyx_r = -1;
21357 __pyx_L0:;
21358
21359 __Pyx_RefNannyFinishContext();
21360 return __pyx_r;
21361}
21362
21363/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
21364 * raise ImportError("numpy._core.multiarray failed to import")
21365 *
21366 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
21367 * try:
21368 * _import_umath()
21369*/
21370
21371static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
21372 int __pyx_r;
21373 __Pyx_RefNannyDeclarations
21374 PyObject *__pyx_t_1 = NULL;
21375 PyObject *__pyx_t_2 = NULL;
21376 PyObject *__pyx_t_3 = NULL;
21377 int __pyx_t_4;
21378 PyObject *__pyx_t_5 = NULL;
21379 PyObject *__pyx_t_6 = NULL;
21380 PyObject *__pyx_t_7 = NULL;
21381 PyObject *__pyx_t_8 = NULL;
21382 PyObject *__pyx_t_9 = NULL;
21383 size_t __pyx_t_10;
21384 int __pyx_lineno = 0;
21385 const char *__pyx_filename = NULL;
21386 int __pyx_clineno = 0;
21387 __Pyx_RefNannySetupContext("import_umath", 0);
21388
21389 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
21390 *
21391 * cdef inline int import_umath() except -1:
21392 * try: # <<<<<<<<<<<<<<
21393 * _import_umath()
21394 * except Exception:
21395*/
21396 {
21397 __Pyx_PyThreadState_declare
21398 __Pyx_PyThreadState_assign
21399 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
21400 __Pyx_XGOTREF(__pyx_t_1);
21401 __Pyx_XGOTREF(__pyx_t_2);
21402 __Pyx_XGOTREF(__pyx_t_3);
21403 /*try:*/ {
21404
21405 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1085
21406 * cdef inline int import_umath() except -1:
21407 * try:
21408 * _import_umath() # <<<<<<<<<<<<<<
21409 * except Exception:
21410 * raise ImportError("numpy._core.umath failed to import")
21411*/
21412 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1085, __pyx_L3_error)
21413
21414
21415 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
21416 *
21417 * cdef inline int import_umath() except -1:
21418 * try: # <<<<<<<<<<<<<<
21419 * _import_umath()
21420 * except Exception:
21421*/
21422 }
21423 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21424 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21425 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21426 goto __pyx_L8_try_end;
21427 __pyx_L3_error:;
21428
21429 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1086
21430 * try:
21431 * _import_umath()
21432 * except Exception: # <<<<<<<<<<<<<<
21433 * raise ImportError("numpy._core.umath failed to import")
21434 *
21435*/
21436 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
21437 if (__pyx_t_4) {
21438 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
21439 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1086, __pyx_L5_except_error)
21440 __Pyx_XGOTREF(__pyx_t_5);
21441 __Pyx_XGOTREF(__pyx_t_6);
21442 __Pyx_XGOTREF(__pyx_t_7);
21443
21444 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1087
21445 * _import_umath()
21446 * except Exception:
21447 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
21448 *
21449 * cdef inline int import_ufunc() except -1:
21450*/
21451 __pyx_t_9 = NULL;
21452 __pyx_t_10 = 1;
21453 {
21454 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
21455 __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));
21456 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
21457 if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1087, __pyx_L5_except_error)
21458 __Pyx_GOTREF(__pyx_t_8);
21459 }
21460 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
21461 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21462 __PYX_ERR(2, 1087, __pyx_L5_except_error)
21463 }
21464 goto __pyx_L5_except_error;
21465
21466 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
21467 *
21468 * cdef inline int import_umath() except -1:
21469 * try: # <<<<<<<<<<<<<<
21470 * _import_umath()
21471 * except Exception:
21472*/
21473 __pyx_L5_except_error:;
21474 __Pyx_XGIVEREF(__pyx_t_1);
21475 __Pyx_XGIVEREF(__pyx_t_2);
21476 __Pyx_XGIVEREF(__pyx_t_3);
21477 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21478 goto __pyx_L1_error;
21479 __pyx_L8_try_end:;
21480 }
21481
21482 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
21483 * raise ImportError("numpy._core.multiarray failed to import")
21484 *
21485 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
21486 * try:
21487 * _import_umath()
21488*/
21489
21490 /* function exit code */
21491 __pyx_r = 0;
21492 goto __pyx_L0;
21493 __pyx_L1_error:;
21494 __Pyx_XDECREF(__pyx_t_5);
21495 __Pyx_XDECREF(__pyx_t_6);
21496 __Pyx_XDECREF(__pyx_t_7);
21497 __Pyx_XDECREF(__pyx_t_8);
21498 __Pyx_XDECREF(__pyx_t_9);
21499 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
21500 __pyx_r = -1;
21501 __pyx_L0:;
21502
21503 __Pyx_RefNannyFinishContext();
21504 return __pyx_r;
21505}
21506
21507/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
21508 * raise ImportError("numpy._core.umath failed to import")
21509 *
21510 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
21511 * try:
21512 * _import_umath()
21513*/
21514
21515static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
21516 int __pyx_r;
21517 __Pyx_RefNannyDeclarations
21518 PyObject *__pyx_t_1 = NULL;
21519 PyObject *__pyx_t_2 = NULL;
21520 PyObject *__pyx_t_3 = NULL;
21521 int __pyx_t_4;
21522 PyObject *__pyx_t_5 = NULL;
21523 PyObject *__pyx_t_6 = NULL;
21524 PyObject *__pyx_t_7 = NULL;
21525 PyObject *__pyx_t_8 = NULL;
21526 PyObject *__pyx_t_9 = NULL;
21527 size_t __pyx_t_10;
21528 int __pyx_lineno = 0;
21529 const char *__pyx_filename = NULL;
21530 int __pyx_clineno = 0;
21531 __Pyx_RefNannySetupContext("import_ufunc", 0);
21532
21533 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
21534 *
21535 * cdef inline int import_ufunc() except -1:
21536 * try: # <<<<<<<<<<<<<<
21537 * _import_umath()
21538 * except Exception:
21539*/
21540 {
21541 __Pyx_PyThreadState_declare
21542 __Pyx_PyThreadState_assign
21543 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
21544 __Pyx_XGOTREF(__pyx_t_1);
21545 __Pyx_XGOTREF(__pyx_t_2);
21546 __Pyx_XGOTREF(__pyx_t_3);
21547 /*try:*/ {
21548
21549 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1091
21550 * cdef inline int import_ufunc() except -1:
21551 * try:
21552 * _import_umath() # <<<<<<<<<<<<<<
21553 * except Exception:
21554 * raise ImportError("numpy._core.umath failed to import")
21555*/
21556 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1091, __pyx_L3_error)
21557
21558
21559 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
21560 *
21561 * cdef inline int import_ufunc() except -1:
21562 * try: # <<<<<<<<<<<<<<
21563 * _import_umath()
21564 * except Exception:
21565*/
21566 }
21567 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21568 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21569 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21570 goto __pyx_L8_try_end;
21571 __pyx_L3_error:;
21572
21573 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1092
21574 * try:
21575 * _import_umath()
21576 * except Exception: # <<<<<<<<<<<<<<
21577 * raise ImportError("numpy._core.umath failed to import")
21578 *
21579*/
21580 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
21581 if (__pyx_t_4) {
21582 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
21583 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1092, __pyx_L5_except_error)
21584 __Pyx_XGOTREF(__pyx_t_5);
21585 __Pyx_XGOTREF(__pyx_t_6);
21586 __Pyx_XGOTREF(__pyx_t_7);
21587
21588 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1093
21589 * _import_umath()
21590 * except Exception:
21591 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
21592 *
21593 *
21594*/
21595 __pyx_t_9 = NULL;
21596 __pyx_t_10 = 1;
21597 {
21598 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
21599 __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));
21600 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
21601 if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1093, __pyx_L5_except_error)
21602 __Pyx_GOTREF(__pyx_t_8);
21603 }
21604 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
21605 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21606 __PYX_ERR(2, 1093, __pyx_L5_except_error)
21607 }
21608 goto __pyx_L5_except_error;
21609
21610 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
21611 *
21612 * cdef inline int import_ufunc() except -1:
21613 * try: # <<<<<<<<<<<<<<
21614 * _import_umath()
21615 * except Exception:
21616*/
21617 __pyx_L5_except_error:;
21618 __Pyx_XGIVEREF(__pyx_t_1);
21619 __Pyx_XGIVEREF(__pyx_t_2);
21620 __Pyx_XGIVEREF(__pyx_t_3);
21621 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21622 goto __pyx_L1_error;
21623 __pyx_L8_try_end:;
21624 }
21625
21626 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
21627 * raise ImportError("numpy._core.umath failed to import")
21628 *
21629 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
21630 * try:
21631 * _import_umath()
21632*/
21633
21634 /* function exit code */
21635 __pyx_r = 0;
21636 goto __pyx_L0;
21637 __pyx_L1_error:;
21638 __Pyx_XDECREF(__pyx_t_5);
21639 __Pyx_XDECREF(__pyx_t_6);
21640 __Pyx_XDECREF(__pyx_t_7);
21641 __Pyx_XDECREF(__pyx_t_8);
21642 __Pyx_XDECREF(__pyx_t_9);
21643 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
21644 __pyx_r = -1;
21645 __pyx_L0:;
21646
21647 __Pyx_RefNannyFinishContext();
21648 return __pyx_r;
21649}
21650
21651/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
21652 *
21653 *
21654 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
21655 * """
21656 * Cython equivalent of `isinstance(obj, np.timedelta64)`
21657*/
21658
21659static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
21660 int __pyx_r;
21661
21662 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1108
21663 * bool
21664 * """
21665 * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
21666 *
21667 *
21668*/
21669 {
21670
21671 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
21672 }
21673 goto __pyx_L0;
21674
21675 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
21676 *
21677 *
21678 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
21679 * """
21680 * Cython equivalent of `isinstance(obj, np.timedelta64)`
21681*/
21682
21683 /* function exit code */
21684 __pyx_L0:;
21685
21686 return __pyx_r;
21687}
21688
21689/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
21690 *
21691 *
21692 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
21693 * """
21694 * Cython equivalent of `isinstance(obj, np.datetime64)`
21695*/
21696
21697static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
21698 int __pyx_r;
21699
21700 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1123
21701 * bool
21702 * """
21703 * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
21704 *
21705 *
21706*/
21707 {
21708
21709 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
21710 }
21711 goto __pyx_L0;
21712
21713 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
21714 *
21715 *
21716 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
21717 * """
21718 * Cython equivalent of `isinstance(obj, np.datetime64)`
21719*/
21720
21721 /* function exit code */
21722 __pyx_L0:;
21723
21724 return __pyx_r;
21725}
21726
21727/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
21728 *
21729 *
21730 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
21731 * """
21732 * returns the int64 value underlying scalar numpy datetime64 object
21733*/
21734
21735static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
21736 npy_datetime __pyx_r;
21737
21738 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1133
21739 * also needed. That can be found using `get_datetime64_unit`.
21740 * """
21741 * return _PyDatetimeScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
21742 *
21743 *
21744*/
21745 {
21746
21747 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
21748 }
21749 goto __pyx_L0;
21750
21751 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
21752 *
21753 *
21754 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
21755 * """
21756 * returns the int64 value underlying scalar numpy datetime64 object
21757*/
21758
21759 /* function exit code */
21760 __pyx_L0:;
21761 return __pyx_r;
21762}
21763
21764/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
21765 *
21766 *
21767 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
21768 * """
21769 * returns the int64 value underlying scalar numpy timedelta64 object
21770*/
21771
21772static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
21773 npy_timedelta __pyx_r;
21774
21775 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1140
21776 * returns the int64 value underlying scalar numpy timedelta64 object
21777 * """
21778 * return _PyTimedeltaScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
21779 *
21780 *
21781*/
21782 {
21783
21784 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
21785 }
21786 goto __pyx_L0;
21787
21788 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
21789 *
21790 *
21791 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
21792 * """
21793 * returns the int64 value underlying scalar numpy timedelta64 object
21794*/
21795
21796 /* function exit code */
21797 __pyx_L0:;
21798 return __pyx_r;
21799}
21800
21801/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
21802 *
21803 *
21804 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
21805 * """
21806 * returns the unit part of the dtype for a numpy datetime64 object.
21807*/
21808
21809static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
21810 NPY_DATETIMEUNIT __pyx_r;
21811
21812 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1147
21813 * returns the unit part of the dtype for a numpy datetime64 object.
21814 * """
21815 * return _PyDatetimeScalarObject_GetMetadata(obj).base # <<<<<<<<<<<<<<
21816 *
21817 *
21818*/
21819 {
21820
21821 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
21822 }
21823 goto __pyx_L0;
21824
21825 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
21826 *
21827 *
21828 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
21829 * """
21830 * returns the unit part of the dtype for a numpy datetime64 object.
21831*/
21832
21833 /* function exit code */
21834 __pyx_L0:;
21835 return __pyx_r;
21836}
21837
21838/* "BoundaryConditions.py":24
21839 * Generic class regrouping boundary conditions
21840 * """
21841 * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None): # <<<<<<<<<<<<<<
21842 * self.Shape = shape
21843 * self.name = name
21844*/
21845
21846/* Python wrapper */
21847static int __pyx_pw_18BoundaryConditions_7BC_Base_1__init__(PyObject *__pyx_v_self,
21848#if CYTHON_VECTORCALL_TPNEW
21849PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21850#else
21851PyObject *__pyx_args, PyObject *__pyx_kwds
21852#endif
21853); /*proto*/
21854static int __pyx_pw_18BoundaryConditions_7BC_Base_1__init__(PyObject *__pyx_v_self,
21855#if CYTHON_VECTORCALL_TPNEW
21856PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21857#else
21858PyObject *__pyx_args, PyObject *__pyx_kwds
21859#endif
21860) {
21861 PyObject *__pyx_v_shape = 0;
21862 PyObject *__pyx_v_name = 0;
21863 PyObject *__pyx_v_b_or = 0;
21864 PyObject *__pyx_v_b_i = 0;
21865 PyObject *__pyx_v_nd = 0;
21866 #if !CYTHON_VECTORCALL_TPNEW
21867 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
21868 #endif
21869 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
21870 PyObject* values[5] = {0,0,0,0,0};
21871 int __pyx_lineno = 0;
21872 const char *__pyx_filename = NULL;
21873 int __pyx_clineno = 0;
21874 int __pyx_r;
21875 __Pyx_RefNannyDeclarations
21876 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
21877 #if !CYTHON_VECTORCALL_TPNEW
21878 #if CYTHON_ASSUME_SAFE_SIZE
21879 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
21880 #else
21881 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
21882 #endif
21883 #endif
21884 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
21885 {
21886 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_b_or,&__pyx_mstate_global->__pyx_n_u_b_i,&__pyx_mstate_global->__pyx_n_u_nd,0};
21887 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL_TPNEW(__pyx_kwds) : 0;
21888 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 24, __pyx_L3_error)
21889 if (__pyx_kwds_len > 0) {
21890 switch (__pyx_nargs) {
21891 case 5:
21892 values[4] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 4);
21893 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 24, __pyx_L3_error)
21894 CYTHON_FALLTHROUGH;
21895 case 4:
21896 values[3] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 3);
21897 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 24, __pyx_L3_error)
21898 CYTHON_FALLTHROUGH;
21899 case 3:
21900 values[2] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 2);
21901 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 24, __pyx_L3_error)
21902 CYTHON_FALLTHROUGH;
21903 case 2:
21904 values[1] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 1);
21905 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 24, __pyx_L3_error)
21906 CYTHON_FALLTHROUGH;
21907 case 1:
21908 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
21909 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 24, __pyx_L3_error)
21910 CYTHON_FALLTHROUGH;
21911 case 0: break;
21912 default: goto __pyx_L5_argtuple_error;
21913 }
21914 const Py_ssize_t kwd_pos_args = __pyx_nargs;
21915 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 24, __pyx_L3_error)
21916 if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
21917 if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
21918 if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
21919 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
21920 if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
21921 } else {
21922 switch (__pyx_nargs) {
21923 case 5:
21924 values[4] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 4);
21925 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 24, __pyx_L3_error)
21926 CYTHON_FALLTHROUGH;
21927 case 4:
21928 values[3] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 3);
21929 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 24, __pyx_L3_error)
21930 CYTHON_FALLTHROUGH;
21931 case 3:
21932 values[2] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 2);
21933 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 24, __pyx_L3_error)
21934 CYTHON_FALLTHROUGH;
21935 case 2:
21936 values[1] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 1);
21937 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 24, __pyx_L3_error)
21938 CYTHON_FALLTHROUGH;
21939 case 1:
21940 values[0] = __Pyx_ArgRef_FASTCALL_TPNEW(__pyx_args, 0);
21941 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 24, __pyx_L3_error)
21942 CYTHON_FALLTHROUGH;
21943 case 0: break;
21944 default: goto __pyx_L5_argtuple_error;
21945 }
21946 if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
21947 if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
21948 if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
21949 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
21950 if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
21951 }
21952 __pyx_v_shape = values[0];
21953 __pyx_v_name = values[1];
21954 __pyx_v_b_or = values[2];
21955 __pyx_v_b_i = values[3];
21956 __pyx_v_nd = values[4];
21957 }
21958 goto __pyx_L6_skip;
21959 __pyx_L5_argtuple_error:;
21960 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 24, __pyx_L3_error)
21961 __pyx_L6_skip:;
21962 goto __pyx_L4_argument_unpacking_done;
21963 __pyx_L3_error:;
21964 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
21965 Py_XDECREF(values[__pyx_temp]);
21966 }
21967 __Pyx_AddTraceback("BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21968 __Pyx_RefNannyFinishContext();
21969 return -1;
21970 __pyx_L4_argument_unpacking_done:;
21971 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base___init__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), __pyx_v_shape, __pyx_v_name, __pyx_v_b_or, __pyx_v_b_i, __pyx_v_nd);
21972
21973 /* function exit code */
21974 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
21975 Py_XDECREF(values[__pyx_temp]);
21976 }
21977 __Pyx_RefNannyFinishContext();
21978 return __pyx_r;
21979}
21980
21981static int __pyx_pf_18BoundaryConditions_7BC_Base___init__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_name, PyObject *__pyx_v_b_or, PyObject *__pyx_v_b_i, PyObject *__pyx_v_nd) {
21982 int __pyx_r;
21983 __Pyx_TraceDeclarationsFunc
21984 __Pyx_RefNannyDeclarations
21985 PyObject *__pyx_t_1 = NULL;
21986 int __pyx_t_2;
21987 PyObject *__pyx_t_3 = NULL;
21988 int __pyx_t_4;
21989 __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
21990 int __pyx_lineno = 0;
21991 const char *__pyx_filename = NULL;
21992 int __pyx_clineno = 0;
21993 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]))
21994 __Pyx_RefNannySetupContext("__init__", 0);
21995 __Pyx_TraceStartFunc("__init__", __pyx_f[0], 24, 0, 0, 0, __PYX_ERR(0, 24, __pyx_L1_error));
21996
21997 /* "BoundaryConditions.py":25
21998 * """
21999 * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None):
22000 * self.Shape = shape # <<<<<<<<<<<<<<
22001 * self.name = name
22002 * self.BC_type = 'None'
22003*/
22004 __Pyx_INCREF(__pyx_v_shape);
22005 __Pyx_GIVEREF(__pyx_v_shape);
22006 __Pyx_GOTREF(__pyx_v_self->Shape);
22007 __Pyx_DECREF(__pyx_v_self->Shape);
22008 __pyx_v_self->Shape = __pyx_v_shape;
22009
22010 /* "BoundaryConditions.py":26
22011 * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None):
22012 * self.Shape = shape
22013 * self.name = name # <<<<<<<<<<<<<<
22014 * self.BC_type = 'None'
22015 * if shape is not None:
22016*/
22017 __pyx_t_1 = __pyx_v_name;
22018 __Pyx_INCREF(__pyx_t_1);
22019 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 26, __pyx_L1_error)
22020 __Pyx_GIVEREF(__pyx_t_1);
22021 __Pyx_GOTREF(__pyx_v_self->name);
22022 __Pyx_DECREF(__pyx_v_self->name);
22023 __pyx_v_self->name = ((PyObject*)__pyx_t_1);
22024 __pyx_t_1 = 0;
22025
22026 /* "BoundaryConditions.py":27
22027 * self.Shape = shape
22028 * self.name = name
22029 * self.BC_type = 'None' # <<<<<<<<<<<<<<
22030 * if shape is not None:
22031 * self.nd = self.Shape.Domain.nd
22032*/
22033 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_None);
22034 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_None);
22035 __Pyx_GOTREF(__pyx_v_self->BC_type);
22036 __Pyx_DECREF(__pyx_v_self->BC_type);
22037 __pyx_v_self->BC_type = __pyx_mstate_global->__pyx_n_u_None;
22038
22039 /* "BoundaryConditions.py":28
22040 * self.name = name
22041 * self.BC_type = 'None'
22042 * if shape is not None: # <<<<<<<<<<<<<<
22043 * self.nd = self.Shape.Domain.nd
22044 * elif nd is not None:
22045*/
22046 __pyx_t_2 = (__pyx_v_shape != Py_None);
22047 if (__pyx_t_2) {
22048
22049
22050 /* "BoundaryConditions.py":29
22051 * self.BC_type = 'None'
22052 * if shape is not None:
22053 * self.nd = self.Shape.Domain.nd # <<<<<<<<<<<<<<
22054 * elif nd is not None:
22055 * self.nd = nd
22056*/
22057 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->Shape, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
22058 __Pyx_GOTREF(__pyx_t_1);
22059 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
22060 __Pyx_GOTREF(__pyx_t_3);
22061 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22062 __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29, __pyx_L1_error)
22063 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22064 __pyx_v_self->nd = __pyx_t_4;
22065
22066 /* "BoundaryConditions.py":28
22067 * self.name = name
22068 * self.BC_type = 'None'
22069 * if shape is not None: # <<<<<<<<<<<<<<
22070 * self.nd = self.Shape.Domain.nd
22071 * elif nd is not None:
22072*/
22073 goto __pyx_L3;
22074 }
22075
22076 /* "BoundaryConditions.py":30
22077 * if shape is not None:
22078 * self.nd = self.Shape.Domain.nd
22079 * elif nd is not None: # <<<<<<<<<<<<<<
22080 * self.nd = nd
22081 * else:
22082*/
22083 __pyx_t_2 = (__pyx_v_nd != Py_None);
22084 if (__pyx_t_2) {
22085
22086
22087 /* "BoundaryConditions.py":31
22088 * self.nd = self.Shape.Domain.nd
22089 * elif nd is not None:
22090 * self.nd = nd # <<<<<<<<<<<<<<
22091 * else:
22092 * assert nd is not None, 'Shape or nd must be passed to BC'
22093*/
22094 __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_nd); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L1_error)
22095 __pyx_v_self->nd = __pyx_t_4;
22096
22097 /* "BoundaryConditions.py":30
22098 * if shape is not None:
22099 * self.nd = self.Shape.Domain.nd
22100 * elif nd is not None: # <<<<<<<<<<<<<<
22101 * self.nd = nd
22102 * else:
22103*/
22104 goto __pyx_L3;
22105 }
22106
22107 /* "BoundaryConditions.py":33
22108 * self.nd = nd
22109 * else:
22110 * assert nd is not None, 'Shape or nd must be passed to BC' # <<<<<<<<<<<<<<
22111 * if b_or is not None:
22112 * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
22113*/
22114 /*else*/ {
22115 #ifndef CYTHON_WITHOUT_ASSERTIONS
22116 if (unlikely(__pyx_assertions_enabled())) {
22117 __pyx_t_2 = (__pyx_v_nd != Py_None);
22118 if (unlikely(!__pyx_t_2)) {
22119 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Shape_or_nd_must_be_passed_to_BC, 0, 0);
22120 __PYX_ERR(0, 33, __pyx_L1_error)
22121 }
22122
22123 }
22124 #else
22125 if ((1)); else __PYX_ERR(0, 33, __pyx_L1_error)
22126 #endif
22127 }
22128 __pyx_L3:;
22129
22130 /* "BoundaryConditions.py":34
22131 * else:
22132 * assert nd is not None, 'Shape or nd must be passed to BC'
22133 * if b_or is not None: # <<<<<<<<<<<<<<
22134 * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
22135 * else:
22136*/
22137 __pyx_t_2 = (__pyx_v_b_or != Py_None);
22138 if (__pyx_t_2) {
22139
22140
22141 /* "BoundaryConditions.py":35
22142 * assert nd is not None, 'Shape or nd must be passed to BC'
22143 * if b_or is not None:
22144 * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape # <<<<<<<<<<<<<<
22145 * else:
22146 * self._b_or = None
22147*/
22148 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_b_or, __pyx_v_b_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
22149 __Pyx_GOTREF(__pyx_t_3);
22150 __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 35, __pyx_L1_error)
22151 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22152 __PYX_XCLEAR_MEMVIEW(&__pyx_v_self->_b_or, 0);
22153 __pyx_v_self->_b_or = __pyx_t_5;
22154 __pyx_t_5.memview = NULL;
22155 __pyx_t_5.data = NULL;
22156
22157 /* "BoundaryConditions.py":34
22158 * else:
22159 * assert nd is not None, 'Shape or nd must be passed to BC'
22160 * if b_or is not None: # <<<<<<<<<<<<<<
22161 * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
22162 * else:
22163*/
22164 goto __pyx_L4;
22165 }
22166
22167 /* "BoundaryConditions.py":37
22168 * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
22169 * else:
22170 * self._b_or = None # <<<<<<<<<<<<<<
22171 *
22172 * # @staticmethod
22173*/
22174 /*else*/ {
22175 __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 37, __pyx_L1_error)
22176 __PYX_XCLEAR_MEMVIEW(&__pyx_v_self->_b_or, 0);
22177 __pyx_v_self->_b_or = __pyx_t_5;
22178 __pyx_t_5.memview = NULL;
22179 __pyx_t_5.data = NULL;
22180 }
22181 __pyx_L4:;
22182
22183 /* "BoundaryConditions.py":24
22184 * Generic class regrouping boundary conditions
22185 * """
22186 * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None): # <<<<<<<<<<<<<<
22187 * self.Shape = shape
22188 * self.name = name
22189*/
22190
22191 /* function exit code */
22192 __pyx_r = 0;
22193 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 24, __pyx_L1_error));
22194 goto __pyx_L0;
22195 __pyx_L1_error:;
22196 __Pyx_XDECREF(__pyx_t_1);
22197 __Pyx_XDECREF(__pyx_t_3);
22198 __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
22199 __Pyx_TraceException(__pyx_lineno, 0, 0);
22200 #if CYTHON_USE_SYS_MONITORING
22201 __Pyx_TraceExceptionUnwind(0, 0);
22202 #else
22203 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 24, __pyx_L1_error));
22204 #endif
22205 __Pyx_AddTraceback("BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22206 __pyx_r = -1;
22207 __pyx_L0:;
22208
22209 __Pyx_PyMonitoring_ExitScope(0);
22210 __Pyx_RefNannyFinishContext();
22211 return __pyx_r;
22212}
22213
22214/* "BoundaryConditions.py":52
22215 * # setattr(BC_Base, name, default_value)
22216 *
22217 * def getContext(self, context=None): # <<<<<<<<<<<<<<
22218 * """
22219 * Gets context from proteus.Context or
22220*/
22221
22222/* Python wrapper */
22223static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_3getContext(PyObject *__pyx_v_self,
22224#if CYTHON_VECTORCALL
22225PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22226#else
22227PyObject *__pyx_args, PyObject *__pyx_kwds
22228#endif
22229); /*proto*/
22230PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_7BC_Base_2getContext, "BC_Base.getContext(self, context=None)\n\nGets context from proteus.Context or\n\nParameters\n----------\ncontext: class, optional\n if set to None, the context will be created from proteus.Context");
22231static PyMethodDef __pyx_mdef_18BoundaryConditions_7BC_Base_3getContext = {"getContext", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_3getContext, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_2getContext};
22232static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_3getContext(PyObject *__pyx_v_self,
22233#if CYTHON_VECTORCALL
22234PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22235#else
22236PyObject *__pyx_args, PyObject *__pyx_kwds
22237#endif
22238) {
22239 PyObject *__pyx_v_context = 0;
22240 #if !CYTHON_VECTORCALL
22241 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
22242 #endif
22243 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22244 PyObject* values[1] = {0};
22245 int __pyx_lineno = 0;
22246 const char *__pyx_filename = NULL;
22247 int __pyx_clineno = 0;
22248 PyObject *__pyx_r = 0;
22249 __Pyx_RefNannyDeclarations
22250 __Pyx_RefNannySetupContext("getContext (wrapper)", 0);
22251 #if !CYTHON_VECTORCALL
22252 #if CYTHON_ASSUME_SAFE_SIZE
22253 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
22254 #else
22255 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
22256 #endif
22257 #endif
22258 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
22259 {
22260 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_context,0};
22261 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
22262 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 52, __pyx_L3_error)
22263 if (__pyx_kwds_len > 0) {
22264 switch (__pyx_nargs) {
22265 case 1:
22266 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
22267 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 52, __pyx_L3_error)
22268 CYTHON_FALLTHROUGH;
22269 case 0: break;
22270 default: goto __pyx_L5_argtuple_error;
22271 }
22272 const Py_ssize_t kwd_pos_args = __pyx_nargs;
22273 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getContext", 0) < (0)) __PYX_ERR(0, 52, __pyx_L3_error)
22274 if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
22275 } else {
22276 switch (__pyx_nargs) {
22277 case 1:
22278 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
22279 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 52, __pyx_L3_error)
22280 CYTHON_FALLTHROUGH;
22281 case 0: break;
22282 default: goto __pyx_L5_argtuple_error;
22283 }
22284 if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
22285 }
22286 __pyx_v_context = values[0];
22287 }
22288 goto __pyx_L6_skip;
22289 __pyx_L5_argtuple_error:;
22290 __Pyx_RaiseArgtupleInvalid("getContext", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 52, __pyx_L3_error)
22291 __pyx_L6_skip:;
22292 goto __pyx_L4_argument_unpacking_done;
22293 __pyx_L3_error:;
22294 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
22295 Py_XDECREF(values[__pyx_temp]);
22296 }
22297 __Pyx_AddTraceback("BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
22298 __Pyx_RefNannyFinishContext();
22299 return NULL;
22300 __pyx_L4_argument_unpacking_done:;
22301 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2getContext(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), __pyx_v_context);
22302
22303 /* function exit code */
22304 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
22305 Py_XDECREF(values[__pyx_temp]);
22306 }
22307 __Pyx_RefNannyFinishContext();
22308 return __pyx_r;
22309}
22310
22311static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2getContext(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_context) {
22312 PyObject *__pyx_v_Context = NULL;
22313 PyObject *__pyx_r = NULL;
22314 __Pyx_TraceDeclarationsFunc
22315 __Pyx_RefNannyDeclarations
22316 int __pyx_t_1;
22317 PyObject *__pyx_t_2 = NULL;
22318 PyObject *__pyx_t_3 = NULL;
22319 Py_ssize_t __pyx_t_4;
22320 PyObject *__pyx_t_5 = NULL;
22321 size_t __pyx_t_6;
22322 int __pyx_lineno = 0;
22323 const char *__pyx_filename = NULL;
22324 int __pyx_clineno = 0;
22325 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]))
22326 __Pyx_RefNannySetupContext("getContext", 0);
22327 __Pyx_TraceStartFunc("getContext", __pyx_f[0], 52, 0, 0, 0, __PYX_ERR(0, 52, __pyx_L1_error));
22328
22329 /* "BoundaryConditions.py":61
22330 * if set to None, the context will be created from proteus.Context
22331 * """
22332 * if context: # <<<<<<<<<<<<<<
22333 * from proteus import Context
22334 * self.ct = Context.get()
22335*/
22336 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_context); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
22337 if (__pyx_t_1) {
22338
22339
22340 /* "BoundaryConditions.py":62
22341 * """
22342 * if context:
22343 * from proteus import Context # <<<<<<<<<<<<<<
22344 * self.ct = Context.get()
22345 * else:
22346*/
22347 {
22348 PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Context};
22349 __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_proteus, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
22350 }
22351 __pyx_t_2 = __pyx_t_3;
22352 __Pyx_GOTREF(__pyx_t_2);
22353 {
22354 PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Context};
22355 __pyx_t_4 = 0; {
22356 __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error)
22357 __Pyx_GOTREF(__pyx_t_5);
22358 switch (__pyx_t_4) {
22359 case 0:
22360 __Pyx_INCREF(__pyx_t_5);
22361 __pyx_v_Context = __pyx_t_5;
22362 break;
22363 default:;
22364 }
22365 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22366 }
22367 }
22368 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22369
22370 /* "BoundaryConditions.py":63
22371 * if context:
22372 * from proteus import Context
22373 * self.ct = Context.get() # <<<<<<<<<<<<<<
22374 * else:
22375 * self.ct = context
22376*/
22377 __pyx_t_5 = __pyx_v_Context;
22378 __Pyx_INCREF(__pyx_t_5);
22379 __pyx_t_6 = 0;
22380 {
22381 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
22382 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
22383 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
22384 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
22385 __Pyx_GOTREF(__pyx_t_2);
22386 }
22387 __Pyx_GIVEREF(__pyx_t_2);
22388 __Pyx_GOTREF(__pyx_v_self->ct);
22389 __Pyx_DECREF(__pyx_v_self->ct);
22390 __pyx_v_self->ct = __pyx_t_2;
22391 __pyx_t_2 = 0;
22392
22393 /* "BoundaryConditions.py":61
22394 * if set to None, the context will be created from proteus.Context
22395 * """
22396 * if context: # <<<<<<<<<<<<<<
22397 * from proteus import Context
22398 * self.ct = Context.get()
22399*/
22400 goto __pyx_L3;
22401 }
22402
22403 /* "BoundaryConditions.py":65
22404 * self.ct = Context.get()
22405 * else:
22406 * self.ct = context # <<<<<<<<<<<<<<
22407 *
22408 *
22409*/
22410 /*else*/ {
22411 __Pyx_INCREF(__pyx_v_context);
22412 __Pyx_GIVEREF(__pyx_v_context);
22413 __Pyx_GOTREF(__pyx_v_self->ct);
22414 __Pyx_DECREF(__pyx_v_self->ct);
22415 __pyx_v_self->ct = __pyx_v_context;
22416 }
22417 __pyx_L3:;
22418
22419 /* "BoundaryConditions.py":52
22420 * # setattr(BC_Base, name, default_value)
22421 *
22422 * def getContext(self, context=None): # <<<<<<<<<<<<<<
22423 * """
22424 * Gets context from proteus.Context or
22425*/
22426
22427 /* function exit code */
22428 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22429 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 52, __pyx_L1_error));
22430 goto __pyx_L0;
22431 __pyx_L1_error:;
22432 __Pyx_XDECREF(__pyx_t_2);
22433 __Pyx_XDECREF(__pyx_t_5);
22434 __Pyx_TraceException(__pyx_lineno, 0, 0);
22435 #if CYTHON_USE_SYS_MONITORING
22436 __Pyx_TraceExceptionUnwind(0, 0);
22437 #else
22438 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 52, __pyx_L1_error));
22439 #endif
22440 __Pyx_AddTraceback("BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
22441 __pyx_r = NULL;
22442 __pyx_L0:;
22443 __Pyx_XDECREF(__pyx_v_Context);
22444 __Pyx_XGIVEREF(__pyx_r);
22445 __Pyx_PyMonitoring_ExitScope(0);
22446 __Pyx_RefNannyFinishContext();
22447 return __pyx_r;
22448}
22449
22450/* "BoundaryConditions.pxd":9
22451 * cdef double[:] _b_or
22452 * cdef public:
22453 * cdef int nd # <<<<<<<<<<<<<<
22454 * object Shape
22455 * str name
22456*/
22457
22458/* Python wrapper */
22459static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(PyObject *__pyx_v_self); /*proto*/
22460static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(PyObject *__pyx_v_self) {
22461 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22462 PyObject *__pyx_r = 0;
22463 __Pyx_RefNannyDeclarations
22464 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
22465 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22466 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
22467
22468 /* function exit code */
22469 __Pyx_RefNannyFinishContext();
22470 return __pyx_r;
22471}
22472
22473static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
22474 PyObject *__pyx_r = NULL;
22475 __Pyx_TraceDeclarationsFunc
22476 __Pyx_RefNannyDeclarations
22477 PyObject *__pyx_t_1 = NULL;
22478 PyObject *__pyx_t_2 = NULL;
22479 PyObject *__pyx_t_3 = NULL;
22480 int __pyx_lineno = 0;
22481 const char *__pyx_filename = NULL;
22482 int __pyx_clineno = 0;
22483 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]))
22484 __Pyx_RefNannySetupContext("__get__", 0);
22485 __Pyx_TraceStartFunc("__get__", __pyx_f[3], 9, 0, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22486 {
22487 __Pyx_PyCriticalSection __pyx_cs;
22488 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22489 __Pyx_INCREF(__pyx_t_1);
22490 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22491 /*try:*/ {
22492 __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_self->nd); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L4_error)
22493 __Pyx_GOTREF(__pyx_t_2);
22494 {
22495 PyObject *__pyx_temp;
22496 {
22497 __pyx_temp = __pyx_r;
22498 __pyx_r = __pyx_t_2;
22499 }
22500 __Pyx_XDECREF(__pyx_temp);
22501 }
22502 __pyx_t_2 = 0;
22503 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(3, 9, __pyx_L4_error));
22504 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22505 goto __pyx_L3_return;
22506 }
22507 /*finally:*/ {
22508 __pyx_L3_return: {
22509 __pyx_t_3 = __pyx_r;
22510 __pyx_r = 0;
22511 __Pyx_PyCriticalSection_End(&__pyx_cs);
22512 __pyx_r = __pyx_t_3;
22513 __pyx_t_3 = 0;
22514 goto __pyx_L0;
22515 }
22516 __pyx_L4_error: {
22517 __Pyx_PyCriticalSection_End(&__pyx_cs);
22518 goto __pyx_L1_error;
22519 }
22520 }
22521 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22522 }
22523
22524 /* function exit code */
22525 __pyx_L1_error:;
22526 __Pyx_XDECREF(__pyx_t_1);
22527 __Pyx_XDECREF(__pyx_t_2);
22528 __Pyx_TraceException(__pyx_lineno, 0, 0);
22529 #if CYTHON_USE_SYS_MONITORING
22530 __Pyx_TraceExceptionUnwind(0, 0);
22531 #else
22532 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22533 #endif
22534 __Pyx_AddTraceback("BoundaryConditions.BC_Base.nd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22535 __pyx_r = NULL;
22536 __pyx_L0:;
22537 __Pyx_XGIVEREF(__pyx_r);
22538 __Pyx_PyMonitoring_ExitScope(0);
22539 __Pyx_RefNannyFinishContext();
22540 return __pyx_r;
22541}
22542
22543/* Python wrapper */
22544static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
22545static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
22546 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22547 int __pyx_r;
22548 __Pyx_RefNannyDeclarations
22549 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
22550 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22551 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
22552
22553 /* function exit code */
22554 __Pyx_RefNannyFinishContext();
22555 return __pyx_r;
22556}
22557
22558static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
22559 int __pyx_r;
22560 __Pyx_TraceDeclarationsFunc
22561 __Pyx_RefNannyDeclarations
22562 PyObject *__pyx_t_1 = NULL;
22563 int __pyx_t_2;
22564 int __pyx_lineno = 0;
22565 const char *__pyx_filename = NULL;
22566 int __pyx_clineno = 0;
22567 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]))
22568 __Pyx_RefNannySetupContext("__set__", 0);
22569 __Pyx_TraceStartFunc("__set__", __pyx_f[3], 9, 0, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22570 {
22571 __Pyx_PyCriticalSection __pyx_cs;
22572 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22573 __Pyx_INCREF(__pyx_t_1);
22574 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22575 /*try:*/ {
22576 __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_value); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 9, __pyx_L4_error)
22577 __pyx_v_self->nd = __pyx_t_2;
22578 }
22579 /*finally:*/ {
22580 /*normal exit:*/{
22581 __Pyx_PyCriticalSection_End(&__pyx_cs);
22582 goto __pyx_L5;
22583 }
22584 __pyx_L4_error: {
22585 __Pyx_PyCriticalSection_End(&__pyx_cs);
22586 goto __pyx_L1_error;
22587 }
22588 __pyx_L5:;
22589 }
22590 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22591 }
22592
22593 /* function exit code */
22594 __pyx_r = 0;
22595 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22596 goto __pyx_L0;
22597 __pyx_L1_error:;
22598 __Pyx_XDECREF(__pyx_t_1);
22599 __Pyx_TraceException(__pyx_lineno, 0, 0);
22600 #if CYTHON_USE_SYS_MONITORING
22601 __Pyx_TraceExceptionUnwind(0, 0);
22602 #else
22603 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22604 #endif
22605 __Pyx_AddTraceback("BoundaryConditions.BC_Base.nd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22606 __pyx_r = -1;
22607 __pyx_L0:;
22608
22609 __Pyx_PyMonitoring_ExitScope(0);
22610 __Pyx_RefNannyFinishContext();
22611 return __pyx_r;
22612}
22613
22614/* "BoundaryConditions.pxd":10
22615 * cdef public:
22616 * cdef int nd
22617 * object Shape # <<<<<<<<<<<<<<
22618 * str name
22619 * str BC_type
22620*/
22621
22622/* Python wrapper */
22623static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(PyObject *__pyx_v_self); /*proto*/
22624static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(PyObject *__pyx_v_self) {
22625 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22626 PyObject *__pyx_r = 0;
22627 __Pyx_RefNannyDeclarations
22628 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
22629 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22630 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
22631
22632 /* function exit code */
22633 __Pyx_RefNannyFinishContext();
22634 return __pyx_r;
22635}
22636
22637static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
22638 PyObject *__pyx_r = NULL;
22639 __Pyx_TraceDeclarationsFunc
22640 __Pyx_RefNannyDeclarations
22641 PyObject *__pyx_t_1 = NULL;
22642 PyObject *__pyx_t_2 = NULL;
22643 int __pyx_lineno = 0;
22644 const char *__pyx_filename = NULL;
22645 int __pyx_clineno = 0;
22646 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]))
22647 __Pyx_RefNannySetupContext("__get__", 0);
22648 __Pyx_TraceStartFunc("__get__", __pyx_f[3], 10, 0, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22649 {
22650 __Pyx_PyCriticalSection __pyx_cs;
22651 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22652 __Pyx_INCREF(__pyx_t_1);
22653 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22654 /*try:*/ {
22655 {
22656 PyObject *__pyx_temp;
22657 {
22658 __pyx_temp = __pyx_r;
22659 __Pyx_INCREF(__pyx_v_self->Shape);
22660 __pyx_r = __pyx_v_self->Shape;
22661 }
22662 __Pyx_XDECREF(__pyx_temp);
22663 }
22664 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(3, 10, __pyx_L4_error));
22665 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22666 goto __pyx_L3_return;
22667 }
22668 /*finally:*/ {
22669 __pyx_L3_return: {
22670 __pyx_t_2 = __pyx_r;
22671 __pyx_r = 0;
22672 __Pyx_PyCriticalSection_End(&__pyx_cs);
22673 __pyx_r = __pyx_t_2;
22674 __pyx_t_2 = 0;
22675 goto __pyx_L0;
22676 }
22677 __pyx_L4_error: {
22678 __Pyx_PyCriticalSection_End(&__pyx_cs);
22679 goto __pyx_L1_error;
22680 }
22681 }
22682 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22683 }
22684
22685 /* function exit code */
22686 __pyx_L1_error:;
22687 __Pyx_XDECREF(__pyx_t_1);
22688 __Pyx_TraceException(__pyx_lineno, 0, 0);
22689 #if CYTHON_USE_SYS_MONITORING
22690 __Pyx_TraceExceptionUnwind(0, 0);
22691 #else
22692 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22693 #endif
22694 __Pyx_AddTraceback("BoundaryConditions.BC_Base.Shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22695 __pyx_r = NULL;
22696 __pyx_L0:;
22697 __Pyx_XGIVEREF(__pyx_r);
22698 __Pyx_PyMonitoring_ExitScope(0);
22699 __Pyx_RefNannyFinishContext();
22700 return __pyx_r;
22701}
22702
22703/* Python wrapper */
22704static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
22705static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
22706 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22707 int __pyx_r;
22708 __Pyx_RefNannyDeclarations
22709 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
22710 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22711 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
22712
22713 /* function exit code */
22714 __Pyx_RefNannyFinishContext();
22715 return __pyx_r;
22716}
22717
22718static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
22719 int __pyx_r;
22720 __Pyx_TraceDeclarationsFunc
22721 __Pyx_RefNannyDeclarations
22722 PyObject *__pyx_t_1 = NULL;
22723 int __pyx_lineno = 0;
22724 const char *__pyx_filename = NULL;
22725 int __pyx_clineno = 0;
22726 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]))
22727 __Pyx_RefNannySetupContext("__set__", 0);
22728 __Pyx_TraceStartFunc("__set__", __pyx_f[3], 10, 0, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22729 {
22730 __Pyx_PyCriticalSection __pyx_cs;
22731 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22732 __Pyx_INCREF(__pyx_t_1);
22733 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22734 /*try:*/ {
22735 __Pyx_INCREF(__pyx_v_value);
22736 __Pyx_GIVEREF(__pyx_v_value);
22737 __Pyx_GOTREF(__pyx_v_self->Shape);
22738 __Pyx_DECREF(__pyx_v_self->Shape);
22739 __pyx_v_self->Shape = __pyx_v_value;
22740 }
22741 /*finally:*/ {
22742 /*normal exit:*/{
22743 __Pyx_PyCriticalSection_End(&__pyx_cs);
22744 goto __pyx_L5;
22745 }
22746 __pyx_L5:;
22747 }
22748 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22749 }
22750
22751 /* function exit code */
22752 __pyx_r = 0;
22753 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22754 goto __pyx_L0;
22755 __pyx_L1_error:;
22756 __Pyx_XDECREF(__pyx_t_1);
22757 __Pyx_TraceException(__pyx_lineno, 0, 0);
22758 #if CYTHON_USE_SYS_MONITORING
22759 __Pyx_TraceExceptionUnwind(0, 0);
22760 #else
22761 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22762 #endif
22763 __Pyx_AddTraceback("BoundaryConditions.BC_Base.Shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22764 __pyx_r = -1;
22765 __pyx_L0:;
22766
22767 __Pyx_PyMonitoring_ExitScope(0);
22768 __Pyx_RefNannyFinishContext();
22769 return __pyx_r;
22770}
22771
22772/* Python wrapper */
22773static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self); /*proto*/
22774static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self) {
22775 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22776 int __pyx_r;
22777 __Pyx_RefNannyDeclarations
22778 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
22779 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22780 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
22781
22782 /* function exit code */
22783 __Pyx_RefNannyFinishContext();
22784 return __pyx_r;
22785}
22786
22787static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
22788 int __pyx_r;
22789 __Pyx_TraceDeclarationsFunc
22790 __Pyx_RefNannyDeclarations
22791 PyObject *__pyx_t_1 = NULL;
22792 int __pyx_lineno = 0;
22793 const char *__pyx_filename = NULL;
22794 int __pyx_clineno = 0;
22795 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]))
22796 __Pyx_RefNannySetupContext("__del__", 0);
22797 __Pyx_TraceStartFunc("__del__", __pyx_f[3], 10, 0, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22798 {
22799 __Pyx_PyCriticalSection __pyx_cs;
22800 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22801 __Pyx_INCREF(__pyx_t_1);
22802 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22803 /*try:*/ {
22804 __Pyx_INCREF(Py_None);
22805 __Pyx_GIVEREF(Py_None);
22806 __Pyx_GOTREF(__pyx_v_self->Shape);
22807 __Pyx_DECREF(__pyx_v_self->Shape);
22808 __pyx_v_self->Shape = Py_None;
22809 }
22810 /*finally:*/ {
22811 /*normal exit:*/{
22812 __Pyx_PyCriticalSection_End(&__pyx_cs);
22813 goto __pyx_L5;
22814 }
22815 __pyx_L5:;
22816 }
22817 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22818 }
22819
22820 /* function exit code */
22821 __pyx_r = 0;
22822 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22823 goto __pyx_L0;
22824 __pyx_L1_error:;
22825 __Pyx_XDECREF(__pyx_t_1);
22826 __Pyx_TraceException(__pyx_lineno, 0, 0);
22827 #if CYTHON_USE_SYS_MONITORING
22828 __Pyx_TraceExceptionUnwind(0, 0);
22829 #else
22830 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22831 #endif
22832 __Pyx_AddTraceback("BoundaryConditions.BC_Base.Shape.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22833 __pyx_r = -1;
22834 __pyx_L0:;
22835
22836 __Pyx_PyMonitoring_ExitScope(0);
22837 __Pyx_RefNannyFinishContext();
22838 return __pyx_r;
22839}
22840
22841/* "BoundaryConditions.pxd":11
22842 * cdef int nd
22843 * object Shape
22844 * str name # <<<<<<<<<<<<<<
22845 * str BC_type
22846 * object ct
22847*/
22848
22849/* Python wrapper */
22850static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
22851static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(PyObject *__pyx_v_self) {
22852 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22853 PyObject *__pyx_r = 0;
22854 __Pyx_RefNannyDeclarations
22855 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
22856 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22857 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
22858
22859 /* function exit code */
22860 __Pyx_RefNannyFinishContext();
22861 return __pyx_r;
22862}
22863
22864static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
22865 PyObject *__pyx_r = NULL;
22866 __Pyx_TraceDeclarationsFunc
22867 __Pyx_RefNannyDeclarations
22868 PyObject *__pyx_t_1 = NULL;
22869 PyObject *__pyx_t_2 = NULL;
22870 int __pyx_lineno = 0;
22871 const char *__pyx_filename = NULL;
22872 int __pyx_clineno = 0;
22873 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]))
22874 __Pyx_RefNannySetupContext("__get__", 0);
22875 __Pyx_TraceStartFunc("__get__", __pyx_f[3], 11, 0, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22876 {
22877 __Pyx_PyCriticalSection __pyx_cs;
22878 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22879 __Pyx_INCREF(__pyx_t_1);
22880 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22881 /*try:*/ {
22882 {
22883 PyObject *__pyx_temp;
22884 {
22885 __pyx_temp = __pyx_r;
22886 __Pyx_INCREF(__pyx_v_self->name);
22887 __pyx_r = __pyx_v_self->name;
22888 }
22889 __Pyx_XDECREF(__pyx_temp);
22890 }
22891 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(3, 11, __pyx_L4_error));
22892 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22893 goto __pyx_L3_return;
22894 }
22895 /*finally:*/ {
22896 __pyx_L3_return: {
22897 __pyx_t_2 = __pyx_r;
22898 __pyx_r = 0;
22899 __Pyx_PyCriticalSection_End(&__pyx_cs);
22900 __pyx_r = __pyx_t_2;
22901 __pyx_t_2 = 0;
22902 goto __pyx_L0;
22903 }
22904 __pyx_L4_error: {
22905 __Pyx_PyCriticalSection_End(&__pyx_cs);
22906 goto __pyx_L1_error;
22907 }
22908 }
22909 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22910 }
22911
22912 /* function exit code */
22913 __pyx_L1_error:;
22914 __Pyx_XDECREF(__pyx_t_1);
22915 __Pyx_TraceException(__pyx_lineno, 0, 0);
22916 #if CYTHON_USE_SYS_MONITORING
22917 __Pyx_TraceExceptionUnwind(0, 0);
22918 #else
22919 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22920 #endif
22921 __Pyx_AddTraceback("BoundaryConditions.BC_Base.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22922 __pyx_r = NULL;
22923 __pyx_L0:;
22924 __Pyx_XGIVEREF(__pyx_r);
22925 __Pyx_PyMonitoring_ExitScope(0);
22926 __Pyx_RefNannyFinishContext();
22927 return __pyx_r;
22928}
22929
22930/* Python wrapper */
22931static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
22932static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
22933 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
22934 int __pyx_r;
22935 __Pyx_RefNannyDeclarations
22936 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
22937 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
22938 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
22939
22940 /* function exit code */
22941 __Pyx_RefNannyFinishContext();
22942 return __pyx_r;
22943}
22944
22945static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
22946 int __pyx_r;
22947 __Pyx_TraceDeclarationsFunc
22948 __Pyx_RefNannyDeclarations
22949 PyObject *__pyx_t_1 = NULL;
22950 PyObject *__pyx_t_2 = NULL;
22951 int __pyx_lineno = 0;
22952 const char *__pyx_filename = NULL;
22953 int __pyx_clineno = 0;
22954 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]))
22955 __Pyx_RefNannySetupContext("__set__", 0);
22956 __Pyx_TraceStartFunc("__set__", __pyx_f[3], 11, 0, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22957 {
22958 __Pyx_PyCriticalSection __pyx_cs;
22959 __pyx_t_1 = ((PyObject *)__pyx_v_self);
22960 __Pyx_INCREF(__pyx_t_1);
22961 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
22962 /*try:*/ {
22963 __pyx_t_2 = __pyx_v_value;
22964 __Pyx_INCREF(__pyx_t_2);
22965 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(3, 11, __pyx_L4_error)
22966 __Pyx_GIVEREF(__pyx_t_2);
22967 __Pyx_GOTREF(__pyx_v_self->name);
22968 __Pyx_DECREF(__pyx_v_self->name);
22969 __pyx_v_self->name = ((PyObject*)__pyx_t_2);
22970 __pyx_t_2 = 0;
22971 }
22972 /*finally:*/ {
22973 /*normal exit:*/{
22974 __Pyx_PyCriticalSection_End(&__pyx_cs);
22975 goto __pyx_L5;
22976 }
22977 __pyx_L4_error: {
22978 __Pyx_PyCriticalSection_End(&__pyx_cs);
22979 goto __pyx_L1_error;
22980 }
22981 __pyx_L5:;
22982 }
22983 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22984 }
22985
22986 /* function exit code */
22987 __pyx_r = 0;
22988 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22989 goto __pyx_L0;
22990 __pyx_L1_error:;
22991 __Pyx_XDECREF(__pyx_t_1);
22992 __Pyx_XDECREF(__pyx_t_2);
22993 __Pyx_TraceException(__pyx_lineno, 0, 0);
22994 #if CYTHON_USE_SYS_MONITORING
22995 __Pyx_TraceExceptionUnwind(0, 0);
22996 #else
22997 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22998 #endif
22999 __Pyx_AddTraceback("BoundaryConditions.BC_Base.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23000 __pyx_r = -1;
23001 __pyx_L0:;
23002
23003 __Pyx_PyMonitoring_ExitScope(0);
23004 __Pyx_RefNannyFinishContext();
23005 return __pyx_r;
23006}
23007
23008/* Python wrapper */
23009static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
23010static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self) {
23011 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23012 int __pyx_r;
23013 __Pyx_RefNannyDeclarations
23014 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
23015 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23016 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
23017
23018 /* function exit code */
23019 __Pyx_RefNannyFinishContext();
23020 return __pyx_r;
23021}
23022
23023static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
23024 int __pyx_r;
23025 __Pyx_TraceDeclarationsFunc
23026 __Pyx_RefNannyDeclarations
23027 PyObject *__pyx_t_1 = NULL;
23028 int __pyx_lineno = 0;
23029 const char *__pyx_filename = NULL;
23030 int __pyx_clineno = 0;
23031 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]))
23032 __Pyx_RefNannySetupContext("__del__", 0);
23033 __Pyx_TraceStartFunc("__del__", __pyx_f[3], 11, 0, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
23034 {
23035 __Pyx_PyCriticalSection __pyx_cs;
23036 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23037 __Pyx_INCREF(__pyx_t_1);
23038 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23039 /*try:*/ {
23040 __Pyx_INCREF(Py_None);
23041 __Pyx_GIVEREF(Py_None);
23042 __Pyx_GOTREF(__pyx_v_self->name);
23043 __Pyx_DECREF(__pyx_v_self->name);
23044 __pyx_v_self->name = ((PyObject*)Py_None);
23045 }
23046 /*finally:*/ {
23047 /*normal exit:*/{
23048 __Pyx_PyCriticalSection_End(&__pyx_cs);
23049 goto __pyx_L5;
23050 }
23051 __pyx_L5:;
23052 }
23053 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23054 }
23055
23056 /* function exit code */
23057 __pyx_r = 0;
23058 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
23059 goto __pyx_L0;
23060 __pyx_L1_error:;
23061 __Pyx_XDECREF(__pyx_t_1);
23062 __Pyx_TraceException(__pyx_lineno, 0, 0);
23063 #if CYTHON_USE_SYS_MONITORING
23064 __Pyx_TraceExceptionUnwind(0, 0);
23065 #else
23066 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
23067 #endif
23068 __Pyx_AddTraceback("BoundaryConditions.BC_Base.name.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23069 __pyx_r = -1;
23070 __pyx_L0:;
23071
23072 __Pyx_PyMonitoring_ExitScope(0);
23073 __Pyx_RefNannyFinishContext();
23074 return __pyx_r;
23075}
23076
23077/* "BoundaryConditions.pxd":12
23078 * object Shape
23079 * str name
23080 * str BC_type # <<<<<<<<<<<<<<
23081 * object ct
23082 * # cpdef void newGlobalBC(BC_Base cls, newstr name, object default_value)
23083*/
23084
23085/* Python wrapper */
23086static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(PyObject *__pyx_v_self); /*proto*/
23087static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(PyObject *__pyx_v_self) {
23088 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23089 PyObject *__pyx_r = 0;
23090 __Pyx_RefNannyDeclarations
23091 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
23092 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23093 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
23094
23095 /* function exit code */
23096 __Pyx_RefNannyFinishContext();
23097 return __pyx_r;
23098}
23099
23100static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
23101 PyObject *__pyx_r = NULL;
23102 __Pyx_TraceDeclarationsFunc
23103 __Pyx_RefNannyDeclarations
23104 PyObject *__pyx_t_1 = NULL;
23105 PyObject *__pyx_t_2 = NULL;
23106 int __pyx_lineno = 0;
23107 const char *__pyx_filename = NULL;
23108 int __pyx_clineno = 0;
23109 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10]))
23110 __Pyx_RefNannySetupContext("__get__", 0);
23111 __Pyx_TraceStartFunc("__get__", __pyx_f[3], 12, 0, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23112 {
23113 __Pyx_PyCriticalSection __pyx_cs;
23114 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23115 __Pyx_INCREF(__pyx_t_1);
23116 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23117 /*try:*/ {
23118 {
23119 PyObject *__pyx_temp;
23120 {
23121 __pyx_temp = __pyx_r;
23122 __Pyx_INCREF(__pyx_v_self->BC_type);
23123 __pyx_r = __pyx_v_self->BC_type;
23124 }
23125 __Pyx_XDECREF(__pyx_temp);
23126 }
23127 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(3, 12, __pyx_L4_error));
23128 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23129 goto __pyx_L3_return;
23130 }
23131 /*finally:*/ {
23132 __pyx_L3_return: {
23133 __pyx_t_2 = __pyx_r;
23134 __pyx_r = 0;
23135 __Pyx_PyCriticalSection_End(&__pyx_cs);
23136 __pyx_r = __pyx_t_2;
23137 __pyx_t_2 = 0;
23138 goto __pyx_L0;
23139 }
23140 __pyx_L4_error: {
23141 __Pyx_PyCriticalSection_End(&__pyx_cs);
23142 goto __pyx_L1_error;
23143 }
23144 }
23145 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23146 }
23147
23148 /* function exit code */
23149 __pyx_L1_error:;
23150 __Pyx_XDECREF(__pyx_t_1);
23151 __Pyx_TraceException(__pyx_lineno, 0, 0);
23152 #if CYTHON_USE_SYS_MONITORING
23153 __Pyx_TraceExceptionUnwind(0, 0);
23154 #else
23155 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23156 #endif
23157 __Pyx_AddTraceback("BoundaryConditions.BC_Base.BC_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23158 __pyx_r = NULL;
23159 __pyx_L0:;
23160 __Pyx_XGIVEREF(__pyx_r);
23161 __Pyx_PyMonitoring_ExitScope(0);
23162 __Pyx_RefNannyFinishContext();
23163 return __pyx_r;
23164}
23165
23166/* Python wrapper */
23167static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
23168static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
23169 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23170 int __pyx_r;
23171 __Pyx_RefNannyDeclarations
23172 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
23173 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23174 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
23175
23176 /* function exit code */
23177 __Pyx_RefNannyFinishContext();
23178 return __pyx_r;
23179}
23180
23181static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
23182 int __pyx_r;
23183 __Pyx_TraceDeclarationsFunc
23184 __Pyx_RefNannyDeclarations
23185 PyObject *__pyx_t_1 = NULL;
23186 PyObject *__pyx_t_2 = NULL;
23187 int __pyx_lineno = 0;
23188 const char *__pyx_filename = NULL;
23189 int __pyx_clineno = 0;
23190 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11]))
23191 __Pyx_RefNannySetupContext("__set__", 0);
23192 __Pyx_TraceStartFunc("__set__", __pyx_f[3], 12, 0, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23193 {
23194 __Pyx_PyCriticalSection __pyx_cs;
23195 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23196 __Pyx_INCREF(__pyx_t_1);
23197 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23198 /*try:*/ {
23199 __pyx_t_2 = __pyx_v_value;
23200 __Pyx_INCREF(__pyx_t_2);
23201 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(3, 12, __pyx_L4_error)
23202 __Pyx_GIVEREF(__pyx_t_2);
23203 __Pyx_GOTREF(__pyx_v_self->BC_type);
23204 __Pyx_DECREF(__pyx_v_self->BC_type);
23205 __pyx_v_self->BC_type = ((PyObject*)__pyx_t_2);
23206 __pyx_t_2 = 0;
23207 }
23208 /*finally:*/ {
23209 /*normal exit:*/{
23210 __Pyx_PyCriticalSection_End(&__pyx_cs);
23211 goto __pyx_L5;
23212 }
23213 __pyx_L4_error: {
23214 __Pyx_PyCriticalSection_End(&__pyx_cs);
23215 goto __pyx_L1_error;
23216 }
23217 __pyx_L5:;
23218 }
23219 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23220 }
23221
23222 /* function exit code */
23223 __pyx_r = 0;
23224 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23225 goto __pyx_L0;
23226 __pyx_L1_error:;
23227 __Pyx_XDECREF(__pyx_t_1);
23228 __Pyx_XDECREF(__pyx_t_2);
23229 __Pyx_TraceException(__pyx_lineno, 0, 0);
23230 #if CYTHON_USE_SYS_MONITORING
23231 __Pyx_TraceExceptionUnwind(0, 0);
23232 #else
23233 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23234 #endif
23235 __Pyx_AddTraceback("BoundaryConditions.BC_Base.BC_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23236 __pyx_r = -1;
23237 __pyx_L0:;
23238
23239 __Pyx_PyMonitoring_ExitScope(0);
23240 __Pyx_RefNannyFinishContext();
23241 return __pyx_r;
23242}
23243
23244/* Python wrapper */
23245static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self); /*proto*/
23246static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self) {
23247 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23248 int __pyx_r;
23249 __Pyx_RefNannyDeclarations
23250 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
23251 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23252 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
23253
23254 /* function exit code */
23255 __Pyx_RefNannyFinishContext();
23256 return __pyx_r;
23257}
23258
23259static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
23260 int __pyx_r;
23261 __Pyx_TraceDeclarationsFunc
23262 __Pyx_RefNannyDeclarations
23263 PyObject *__pyx_t_1 = NULL;
23264 int __pyx_lineno = 0;
23265 const char *__pyx_filename = NULL;
23266 int __pyx_clineno = 0;
23267 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12]))
23268 __Pyx_RefNannySetupContext("__del__", 0);
23269 __Pyx_TraceStartFunc("__del__", __pyx_f[3], 12, 0, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23270 {
23271 __Pyx_PyCriticalSection __pyx_cs;
23272 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23273 __Pyx_INCREF(__pyx_t_1);
23274 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23275 /*try:*/ {
23276 __Pyx_INCREF(Py_None);
23277 __Pyx_GIVEREF(Py_None);
23278 __Pyx_GOTREF(__pyx_v_self->BC_type);
23279 __Pyx_DECREF(__pyx_v_self->BC_type);
23280 __pyx_v_self->BC_type = ((PyObject*)Py_None);
23281 }
23282 /*finally:*/ {
23283 /*normal exit:*/{
23284 __Pyx_PyCriticalSection_End(&__pyx_cs);
23285 goto __pyx_L5;
23286 }
23287 __pyx_L5:;
23288 }
23289 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23290 }
23291
23292 /* function exit code */
23293 __pyx_r = 0;
23294 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23295 goto __pyx_L0;
23296 __pyx_L1_error:;
23297 __Pyx_XDECREF(__pyx_t_1);
23298 __Pyx_TraceException(__pyx_lineno, 0, 0);
23299 #if CYTHON_USE_SYS_MONITORING
23300 __Pyx_TraceExceptionUnwind(0, 0);
23301 #else
23302 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23303 #endif
23304 __Pyx_AddTraceback("BoundaryConditions.BC_Base.BC_type.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23305 __pyx_r = -1;
23306 __pyx_L0:;
23307
23308 __Pyx_PyMonitoring_ExitScope(0);
23309 __Pyx_RefNannyFinishContext();
23310 return __pyx_r;
23311}
23312
23313/* "BoundaryConditions.pxd":13
23314 * str name
23315 * str BC_type
23316 * object ct # <<<<<<<<<<<<<<
23317 * # cpdef void newGlobalBC(BC_Base cls, newstr name, object default_value)
23318 * # cpdef void getContext(BC_Base cls, object context=*)
23319*/
23320
23321/* Python wrapper */
23322static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(PyObject *__pyx_v_self); /*proto*/
23323static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(PyObject *__pyx_v_self) {
23324 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23325 PyObject *__pyx_r = 0;
23326 __Pyx_RefNannyDeclarations
23327 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
23328 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23329 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
23330
23331 /* function exit code */
23332 __Pyx_RefNannyFinishContext();
23333 return __pyx_r;
23334}
23335
23336static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
23337 PyObject *__pyx_r = NULL;
23338 __Pyx_TraceDeclarationsFunc
23339 __Pyx_RefNannyDeclarations
23340 PyObject *__pyx_t_1 = NULL;
23341 PyObject *__pyx_t_2 = NULL;
23342 int __pyx_lineno = 0;
23343 const char *__pyx_filename = NULL;
23344 int __pyx_clineno = 0;
23345 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13]))
23346 __Pyx_RefNannySetupContext("__get__", 0);
23347 __Pyx_TraceStartFunc("__get__", __pyx_f[3], 13, 0, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23348 {
23349 __Pyx_PyCriticalSection __pyx_cs;
23350 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23351 __Pyx_INCREF(__pyx_t_1);
23352 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23353 /*try:*/ {
23354 {
23355 PyObject *__pyx_temp;
23356 {
23357 __pyx_temp = __pyx_r;
23358 __Pyx_INCREF(__pyx_v_self->ct);
23359 __pyx_r = __pyx_v_self->ct;
23360 }
23361 __Pyx_XDECREF(__pyx_temp);
23362 }
23363 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(3, 13, __pyx_L4_error));
23364 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23365 goto __pyx_L3_return;
23366 }
23367 /*finally:*/ {
23368 __pyx_L3_return: {
23369 __pyx_t_2 = __pyx_r;
23370 __pyx_r = 0;
23371 __Pyx_PyCriticalSection_End(&__pyx_cs);
23372 __pyx_r = __pyx_t_2;
23373 __pyx_t_2 = 0;
23374 goto __pyx_L0;
23375 }
23376 __pyx_L4_error: {
23377 __Pyx_PyCriticalSection_End(&__pyx_cs);
23378 goto __pyx_L1_error;
23379 }
23380 }
23381 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23382 }
23383
23384 /* function exit code */
23385 __pyx_L1_error:;
23386 __Pyx_XDECREF(__pyx_t_1);
23387 __Pyx_TraceException(__pyx_lineno, 0, 0);
23388 #if CYTHON_USE_SYS_MONITORING
23389 __Pyx_TraceExceptionUnwind(0, 0);
23390 #else
23391 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23392 #endif
23393 __Pyx_AddTraceback("BoundaryConditions.BC_Base.ct.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23394 __pyx_r = NULL;
23395 __pyx_L0:;
23396 __Pyx_XGIVEREF(__pyx_r);
23397 __Pyx_PyMonitoring_ExitScope(0);
23398 __Pyx_RefNannyFinishContext();
23399 return __pyx_r;
23400}
23401
23402/* Python wrapper */
23403static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
23404static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
23405 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23406 int __pyx_r;
23407 __Pyx_RefNannyDeclarations
23408 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
23409 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23410 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
23411
23412 /* function exit code */
23413 __Pyx_RefNannyFinishContext();
23414 return __pyx_r;
23415}
23416
23417static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
23418 int __pyx_r;
23419 __Pyx_TraceDeclarationsFunc
23420 __Pyx_RefNannyDeclarations
23421 PyObject *__pyx_t_1 = NULL;
23422 int __pyx_lineno = 0;
23423 const char *__pyx_filename = NULL;
23424 int __pyx_clineno = 0;
23425 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14]))
23426 __Pyx_RefNannySetupContext("__set__", 0);
23427 __Pyx_TraceStartFunc("__set__", __pyx_f[3], 13, 0, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23428 {
23429 __Pyx_PyCriticalSection __pyx_cs;
23430 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23431 __Pyx_INCREF(__pyx_t_1);
23432 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23433 /*try:*/ {
23434 __Pyx_INCREF(__pyx_v_value);
23435 __Pyx_GIVEREF(__pyx_v_value);
23436 __Pyx_GOTREF(__pyx_v_self->ct);
23437 __Pyx_DECREF(__pyx_v_self->ct);
23438 __pyx_v_self->ct = __pyx_v_value;
23439 }
23440 /*finally:*/ {
23441 /*normal exit:*/{
23442 __Pyx_PyCriticalSection_End(&__pyx_cs);
23443 goto __pyx_L5;
23444 }
23445 __pyx_L5:;
23446 }
23447 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23448 }
23449
23450 /* function exit code */
23451 __pyx_r = 0;
23452 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23453 goto __pyx_L0;
23454 __pyx_L1_error:;
23455 __Pyx_XDECREF(__pyx_t_1);
23456 __Pyx_TraceException(__pyx_lineno, 0, 0);
23457 #if CYTHON_USE_SYS_MONITORING
23458 __Pyx_TraceExceptionUnwind(0, 0);
23459 #else
23460 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23461 #endif
23462 __Pyx_AddTraceback("BoundaryConditions.BC_Base.ct.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23463 __pyx_r = -1;
23464 __pyx_L0:;
23465
23466 __Pyx_PyMonitoring_ExitScope(0);
23467 __Pyx_RefNannyFinishContext();
23468 return __pyx_r;
23469}
23470
23471/* Python wrapper */
23472static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self); /*proto*/
23473static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self) {
23474 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23475 int __pyx_r;
23476 __Pyx_RefNannyDeclarations
23477 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
23478 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23479 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
23480
23481 /* function exit code */
23482 __Pyx_RefNannyFinishContext();
23483 return __pyx_r;
23484}
23485
23486static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
23487 int __pyx_r;
23488 __Pyx_TraceDeclarationsFunc
23489 __Pyx_RefNannyDeclarations
23490 PyObject *__pyx_t_1 = NULL;
23491 int __pyx_lineno = 0;
23492 const char *__pyx_filename = NULL;
23493 int __pyx_clineno = 0;
23494 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15]))
23495 __Pyx_RefNannySetupContext("__del__", 0);
23496 __Pyx_TraceStartFunc("__del__", __pyx_f[3], 13, 0, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23497 {
23498 __Pyx_PyCriticalSection __pyx_cs;
23499 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23500 __Pyx_INCREF(__pyx_t_1);
23501 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23502 /*try:*/ {
23503 __Pyx_INCREF(Py_None);
23504 __Pyx_GIVEREF(Py_None);
23505 __Pyx_GOTREF(__pyx_v_self->ct);
23506 __Pyx_DECREF(__pyx_v_self->ct);
23507 __pyx_v_self->ct = Py_None;
23508 }
23509 /*finally:*/ {
23510 /*normal exit:*/{
23511 __Pyx_PyCriticalSection_End(&__pyx_cs);
23512 goto __pyx_L5;
23513 }
23514 __pyx_L5:;
23515 }
23516 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23517 }
23518
23519 /* function exit code */
23520 __pyx_r = 0;
23521 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23522 goto __pyx_L0;
23523 __pyx_L1_error:;
23524 __Pyx_XDECREF(__pyx_t_1);
23525 __Pyx_TraceException(__pyx_lineno, 0, 0);
23526 #if CYTHON_USE_SYS_MONITORING
23527 __Pyx_TraceExceptionUnwind(0, 0);
23528 #else
23529 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23530 #endif
23531 __Pyx_AddTraceback("BoundaryConditions.BC_Base.ct.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23532 __pyx_r = -1;
23533 __pyx_L0:;
23534
23535 __Pyx_PyMonitoring_ExitScope(0);
23536 __Pyx_RefNannyFinishContext();
23537 return __pyx_r;
23538}
23539
23540/* "(tree fragment)":1
23541 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
23542 * cdef tuple state
23543 * cdef object _dict
23544*/
23545
23546/* Python wrapper */
23547static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__(PyObject *__pyx_v_self,
23548#if CYTHON_VECTORCALL
23549PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23550#else
23551PyObject *__pyx_args, PyObject *__pyx_kwds
23552#endif
23553); /*proto*/
23554PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_7BC_Base_4__reduce_cython__, "BC_Base.__reduce_cython__(self)");
23555static PyMethodDef __pyx_mdef_18BoundaryConditions_7BC_Base_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_4__reduce_cython__};
23556static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__(PyObject *__pyx_v_self,
23557#if CYTHON_VECTORCALL
23558PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23559#else
23560PyObject *__pyx_args, PyObject *__pyx_kwds
23561#endif
23562) {
23563 #if !CYTHON_VECTORCALL
23564 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23565 #endif
23566 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23567 PyObject *__pyx_r = 0;
23568 __Pyx_RefNannyDeclarations
23569 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
23570 #if !CYTHON_VECTORCALL
23571 #if CYTHON_ASSUME_SAFE_SIZE
23572 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23573 #else
23574 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
23575 #endif
23576 #endif
23577 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
23578 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
23579 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
23580 if (unlikely(__pyx_kwds_len < 0)) return NULL;
23581 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
23582 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
23583
23584 /* function exit code */
23585 __Pyx_RefNannyFinishContext();
23586 return __pyx_r;
23587}
23588
23589static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
23590 PyObject *__pyx_v_state = 0;
23591 PyObject *__pyx_v__dict = 0;
23592 int __pyx_v_use_setstate;
23593 PyObject *__pyx_r = NULL;
23594 __Pyx_TraceDeclarationsFunc
23595 __Pyx_RefNannyDeclarations
23596 PyObject *__pyx_t_1 = NULL;
23597 PyObject *__pyx_t_2 = NULL;
23598 PyObject *__pyx_t_3 = NULL;
23599 PyObject *__pyx_t_4 = NULL;
23600 int __pyx_t_5;
23601 int __pyx_t_6;
23602 int __pyx_lineno = 0;
23603 const char *__pyx_filename = NULL;
23604 int __pyx_clineno = 0;
23605 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16]))
23606 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
23607 __Pyx_TraceStartFunc("__reduce_cython__", __pyx_f[1], 1, 0, 0, 0, __PYX_ERR(1, 1, __pyx_L1_error));
23608
23609 /* "(tree fragment)":5
23610 * cdef object _dict
23611 * cdef bint use_setstate
23612 * with CRITICAL_SECTION(self): # <<<<<<<<<<<<<<
23613 * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
23614 * _dict = getattr(self, '__dict__', None)
23615*/
23616 {
23617 __Pyx_PyCriticalSection __pyx_cs;
23618 __pyx_t_1 = ((PyObject *)__pyx_v_self);
23619 __Pyx_INCREF(__pyx_t_1);
23620 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
23621 /*try:*/ {
23622
23623 /* "(tree fragment)":6
23624 * cdef bint use_setstate
23625 * with CRITICAL_SECTION(self):
23626 * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd) # <<<<<<<<<<<<<<
23627 * _dict = getattr(self, '__dict__', None)
23628 * if _dict is not None and _dict:
23629*/
23630 __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->_b_or, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L4_error)
23631 __Pyx_GOTREF(__pyx_t_2);
23632 __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_self->nd); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L4_error)
23633 __Pyx_GOTREF(__pyx_t_3);
23634 __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L4_error)
23635 __Pyx_GOTREF(__pyx_t_4);
23636 __Pyx_INCREF(__pyx_v_self->BC_type);
23637 __Pyx_GIVEREF(__pyx_v_self->BC_type);
23638 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->BC_type) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
23639 __Pyx_INCREF(__pyx_v_self->Shape);
23640 __Pyx_GIVEREF(__pyx_v_self->Shape);
23641 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->Shape) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
23642 __Pyx_GIVEREF(__pyx_t_2);
23643 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
23644 __Pyx_INCREF(__pyx_v_self->ct);
23645 __Pyx_GIVEREF(__pyx_v_self->ct);
23646 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->ct) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
23647 __Pyx_INCREF(__pyx_v_self->name);
23648 __Pyx_GIVEREF(__pyx_v_self->name);
23649 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->name) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
23650 __Pyx_GIVEREF(__pyx_t_3);
23651 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3) != (0)) __PYX_ERR(1, 6, __pyx_L4_error);
23652 __pyx_t_2 = 0;
23653 __pyx_t_3 = 0;
23654 __pyx_v_state = ((PyObject*)__pyx_t_4);
23655 __pyx_t_4 = 0;
23656
23657 /* "(tree fragment)":7
23658 * with CRITICAL_SECTION(self):
23659 * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
23660 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
23661 * if _dict is not None and _dict:
23662 * state += (_dict,)
23663*/
23664 __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L4_error)
23665 __Pyx_GOTREF(__pyx_t_4);
23666 __pyx_v__dict = __pyx_t_4;
23667 __pyx_t_4 = 0;
23668 }
23669
23670 /* "(tree fragment)":5
23671 * cdef object _dict
23672 * cdef bint use_setstate
23673 * with CRITICAL_SECTION(self): # <<<<<<<<<<<<<<
23674 * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
23675 * _dict = getattr(self, '__dict__', None)
23676*/
23677 /*finally:*/ {
23678 /*normal exit:*/{
23679 __Pyx_PyCriticalSection_End(&__pyx_cs);
23680 goto __pyx_L5;
23681 }
23682 __pyx_L4_error: {
23683 __Pyx_PyCriticalSection_End(&__pyx_cs);
23684 goto __pyx_L1_error;
23685 }
23686 __pyx_L5:;
23687 }
23688 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23689 }
23690
23691 /* "(tree fragment)":8
23692 * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
23693 * _dict = getattr(self, '__dict__', None)
23694 * if _dict is not None and _dict: # <<<<<<<<<<<<<<
23695 * state += (_dict,)
23696 * use_setstate = True
23697*/
23698 __pyx_t_6 = (__pyx_v__dict != Py_None);
23699 if (__pyx_t_6) {
23700
23701 } else {
23702
23703 __pyx_t_5 = __pyx_t_6;
23704
23705 goto __pyx_L7_bool_binop_done;
23706 }
23707 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 8, __pyx_L1_error)
23708
23709 __pyx_t_5 = __pyx_t_6;
23710
23711 __pyx_L7_bool_binop_done:;
23712 if (__pyx_t_5) {
23713
23714
23715 /* "(tree fragment)":9
23716 * _dict = getattr(self, '__dict__', None)
23717 * if _dict is not None and _dict:
23718 * state += (_dict,) # <<<<<<<<<<<<<<
23719 * use_setstate = True
23720 * else:
23721*/
23722 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
23723 __Pyx_GOTREF(__pyx_t_1);
23724 __Pyx_INCREF(__pyx_v__dict);
23725 __Pyx_GIVEREF(__pyx_v__dict);
23726 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 9, __pyx_L1_error);
23727 __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
23728 __Pyx_GOTREF(__pyx_t_4);
23729 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23730 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
23731 __pyx_t_4 = 0;
23732
23733 /* "(tree fragment)":10
23734 * if _dict is not None and _dict:
23735 * state += (_dict,)
23736 * use_setstate = True # <<<<<<<<<<<<<<
23737 * else:
23738 * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
23739*/
23740 __pyx_v_use_setstate = 1;
23741
23742 /* "(tree fragment)":8
23743 * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
23744 * _dict = getattr(self, '__dict__', None)
23745 * if _dict is not None and _dict: # <<<<<<<<<<<<<<
23746 * state += (_dict,)
23747 * use_setstate = True
23748*/
23749 goto __pyx_L6;
23750 }
23751
23752 /* "(tree fragment)":12
23753 * use_setstate = True
23754 * else:
23755 * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None # <<<<<<<<<<<<<<
23756 * if use_setstate:
23757 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, None), state
23758*/
23759 /*else*/ {
23760 __pyx_t_6 = (__pyx_v_self->BC_type != ((PyObject*)Py_None));
23761 if (!__pyx_t_6) {
23762
23763 } else {
23764
23765 __pyx_t_5 = __pyx_t_6;
23766
23767 goto __pyx_L9_bool_binop_done;
23768 }
23769 __pyx_t_6 = (__pyx_v_self->Shape != Py_None);
23770 if (!__pyx_t_6) {
23771
23772 } else {
23773
23774 __pyx_t_5 = __pyx_t_6;
23775
23776 goto __pyx_L9_bool_binop_done;
23777 }
23778 __pyx_t_6 = (__pyx_v_self->ct != Py_None);
23779 if (!__pyx_t_6) {
23780
23781 } else {
23782
23783 __pyx_t_5 = __pyx_t_6;
23784
23785 goto __pyx_L9_bool_binop_done;
23786 }
23787 __pyx_t_6 = (__pyx_v_self->name != ((PyObject*)Py_None));
23788
23789 __pyx_t_5 = __pyx_t_6;
23790
23791 __pyx_L9_bool_binop_done:;
23792 __pyx_v_use_setstate = __pyx_t_5;
23793 }
23794 __pyx_L6:;
23795
23796 /* "(tree fragment)":13
23797 * else:
23798 * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
23799 * if use_setstate: # <<<<<<<<<<<<<<
23800 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, None), state
23801 * else:
23802*/
23803 if (__pyx_v_use_setstate) {
23804
23805 /* "(tree fragment)":14
23806 * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
23807 * if use_setstate:
23808 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, None), state # <<<<<<<<<<<<<<
23809 * else:
23810 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, state)
23811*/
23812 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BC_Base); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 14, __pyx_L1_error)
23813 __Pyx_GOTREF(__pyx_t_4);
23814 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
23815 __Pyx_GOTREF(__pyx_t_1);
23816 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
23817 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
23818 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
23819 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_81007987);
23820 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_81007987);
23821 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_81007987) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
23822 __Pyx_INCREF(Py_None);
23823 __Pyx_GIVEREF(Py_None);
23824 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
23825 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 14, __pyx_L1_error)
23826 __Pyx_GOTREF(__pyx_t_3);
23827 __Pyx_GIVEREF(__pyx_t_4);
23828 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
23829 __Pyx_GIVEREF(__pyx_t_1);
23830 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
23831 __Pyx_INCREF(__pyx_v_state);
23832 __Pyx_GIVEREF(__pyx_v_state);
23833 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 14, __pyx_L1_error);
23834 __pyx_t_4 = 0;
23835 __pyx_t_1 = 0;
23836 {
23837 PyObject *__pyx_temp;
23838 {
23839 __pyx_temp = __pyx_r;
23840 __pyx_r = __pyx_t_3;
23841 }
23842 __Pyx_XDECREF(__pyx_temp);
23843 }
23844 __pyx_t_3 = 0;
23845 __Pyx_TraceReturnValue(__pyx_r, 54, 0, __PYX_ERR(1, 14, __pyx_L1_error));
23846 goto __pyx_L0;
23847
23848 /* "(tree fragment)":13
23849 * else:
23850 * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
23851 * if use_setstate: # <<<<<<<<<<<<<<
23852 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, None), state
23853 * else:
23854*/
23855 }
23856
23857 /* "(tree fragment)":16
23858 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, None), state
23859 * else:
23860 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, state) # <<<<<<<<<<<<<<
23861 * def __setstate_cython__(self, __pyx_state):
23862 * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
23863*/
23864 /*else*/ {
23865 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BC_Base); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 16, __pyx_L1_error)
23866 __Pyx_GOTREF(__pyx_t_3);
23867 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error)
23868 __Pyx_GOTREF(__pyx_t_1);
23869 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
23870 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
23871 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
23872 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_81007987);
23873 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_81007987);
23874 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_81007987) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
23875 __Pyx_INCREF(__pyx_v_state);
23876 __Pyx_GIVEREF(__pyx_v_state);
23877 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
23878 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
23879 __Pyx_GOTREF(__pyx_t_4);
23880 __Pyx_GIVEREF(__pyx_t_3);
23881 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
23882 __Pyx_GIVEREF(__pyx_t_1);
23883 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 16, __pyx_L1_error);
23884 __pyx_t_3 = 0;
23885 __pyx_t_1 = 0;
23886 {
23887 PyObject *__pyx_temp;
23888 {
23889 __pyx_temp = __pyx_r;
23890 __pyx_r = __pyx_t_4;
23891 }
23892 __Pyx_XDECREF(__pyx_temp);
23893 }
23894 __pyx_t_4 = 0;
23895 __Pyx_TraceReturnValue(__pyx_r, 62, 0, __PYX_ERR(1, 16, __pyx_L1_error));
23896 goto __pyx_L0;
23897 }
23898
23899 /* "(tree fragment)":1
23900 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
23901 * cdef tuple state
23902 * cdef object _dict
23903*/
23904
23905 /* function exit code */
23906 __pyx_L1_error:;
23907 __Pyx_XDECREF(__pyx_t_1);
23908 __Pyx_XDECREF(__pyx_t_2);
23909 __Pyx_XDECREF(__pyx_t_3);
23910 __Pyx_XDECREF(__pyx_t_4);
23911 __Pyx_TraceException(__pyx_lineno, 0, 0);
23912 #if CYTHON_USE_SYS_MONITORING
23913 __Pyx_TraceExceptionUnwind(0, 0);
23914 #else
23915 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 1, __pyx_L1_error));
23916 #endif
23917 __Pyx_AddTraceback("BoundaryConditions.BC_Base.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23918 __pyx_r = NULL;
23919 __pyx_L0:;
23920 __Pyx_XDECREF(__pyx_v_state);
23921 __Pyx_XDECREF(__pyx_v__dict);
23922
23923 __Pyx_XGIVEREF(__pyx_r);
23924 __Pyx_PyMonitoring_ExitScope(0);
23925 __Pyx_RefNannyFinishContext();
23926 return __pyx_r;
23927}
23928
23929/* "(tree fragment)":17
23930 * else:
23931 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, state)
23932 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
23933 * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
23934*/
23935
23936/* Python wrapper */
23937static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__(PyObject *__pyx_v_self,
23938#if CYTHON_VECTORCALL
23939PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23940#else
23941PyObject *__pyx_args, PyObject *__pyx_kwds
23942#endif
23943); /*proto*/
23944PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_7BC_Base_6__setstate_cython__, "BC_Base.__setstate_cython__(self, __pyx_state)");
23945static PyMethodDef __pyx_mdef_18BoundaryConditions_7BC_Base_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_6__setstate_cython__};
23946static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__(PyObject *__pyx_v_self,
23947#if CYTHON_VECTORCALL
23948PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23949#else
23950PyObject *__pyx_args, PyObject *__pyx_kwds
23951#endif
23952) {
23953 PyObject *__pyx_v___pyx_state = 0;
23954 #if !CYTHON_VECTORCALL
23955 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23956 #endif
23957 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23958 PyObject* values[1] = {0};
23959 int __pyx_lineno = 0;
23960 const char *__pyx_filename = NULL;
23961 int __pyx_clineno = 0;
23962 PyObject *__pyx_r = 0;
23963 __Pyx_RefNannyDeclarations
23964 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
23965 #if !CYTHON_VECTORCALL
23966 #if CYTHON_ASSUME_SAFE_SIZE
23967 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23968 #else
23969 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
23970 #endif
23971 #endif
23972 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
23973 {
23974 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
23975 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
23976 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 17, __pyx_L3_error)
23977 if (__pyx_kwds_len > 0) {
23978 switch (__pyx_nargs) {
23979 case 1:
23980 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
23981 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 17, __pyx_L3_error)
23982 CYTHON_FALLTHROUGH;
23983 case 0: break;
23984 default: goto __pyx_L5_argtuple_error;
23985 }
23986 const Py_ssize_t kwd_pos_args = __pyx_nargs;
23987 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 17, __pyx_L3_error)
23988 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
23989 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 17, __pyx_L3_error) }
23990 }
23991 } else if (unlikely(__pyx_nargs != 1)) {
23992 goto __pyx_L5_argtuple_error;
23993 } else {
23994 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
23995 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 17, __pyx_L3_error)
23996 }
23997 __pyx_v___pyx_state = values[0];
23998 }
23999 goto __pyx_L6_skip;
24000 __pyx_L5_argtuple_error:;
24001 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 17, __pyx_L3_error)
24002 __pyx_L6_skip:;
24003 goto __pyx_L4_argument_unpacking_done;
24004 __pyx_L3_error:;
24005 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24006 Py_XDECREF(values[__pyx_temp]);
24007 }
24008 __Pyx_AddTraceback("BoundaryConditions.BC_Base.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24009 __Pyx_RefNannyFinishContext();
24010 return NULL;
24011 __pyx_L4_argument_unpacking_done:;
24012 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), __pyx_v___pyx_state);
24013
24014 /* function exit code */
24015 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24016 Py_XDECREF(values[__pyx_temp]);
24017 }
24018 __Pyx_RefNannyFinishContext();
24019 return __pyx_r;
24020}
24021
24022static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
24023 PyObject *__pyx_r = NULL;
24024 __Pyx_TraceDeclarationsFunc
24025 __Pyx_RefNannyDeclarations
24026 PyObject *__pyx_t_1 = NULL;
24027 PyObject *__pyx_t_2 = NULL;
24028 int __pyx_lineno = 0;
24029 const char *__pyx_filename = NULL;
24030 int __pyx_clineno = 0;
24031 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17]))
24032 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
24033 __Pyx_TraceStartFunc("__setstate_cython__", __pyx_f[1], 17, 0, 0, 0, __PYX_ERR(1, 17, __pyx_L1_error));
24034
24035 /* "(tree fragment)":18
24036 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, state)
24037 * def __setstate_cython__(self, __pyx_state):
24038 * __pyx_unpickle_BC_Base__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
24039*/
24040 __pyx_t_1 = __pyx_v___pyx_state;
24041 __Pyx_INCREF(__pyx_t_1);
24042 if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 18, __pyx_L1_error)
24043 if (unlikely(__pyx_t_1 == Py_None)) {
24044 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
24045 __PYX_ERR(1, 18, __pyx_L1_error)
24046 }
24047 __pyx_t_2 = __pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error)
24048 __Pyx_GOTREF(__pyx_t_2);
24049 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24050 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24051
24052 /* "(tree fragment)":17
24053 * else:
24054 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, state)
24055 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
24056 * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
24057*/
24058
24059 /* function exit code */
24060 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24061 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(1, 17, __pyx_L1_error));
24062 goto __pyx_L0;
24063 __pyx_L1_error:;
24064 __Pyx_XDECREF(__pyx_t_1);
24065 __Pyx_XDECREF(__pyx_t_2);
24066 __Pyx_TraceException(__pyx_lineno, 0, 0);
24067 #if CYTHON_USE_SYS_MONITORING
24068 __Pyx_TraceExceptionUnwind(0, 0);
24069 #else
24070 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 17, __pyx_L1_error));
24071 #endif
24072 __Pyx_AddTraceback("BoundaryConditions.BC_Base.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24073 __pyx_r = NULL;
24074 __pyx_L0:;
24075 __Pyx_XGIVEREF(__pyx_r);
24076 __Pyx_PyMonitoring_ExitScope(0);
24077 __Pyx_RefNannyFinishContext();
24078 return __pyx_r;
24079}
24080
24081/* "BoundaryConditions.py":78
24082 * no boundary condition
24083 * """
24084 * def __init__(self): # <<<<<<<<<<<<<<
24085 * self.uOfXT = None
24086 *
24087*/
24088
24089/* Python wrapper */
24090static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(PyObject *__pyx_v_self,
24091#if CYTHON_VECTORCALL_TPNEW
24092PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24093#else
24094PyObject *__pyx_args, PyObject *__pyx_kwds
24095#endif
24096); /*proto*/
24097static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(PyObject *__pyx_v_self,
24098#if CYTHON_VECTORCALL_TPNEW
24099PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24100#else
24101PyObject *__pyx_args, PyObject *__pyx_kwds
24102#endif
24103) {
24104 #if !CYTHON_VECTORCALL_TPNEW
24105 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24106 #endif
24107 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24108 int __pyx_r;
24109 __Pyx_RefNannyDeclarations
24110 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
24111 #if !CYTHON_VECTORCALL_TPNEW
24112 #if CYTHON_ASSUME_SAFE_SIZE
24113 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24114 #else
24115 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
24116 #endif
24117 #endif
24118 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
24119 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
24120 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL_TPNEW(__pyx_kwds) : 0;
24121 if (unlikely(__pyx_kwds_len < 0)) return -1;
24122 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
24123 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
24124
24125 /* function exit code */
24126 __Pyx_RefNannyFinishContext();
24127 return __pyx_r;
24128}
24129
24130static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
24131 int __pyx_r;
24132 __Pyx_TraceDeclarationsFunc
24133 __Pyx_RefNannyDeclarations
24134 int __pyx_lineno = 0;
24135 const char *__pyx_filename = NULL;
24136 int __pyx_clineno = 0;
24137 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18]))
24138 __Pyx_RefNannySetupContext("__init__", 0);
24139 __Pyx_TraceStartFunc("__init__", __pyx_f[0], 78, 0, 0, 0, __PYX_ERR(0, 78, __pyx_L1_error));
24140
24141 /* "BoundaryConditions.py":79
24142 * """
24143 * def __init__(self):
24144 * self.uOfXT = None # <<<<<<<<<<<<<<
24145 *
24146 * def init_cython(self):
24147*/
24148 __Pyx_INCREF(Py_None);
24149 __Pyx_GIVEREF(Py_None);
24150 __Pyx_GOTREF(__pyx_v_self->uOfXT);
24151 __Pyx_DECREF(__pyx_v_self->uOfXT);
24152 __pyx_v_self->uOfXT = Py_None;
24153
24154 /* "BoundaryConditions.py":78
24155 * no boundary condition
24156 * """
24157 * def __init__(self): # <<<<<<<<<<<<<<
24158 * self.uOfXT = None
24159 *
24160*/
24161
24162 /* function exit code */
24163 __pyx_r = 0;
24164 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 78, __pyx_L1_error));
24165 goto __pyx_L0;
24166 __pyx_L1_error:;
24167 __Pyx_TraceException(__pyx_lineno, 0, 0);
24168 #if CYTHON_USE_SYS_MONITORING
24169 __Pyx_TraceExceptionUnwind(0, 0);
24170 #else
24171 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 78, __pyx_L1_error));
24172 #endif
24173 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24174 __pyx_r = -1;
24175 __pyx_L0:;
24176
24177 __Pyx_PyMonitoring_ExitScope(0);
24178 __Pyx_RefNannyFinishContext();
24179 return __pyx_r;
24180}
24181
24182/* "BoundaryConditions.py":81
24183 * self.uOfXT = None
24184 *
24185 * def init_cython(self): # <<<<<<<<<<<<<<
24186 * return self.uOfXT
24187 *
24188*/
24189
24190/* Python wrapper */
24191static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython(PyObject *__pyx_v_self,
24192#if CYTHON_VECTORCALL
24193PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24194#else
24195PyObject *__pyx_args, PyObject *__pyx_kwds
24196#endif
24197); /*proto*/
24198PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_2init_cython, "BoundaryCondition.init_cython(self)");
24199static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_3init_cython = {"init_cython", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_2init_cython};
24200static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython(PyObject *__pyx_v_self,
24201#if CYTHON_VECTORCALL
24202PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24203#else
24204PyObject *__pyx_args, PyObject *__pyx_kwds
24205#endif
24206) {
24207 #if !CYTHON_VECTORCALL
24208 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24209 #endif
24210 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24211 PyObject *__pyx_r = 0;
24212 __Pyx_RefNannyDeclarations
24213 __Pyx_RefNannySetupContext("init_cython (wrapper)", 0);
24214 #if !CYTHON_VECTORCALL
24215 #if CYTHON_ASSUME_SAFE_SIZE
24216 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24217 #else
24218 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
24219 #endif
24220 #endif
24221 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24222 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("init_cython", 1, 0, 0, __pyx_nargs); return NULL; }
24223 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
24224 if (unlikely(__pyx_kwds_len < 0)) return NULL;
24225 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("init_cython", __pyx_kwds); return NULL;}
24226 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
24227
24228 /* function exit code */
24229 __Pyx_RefNannyFinishContext();
24230 return __pyx_r;
24231}
24232
24233static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
24234 PyObject *__pyx_r = NULL;
24235 __Pyx_TraceDeclarationsFunc
24236 __Pyx_RefNannyDeclarations
24237 int __pyx_lineno = 0;
24238 const char *__pyx_filename = NULL;
24239 int __pyx_clineno = 0;
24240 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19]))
24241 __Pyx_RefNannySetupContext("init_cython", 0);
24242 __Pyx_TraceStartFunc("init_cython", __pyx_f[0], 81, 0, 0, 0, __PYX_ERR(0, 81, __pyx_L1_error));
24243
24244 /* "BoundaryConditions.py":82
24245 *
24246 * def init_cython(self):
24247 * return self.uOfXT # <<<<<<<<<<<<<<
24248 *
24249 * def resetBC(self):
24250*/
24251 {
24252 PyObject *__pyx_temp;
24253 {
24254 __pyx_temp = __pyx_r;
24255 __Pyx_INCREF(__pyx_v_self->uOfXT);
24256 __pyx_r = __pyx_v_self->uOfXT;
24257 }
24258 __Pyx_XDECREF(__pyx_temp);
24259 }
24260 __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 82, __pyx_L1_error));
24261 goto __pyx_L0;
24262
24263 /* "BoundaryConditions.py":81
24264 * self.uOfXT = None
24265 *
24266 * def init_cython(self): # <<<<<<<<<<<<<<
24267 * return self.uOfXT
24268 *
24269*/
24270
24271 /* function exit code */
24272 __pyx_L1_error:;
24273 __Pyx_TraceException(__pyx_lineno, 0, 0);
24274 #if CYTHON_USE_SYS_MONITORING
24275 __Pyx_TraceExceptionUnwind(0, 0);
24276 #else
24277 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 81, __pyx_L1_error));
24278 #endif
24279 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.init_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
24280 __pyx_r = NULL;
24281 __pyx_L0:;
24282 __Pyx_XGIVEREF(__pyx_r);
24283 __Pyx_PyMonitoring_ExitScope(0);
24284 __Pyx_RefNannyFinishContext();
24285 return __pyx_r;
24286}
24287
24288/* "BoundaryConditions.py":84
24289 * return self.uOfXT
24290 *
24291 * def resetBC(self): # <<<<<<<<<<<<<<
24292 * self.uOfXT = None
24293 *
24294*/
24295
24296static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self,
24297#if CYTHON_VECTORCALL
24298PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24299#else
24300PyObject *__pyx_args, PyObject *__pyx_kwds
24301#endif
24302); /*proto*/
24303static void __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, int __pyx_skip_dispatch) {
24304 __Pyx_TraceDeclarationsFunc
24305 __Pyx_RefNannyDeclarations
24306 PyObject *__pyx_t_1 = NULL;
24307 PyObject *__pyx_t_2 = NULL;
24308 PyObject *__pyx_t_3 = NULL;
24309 PyObject *__pyx_t_4 = NULL;
24310 size_t __pyx_t_5;
24311 int __pyx_lineno = 0;
24312 const char *__pyx_filename = NULL;
24313 int __pyx_clineno = 0;
24314 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20]))
24315 __Pyx_RefNannySetupContext("resetBC", 0);
24316 __Pyx_TraceStartFunc("resetBC", __pyx_f[0], 84, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 84, __pyx_L1_error));
24317 /* Check if called by wrapper */
24318 if (unlikely(__pyx_skip_dispatch)) ;
24319 /* Check if overridden in Python */
24320 else if (
24321 #if !CYTHON_USE_TYPE_SLOTS
24322 unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition &&
24323 __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
24324 #else
24325 unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
24326 #endif
24327 ) {
24328 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
24329 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
24330 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
24331 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
24332 #endif
24333 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_resetBC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
24334 __Pyx_GOTREF(__pyx_t_1);
24335 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC)) {
24336 __pyx_t_3 = NULL;
24337 __Pyx_INCREF(__pyx_t_1);
24338 __pyx_t_4 = __pyx_t_1;
24339 __pyx_t_5 = 1;
24340 #if CYTHON_UNPACK_METHODS
24341 if (unlikely(PyMethod_Check(__pyx_t_4))) {
24342 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
24343 assert(__pyx_t_3);
24344 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
24345 __Pyx_INCREF(__pyx_t_3);
24346 __Pyx_INCREF(__pyx__function);
24347 __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
24348 __pyx_t_5 = 0;
24349 }
24350 #endif
24351 {
24352 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
24353 __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
24354 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24355 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24356 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
24357 __Pyx_GOTREF(__pyx_t_2);
24358 }
24359 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24360 {
24361 }
24362 __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24363 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24364 goto __pyx_L0;
24365 }
24366 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
24367 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
24368 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
24369 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
24370 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
24371 }
24372 #endif
24373 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24374 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
24375 }
24376 #endif
24377 }
24378
24379 /* "BoundaryConditions.py":85
24380 *
24381 * def resetBC(self):
24382 * self.uOfXT = None # <<<<<<<<<<<<<<
24383 *
24384 * def setConstantBC(self, value):
24385*/
24386 __Pyx_INCREF(Py_None);
24387 __Pyx_GIVEREF(Py_None);
24388 __Pyx_GOTREF(__pyx_v_self->uOfXT);
24389 __Pyx_DECREF(__pyx_v_self->uOfXT);
24390 __pyx_v_self->uOfXT = Py_None;
24391
24392 /* "BoundaryConditions.py":84
24393 * return self.uOfXT
24394 *
24395 * def resetBC(self): # <<<<<<<<<<<<<<
24396 * self.uOfXT = None
24397 *
24398*/
24399
24400 /* function exit code */
24401 __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24402 goto __pyx_L0;
24403 __pyx_L1_error:;
24404 __Pyx_XDECREF(__pyx_t_1);
24405 __Pyx_XDECREF(__pyx_t_2);
24406 __Pyx_XDECREF(__pyx_t_3);
24407 __Pyx_XDECREF(__pyx_t_4);
24408 __Pyx_TraceException(__pyx_lineno, 0, 0);
24409 #if CYTHON_USE_SYS_MONITORING
24410 __Pyx_TraceExceptionUnwind(0, 0);
24411 #else
24412 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24413 #endif
24414 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24415 __pyx_L0:;
24416
24417 __Pyx_PyMonitoring_ExitScope(0);
24418 __Pyx_RefNannyFinishContext();
24419}
24420
24421/* Python wrapper */
24422static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self,
24423#if CYTHON_VECTORCALL
24424PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24425#else
24426PyObject *__pyx_args, PyObject *__pyx_kwds
24427#endif
24428); /*proto*/
24429PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_4resetBC, "BoundaryCondition.resetBC(self) -> void");
24430static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_5resetBC = {"resetBC", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_4resetBC};
24431static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self,
24432#if CYTHON_VECTORCALL
24433PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24434#else
24435PyObject *__pyx_args, PyObject *__pyx_kwds
24436#endif
24437) {
24438 #if !CYTHON_VECTORCALL
24439 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24440 #endif
24441 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24442 PyObject *__pyx_r = 0;
24443 __Pyx_RefNannyDeclarations
24444 __Pyx_RefNannySetupContext("resetBC (wrapper)", 0);
24445 #if !CYTHON_VECTORCALL
24446 #if CYTHON_ASSUME_SAFE_SIZE
24447 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24448 #else
24449 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
24450 #endif
24451 #endif
24452 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24453 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("resetBC", 1, 0, 0, __pyx_nargs); return NULL; }
24454 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
24455 if (unlikely(__pyx_kwds_len < 0)) return NULL;
24456 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("resetBC", __pyx_kwds); return NULL;}
24457 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
24458
24459 /* function exit code */
24460 __Pyx_RefNannyFinishContext();
24461 return __pyx_r;
24462}
24463
24464static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
24465 PyObject *__pyx_r = NULL;
24466 __Pyx_TraceDeclarationsFunc
24467 __Pyx_RefNannyDeclarations
24468 PyObject *__pyx_t_1 = NULL;
24469 int __pyx_lineno = 0;
24470 const char *__pyx_filename = NULL;
24471 int __pyx_clineno = 0;
24472 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20]))
24473 __Pyx_RefNannySetupContext("resetBC", 0);
24474 __Pyx_TraceStartFunc("resetBC (wrapper)", __pyx_f[0], 84, 0, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24475 __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L1_error)
24476 __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
24477 __Pyx_GOTREF(__pyx_t_1);
24478 {
24479 PyObject *__pyx_temp;
24480 {
24481 __pyx_temp = __pyx_r;
24482 __pyx_r = __pyx_t_1;
24483 }
24484 __Pyx_XDECREF(__pyx_temp);
24485 }
24486 __pyx_t_1 = 0;
24487 goto __pyx_L0;
24488
24489 /* function exit code */
24490 __pyx_L1_error:;
24491 __Pyx_XDECREF(__pyx_t_1);
24492 __Pyx_TraceException(__pyx_lineno, 0, 0);
24493 #if CYTHON_USE_SYS_MONITORING
24494 __Pyx_TraceExceptionUnwind(0, 0);
24495 #else
24496 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24497 #endif
24498 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24499 __pyx_r = NULL;
24500 __pyx_L0:;
24501 __Pyx_XGIVEREF(__pyx_r);
24502 __Pyx_PyMonitoring_ExitScope(0);
24503 __Pyx_RefNannyFinishContext();
24504 return __pyx_r;
24505}
24506
24507/* "BoundaryConditions.py":87
24508 * self.uOfXT = None
24509 *
24510 * def setConstantBC(self, value): # <<<<<<<<<<<<<<
24511 * """
24512 * function returning constant BC
24513*/
24514
24515/* Python wrapper */
24516static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC(PyObject *__pyx_v_self,
24517#if CYTHON_VECTORCALL
24518PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24519#else
24520PyObject *__pyx_args, PyObject *__pyx_kwds
24521#endif
24522); /*proto*/
24523PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_6setConstantBC, "BoundaryCondition.setConstantBC(self, value)\n\nfunction returning constant BC\n\nParameters\n----------\nvalue : float\n Constant value");
24524static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_7setConstantBC = {"setConstantBC", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_6setConstantBC};
24525static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC(PyObject *__pyx_v_self,
24526#if CYTHON_VECTORCALL
24527PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24528#else
24529PyObject *__pyx_args, PyObject *__pyx_kwds
24530#endif
24531) {
24532 PyObject *__pyx_v_value = 0;
24533 #if !CYTHON_VECTORCALL
24534 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24535 #endif
24536 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24537 PyObject* values[1] = {0};
24538 int __pyx_lineno = 0;
24539 const char *__pyx_filename = NULL;
24540 int __pyx_clineno = 0;
24541 PyObject *__pyx_r = 0;
24542 __Pyx_RefNannyDeclarations
24543 __Pyx_RefNannySetupContext("setConstantBC (wrapper)", 0);
24544 #if !CYTHON_VECTORCALL
24545 #if CYTHON_ASSUME_SAFE_SIZE
24546 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24547 #else
24548 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
24549 #endif
24550 #endif
24551 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24552 {
24553 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0};
24554 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
24555 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 87, __pyx_L3_error)
24556 if (__pyx_kwds_len > 0) {
24557 switch (__pyx_nargs) {
24558 case 1:
24559 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
24560 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 87, __pyx_L3_error)
24561 CYTHON_FALLTHROUGH;
24562 case 0: break;
24563 default: goto __pyx_L5_argtuple_error;
24564 }
24565 const Py_ssize_t kwd_pos_args = __pyx_nargs;
24566 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setConstantBC", 0) < (0)) __PYX_ERR(0, 87, __pyx_L3_error)
24567 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
24568 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setConstantBC", 1, 1, 1, i); __PYX_ERR(0, 87, __pyx_L3_error) }
24569 }
24570 } else if (unlikely(__pyx_nargs != 1)) {
24571 goto __pyx_L5_argtuple_error;
24572 } else {
24573 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
24574 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 87, __pyx_L3_error)
24575 }
24576 __pyx_v_value = values[0];
24577 }
24578 goto __pyx_L6_skip;
24579 __pyx_L5_argtuple_error:;
24580 __Pyx_RaiseArgtupleInvalid("setConstantBC", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 87, __pyx_L3_error)
24581 __pyx_L6_skip:;
24582 goto __pyx_L4_argument_unpacking_done;
24583 __pyx_L3_error:;
24584 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24585 Py_XDECREF(values[__pyx_temp]);
24586 }
24587 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setConstantBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24588 __Pyx_RefNannyFinishContext();
24589 return NULL;
24590 __pyx_L4_argument_unpacking_done:;
24591 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), __pyx_v_value);
24592
24593 /* function exit code */
24594 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24595 Py_XDECREF(values[__pyx_temp]);
24596 }
24597 __Pyx_RefNannyFinishContext();
24598 return __pyx_r;
24599}
24600
24601/* "BoundaryConditions.py":97
24602 *
24603 * """
24604 * self.uOfXT = lambda x, t, n=np.zeros(3,): value # <<<<<<<<<<<<<<
24605 *
24606 *
24607*/
24608
24609static PyObject *__pyx_pf_18BoundaryConditions_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
24610 PyObject *__pyx_r = NULL;
24611 __Pyx_RefNannyDeclarations
24612 PyObject *__pyx_t_1 = NULL;
24613 PyObject *__pyx_t_2 = NULL;
24614 int __pyx_lineno = 0;
24615 const char *__pyx_filename = NULL;
24616 int __pyx_clineno = 0;
24617 __Pyx_RefNannySetupContext("__defaults__", 0);
24618 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
24619 __Pyx_GOTREF(__pyx_t_1);
24620 __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
24621 __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
24622 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 97, __pyx_L1_error);
24623 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
24624 __Pyx_GOTREF(__pyx_t_2);
24625 __Pyx_GIVEREF(__pyx_t_1);
24626 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 97, __pyx_L1_error);
24627 __Pyx_INCREF(Py_None);
24628 __Pyx_GIVEREF(Py_None);
24629 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 97, __pyx_L1_error);
24630 __pyx_t_1 = 0;
24631 {
24632 PyObject *__pyx_temp;
24633 {
24634 __pyx_temp = __pyx_r;
24635 __pyx_r = __pyx_t_2;
24636 }
24637 __Pyx_XDECREF(__pyx_temp);
24638 }
24639 __pyx_t_2 = 0;
24640 goto __pyx_L0;
24641
24642 /* function exit code */
24643 __pyx_L1_error:;
24644 __Pyx_XDECREF(__pyx_t_1);
24645 __Pyx_XDECREF(__pyx_t_2);
24646 __Pyx_AddTraceback("BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24647 __pyx_r = NULL;
24648 __pyx_L0:;
24649 __Pyx_XGIVEREF(__pyx_r);
24650 __Pyx_RefNannyFinishContext();
24651 return __pyx_r;
24652}
24653
24654/* Python wrapper */
24655static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC___pyx_lambda_funcdef_lambda(PyObject *__pyx_self,
24656#if CYTHON_VECTORCALL
24657PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24658#else
24659PyObject *__pyx_args, PyObject *__pyx_kwds
24660#endif
24661); /*proto*/
24662static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setConstantBC___pyx_lambda_funcdef_lambda = {"lambda", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC___pyx_lambda_funcdef_lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
24663static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC___pyx_lambda_funcdef_lambda(PyObject *__pyx_self,
24664#if CYTHON_VECTORCALL
24665PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24666#else
24667PyObject *__pyx_args, PyObject *__pyx_kwds
24668#endif
24669) {
24670 CYTHON_UNUSED PyObject *__pyx_v_x = 0;
24671 CYTHON_UNUSED PyObject *__pyx_v_t = 0;
24672 CYTHON_UNUSED PyObject *__pyx_v_n = 0;
24673 #if !CYTHON_VECTORCALL
24674 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24675 #endif
24676 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24677 PyObject* values[3] = {0,0,0};
24678 int __pyx_lineno = 0;
24679 const char *__pyx_filename = NULL;
24680 int __pyx_clineno = 0;
24681 PyObject *__pyx_r = 0;
24682 __Pyx_RefNannyDeclarations
24683 __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
24684 #if !CYTHON_VECTORCALL
24685 #if CYTHON_ASSUME_SAFE_SIZE
24686 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24687 #else
24688 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
24689 #endif
24690 #endif
24691 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24692 {
24693 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_t,&__pyx_mstate_global->__pyx_n_u_n,0};
24694 struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self);
24695 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
24696 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 97, __pyx_L3_error)
24697 if (__pyx_kwds_len > 0) {
24698 switch (__pyx_nargs) {
24699 case 3:
24700 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
24701 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 97, __pyx_L3_error)
24702 CYTHON_FALLTHROUGH;
24703 case 2:
24704 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
24705 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error)
24706 CYTHON_FALLTHROUGH;
24707 case 1:
24708 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
24709 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error)
24710 CYTHON_FALLTHROUGH;
24711 case 0: break;
24712 default: goto __pyx_L5_argtuple_error;
24713 }
24714 const Py_ssize_t kwd_pos_args = __pyx_nargs;
24715 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda", 0) < (0)) __PYX_ERR(0, 97, __pyx_L3_error)
24716 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
24717 for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
24718 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda", 0, 2, 3, i); __PYX_ERR(0, 97, __pyx_L3_error) }
24719 }
24720 } else {
24721 switch (__pyx_nargs) {
24722 case 3:
24723 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
24724 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 97, __pyx_L3_error)
24725 CYTHON_FALLTHROUGH;
24726 case 2:
24727 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
24728 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error)
24729 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
24730 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error)
24731 break;
24732 default: goto __pyx_L5_argtuple_error;
24733 }
24734 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
24735 }
24736 __pyx_v_x = values[0];
24737 __pyx_v_t = values[1];
24738 __pyx_v_n = values[2];
24739 }
24740 goto __pyx_L6_skip;
24741 __pyx_L5_argtuple_error:;
24742 __Pyx_RaiseArgtupleInvalid("lambda", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error)
24743 __pyx_L6_skip:;
24744 goto __pyx_L4_argument_unpacking_done;
24745 __pyx_L3_error:;
24746 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24747 Py_XDECREF(values[__pyx_temp]);
24748 }
24749 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
24750 __Pyx_RefNannyFinishContext();
24751 return NULL;
24752 __pyx_L4_argument_unpacking_done:;
24753 __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
24754
24755 /* function exit code */
24756 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24757 Py_XDECREF(values[__pyx_temp]);
24758 }
24759 __Pyx_RefNannyFinishContext();
24760 return __pyx_r;
24761}
24762
24763static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n) {
24764 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_cur_scope;
24765 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_outer_scope;
24766 PyObject *__pyx_r = NULL;
24767 __Pyx_TraceDeclarationsFunc
24768 __Pyx_RefNannyDeclarations
24769 int __pyx_lineno = 0;
24770 const char *__pyx_filename = NULL;
24771 int __pyx_clineno = 0;
24772 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21]))
24773 __Pyx_RefNannySetupContext("lambda", 0);
24774 __pyx_outer_scope = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *) __Pyx_CyFunction_GetClosure(__pyx_self);
24775 __pyx_cur_scope = __pyx_outer_scope;
24776 __Pyx_TraceStartFunc("lambda", __pyx_f[0], 97, 0, 0, 0, __PYX_ERR(0, 97, __pyx_L1_error));
24777 if (unlikely(!__pyx_cur_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 97, __pyx_L1_error) }
24778 {
24779 PyObject *__pyx_temp;
24780 {
24781 __pyx_temp = __pyx_r;
24782 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
24783 __pyx_r = __pyx_cur_scope->__pyx_v_value;
24784 }
24785 __Pyx_XDECREF(__pyx_temp);
24786 }
24787 __Pyx_TraceReturnValue(__pyx_r, 5, 0, __PYX_ERR(0, 97, __pyx_L1_error));
24788 goto __pyx_L0;
24789
24790 /* function exit code */
24791 __pyx_L1_error:;
24792 __Pyx_TraceException(__pyx_lineno, 0, 0);
24793 #if CYTHON_USE_SYS_MONITORING
24794 __Pyx_TraceExceptionUnwind(0, 0);
24795 #else
24796 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 97, __pyx_L1_error));
24797 #endif
24798 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
24799 __pyx_r = NULL;
24800 __pyx_L0:;
24801 __Pyx_XGIVEREF(__pyx_r);
24802 __Pyx_PyMonitoring_ExitScope(0);
24803 __Pyx_RefNannyFinishContext();
24804 return __pyx_r;
24805}
24806
24807/* "BoundaryConditions.py":87
24808 * self.uOfXT = None
24809 *
24810 * def setConstantBC(self, value): # <<<<<<<<<<<<<<
24811 * """
24812 * function returning constant BC
24813*/
24814
24815static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value) {
24816 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_cur_scope;
24817 PyObject *__pyx_r = NULL;
24818 __Pyx_TraceDeclarationsFunc
24819 __Pyx_RefNannyDeclarations
24820 PyObject *__pyx_t_1 = NULL;
24821 PyObject *__pyx_t_2 = NULL;
24822 PyObject *__pyx_t_3 = NULL;
24823 PyObject *__pyx_t_4 = NULL;
24824 PyObject *__pyx_t_5 = NULL;
24825 size_t __pyx_t_6;
24826 int __pyx_lineno = 0;
24827 const char *__pyx_filename = NULL;
24828 int __pyx_clineno = 0;
24829 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22]))
24830 __Pyx_RefNannySetupContext("setConstantBC", 0);
24831 __pyx_cur_scope = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC, __pyx_mstate_global->__pyx_empty_tuple, NULL);
24832 if (unlikely(!__pyx_cur_scope)) {
24833 __pyx_cur_scope = ((struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)Py_None);
24834 __Pyx_INCREF(Py_None);
24835 __PYX_ERR(0, 87, __pyx_L1_error)
24836 } else {
24837 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
24838 }
24839 __Pyx_TraceStartFunc("setConstantBC", __pyx_f[0], 87, 0, 0, 0, __PYX_ERR(0, 87, __pyx_L1_error));
24840 __pyx_cur_scope->__pyx_v_value = __pyx_v_value;
24841 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
24842 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value);
24843
24844 /* "BoundaryConditions.py":97
24845 *
24846 * """
24847 * self.uOfXT = lambda x, t, n=np.zeros(3,): value # <<<<<<<<<<<<<<
24848 *
24849 *
24850*/
24851 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setConstantBC___pyx_lambda_funcdef_lambda, 0, __pyx_mstate_global->__pyx_n_u_setConstantBC_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
24852 __Pyx_GOTREF(__pyx_t_1);
24853 if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_defaults)) __PYX_ERR(0, 97, __pyx_L1_error)
24854 __pyx_t_3 = NULL;
24855 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
24856 __Pyx_GOTREF(__pyx_t_4);
24857 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
24858 __Pyx_GOTREF(__pyx_t_5);
24859 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24860 __pyx_t_6 = 1;
24861 #if CYTHON_UNPACK_METHODS
24862 if (unlikely(PyMethod_Check(__pyx_t_5))) {
24863 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
24864 assert(__pyx_t_3);
24865 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
24866 __Pyx_INCREF(__pyx_t_3);
24867 __Pyx_INCREF(__pyx__function);
24868 __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
24869 __pyx_t_6 = 0;
24870 }
24871 #endif
24872 {
24873 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_3};
24874 __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
24875 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24876 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24877 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
24878 __Pyx_GOTREF(__pyx_t_2);
24879 }
24880 __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_t_2;
24881 __Pyx_GIVEREF(__pyx_t_2);
24882 __pyx_t_2 = 0;
24883 __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_18BoundaryConditions_2__defaults__);
24884 __Pyx_GIVEREF(__pyx_t_1);
24885 __Pyx_GOTREF(__pyx_v_self->uOfXT);
24886 __Pyx_DECREF(__pyx_v_self->uOfXT);
24887 __pyx_v_self->uOfXT = __pyx_t_1;
24888 __pyx_t_1 = 0;
24889
24890 /* "BoundaryConditions.py":87
24891 * self.uOfXT = None
24892 *
24893 * def setConstantBC(self, value): # <<<<<<<<<<<<<<
24894 * """
24895 * function returning constant BC
24896*/
24897
24898 /* function exit code */
24899 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24900 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 87, __pyx_L1_error));
24901 goto __pyx_L0;
24902 __pyx_L1_error:;
24903 __Pyx_XDECREF(__pyx_t_1);
24904 __Pyx_XDECREF(__pyx_t_2);
24905 __Pyx_XDECREF(__pyx_t_3);
24906 __Pyx_XDECREF(__pyx_t_4);
24907 __Pyx_XDECREF(__pyx_t_5);
24908 __Pyx_TraceException(__pyx_lineno, 0, 0);
24909 #if CYTHON_USE_SYS_MONITORING
24910 __Pyx_TraceExceptionUnwind(0, 0);
24911 #else
24912 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 87, __pyx_L1_error));
24913 #endif
24914 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setConstantBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24915 __pyx_r = NULL;
24916 __pyx_L0:;
24917 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
24918 __Pyx_XGIVEREF(__pyx_r);
24919 __Pyx_PyMonitoring_ExitScope(0);
24920 __Pyx_RefNannyFinishContext();
24921 return __pyx_r;
24922}
24923
24924/* "BoundaryConditions.py":100
24925 *
24926 *
24927 * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
24928 * """
24929 * function returning value=a0+ax*x+ay*y+az*z
24930*/
24931
24932/* Python wrapper */
24933static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC(PyObject *__pyx_v_self,
24934#if CYTHON_VECTORCALL
24935PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24936#else
24937PyObject *__pyx_args, PyObject *__pyx_kwds
24938#endif
24939); /*proto*/
24940PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_8setLinearBC, "BoundaryCondition.setLinearBC(self, a0, a)\n\nfunction returning value=a0+ax*x+ay*y+az*z\n\nParameters\n----------\na0 : float\n constant\na: numpy.ndarray\n ax,ay,az");
24941static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_9setLinearBC = {"setLinearBC", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_8setLinearBC};
24942static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC(PyObject *__pyx_v_self,
24943#if CYTHON_VECTORCALL
24944PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24945#else
24946PyObject *__pyx_args, PyObject *__pyx_kwds
24947#endif
24948) {
24949 PyObject *__pyx_v_a0 = 0;
24950 PyObject *__pyx_v_a = 0;
24951 #if !CYTHON_VECTORCALL
24952 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24953 #endif
24954 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24955 PyObject* values[2] = {0,0};
24956 int __pyx_lineno = 0;
24957 const char *__pyx_filename = NULL;
24958 int __pyx_clineno = 0;
24959 PyObject *__pyx_r = 0;
24960 __Pyx_RefNannyDeclarations
24961 __Pyx_RefNannySetupContext("setLinearBC (wrapper)", 0);
24962 #if !CYTHON_VECTORCALL
24963 #if CYTHON_ASSUME_SAFE_SIZE
24964 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24965 #else
24966 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
24967 #endif
24968 #endif
24969 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24970 {
24971 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a0,&__pyx_mstate_global->__pyx_n_u_a,0};
24972 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
24973 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 100, __pyx_L3_error)
24974 if (__pyx_kwds_len > 0) {
24975 switch (__pyx_nargs) {
24976 case 2:
24977 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
24978 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 100, __pyx_L3_error)
24979 CYTHON_FALLTHROUGH;
24980 case 1:
24981 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
24982 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 100, __pyx_L3_error)
24983 CYTHON_FALLTHROUGH;
24984 case 0: break;
24985 default: goto __pyx_L5_argtuple_error;
24986 }
24987 const Py_ssize_t kwd_pos_args = __pyx_nargs;
24988 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setLinearBC", 0) < (0)) __PYX_ERR(0, 100, __pyx_L3_error)
24989 for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
24990 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setLinearBC", 1, 2, 2, i); __PYX_ERR(0, 100, __pyx_L3_error) }
24991 }
24992 } else if (unlikely(__pyx_nargs != 2)) {
24993 goto __pyx_L5_argtuple_error;
24994 } else {
24995 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
24996 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 100, __pyx_L3_error)
24997 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
24998 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 100, __pyx_L3_error)
24999 }
25000 __pyx_v_a0 = values[0];
25001 __pyx_v_a = values[1];
25002 }
25003 goto __pyx_L6_skip;
25004 __pyx_L5_argtuple_error:;
25005 __Pyx_RaiseArgtupleInvalid("setLinearBC", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 100, __pyx_L3_error)
25006 __pyx_L6_skip:;
25007 goto __pyx_L4_argument_unpacking_done;
25008 __pyx_L3_error:;
25009 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25010 Py_XDECREF(values[__pyx_temp]);
25011 }
25012 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
25013 __Pyx_RefNannyFinishContext();
25014 return NULL;
25015 __pyx_L4_argument_unpacking_done:;
25016 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), __pyx_v_a0, __pyx_v_a);
25017
25018 /* function exit code */
25019 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25020 Py_XDECREF(values[__pyx_temp]);
25021 }
25022 __Pyx_RefNannyFinishContext();
25023 return __pyx_r;
25024}
25025
25026/* "BoundaryConditions.py":113
25027 * """
25028 *
25029 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:]) # <<<<<<<<<<<<<<
25030 *
25031 * def setLinearRamp(self,t1,value):
25032*/
25033
25034static PyObject *__pyx_pf_18BoundaryConditions_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
25035 PyObject *__pyx_r = NULL;
25036 __Pyx_RefNannyDeclarations
25037 PyObject *__pyx_t_1 = NULL;
25038 PyObject *__pyx_t_2 = NULL;
25039 int __pyx_lineno = 0;
25040 const char *__pyx_filename = NULL;
25041 int __pyx_clineno = 0;
25042 __Pyx_RefNannySetupContext("__defaults__", 0);
25043 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
25044 __Pyx_GOTREF(__pyx_t_1);
25045 __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
25046 __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
25047 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 113, __pyx_L1_error);
25048 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
25049 __Pyx_GOTREF(__pyx_t_2);
25050 __Pyx_GIVEREF(__pyx_t_1);
25051 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 113, __pyx_L1_error);
25052 __Pyx_INCREF(Py_None);
25053 __Pyx_GIVEREF(Py_None);
25054 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 113, __pyx_L1_error);
25055 __pyx_t_1 = 0;
25056 {
25057 PyObject *__pyx_temp;
25058 {
25059 __pyx_temp = __pyx_r;
25060 __pyx_r = __pyx_t_2;
25061 }
25062 __Pyx_XDECREF(__pyx_temp);
25063 }
25064 __pyx_t_2 = 0;
25065 goto __pyx_L0;
25066
25067 /* function exit code */
25068 __pyx_L1_error:;
25069 __Pyx_XDECREF(__pyx_t_1);
25070 __Pyx_XDECREF(__pyx_t_2);
25071 __Pyx_AddTraceback("BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25072 __pyx_r = NULL;
25073 __pyx_L0:;
25074 __Pyx_XGIVEREF(__pyx_r);
25075 __Pyx_RefNannyFinishContext();
25076 return __pyx_r;
25077}
25078
25079/* Python wrapper */
25080static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC___pyx_lambda_funcdef_lambda1(PyObject *__pyx_self,
25081#if CYTHON_VECTORCALL
25082PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25083#else
25084PyObject *__pyx_args, PyObject *__pyx_kwds
25085#endif
25086); /*proto*/
25087static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearBC___pyx_lambda_funcdef_lambda1 = {"lambda1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC___pyx_lambda_funcdef_lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
25088static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC___pyx_lambda_funcdef_lambda1(PyObject *__pyx_self,
25089#if CYTHON_VECTORCALL
25090PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25091#else
25092PyObject *__pyx_args, PyObject *__pyx_kwds
25093#endif
25094) {
25095 PyObject *__pyx_v_x = 0;
25096 CYTHON_UNUSED PyObject *__pyx_v_t = 0;
25097 CYTHON_UNUSED PyObject *__pyx_v_n = 0;
25098 #if !CYTHON_VECTORCALL
25099 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25100 #endif
25101 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25102 PyObject* values[3] = {0,0,0};
25103 int __pyx_lineno = 0;
25104 const char *__pyx_filename = NULL;
25105 int __pyx_clineno = 0;
25106 PyObject *__pyx_r = 0;
25107 __Pyx_RefNannyDeclarations
25108 __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
25109 #if !CYTHON_VECTORCALL
25110 #if CYTHON_ASSUME_SAFE_SIZE
25111 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25112 #else
25113 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25114 #endif
25115 #endif
25116 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25117 {
25118 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_t,&__pyx_mstate_global->__pyx_n_u_n,0};
25119 struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self);
25120 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
25121 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 113, __pyx_L3_error)
25122 if (__pyx_kwds_len > 0) {
25123 switch (__pyx_nargs) {
25124 case 3:
25125 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
25126 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 113, __pyx_L3_error)
25127 CYTHON_FALLTHROUGH;
25128 case 2:
25129 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
25130 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 113, __pyx_L3_error)
25131 CYTHON_FALLTHROUGH;
25132 case 1:
25133 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
25134 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 113, __pyx_L3_error)
25135 CYTHON_FALLTHROUGH;
25136 case 0: break;
25137 default: goto __pyx_L5_argtuple_error;
25138 }
25139 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25140 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda1", 0) < (0)) __PYX_ERR(0, 113, __pyx_L3_error)
25141 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
25142 for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
25143 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda1", 0, 2, 3, i); __PYX_ERR(0, 113, __pyx_L3_error) }
25144 }
25145 } else {
25146 switch (__pyx_nargs) {
25147 case 3:
25148 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
25149 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 113, __pyx_L3_error)
25150 CYTHON_FALLTHROUGH;
25151 case 2:
25152 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
25153 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 113, __pyx_L3_error)
25154 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
25155 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 113, __pyx_L3_error)
25156 break;
25157 default: goto __pyx_L5_argtuple_error;
25158 }
25159 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
25160 }
25161 __pyx_v_x = values[0];
25162 __pyx_v_t = values[1];
25163 __pyx_v_n = values[2];
25164 }
25165 goto __pyx_L6_skip;
25166 __pyx_L5_argtuple_error:;
25167 __Pyx_RaiseArgtupleInvalid("lambda1", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 113, __pyx_L3_error)
25168 __pyx_L6_skip:;
25169 goto __pyx_L4_argument_unpacking_done;
25170 __pyx_L3_error:;
25171 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25172 Py_XDECREF(values[__pyx_temp]);
25173 }
25174 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
25175 __Pyx_RefNannyFinishContext();
25176 return NULL;
25177 __pyx_L4_argument_unpacking_done:;
25178 __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
25179
25180 /* function exit code */
25181 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25182 Py_XDECREF(values[__pyx_temp]);
25183 }
25184 __Pyx_RefNannyFinishContext();
25185 return __pyx_r;
25186}
25187
25188static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n) {
25189 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_cur_scope;
25190 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_outer_scope;
25191 PyObject *__pyx_r = NULL;
25192 __Pyx_TraceDeclarationsFunc
25193 __Pyx_RefNannyDeclarations
25194 PyObject *__pyx_t_1 = NULL;
25195 PyObject *__pyx_t_2 = NULL;
25196 PyObject *__pyx_t_3 = NULL;
25197 PyObject *__pyx_t_4 = NULL;
25198 PyObject *__pyx_t_5 = NULL;
25199 size_t __pyx_t_6;
25200 int __pyx_lineno = 0;
25201 const char *__pyx_filename = NULL;
25202 int __pyx_clineno = 0;
25203 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23]))
25204 __Pyx_RefNannySetupContext("lambda1", 0);
25205 __pyx_outer_scope = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *) __Pyx_CyFunction_GetClosure(__pyx_self);
25206 __pyx_cur_scope = __pyx_outer_scope;
25207 __Pyx_TraceStartFunc("lambda1", __pyx_f[0], 113, 0, 0, 0, __PYX_ERR(0, 113, __pyx_L1_error));
25208 if (unlikely(!__pyx_cur_scope->__pyx_v_a0)) { __Pyx_RaiseClosureNameError("a0"); __PYX_ERR(0, 113, __pyx_L1_error) }
25209 __pyx_t_2 = NULL;
25210 if (unlikely(!__pyx_cur_scope->__pyx_v_a)) { __Pyx_RaiseClosureNameError("a"); __PYX_ERR(0, 113, __pyx_L1_error) }
25211 __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_a, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
25212 __Pyx_GOTREF(__pyx_t_3);
25213 __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_x, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
25214 __Pyx_GOTREF(__pyx_t_4);
25215 __pyx_t_5 = __Pyx_PyNumber_Multiply_object_object(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
25216 __Pyx_GOTREF(__pyx_t_5);
25217 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25218 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25219 __pyx_t_6 = 1;
25220 {
25221 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
25222 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
25223 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25224 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25225 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
25226 __Pyx_GOTREF(__pyx_t_1);
25227 }
25228 __pyx_t_5 = __Pyx_PyNumber_Add_object_object(__pyx_cur_scope->__pyx_v_a0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
25229 __Pyx_GOTREF(__pyx_t_5);
25230 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25231 {
25232 PyObject *__pyx_temp;
25233 {
25234 __pyx_temp = __pyx_r;
25235 __pyx_r = __pyx_t_5;
25236 }
25237 __Pyx_XDECREF(__pyx_temp);
25238 }
25239 __pyx_t_5 = 0;
25240 __Pyx_TraceReturnValue(__pyx_r, 6, 0, __PYX_ERR(0, 113, __pyx_L1_error));
25241 goto __pyx_L0;
25242
25243 /* function exit code */
25244 __pyx_L1_error:;
25245 __Pyx_XDECREF(__pyx_t_1);
25246 __Pyx_XDECREF(__pyx_t_2);
25247 __Pyx_XDECREF(__pyx_t_3);
25248 __Pyx_XDECREF(__pyx_t_4);
25249 __Pyx_XDECREF(__pyx_t_5);
25250 __Pyx_TraceException(__pyx_lineno, 0, 0);
25251 #if CYTHON_USE_SYS_MONITORING
25252 __Pyx_TraceExceptionUnwind(0, 0);
25253 #else
25254 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 113, __pyx_L1_error));
25255 #endif
25256 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
25257 __pyx_r = NULL;
25258 __pyx_L0:;
25259 __Pyx_XGIVEREF(__pyx_r);
25260 __Pyx_PyMonitoring_ExitScope(0);
25261 __Pyx_RefNannyFinishContext();
25262 return __pyx_r;
25263}
25264
25265/* "BoundaryConditions.py":100
25266 *
25267 *
25268 * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
25269 * """
25270 * function returning value=a0+ax*x+ay*y+az*z
25271*/
25272
25273static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_a0, PyObject *__pyx_v_a) {
25274 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_cur_scope;
25275 PyObject *__pyx_r = NULL;
25276 __Pyx_TraceDeclarationsFunc
25277 __Pyx_RefNannyDeclarations
25278 PyObject *__pyx_t_1 = NULL;
25279 PyObject *__pyx_t_2 = NULL;
25280 PyObject *__pyx_t_3 = NULL;
25281 PyObject *__pyx_t_4 = NULL;
25282 PyObject *__pyx_t_5 = NULL;
25283 size_t __pyx_t_6;
25284 int __pyx_lineno = 0;
25285 const char *__pyx_filename = NULL;
25286 int __pyx_clineno = 0;
25287 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24]))
25288 __Pyx_RefNannySetupContext("setLinearBC", 0);
25289 __pyx_cur_scope = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, __pyx_mstate_global->__pyx_empty_tuple, NULL);
25290 if (unlikely(!__pyx_cur_scope)) {
25291 __pyx_cur_scope = ((struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)Py_None);
25292 __Pyx_INCREF(Py_None);
25293 __PYX_ERR(0, 100, __pyx_L1_error)
25294 } else {
25295 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
25296 }
25297 __Pyx_TraceStartFunc("setLinearBC", __pyx_f[0], 100, 0, 0, 0, __PYX_ERR(0, 100, __pyx_L1_error));
25298 __pyx_cur_scope->__pyx_v_a0 = __pyx_v_a0;
25299 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_a0);
25300 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a0);
25301 __pyx_cur_scope->__pyx_v_a = __pyx_v_a;
25302 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_a);
25303 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a);
25304
25305 /* "BoundaryConditions.py":113
25306 * """
25307 *
25308 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:]) # <<<<<<<<<<<<<<
25309 *
25310 * def setLinearRamp(self,t1,value):
25311*/
25312 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearBC___pyx_lambda_funcdef_lambda1, 0, __pyx_mstate_global->__pyx_n_u_setLinearBC_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
25313 __Pyx_GOTREF(__pyx_t_1);
25314 if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_defaults)) __PYX_ERR(0, 113, __pyx_L1_error)
25315 __pyx_t_3 = NULL;
25316 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
25317 __Pyx_GOTREF(__pyx_t_4);
25318 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
25319 __Pyx_GOTREF(__pyx_t_5);
25320 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25321 __pyx_t_6 = 1;
25322 #if CYTHON_UNPACK_METHODS
25323 if (unlikely(PyMethod_Check(__pyx_t_5))) {
25324 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
25325 assert(__pyx_t_3);
25326 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
25327 __Pyx_INCREF(__pyx_t_3);
25328 __Pyx_INCREF(__pyx__function);
25329 __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
25330 __pyx_t_6 = 0;
25331 }
25332 #endif
25333 {
25334 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_3};
25335 __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
25336 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25337 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25338 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
25339 __Pyx_GOTREF(__pyx_t_2);
25340 }
25341 __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_t_2;
25342 __Pyx_GIVEREF(__pyx_t_2);
25343 __pyx_t_2 = 0;
25344 __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_18BoundaryConditions_4__defaults__);
25345 __Pyx_GIVEREF(__pyx_t_1);
25346 __Pyx_GOTREF(__pyx_v_self->uOfXT);
25347 __Pyx_DECREF(__pyx_v_self->uOfXT);
25348 __pyx_v_self->uOfXT = __pyx_t_1;
25349 __pyx_t_1 = 0;
25350
25351 /* "BoundaryConditions.py":100
25352 *
25353 *
25354 * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
25355 * """
25356 * function returning value=a0+ax*x+ay*y+az*z
25357*/
25358
25359 /* function exit code */
25360 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25361 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 100, __pyx_L1_error));
25362 goto __pyx_L0;
25363 __pyx_L1_error:;
25364 __Pyx_XDECREF(__pyx_t_1);
25365 __Pyx_XDECREF(__pyx_t_2);
25366 __Pyx_XDECREF(__pyx_t_3);
25367 __Pyx_XDECREF(__pyx_t_4);
25368 __Pyx_XDECREF(__pyx_t_5);
25369 __Pyx_TraceException(__pyx_lineno, 0, 0);
25370 #if CYTHON_USE_SYS_MONITORING
25371 __Pyx_TraceExceptionUnwind(0, 0);
25372 #else
25373 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 100, __pyx_L1_error));
25374 #endif
25375 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
25376 __pyx_r = NULL;
25377 __pyx_L0:;
25378 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
25379 __Pyx_XGIVEREF(__pyx_r);
25380 __Pyx_PyMonitoring_ExitScope(0);
25381 __Pyx_RefNannyFinishContext();
25382 return __pyx_r;
25383}
25384
25385/* "BoundaryConditions.py":115
25386 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
25387 *
25388 * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
25389 * """
25390 * function setting a linear ramp from t=0 to t=t1
25391*/
25392
25393/* Python wrapper */
25394static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp(PyObject *__pyx_v_self,
25395#if CYTHON_VECTORCALL
25396PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25397#else
25398PyObject *__pyx_args, PyObject *__pyx_kwds
25399#endif
25400); /*proto*/
25401PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_10setLinearRamp, "BoundaryCondition.setLinearRamp(self, t1, value)\n\nfunction setting a linear ramp from t=0 to t=t1\n\nParameters\n-----------\nt1: float\n Ramp end time\nvalue: float\n Variable value");
25402static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearRamp = {"setLinearRamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_10setLinearRamp};
25403static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp(PyObject *__pyx_v_self,
25404#if CYTHON_VECTORCALL
25405PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25406#else
25407PyObject *__pyx_args, PyObject *__pyx_kwds
25408#endif
25409) {
25410 PyObject *__pyx_v_t1 = 0;
25411 PyObject *__pyx_v_value = 0;
25412 #if !CYTHON_VECTORCALL
25413 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25414 #endif
25415 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25416 PyObject* values[2] = {0,0};
25417 int __pyx_lineno = 0;
25418 const char *__pyx_filename = NULL;
25419 int __pyx_clineno = 0;
25420 PyObject *__pyx_r = 0;
25421 __Pyx_RefNannyDeclarations
25422 __Pyx_RefNannySetupContext("setLinearRamp (wrapper)", 0);
25423 #if !CYTHON_VECTORCALL
25424 #if CYTHON_ASSUME_SAFE_SIZE
25425 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25426 #else
25427 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25428 #endif
25429 #endif
25430 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25431 {
25432 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_t1,&__pyx_mstate_global->__pyx_n_u_value,0};
25433 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
25434 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 115, __pyx_L3_error)
25435 if (__pyx_kwds_len > 0) {
25436 switch (__pyx_nargs) {
25437 case 2:
25438 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
25439 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 115, __pyx_L3_error)
25440 CYTHON_FALLTHROUGH;
25441 case 1:
25442 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
25443 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 115, __pyx_L3_error)
25444 CYTHON_FALLTHROUGH;
25445 case 0: break;
25446 default: goto __pyx_L5_argtuple_error;
25447 }
25448 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25449 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setLinearRamp", 0) < (0)) __PYX_ERR(0, 115, __pyx_L3_error)
25450 for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
25451 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setLinearRamp", 1, 2, 2, i); __PYX_ERR(0, 115, __pyx_L3_error) }
25452 }
25453 } else if (unlikely(__pyx_nargs != 2)) {
25454 goto __pyx_L5_argtuple_error;
25455 } else {
25456 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
25457 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 115, __pyx_L3_error)
25458 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
25459 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 115, __pyx_L3_error)
25460 }
25461 __pyx_v_t1 = values[0];
25462 __pyx_v_value = values[1];
25463 }
25464 goto __pyx_L6_skip;
25465 __pyx_L5_argtuple_error:;
25466 __Pyx_RaiseArgtupleInvalid("setLinearRamp", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 115, __pyx_L3_error)
25467 __pyx_L6_skip:;
25468 goto __pyx_L4_argument_unpacking_done;
25469 __pyx_L3_error:;
25470 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25471 Py_XDECREF(values[__pyx_temp]);
25472 }
25473 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
25474 __Pyx_RefNannyFinishContext();
25475 return NULL;
25476 __pyx_L4_argument_unpacking_done:;
25477 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), __pyx_v_t1, __pyx_v_value);
25478
25479 /* function exit code */
25480 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25481 Py_XDECREF(values[__pyx_temp]);
25482 }
25483 __Pyx_RefNannyFinishContext();
25484 return __pyx_r;
25485}
25486
25487/* "BoundaryConditions.py":126
25488 * Variable value
25489 * """
25490 * self.uOfXT = lambda x, t, n=np.zeros(3,): min( t/t1, 1)*value # <<<<<<<<<<<<<<
25491*/
25492
25493static PyObject *__pyx_pf_18BoundaryConditions_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
25494 PyObject *__pyx_r = NULL;
25495 __Pyx_RefNannyDeclarations
25496 PyObject *__pyx_t_1 = NULL;
25497 PyObject *__pyx_t_2 = NULL;
25498 int __pyx_lineno = 0;
25499 const char *__pyx_filename = NULL;
25500 int __pyx_clineno = 0;
25501 __Pyx_RefNannySetupContext("__defaults__", 0);
25502 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
25503 __Pyx_GOTREF(__pyx_t_1);
25504 __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
25505 __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
25506 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 126, __pyx_L1_error);
25507 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
25508 __Pyx_GOTREF(__pyx_t_2);
25509 __Pyx_GIVEREF(__pyx_t_1);
25510 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 126, __pyx_L1_error);
25511 __Pyx_INCREF(Py_None);
25512 __Pyx_GIVEREF(Py_None);
25513 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 126, __pyx_L1_error);
25514 __pyx_t_1 = 0;
25515 {
25516 PyObject *__pyx_temp;
25517 {
25518 __pyx_temp = __pyx_r;
25519 __pyx_r = __pyx_t_2;
25520 }
25521 __Pyx_XDECREF(__pyx_temp);
25522 }
25523 __pyx_t_2 = 0;
25524 goto __pyx_L0;
25525
25526 /* function exit code */
25527 __pyx_L1_error:;
25528 __Pyx_XDECREF(__pyx_t_1);
25529 __Pyx_XDECREF(__pyx_t_2);
25530 __Pyx_AddTraceback("BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25531 __pyx_r = NULL;
25532 __pyx_L0:;
25533 __Pyx_XGIVEREF(__pyx_r);
25534 __Pyx_RefNannyFinishContext();
25535 return __pyx_r;
25536}
25537
25538/* Python wrapper */
25539static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp___pyx_lambda_funcdef_lambda2(PyObject *__pyx_self,
25540#if CYTHON_VECTORCALL
25541PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25542#else
25543PyObject *__pyx_args, PyObject *__pyx_kwds
25544#endif
25545); /*proto*/
25546static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setLinearRamp___pyx_lambda_funcdef_lambda2 = {"lambda2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp___pyx_lambda_funcdef_lambda2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
25547static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp___pyx_lambda_funcdef_lambda2(PyObject *__pyx_self,
25548#if CYTHON_VECTORCALL
25549PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25550#else
25551PyObject *__pyx_args, PyObject *__pyx_kwds
25552#endif
25553) {
25554 CYTHON_UNUSED PyObject *__pyx_v_x = 0;
25555 PyObject *__pyx_v_t = 0;
25556 CYTHON_UNUSED PyObject *__pyx_v_n = 0;
25557 #if !CYTHON_VECTORCALL
25558 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25559 #endif
25560 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25561 PyObject* values[3] = {0,0,0};
25562 int __pyx_lineno = 0;
25563 const char *__pyx_filename = NULL;
25564 int __pyx_clineno = 0;
25565 PyObject *__pyx_r = 0;
25566 __Pyx_RefNannyDeclarations
25567 __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
25568 #if !CYTHON_VECTORCALL
25569 #if CYTHON_ASSUME_SAFE_SIZE
25570 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25571 #else
25572 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25573 #endif
25574 #endif
25575 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25576 {
25577 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_t,&__pyx_mstate_global->__pyx_n_u_n,0};
25578 struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self);
25579 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
25580 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 126, __pyx_L3_error)
25581 if (__pyx_kwds_len > 0) {
25582 switch (__pyx_nargs) {
25583 case 3:
25584 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
25585 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 126, __pyx_L3_error)
25586 CYTHON_FALLTHROUGH;
25587 case 2:
25588 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
25589 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 126, __pyx_L3_error)
25590 CYTHON_FALLTHROUGH;
25591 case 1:
25592 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
25593 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 126, __pyx_L3_error)
25594 CYTHON_FALLTHROUGH;
25595 case 0: break;
25596 default: goto __pyx_L5_argtuple_error;
25597 }
25598 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25599 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda2", 0) < (0)) __PYX_ERR(0, 126, __pyx_L3_error)
25600 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
25601 for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
25602 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda2", 0, 2, 3, i); __PYX_ERR(0, 126, __pyx_L3_error) }
25603 }
25604 } else {
25605 switch (__pyx_nargs) {
25606 case 3:
25607 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
25608 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 126, __pyx_L3_error)
25609 CYTHON_FALLTHROUGH;
25610 case 2:
25611 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
25612 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 126, __pyx_L3_error)
25613 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
25614 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 126, __pyx_L3_error)
25615 break;
25616 default: goto __pyx_L5_argtuple_error;
25617 }
25618 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
25619 }
25620 __pyx_v_x = values[0];
25621 __pyx_v_t = values[1];
25622 __pyx_v_n = values[2];
25623 }
25624 goto __pyx_L6_skip;
25625 __pyx_L5_argtuple_error:;
25626 __Pyx_RaiseArgtupleInvalid("lambda2", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 126, __pyx_L3_error)
25627 __pyx_L6_skip:;
25628 goto __pyx_L4_argument_unpacking_done;
25629 __pyx_L3_error:;
25630 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25631 Py_XDECREF(values[__pyx_temp]);
25632 }
25633 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
25634 __Pyx_RefNannyFinishContext();
25635 return NULL;
25636 __pyx_L4_argument_unpacking_done:;
25637 __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
25638
25639 /* function exit code */
25640 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25641 Py_XDECREF(values[__pyx_temp]);
25642 }
25643 __Pyx_RefNannyFinishContext();
25644 return __pyx_r;
25645}
25646
25647static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n) {
25648 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_cur_scope;
25649 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_outer_scope;
25650 PyObject *__pyx_r = NULL;
25651 __Pyx_TraceDeclarationsFunc
25652 __Pyx_RefNannyDeclarations
25653 long __pyx_t_1;
25654 PyObject *__pyx_t_2 = NULL;
25655 PyObject *__pyx_t_3 = NULL;
25656 PyObject *__pyx_t_4 = NULL;
25657 int __pyx_t_5;
25658 int __pyx_lineno = 0;
25659 const char *__pyx_filename = NULL;
25660 int __pyx_clineno = 0;
25661 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25]))
25662 __Pyx_RefNannySetupContext("lambda2", 0);
25663 __pyx_outer_scope = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *) __Pyx_CyFunction_GetClosure(__pyx_self);
25664 __pyx_cur_scope = __pyx_outer_scope;
25665 __Pyx_TraceStartFunc("lambda2", __pyx_f[0], 126, 0, 0, 0, __PYX_ERR(0, 126, __pyx_L1_error));
25666
25667 __pyx_t_1 = 1;
25668 if (unlikely(!__pyx_cur_scope->__pyx_v_t1)) { __Pyx_RaiseClosureNameError("t1"); __PYX_ERR(0, 126, __pyx_L1_error) }
25669 __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_t, __pyx_cur_scope->__pyx_v_t1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
25670 __Pyx_GOTREF(__pyx_t_2);
25671 __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
25672 __Pyx_GOTREF(__pyx_t_4);
25673 __pyx_t_5 = __Pyx_PyObject_CompareBoolLt_int_object(__pyx_t_4, __pyx_t_2, Py_LT); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 126, __pyx_L1_error)
25674 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25675 if (__pyx_t_5) {
25676 __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
25677 __Pyx_GOTREF(__pyx_t_4);
25678 __pyx_t_3 = __pyx_t_4;
25679 __pyx_t_4 = 0;
25680 } else {
25681 __Pyx_INCREF(__pyx_t_2);
25682 __pyx_t_3 = __pyx_t_2;
25683 }
25684
25685 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25686 if (unlikely(!__pyx_cur_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 126, __pyx_L1_error) }
25687 __pyx_t_2 = __Pyx_PyNumber_Multiply_object_object(__pyx_t_3, __pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
25688 __Pyx_GOTREF(__pyx_t_2);
25689 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25690 {
25691 PyObject *__pyx_temp;
25692 {
25693 __pyx_temp = __pyx_r;
25694 __pyx_r = __pyx_t_2;
25695 }
25696 __Pyx_XDECREF(__pyx_temp);
25697 }
25698 __pyx_t_2 = 0;
25699 __Pyx_TraceReturnValue(__pyx_r, 9, 0, __PYX_ERR(0, 126, __pyx_L1_error));
25700 goto __pyx_L0;
25701
25702 /* function exit code */
25703 __pyx_L1_error:;
25704 __Pyx_XDECREF(__pyx_t_2);
25705 __Pyx_XDECREF(__pyx_t_3);
25706 __Pyx_XDECREF(__pyx_t_4);
25707 __Pyx_TraceException(__pyx_lineno, 0, 0);
25708 #if CYTHON_USE_SYS_MONITORING
25709 __Pyx_TraceExceptionUnwind(0, 0);
25710 #else
25711 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 126, __pyx_L1_error));
25712 #endif
25713 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
25714 __pyx_r = NULL;
25715 __pyx_L0:;
25716 __Pyx_XGIVEREF(__pyx_r);
25717 __Pyx_PyMonitoring_ExitScope(0);
25718 __Pyx_RefNannyFinishContext();
25719 return __pyx_r;
25720}
25721
25722/* "BoundaryConditions.py":115
25723 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
25724 *
25725 * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
25726 * """
25727 * function setting a linear ramp from t=0 to t=t1
25728*/
25729
25730static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_t1, PyObject *__pyx_v_value) {
25731 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_cur_scope;
25732 PyObject *__pyx_r = NULL;
25733 __Pyx_TraceDeclarationsFunc
25734 __Pyx_RefNannyDeclarations
25735 PyObject *__pyx_t_1 = NULL;
25736 PyObject *__pyx_t_2 = NULL;
25737 PyObject *__pyx_t_3 = NULL;
25738 PyObject *__pyx_t_4 = NULL;
25739 PyObject *__pyx_t_5 = NULL;
25740 size_t __pyx_t_6;
25741 int __pyx_lineno = 0;
25742 const char *__pyx_filename = NULL;
25743 int __pyx_clineno = 0;
25744 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26]))
25745 __Pyx_RefNannySetupContext("setLinearRamp", 0);
25746 __pyx_cur_scope = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, __pyx_mstate_global->__pyx_empty_tuple, NULL);
25747 if (unlikely(!__pyx_cur_scope)) {
25748 __pyx_cur_scope = ((struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)Py_None);
25749 __Pyx_INCREF(Py_None);
25750 __PYX_ERR(0, 115, __pyx_L1_error)
25751 } else {
25752 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
25753 }
25754 __Pyx_TraceStartFunc("setLinearRamp", __pyx_f[0], 115, 0, 0, 0, __PYX_ERR(0, 115, __pyx_L1_error));
25755 __pyx_cur_scope->__pyx_v_t1 = __pyx_v_t1;
25756 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_t1);
25757 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_t1);
25758 __pyx_cur_scope->__pyx_v_value = __pyx_v_value;
25759 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
25760 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value);
25761
25762 /* "BoundaryConditions.py":126
25763 * Variable value
25764 * """
25765 * self.uOfXT = lambda x, t, n=np.zeros(3,): min( t/t1, 1)*value # <<<<<<<<<<<<<<
25766*/
25767 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setLinearRamp___pyx_lambda_funcdef_lambda2, 0, __pyx_mstate_global->__pyx_n_u_setLinearRamp_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
25768 __Pyx_GOTREF(__pyx_t_1);
25769 if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_defaults)) __PYX_ERR(0, 126, __pyx_L1_error)
25770 __pyx_t_3 = NULL;
25771 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
25772 __Pyx_GOTREF(__pyx_t_4);
25773 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
25774 __Pyx_GOTREF(__pyx_t_5);
25775 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25776 __pyx_t_6 = 1;
25777 #if CYTHON_UNPACK_METHODS
25778 if (unlikely(PyMethod_Check(__pyx_t_5))) {
25779 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
25780 assert(__pyx_t_3);
25781 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
25782 __Pyx_INCREF(__pyx_t_3);
25783 __Pyx_INCREF(__pyx__function);
25784 __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
25785 __pyx_t_6 = 0;
25786 }
25787 #endif
25788 {
25789 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_3};
25790 __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
25791 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25792 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25793 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
25794 __Pyx_GOTREF(__pyx_t_2);
25795 }
25796 __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_t_2;
25797 __Pyx_GIVEREF(__pyx_t_2);
25798 __pyx_t_2 = 0;
25799 __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_18BoundaryConditions_6__defaults__);
25800 __Pyx_GIVEREF(__pyx_t_1);
25801 __Pyx_GOTREF(__pyx_v_self->uOfXT);
25802 __Pyx_DECREF(__pyx_v_self->uOfXT);
25803 __pyx_v_self->uOfXT = __pyx_t_1;
25804 __pyx_t_1 = 0;
25805
25806 /* "BoundaryConditions.py":115
25807 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
25808 *
25809 * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
25810 * """
25811 * function setting a linear ramp from t=0 to t=t1
25812*/
25813
25814 /* function exit code */
25815 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25816 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 115, __pyx_L1_error));
25817 goto __pyx_L0;
25818 __pyx_L1_error:;
25819 __Pyx_XDECREF(__pyx_t_1);
25820 __Pyx_XDECREF(__pyx_t_2);
25821 __Pyx_XDECREF(__pyx_t_3);
25822 __Pyx_XDECREF(__pyx_t_4);
25823 __Pyx_XDECREF(__pyx_t_5);
25824 __Pyx_TraceException(__pyx_lineno, 0, 0);
25825 #if CYTHON_USE_SYS_MONITORING
25826 __Pyx_TraceExceptionUnwind(0, 0);
25827 #else
25828 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 115, __pyx_L1_error));
25829 #endif
25830 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
25831 __pyx_r = NULL;
25832 __pyx_L0:;
25833 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
25834 __Pyx_XGIVEREF(__pyx_r);
25835 __Pyx_PyMonitoring_ExitScope(0);
25836 __Pyx_RefNannyFinishContext();
25837 return __pyx_r;
25838}
25839
25840/* "BoundaryConditions.pxd":21
25841 * cdef cpp_uOfXT uuOfXT
25842 * cdef public:
25843 * object uOfXT # <<<<<<<<<<<<<<
25844 * cpdef void resetBC(self)
25845 * # cpdef void setConstantBC(self, double value)
25846*/
25847
25848/* Python wrapper */
25849static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(PyObject *__pyx_v_self); /*proto*/
25850static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(PyObject *__pyx_v_self) {
25851 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25852 PyObject *__pyx_r = 0;
25853 __Pyx_RefNannyDeclarations
25854 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25855 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25856 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
25857
25858 /* function exit code */
25859 __Pyx_RefNannyFinishContext();
25860 return __pyx_r;
25861}
25862
25863static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
25864 PyObject *__pyx_r = NULL;
25865 __Pyx_TraceDeclarationsFunc
25866 __Pyx_RefNannyDeclarations
25867 PyObject *__pyx_t_1 = NULL;
25868 PyObject *__pyx_t_2 = NULL;
25869 int __pyx_lineno = 0;
25870 const char *__pyx_filename = NULL;
25871 int __pyx_clineno = 0;
25872 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27]))
25873 __Pyx_RefNannySetupContext("__get__", 0);
25874 __Pyx_TraceStartFunc("__get__", __pyx_f[3], 21, 0, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25875 {
25876 __Pyx_PyCriticalSection __pyx_cs;
25877 __pyx_t_1 = ((PyObject *)__pyx_v_self);
25878 __Pyx_INCREF(__pyx_t_1);
25879 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
25880 /*try:*/ {
25881 {
25882 PyObject *__pyx_temp;
25883 {
25884 __pyx_temp = __pyx_r;
25885 __Pyx_INCREF(__pyx_v_self->uOfXT);
25886 __pyx_r = __pyx_v_self->uOfXT;
25887 }
25888 __Pyx_XDECREF(__pyx_temp);
25889 }
25890 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(3, 21, __pyx_L4_error));
25891 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25892 goto __pyx_L3_return;
25893 }
25894 /*finally:*/ {
25895 __pyx_L3_return: {
25896 __pyx_t_2 = __pyx_r;
25897 __pyx_r = 0;
25898 __Pyx_PyCriticalSection_End(&__pyx_cs);
25899 __pyx_r = __pyx_t_2;
25900 __pyx_t_2 = 0;
25901 goto __pyx_L0;
25902 }
25903 __pyx_L4_error: {
25904 __Pyx_PyCriticalSection_End(&__pyx_cs);
25905 goto __pyx_L1_error;
25906 }
25907 }
25908 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25909 }
25910
25911 /* function exit code */
25912 __pyx_L1_error:;
25913 __Pyx_XDECREF(__pyx_t_1);
25914 __Pyx_TraceException(__pyx_lineno, 0, 0);
25915 #if CYTHON_USE_SYS_MONITORING
25916 __Pyx_TraceExceptionUnwind(0, 0);
25917 #else
25918 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25919 #endif
25920 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.uOfXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25921 __pyx_r = NULL;
25922 __pyx_L0:;
25923 __Pyx_XGIVEREF(__pyx_r);
25924 __Pyx_PyMonitoring_ExitScope(0);
25925 __Pyx_RefNannyFinishContext();
25926 return __pyx_r;
25927}
25928
25929/* Python wrapper */
25930static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
25931static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
25932 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25933 int __pyx_r;
25934 __Pyx_RefNannyDeclarations
25935 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
25936 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25937 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), ((PyObject *)__pyx_v_value));
25938
25939 /* function exit code */
25940 __Pyx_RefNannyFinishContext();
25941 return __pyx_r;
25942}
25943
25944static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value) {
25945 int __pyx_r;
25946 __Pyx_TraceDeclarationsFunc
25947 __Pyx_RefNannyDeclarations
25948 PyObject *__pyx_t_1 = NULL;
25949 int __pyx_lineno = 0;
25950 const char *__pyx_filename = NULL;
25951 int __pyx_clineno = 0;
25952 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28]))
25953 __Pyx_RefNannySetupContext("__set__", 0);
25954 __Pyx_TraceStartFunc("__set__", __pyx_f[3], 21, 0, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25955 {
25956 __Pyx_PyCriticalSection __pyx_cs;
25957 __pyx_t_1 = ((PyObject *)__pyx_v_self);
25958 __Pyx_INCREF(__pyx_t_1);
25959 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
25960 /*try:*/ {
25961 __Pyx_INCREF(__pyx_v_value);
25962 __Pyx_GIVEREF(__pyx_v_value);
25963 __Pyx_GOTREF(__pyx_v_self->uOfXT);
25964 __Pyx_DECREF(__pyx_v_self->uOfXT);
25965 __pyx_v_self->uOfXT = __pyx_v_value;
25966 }
25967 /*finally:*/ {
25968 /*normal exit:*/{
25969 __Pyx_PyCriticalSection_End(&__pyx_cs);
25970 goto __pyx_L5;
25971 }
25972 __pyx_L5:;
25973 }
25974 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25975 }
25976
25977 /* function exit code */
25978 __pyx_r = 0;
25979 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25980 goto __pyx_L0;
25981 __pyx_L1_error:;
25982 __Pyx_XDECREF(__pyx_t_1);
25983 __Pyx_TraceException(__pyx_lineno, 0, 0);
25984 #if CYTHON_USE_SYS_MONITORING
25985 __Pyx_TraceExceptionUnwind(0, 0);
25986 #else
25987 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25988 #endif
25989 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.uOfXT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25990 __pyx_r = -1;
25991 __pyx_L0:;
25992
25993 __Pyx_PyMonitoring_ExitScope(0);
25994 __Pyx_RefNannyFinishContext();
25995 return __pyx_r;
25996}
25997
25998/* Python wrapper */
25999static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self); /*proto*/
26000static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self) {
26001 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26002 int __pyx_r;
26003 __Pyx_RefNannyDeclarations
26004 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
26005 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
26006 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
26007
26008 /* function exit code */
26009 __Pyx_RefNannyFinishContext();
26010 return __pyx_r;
26011}
26012
26013static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
26014 int __pyx_r;
26015 __Pyx_TraceDeclarationsFunc
26016 __Pyx_RefNannyDeclarations
26017 PyObject *__pyx_t_1 = NULL;
26018 int __pyx_lineno = 0;
26019 const char *__pyx_filename = NULL;
26020 int __pyx_clineno = 0;
26021 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29]))
26022 __Pyx_RefNannySetupContext("__del__", 0);
26023 __Pyx_TraceStartFunc("__del__", __pyx_f[3], 21, 0, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
26024 {
26025 __Pyx_PyCriticalSection __pyx_cs;
26026 __pyx_t_1 = ((PyObject *)__pyx_v_self);
26027 __Pyx_INCREF(__pyx_t_1);
26028 __Pyx_PyCriticalSection_Begin(&__pyx_cs, (PyObject*)__pyx_t_1);
26029 /*try:*/ {
26030 __Pyx_INCREF(Py_None);
26031 __Pyx_GIVEREF(Py_None);
26032 __Pyx_GOTREF(__pyx_v_self->uOfXT);
26033 __Pyx_DECREF(__pyx_v_self->uOfXT);
26034 __pyx_v_self->uOfXT = Py_None;
26035 }
26036 /*finally:*/ {
26037 /*normal exit:*/{
26038 __Pyx_PyCriticalSection_End(&__pyx_cs);
26039 goto __pyx_L5;
26040 }
26041 __pyx_L5:;
26042 }
26043 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26044 }
26045
26046 /* function exit code */
26047 __pyx_r = 0;
26048 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
26049 goto __pyx_L0;
26050 __pyx_L1_error:;
26051 __Pyx_XDECREF(__pyx_t_1);
26052 __Pyx_TraceException(__pyx_lineno, 0, 0);
26053 #if CYTHON_USE_SYS_MONITORING
26054 __Pyx_TraceExceptionUnwind(0, 0);
26055 #else
26056 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
26057 #endif
26058 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.uOfXT.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26059 __pyx_r = -1;
26060 __pyx_L0:;
26061
26062 __Pyx_PyMonitoring_ExitScope(0);
26063 __Pyx_RefNannyFinishContext();
26064 return __pyx_r;
26065}
26066
26067/* "(tree fragment)":1
26068 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
26069 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26070 * def __setstate_cython__(self, __pyx_state):
26071*/
26072
26073/* Python wrapper */
26074static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__(PyObject *__pyx_v_self,
26075#if CYTHON_VECTORCALL
26076PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26077#else
26078PyObject *__pyx_args, PyObject *__pyx_kwds
26079#endif
26080); /*proto*/
26081PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__, "BoundaryCondition.__reduce_cython__(self)");
26082static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__};
26083static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__(PyObject *__pyx_v_self,
26084#if CYTHON_VECTORCALL
26085PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26086#else
26087PyObject *__pyx_args, PyObject *__pyx_kwds
26088#endif
26089) {
26090 #if !CYTHON_VECTORCALL
26091 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26092 #endif
26093 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26094 PyObject *__pyx_r = 0;
26095 __Pyx_RefNannyDeclarations
26096 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
26097 #if !CYTHON_VECTORCALL
26098 #if CYTHON_ASSUME_SAFE_SIZE
26099 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26100 #else
26101 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26102 #endif
26103 #endif
26104 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26105 if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
26106 const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
26107 if (unlikely(__pyx_kwds_len < 0)) return NULL;
26108 if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
26109 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
26110
26111 /* function exit code */
26112 __Pyx_RefNannyFinishContext();
26113 return __pyx_r;
26114}
26115
26116static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
26117 PyObject *__pyx_r = NULL;
26118 __Pyx_TraceDeclarationsFunc
26119 __Pyx_RefNannyDeclarations
26120 int __pyx_lineno = 0;
26121 const char *__pyx_filename = NULL;
26122 int __pyx_clineno = 0;
26123 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30]))
26124 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
26125 __Pyx_TraceStartFunc("__reduce_cython__", __pyx_f[1], 1, 0, 0, 0, __PYX_ERR(1, 1, __pyx_L1_error));
26126
26127 /* "(tree fragment)":2
26128 * def __reduce_cython__(self):
26129 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
26130 * def __setstate_cython__(self, __pyx_state):
26131 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26132*/
26133 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_uuOfXT_cannot_be_converted, 0, 0);
26134 __PYX_ERR(1, 2, __pyx_L1_error)
26135
26136 /* "(tree fragment)":1
26137 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
26138 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26139 * def __setstate_cython__(self, __pyx_state):
26140*/
26141
26142 /* function exit code */
26143 __pyx_L1_error:;
26144 __Pyx_TraceException(__pyx_lineno, 0, 0);
26145 #if CYTHON_USE_SYS_MONITORING
26146 __Pyx_TraceExceptionUnwind(0, 0);
26147 #else
26148 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 1, __pyx_L1_error));
26149 #endif
26150 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26151 __pyx_r = NULL;
26152 __Pyx_XGIVEREF(__pyx_r);
26153 __Pyx_PyMonitoring_ExitScope(0);
26154 __Pyx_RefNannyFinishContext();
26155 return __pyx_r;
26156}
26157
26158/* "(tree fragment)":3
26159 * def __reduce_cython__(self):
26160 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26161 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
26162 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26163*/
26164
26165/* Python wrapper */
26166static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__(PyObject *__pyx_v_self,
26167#if CYTHON_VECTORCALL
26168PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26169#else
26170PyObject *__pyx_args, PyObject *__pyx_kwds
26171#endif
26172); /*proto*/
26173PyDoc_STRVAR(__pyx_doc_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__, "BoundaryCondition.__setstate_cython__(self, __pyx_state)");
26174static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__};
26175static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__(PyObject *__pyx_v_self,
26176#if CYTHON_VECTORCALL
26177PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26178#else
26179PyObject *__pyx_args, PyObject *__pyx_kwds
26180#endif
26181) {
26182 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
26183 #if !CYTHON_VECTORCALL
26184 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26185 #endif
26186 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26187 PyObject* values[1] = {0};
26188 int __pyx_lineno = 0;
26189 const char *__pyx_filename = NULL;
26190 int __pyx_clineno = 0;
26191 PyObject *__pyx_r = 0;
26192 __Pyx_RefNannyDeclarations
26193 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
26194 #if !CYTHON_VECTORCALL
26195 #if CYTHON_ASSUME_SAFE_SIZE
26196 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26197 #else
26198 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26199 #endif
26200 #endif
26201 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26202 {
26203 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
26204 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
26205 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
26206 if (__pyx_kwds_len > 0) {
26207 switch (__pyx_nargs) {
26208 case 1:
26209 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
26210 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
26211 CYTHON_FALLTHROUGH;
26212 case 0: break;
26213 default: goto __pyx_L5_argtuple_error;
26214 }
26215 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26216 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
26217 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
26218 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
26219 }
26220 } else if (unlikely(__pyx_nargs != 1)) {
26221 goto __pyx_L5_argtuple_error;
26222 } else {
26223 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
26224 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
26225 }
26226 __pyx_v___pyx_state = values[0];
26227 }
26228 goto __pyx_L6_skip;
26229 __pyx_L5_argtuple_error:;
26230 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
26231 __pyx_L6_skip:;
26232 goto __pyx_L4_argument_unpacking_done;
26233 __pyx_L3_error:;
26234 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26235 Py_XDECREF(values[__pyx_temp]);
26236 }
26237 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26238 __Pyx_RefNannyFinishContext();
26239 return NULL;
26240 __pyx_L4_argument_unpacking_done:;
26241 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__(((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), __pyx_v___pyx_state);
26242
26243 /* function exit code */
26244 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26245 Py_XDECREF(values[__pyx_temp]);
26246 }
26247 __Pyx_RefNannyFinishContext();
26248 return __pyx_r;
26249}
26250
26251static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
26252 PyObject *__pyx_r = NULL;
26253 __Pyx_TraceDeclarationsFunc
26254 __Pyx_RefNannyDeclarations
26255 int __pyx_lineno = 0;
26256 const char *__pyx_filename = NULL;
26257 int __pyx_clineno = 0;
26258 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31]))
26259 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
26260 __Pyx_TraceStartFunc("__setstate_cython__", __pyx_f[1], 3, 0, 0, 0, __PYX_ERR(1, 3, __pyx_L1_error));
26261
26262 /* "(tree fragment)":4
26263 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26264 * def __setstate_cython__(self, __pyx_state):
26265 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
26266*/
26267 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_uuOfXT_cannot_be_converted, 0, 0);
26268 __PYX_ERR(1, 4, __pyx_L1_error)
26269
26270 /* "(tree fragment)":3
26271 * def __reduce_cython__(self):
26272 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26273 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
26274 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
26275*/
26276
26277 /* function exit code */
26278 __pyx_L1_error:;
26279 __Pyx_TraceException(__pyx_lineno, 0, 0);
26280 #if CYTHON_USE_SYS_MONITORING
26281 __Pyx_TraceExceptionUnwind(0, 0);
26282 #else
26283 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 3, __pyx_L1_error));
26284 #endif
26285 __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26286 __pyx_r = NULL;
26287 __Pyx_XGIVEREF(__pyx_r);
26288 __Pyx_PyMonitoring_ExitScope(0);
26289 __Pyx_RefNannyFinishContext();
26290 return __pyx_r;
26291}
26292
26293/* "(tree fragment)":4
26294 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
26295 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
26296 * def __pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<<
26297 * cdef object __pyx_result
26298 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd')
26299*/
26300
26301/* Python wrapper */
26302static PyObject *__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base(PyObject *__pyx_self,
26303#if CYTHON_VECTORCALL
26304PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26305#else
26306PyObject *__pyx_args, PyObject *__pyx_kwds
26307#endif
26308); /*proto*/
26309PyDoc_STRVAR(__pyx_doc_18BoundaryConditions___pyx_unpickle_BC_Base, "__pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, tuple __pyx_state)");
26310static PyMethodDef __pyx_mdef_18BoundaryConditions_1__pyx_unpickle_BC_Base = {"__pyx_unpickle_BC_Base", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions___pyx_unpickle_BC_Base};
26311static PyObject *__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base(PyObject *__pyx_self,
26312#if CYTHON_VECTORCALL
26313PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26314#else
26315PyObject *__pyx_args, PyObject *__pyx_kwds
26316#endif
26317) {
26318 PyObject *__pyx_v___pyx_type = 0;
26319 long __pyx_v___pyx_checksum;
26320 PyObject *__pyx_v___pyx_state = 0;
26321 #if !CYTHON_VECTORCALL
26322 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26323 #endif
26324 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26325 PyObject* values[3] = {0,0,0};
26326 int __pyx_lineno = 0;
26327 const char *__pyx_filename = NULL;
26328 int __pyx_clineno = 0;
26329 PyObject *__pyx_r = 0;
26330 __Pyx_RefNannyDeclarations
26331 __Pyx_RefNannySetupContext("__pyx_unpickle_BC_Base (wrapper)", 0);
26332 #if !CYTHON_VECTORCALL
26333 #if CYTHON_ASSUME_SAFE_SIZE
26334 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26335 #else
26336 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26337 #endif
26338 #endif
26339 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26340 {
26341 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
26342 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
26343 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 4, __pyx_L3_error)
26344 if (__pyx_kwds_len > 0) {
26345 switch (__pyx_nargs) {
26346 case 3:
26347 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
26348 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
26349 CYTHON_FALLTHROUGH;
26350 case 2:
26351 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
26352 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
26353 CYTHON_FALLTHROUGH;
26354 case 1:
26355 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
26356 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
26357 CYTHON_FALLTHROUGH;
26358 case 0: break;
26359 default: goto __pyx_L5_argtuple_error;
26360 }
26361 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26362 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BC_Base", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error)
26363 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
26364 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BC_Base", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) }
26365 }
26366 } else if (unlikely(__pyx_nargs != 3)) {
26367 goto __pyx_L5_argtuple_error;
26368 } else {
26369 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
26370 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
26371 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
26372 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
26373 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
26374 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
26375 }
26376 __pyx_v___pyx_type = values[0];
26377 __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error)
26378 __pyx_v___pyx_state = ((PyObject*)values[2]);
26379 }
26380 goto __pyx_L6_skip;
26381 __pyx_L5_argtuple_error:;
26382 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BC_Base", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error)
26383 __pyx_L6_skip:;
26384 goto __pyx_L4_argument_unpacking_done;
26385 __pyx_L3_error:;
26386 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26387 Py_XDECREF(values[__pyx_temp]);
26388 }
26389 __Pyx_AddTraceback("BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
26390 __Pyx_RefNannyFinishContext();
26391 return NULL;
26392 __pyx_L4_argument_unpacking_done:;
26393 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error)
26394 __pyx_r = __pyx_pf_18BoundaryConditions___pyx_unpickle_BC_Base(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
26395
26396 /* function exit code */
26397 goto __pyx_L0;
26398 __pyx_L1_error:;
26399 __pyx_r = NULL;
26400 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26401 Py_XDECREF(values[__pyx_temp]);
26402 }
26403 goto __pyx_L7_cleaned_up;
26404 __pyx_L0:;
26405 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26406 Py_XDECREF(values[__pyx_temp]);
26407 }
26408 __pyx_L7_cleaned_up:;
26409
26410 __Pyx_RefNannyFinishContext();
26411 return __pyx_r;
26412}
26413
26414static PyObject *__pyx_pf_18BoundaryConditions___pyx_unpickle_BC_Base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
26415 PyObject *__pyx_v___pyx_result = 0;
26416 PyObject *__pyx_r = NULL;
26417 __Pyx_TraceDeclarationsFunc
26418 __Pyx_RefNannyDeclarations
26419 int __pyx_t_1;
26420 PyObject *__pyx_t_2 = NULL;
26421 PyObject *__pyx_t_3 = NULL;
26422 size_t __pyx_t_4;
26423 int __pyx_t_5;
26424 int __pyx_lineno = 0;
26425 const char *__pyx_filename = NULL;
26426 int __pyx_clineno = 0;
26427 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32]))
26428 __Pyx_RefNannySetupContext("__pyx_unpickle_BC_Base", 0);
26429 __Pyx_TraceStartFunc("__pyx_unpickle_BC_Base", __pyx_f[1], 4, 0, 0, 0, __PYX_ERR(1, 4, __pyx_L1_error));
26430
26431 /* "(tree fragment)":6
26432 * def __pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, tuple __pyx_state):
26433 * cdef object __pyx_result
26434 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd') # <<<<<<<<<<<<<<
26435 * __pyx_result = BC_Base.__new__(__pyx_type)
26436 * if __pyx_state is not None:
26437*/
26438 __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, __pyx_k_BC_type_Shape__b_or_ct_name_nd); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error)
26439
26440
26441 /* "(tree fragment)":7
26442 * cdef object __pyx_result
26443 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd')
26444 * __pyx_result = BC_Base.__new__(__pyx_type) # <<<<<<<<<<<<<<
26445 * if __pyx_state is not None:
26446 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
26447*/
26448 __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BC_Base);
26449 __Pyx_INCREF(__pyx_t_3);
26450 __pyx_t_4 = 0;
26451 {
26452 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
26453 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
26454 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26455 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
26456 __Pyx_GOTREF(__pyx_t_2);
26457 }
26458 __pyx_v___pyx_result = __pyx_t_2;
26459 __pyx_t_2 = 0;
26460
26461 /* "(tree fragment)":8
26462 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd')
26463 * __pyx_result = BC_Base.__new__(__pyx_type)
26464 * if __pyx_state is not None: # <<<<<<<<<<<<<<
26465 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
26466 * return __pyx_result
26467*/
26468 __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
26469 if (__pyx_t_5) {
26470
26471
26472 /* "(tree fragment)":9
26473 * __pyx_result = BC_Base.__new__(__pyx_type)
26474 * if __pyx_state is not None:
26475 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
26476 * return __pyx_result
26477 * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, __pyx_state: tuple):
26478*/
26479 if (unlikely(__pyx_v___pyx_state == Py_None)) {
26480 PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared \047not None\047");
26481 __PYX_ERR(1, 9, __pyx_L1_error)
26482 }
26483 __pyx_t_2 = __pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(((struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
26484 __Pyx_GOTREF(__pyx_t_2);
26485 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26486
26487 /* "(tree fragment)":8
26488 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd')
26489 * __pyx_result = BC_Base.__new__(__pyx_type)
26490 * if __pyx_state is not None: # <<<<<<<<<<<<<<
26491 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
26492 * return __pyx_result
26493*/
26494 }
26495
26496 /* "(tree fragment)":10
26497 * if __pyx_state is not None:
26498 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
26499 * return __pyx_result # <<<<<<<<<<<<<<
26500 * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, __pyx_state: tuple):
26501 * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
26502*/
26503 {
26504 PyObject *__pyx_temp;
26505 {
26506 __pyx_temp = __pyx_r;
26507 __Pyx_INCREF(__pyx_v___pyx_result);
26508 __pyx_r = __pyx_v___pyx_result;
26509 }
26510 __Pyx_XDECREF(__pyx_temp);
26511 }
26512 __Pyx_TraceReturnValue(__pyx_r, 22, 0, __PYX_ERR(1, 10, __pyx_L1_error));
26513 goto __pyx_L0;
26514
26515 /* "(tree fragment)":4
26516 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
26517 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
26518 * def __pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<<
26519 * cdef object __pyx_result
26520 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd')
26521*/
26522
26523 /* function exit code */
26524 __pyx_L1_error:;
26525 __Pyx_XDECREF(__pyx_t_2);
26526 __Pyx_XDECREF(__pyx_t_3);
26527 __Pyx_TraceException(__pyx_lineno, 0, 0);
26528 #if CYTHON_USE_SYS_MONITORING
26529 __Pyx_TraceExceptionUnwind(0, 0);
26530 #else
26531 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 4, __pyx_L1_error));
26532 #endif
26533 __Pyx_AddTraceback("BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
26534 __pyx_r = NULL;
26535 __pyx_L0:;
26536 __Pyx_XDECREF(__pyx_v___pyx_result);
26537 __Pyx_XGIVEREF(__pyx_r);
26538 __Pyx_PyMonitoring_ExitScope(0);
26539 __Pyx_RefNannyFinishContext();
26540 return __pyx_r;
26541}
26542
26543/* "(tree fragment)":11
26544 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
26545 * return __pyx_result
26546 * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<<
26547 * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
26548 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6)
26549*/
26550
26551static PyObject *__pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
26552 PyObject *__pyx_r = NULL;
26553 __Pyx_TraceDeclarationsFunc
26554 __Pyx_RefNannyDeclarations
26555 PyObject *__pyx_t_1 = NULL;
26556 __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
26557 int __pyx_t_3;
26558 int __pyx_lineno = 0;
26559 const char *__pyx_filename = NULL;
26560 int __pyx_clineno = 0;
26561 __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33]))
26562 __Pyx_RefNannySetupContext("__pyx_unpickle_BC_Base__set_state", 0);
26563 __Pyx_TraceStartFunc("__pyx_unpickle_BC_Base__set_state", __pyx_f[1], 11, 0, 0, 0, __PYX_ERR(1, 11, __pyx_L1_error));
26564
26565 /* "(tree fragment)":12
26566 * return __pyx_result
26567 * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, __pyx_state: tuple):
26568 * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5] # <<<<<<<<<<<<<<
26569 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6)
26570*/
26571 __pyx_t_1 = __Pyx_PyTuple_GET_ITEM(__pyx_v___pyx_state, 0);
26572 __Pyx_INCREF(__pyx_t_1);
26573 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
26574 __Pyx_GIVEREF(__pyx_t_1);
26575 __Pyx_GOTREF(__pyx_v___pyx_result->BC_type);
26576 __Pyx_DECREF(__pyx_v___pyx_result->BC_type);
26577 __pyx_v___pyx_result->BC_type = ((PyObject*)__pyx_t_1);
26578 __pyx_t_1 = 0;
26579 __pyx_t_1 = __Pyx_PyTuple_GET_ITEM(__pyx_v___pyx_state, 1);
26580 __Pyx_INCREF(__pyx_t_1);
26581 __Pyx_GIVEREF(__pyx_t_1);
26582 __Pyx_GOTREF(__pyx_v___pyx_result->Shape);
26583 __Pyx_DECREF(__pyx_v___pyx_result->Shape);
26584 __pyx_v___pyx_result->Shape = __pyx_t_1;
26585 __pyx_t_1 = 0;
26586 __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__Pyx_PyTuple_GET_ITEM(__pyx_v___pyx_state, 2), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(1, 12, __pyx_L1_error)
26587 __PYX_XCLEAR_MEMVIEW(&__pyx_v___pyx_result->_b_or, 0);
26588 __pyx_v___pyx_result->_b_or = __pyx_t_2;
26589 __pyx_t_2.memview = NULL;
26590 __pyx_t_2.data = NULL;
26591 __pyx_t_1 = __Pyx_PyTuple_GET_ITEM(__pyx_v___pyx_state, 3);
26592 __Pyx_INCREF(__pyx_t_1);
26593 __Pyx_GIVEREF(__pyx_t_1);
26594 __Pyx_GOTREF(__pyx_v___pyx_result->ct);
26595 __Pyx_DECREF(__pyx_v___pyx_result->ct);
26596 __pyx_v___pyx_result->ct = __pyx_t_1;
26597 __pyx_t_1 = 0;
26598 __pyx_t_1 = __Pyx_PyTuple_GET_ITEM(__pyx_v___pyx_state, 4);
26599 __Pyx_INCREF(__pyx_t_1);
26600 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
26601 __Pyx_GIVEREF(__pyx_t_1);
26602 __Pyx_GOTREF(__pyx_v___pyx_result->name);
26603 __Pyx_DECREF(__pyx_v___pyx_result->name);
26604 __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1);
26605 __pyx_t_1 = 0;
26606 __pyx_t_3 = __Pyx_PyLong_As_int(__Pyx_PyTuple_GET_ITEM(__pyx_v___pyx_state, 5)); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
26607 __pyx_v___pyx_result->nd = __pyx_t_3;
26608
26609 /* "(tree fragment)":13
26610 * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, __pyx_state: tuple):
26611 * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
26612 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) # <<<<<<<<<<<<<<
26613*/
26614 __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 6); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
26615
26616
26617 /* "(tree fragment)":11
26618 * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
26619 * return __pyx_result
26620 * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<<
26621 * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
26622 * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6)
26623*/
26624
26625 /* function exit code */
26626 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26627 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(1, 11, __pyx_L1_error));
26628 goto __pyx_L0;
26629 __pyx_L1_error:;
26630 __Pyx_XDECREF(__pyx_t_1);
26631 __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
26632 __Pyx_TraceException(__pyx_lineno, 0, 0);
26633 #if CYTHON_USE_SYS_MONITORING
26634 __Pyx_TraceExceptionUnwind(0, 0);
26635 #else
26636 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 11, __pyx_L1_error));
26637 #endif
26638 __Pyx_AddTraceback("BoundaryConditions.__pyx_unpickle_BC_Base__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
26639 __pyx_r = 0;
26640 __pyx_L0:;
26641 __Pyx_XGIVEREF(__pyx_r);
26642 __Pyx_PyMonitoring_ExitScope(0);
26643 __Pyx_RefNannyFinishContext();
26644 return __pyx_r;
26645}
26646/* #### Code section: module_exttypes ### */
26647
26648static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions_BC_Base(PyObject *o,
26649#if CYTHON_VECTORCALL_TPNEW
26650 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
26651#else
26652 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
26653#endif
26654) {
26655 struct __pyx_obj_18BoundaryConditions_BC_Base *p = ((struct __pyx_obj_18BoundaryConditions_BC_Base *)o);
26656 p->Shape = Py_None; Py_INCREF(Py_None);
26657 p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
26658 p->BC_type = ((PyObject*)Py_None); Py_INCREF(Py_None);
26659 p->ct = Py_None; Py_INCREF(Py_None);
26660 p->_b_or.data = NULL;
26661 p->_b_or.memview = NULL;
26662 return o;
26663}
26664
26665static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base(PyTypeObject *t,
26666#if CYTHON_VECTORCALL_TPNEW
26667 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
26668#else
26669 PyObject *a, PyObject *k
26670#endif
26671) {
26672 PyObject *o;
26673 o = __Pyx_AllocateExtensionType(t, 0);
26674 if (unlikely(!o)) return 0;
26675 return __pyx_tp_new__initialisation_18BoundaryConditions_BC_Base(o,
26676#if CYTHON_VECTORCALL_TPNEW
26677 args, nargs, kwnames
26678#else
26679 a, k
26680#endif
26681);
26682}
26683
26684#if CYTHON_VECTORCALL_TPNEW
26685static PyObject *__pyx_tp_new_18BoundaryConditions_BC_Base(PyTypeObject *t, PyObject *a, PyObject *k) {
26686 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base, t, a, k);
26687}
26688#endif
26689
26690#if CYTHON_VECTORCALL_TPNEW
26691static PyObject *__pyx_tp_vectorcall_18BoundaryConditions_BC_Base(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
26692 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BC_Base || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
26693 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
26694 }
26695 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
26696 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base((PyTypeObject*)t, args, nargs, kwnames);
26697 if (likely(o)) {
26698 assert(Py_TYPE(o) == (PyTypeObject*)t);
26699 if (unlikely(__pyx_pw_18BoundaryConditions_7BC_Base_1__init__(o, args, nargs, kwnames) < 0)) {
26700 Py_CLEAR(o);
26701 }
26702 }
26703 return o;
26704}
26705#endif
26706
26707#if CYTHON_VECTORCALL_TPNEW
26708static int __pyx_tp_init_18BoundaryConditions_BC_Base(PyObject *o, PyObject *args, PyObject *kwds) {
26709 return __Pyx_CallTpinitAsVectorcall(__pyx_pw_18BoundaryConditions_7BC_Base_1__init__, o, args, kwds);
26710}
26711#endif
26712
26713static void __pyx_tp_dealloc_18BoundaryConditions_BC_Base(PyObject *o) {
26714 struct __pyx_obj_18BoundaryConditions_BC_Base *p = (struct __pyx_obj_18BoundaryConditions_BC_Base *)o;
26715 #if CYTHON_USE_TP_FINALIZE
26716 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
26717 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18BoundaryConditions_BC_Base) {
26718 if (PyObject_CallFinalizerFromDealloc(o)) return;
26719 }
26720 }
26721 #endif
26722 PyObject_GC_UnTrack(o);
26723 Py_CLEAR(p->Shape);
26724 Py_CLEAR(p->name);
26725 Py_CLEAR(p->BC_type);
26726 Py_CLEAR(p->ct);
26727 __PYX_XCLEAR_MEMVIEW(&p->_b_or, 1);; p->_b_or.memview = NULL; p->_b_or.data = NULL;
26728 PyTypeObject *tp = Py_TYPE(o);
26729 #if CYTHON_USE_TYPE_SLOTS
26730 (*tp->tp_free)(o);
26731 #else
26732 {
26733 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
26734 if (tp_free) tp_free(o);
26735 }
26736 #endif
26737 #if CYTHON_USE_TYPE_SPECS
26738 Py_DECREF(tp);
26739 #endif
26740}
26741
26742static int __pyx_tp_traverse_18BoundaryConditions_BC_Base(PyObject *o, visitproc v, void *a) {
26743 int e;
26744 struct __pyx_obj_18BoundaryConditions_BC_Base *p = (struct __pyx_obj_18BoundaryConditions_BC_Base *)o;
26745 {
26746 e = __Pyx_call_type_traverse(o, 1, v, a);
26747 if (e) return e;
26748 }
26749 if (p->Shape) {
26750 e = (*v)(p->Shape, a); if (e) return e;
26751 }
26752 if (p->ct) {
26753 e = (*v)(p->ct, a); if (e) return e;
26754 }
26755 return 0;
26756}
26757
26758static int __pyx_tp_clear_18BoundaryConditions_BC_Base(PyObject *o) {
26759 PyObject* tmp;
26760 struct __pyx_obj_18BoundaryConditions_BC_Base *p = (struct __pyx_obj_18BoundaryConditions_BC_Base *)o;
26761 tmp = ((PyObject*)p->Shape);
26762 p->Shape = Py_None; Py_INCREF(Py_None);
26763 Py_XDECREF(tmp);
26764 tmp = ((PyObject*)p->ct);
26765 p->ct = Py_None; Py_INCREF(Py_None);
26766 Py_XDECREF(tmp);
26767 return 0;
26768}
26769
26770static PyObject *__pyx_getprop_18BoundaryConditions_7BC_Base_nd(PyObject *o, CYTHON_UNUSED void *x) {
26771 return __pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(o);
26772}
26773
26774static int __pyx_setprop_18BoundaryConditions_7BC_Base_nd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
26775 if (v) {
26776 return __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(o, v);
26777 }
26778 else {
26779 PyErr_SetString(PyExc_NotImplementedError, "__del__");
26780 return -1;
26781 }
26782}
26783
26784static PyObject *__pyx_getprop_18BoundaryConditions_7BC_Base_Shape(PyObject *o, CYTHON_UNUSED void *x) {
26785 return __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(o);
26786}
26787
26788static int __pyx_setprop_18BoundaryConditions_7BC_Base_Shape(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
26789 if (v) {
26790 return __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(o, v);
26791 }
26792 else {
26793 return __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(o);
26794 }
26795}
26796
26797static PyObject *__pyx_getprop_18BoundaryConditions_7BC_Base_name(PyObject *o, CYTHON_UNUSED void *x) {
26798 return __pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(o);
26799}
26800
26801static int __pyx_setprop_18BoundaryConditions_7BC_Base_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
26802 if (v) {
26803 return __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(o, v);
26804 }
26805 else {
26806 return __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(o);
26807 }
26808}
26809
26810static PyObject *__pyx_getprop_18BoundaryConditions_7BC_Base_BC_type(PyObject *o, CYTHON_UNUSED void *x) {
26811 return __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(o);
26812}
26813
26814static int __pyx_setprop_18BoundaryConditions_7BC_Base_BC_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
26815 if (v) {
26816 return __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(o, v);
26817 }
26818 else {
26819 return __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(o);
26820 }
26821}
26822
26823static PyObject *__pyx_getprop_18BoundaryConditions_7BC_Base_ct(PyObject *o, CYTHON_UNUSED void *x) {
26824 return __pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(o);
26825}
26826
26827static int __pyx_setprop_18BoundaryConditions_7BC_Base_ct(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
26828 if (v) {
26829 return __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(o, v);
26830 }
26831 else {
26832 return __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(o);
26833 }
26834}
26835
26836static PyMethodDef __pyx_methods_18BoundaryConditions_BC_Base[] = {
26837 {"getContext", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_3getContext, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_2getContext},
26838 {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_4__reduce_cython__},
26839 {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_6__setstate_cython__},
26840 {0, 0, 0, 0}
26841};
26842
26843static struct PyGetSetDef __pyx_getsets_18BoundaryConditions_BC_Base[] = {
26844 {"nd", __pyx_getprop_18BoundaryConditions_7BC_Base_nd, __pyx_setprop_18BoundaryConditions_7BC_Base_nd, PyDoc_STR("nd: \047int\047"), 0},
26845 {"Shape", __pyx_getprop_18BoundaryConditions_7BC_Base_Shape, __pyx_setprop_18BoundaryConditions_7BC_Base_Shape, PyDoc_STR("Shape: object"), 0},
26846 {"name", __pyx_getprop_18BoundaryConditions_7BC_Base_name, __pyx_setprop_18BoundaryConditions_7BC_Base_name, PyDoc_STR("name: str"), 0},
26847 {"BC_type", __pyx_getprop_18BoundaryConditions_7BC_Base_BC_type, __pyx_setprop_18BoundaryConditions_7BC_Base_BC_type, PyDoc_STR("BC_type: str"), 0},
26848 {"ct", __pyx_getprop_18BoundaryConditions_7BC_Base_ct, __pyx_setprop_18BoundaryConditions_7BC_Base_ct, PyDoc_STR("ct: object"), 0},
26849 {0, 0, 0, 0, 0}
26850};
26851#if CYTHON_USE_TYPE_SPECS
26852static PyType_Slot __pyx_type_18BoundaryConditions_BC_Base_slots[] = {
26853 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18BoundaryConditions_BC_Base},
26854 {Py_tp_doc, (void *)PyDoc_STR("BC_Base(shape=None, name=None, b_or=None, b_i=0, nd=None)\n\nGeneric class regrouping boundary conditions")},
26855 {Py_tp_traverse, (void *)__pyx_tp_traverse_18BoundaryConditions_BC_Base},
26856 {Py_tp_clear, (void *)__pyx_tp_clear_18BoundaryConditions_BC_Base},
26857 {Py_tp_methods, (void *)__pyx_methods_18BoundaryConditions_BC_Base},
26858 {Py_tp_getset, (void *)__pyx_getsets_18BoundaryConditions_BC_Base},
26859 {Py_tp_init, (void *)__pyx_tp_init_18BoundaryConditions_BC_Base},
26860 {Py_tp_new, (void *)__pyx_tp_new_18BoundaryConditions_BC_Base},
26861 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
26862 #if CYTHON_VECTORCALL_TPNEW
26863 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_18BoundaryConditions_BC_Base},
26864 #endif
26865 #endif
26866 {0, 0},
26867};
26868static PyType_Spec __pyx_type_18BoundaryConditions_BC_Base_spec = {
26869 "BoundaryConditions.BC_Base",
26870 sizeof(struct __pyx_obj_18BoundaryConditions_BC_Base),
26871 0,
26872 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
26873 __pyx_type_18BoundaryConditions_BC_Base_slots,
26874};
26875#else
26876
26877static PyTypeObject __pyx_type_18BoundaryConditions_BC_Base = {
26878 PyVarObject_HEAD_INIT(0, 0)
26879 "BoundaryConditions.""BC_Base", /*tp_name*/
26880 sizeof(struct __pyx_obj_18BoundaryConditions_BC_Base), /*tp_basicsize*/
26881 0, /*tp_itemsize*/
26882 __pyx_tp_dealloc_18BoundaryConditions_BC_Base, /*tp_dealloc*/
26883 0, /*tp_vectorcall_offset*/
26884 0, /*tp_getattr*/
26885 0, /*tp_setattr*/
26886 0, /*tp_as_async*/
26887 0, /*tp_repr*/
26888 0, /*tp_as_number*/
26889 0, /*tp_as_sequence*/
26890 0, /*tp_as_mapping*/
26891 0, /*tp_hash*/
26892 0, /*tp_call*/
26893 0, /*tp_str*/
26894 0, /*tp_getattro*/
26895 0, /*tp_setattro*/
26896 0, /*tp_as_buffer*/
26897 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26898 PyDoc_STR("BC_Base(shape=None, name=None, b_or=None, b_i=0, nd=None)\n\nGeneric class regrouping boundary conditions"), /*tp_doc*/
26899 __pyx_tp_traverse_18BoundaryConditions_BC_Base, /*tp_traverse*/
26900 __pyx_tp_clear_18BoundaryConditions_BC_Base, /*tp_clear*/
26901 0, /*tp_richcompare*/
26902 0, /*tp_weaklistoffset*/
26903 0, /*tp_iter*/
26904 0, /*tp_iternext*/
26905 __pyx_methods_18BoundaryConditions_BC_Base, /*tp_methods*/
26906 0, /*tp_members*/
26907 __pyx_getsets_18BoundaryConditions_BC_Base, /*tp_getset*/
26908 0, /*tp_base*/
26909 0, /*tp_dict*/
26910 0, /*tp_descr_get*/
26911 0, /*tp_descr_set*/
26912 #if !CYTHON_USE_TYPE_SPECS
26913 0, /*tp_dictoffset*/
26914 #endif
26915 __pyx_tp_init_18BoundaryConditions_BC_Base, /*tp_init*/
26916 0, /*tp_alloc*/
26917 __pyx_tp_new_18BoundaryConditions_BC_Base, /*tp_new*/
26918 0, /*tp_free*/
26919 0, /*tp_is_gc*/
26920 0, /*tp_bases*/
26921 0, /*tp_mro*/
26922 0, /*tp_cache*/
26923 0, /*tp_subclasses*/
26924 0, /*tp_weaklist*/
26925 0, /*tp_del*/
26926 0, /*tp_version_tag*/
26927 #if CYTHON_USE_TP_FINALIZE
26928 0, /*tp_finalize*/
26929 #else
26930 NULL, /*tp_finalize*/
26931 #endif
26932 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
26933 #if CYTHON_VECTORCALL_TPNEW
26934 __pyx_tp_vectorcall_18BoundaryConditions_BC_Base, /*tp_vectorcall*/
26935 #else
26936 NULL, /*tp_vectorcall*/
26937 #endif
26938 #endif
26939 #if __PYX_NEED_TP_PRINT_SLOT == 1
26940 0, /*tp_print*/
26941 #endif
26942 #if PY_VERSION_HEX >= 0x030C0000
26943 0, /*tp_watched*/
26944 #endif
26945 #if PY_VERSION_HEX >= 0x030d00A4
26946 0, /*tp_versions_used*/
26947 #endif
26948 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
26949 0, /*tp_pypy_flags*/
26950 #endif
26951};
26952#endif
26953static struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition __pyx_vtable_18BoundaryConditions_BoundaryCondition;
26954
26955static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions_BoundaryCondition(PyObject *o,
26956#if CYTHON_VECTORCALL_TPNEW
26957 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
26958#else
26959 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
26960#endif
26961) {
26962 struct __pyx_obj_18BoundaryConditions_BoundaryCondition *p = ((struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)o);
26963 p->__pyx_vtab = __pyx_vtabptr_18BoundaryConditions_BoundaryCondition;
26964 p->uOfXT = Py_None; Py_INCREF(Py_None);
26965 return o;
26966}
26967
26968static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition(PyTypeObject *t,
26969#if CYTHON_VECTORCALL_TPNEW
26970 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
26971#else
26972 PyObject *a, PyObject *k
26973#endif
26974) {
26975 PyObject *o;
26976 o = __Pyx_AllocateExtensionType(t, 0);
26977 if (unlikely(!o)) return 0;
26978 return __pyx_tp_new__initialisation_18BoundaryConditions_BoundaryCondition(o,
26979#if CYTHON_VECTORCALL_TPNEW
26980 args, nargs, kwnames
26981#else
26982 a, k
26983#endif
26984);
26985}
26986
26987#if CYTHON_VECTORCALL_TPNEW
26988static PyObject *__pyx_tp_new_18BoundaryConditions_BoundaryCondition(PyTypeObject *t, PyObject *a, PyObject *k) {
26989 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition, t, a, k);
26990}
26991#endif
26992
26993#if CYTHON_VECTORCALL_TPNEW
26994static PyObject *__pyx_tp_vectorcall_18BoundaryConditions_BoundaryCondition(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
26995 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
26996 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
26997 }
26998 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
26999 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition((PyTypeObject*)t, args, nargs, kwnames);
27000 if (likely(o)) {
27001 assert(Py_TYPE(o) == (PyTypeObject*)t);
27002 if (unlikely(__pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(o, args, nargs, kwnames) < 0)) {
27003 Py_CLEAR(o);
27004 }
27005 }
27006 return o;
27007}
27008#endif
27009
27010#if CYTHON_VECTORCALL_TPNEW
27011static int __pyx_tp_init_18BoundaryConditions_BoundaryCondition(PyObject *o, PyObject *args, PyObject *kwds) {
27012 return __Pyx_CallTpinitAsVectorcall(__pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__, o, args, kwds);
27013}
27014#endif
27015
27016static void __pyx_tp_dealloc_18BoundaryConditions_BoundaryCondition(PyObject *o) {
27017 struct __pyx_obj_18BoundaryConditions_BoundaryCondition *p = (struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)o;
27018 #if CYTHON_USE_TP_FINALIZE
27019 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
27020 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18BoundaryConditions_BoundaryCondition) {
27021 if (PyObject_CallFinalizerFromDealloc(o)) return;
27022 }
27023 }
27024 #endif
27025 PyObject_GC_UnTrack(o);
27026 Py_CLEAR(p->uOfXT);
27027 PyTypeObject *tp = Py_TYPE(o);
27028 #if CYTHON_USE_TYPE_SLOTS
27029 (*tp->tp_free)(o);
27030 #else
27031 {
27032 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27033 if (tp_free) tp_free(o);
27034 }
27035 #endif
27036 #if CYTHON_USE_TYPE_SPECS
27037 Py_DECREF(tp);
27038 #endif
27039}
27040
27041static int __pyx_tp_traverse_18BoundaryConditions_BoundaryCondition(PyObject *o, visitproc v, void *a) {
27042 int e;
27043 struct __pyx_obj_18BoundaryConditions_BoundaryCondition *p = (struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)o;
27044 {
27045 e = __Pyx_call_type_traverse(o, 1, v, a);
27046 if (e) return e;
27047 }
27048 if (p->uOfXT) {
27049 e = (*v)(p->uOfXT, a); if (e) return e;
27050 }
27051 return 0;
27052}
27053
27054static int __pyx_tp_clear_18BoundaryConditions_BoundaryCondition(PyObject *o) {
27055 PyObject* tmp;
27056 struct __pyx_obj_18BoundaryConditions_BoundaryCondition *p = (struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)o;
27057 tmp = ((PyObject*)p->uOfXT);
27058 p->uOfXT = Py_None; Py_INCREF(Py_None);
27059 Py_XDECREF(tmp);
27060 return 0;
27061}
27062
27063static PyObject *__pyx_getprop_18BoundaryConditions_17BoundaryCondition_uOfXT(PyObject *o, CYTHON_UNUSED void *x) {
27064 return __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(o);
27065}
27066
27067static int __pyx_setprop_18BoundaryConditions_17BoundaryCondition_uOfXT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
27068 if (v) {
27069 return __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(o, v);
27070 }
27071 else {
27072 return __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(o);
27073 }
27074}
27075
27076static PyMethodDef __pyx_methods_18BoundaryConditions_BoundaryCondition[] = {
27077 {"init_cython", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_2init_cython},
27078 {"setConstantBC", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_6setConstantBC},
27079 {"setLinearBC", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_8setLinearBC},
27080 {"setLinearRamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_10setLinearRamp},
27081 {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__},
27082 {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__},
27083 {0, 0, 0, 0}
27084};
27085
27086static struct PyGetSetDef __pyx_getsets_18BoundaryConditions_BoundaryCondition[] = {
27087 {"uOfXT", __pyx_getprop_18BoundaryConditions_17BoundaryCondition_uOfXT, __pyx_setprop_18BoundaryConditions_17BoundaryCondition_uOfXT, PyDoc_STR("uOfXT: object"), 0},
27088 {0, 0, 0, 0, 0}
27089};
27090#if CYTHON_USE_TYPE_SPECS
27091static PyType_Slot __pyx_type_18BoundaryConditions_BoundaryCondition_slots[] = {
27092 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18BoundaryConditions_BoundaryCondition},
27093 {Py_tp_doc, (void *)PyDoc_STR("BoundaryCondition()\n\nBoundary condition class\n\nAttributes\n----------\nuOfXT: func or None\n boundary condition function of x (array_like) and t (float) or None for\n no boundary condition")},
27094 {Py_tp_traverse, (void *)__pyx_tp_traverse_18BoundaryConditions_BoundaryCondition},
27095 {Py_tp_clear, (void *)__pyx_tp_clear_18BoundaryConditions_BoundaryCondition},
27096 {Py_tp_methods, (void *)__pyx_methods_18BoundaryConditions_BoundaryCondition},
27097 {Py_tp_getset, (void *)__pyx_getsets_18BoundaryConditions_BoundaryCondition},
27098 {Py_tp_init, (void *)__pyx_tp_init_18BoundaryConditions_BoundaryCondition},
27099 {Py_tp_new, (void *)__pyx_tp_new_18BoundaryConditions_BoundaryCondition},
27100 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27101 #if CYTHON_VECTORCALL_TPNEW
27102 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_18BoundaryConditions_BoundaryCondition},
27103 #endif
27104 #endif
27105 {0, 0},
27106};
27107static PyType_Spec __pyx_type_18BoundaryConditions_BoundaryCondition_spec = {
27108 "BoundaryConditions.BoundaryCondition",
27109 sizeof(struct __pyx_obj_18BoundaryConditions_BoundaryCondition),
27110 0,
27111 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
27112 __pyx_type_18BoundaryConditions_BoundaryCondition_slots,
27113};
27114#else
27115
27116static PyTypeObject __pyx_type_18BoundaryConditions_BoundaryCondition = {
27117 PyVarObject_HEAD_INIT(0, 0)
27118 "BoundaryConditions.""BoundaryCondition", /*tp_name*/
27119 sizeof(struct __pyx_obj_18BoundaryConditions_BoundaryCondition), /*tp_basicsize*/
27120 0, /*tp_itemsize*/
27121 __pyx_tp_dealloc_18BoundaryConditions_BoundaryCondition, /*tp_dealloc*/
27122 0, /*tp_vectorcall_offset*/
27123 0, /*tp_getattr*/
27124 0, /*tp_setattr*/
27125 0, /*tp_as_async*/
27126 0, /*tp_repr*/
27127 0, /*tp_as_number*/
27128 0, /*tp_as_sequence*/
27129 0, /*tp_as_mapping*/
27130 0, /*tp_hash*/
27131 0, /*tp_call*/
27132 0, /*tp_str*/
27133 0, /*tp_getattro*/
27134 0, /*tp_setattro*/
27135 0, /*tp_as_buffer*/
27136 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
27137 PyDoc_STR("BoundaryCondition()\n\nBoundary condition class\n\nAttributes\n----------\nuOfXT: func or None\n boundary condition function of x (array_like) and t (float) or None for\n no boundary condition"), /*tp_doc*/
27138 __pyx_tp_traverse_18BoundaryConditions_BoundaryCondition, /*tp_traverse*/
27139 __pyx_tp_clear_18BoundaryConditions_BoundaryCondition, /*tp_clear*/
27140 0, /*tp_richcompare*/
27141 0, /*tp_weaklistoffset*/
27142 0, /*tp_iter*/
27143 0, /*tp_iternext*/
27144 __pyx_methods_18BoundaryConditions_BoundaryCondition, /*tp_methods*/
27145 0, /*tp_members*/
27146 __pyx_getsets_18BoundaryConditions_BoundaryCondition, /*tp_getset*/
27147 0, /*tp_base*/
27148 0, /*tp_dict*/
27149 0, /*tp_descr_get*/
27150 0, /*tp_descr_set*/
27151 #if !CYTHON_USE_TYPE_SPECS
27152 0, /*tp_dictoffset*/
27153 #endif
27154 __pyx_tp_init_18BoundaryConditions_BoundaryCondition, /*tp_init*/
27155 0, /*tp_alloc*/
27156 __pyx_tp_new_18BoundaryConditions_BoundaryCondition, /*tp_new*/
27157 0, /*tp_free*/
27158 0, /*tp_is_gc*/
27159 0, /*tp_bases*/
27160 0, /*tp_mro*/
27161 0, /*tp_cache*/
27162 0, /*tp_subclasses*/
27163 0, /*tp_weaklist*/
27164 0, /*tp_del*/
27165 0, /*tp_version_tag*/
27166 #if CYTHON_USE_TP_FINALIZE
27167 0, /*tp_finalize*/
27168 #else
27169 NULL, /*tp_finalize*/
27170 #endif
27171 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27172 #if CYTHON_VECTORCALL_TPNEW
27173 __pyx_tp_vectorcall_18BoundaryConditions_BoundaryCondition, /*tp_vectorcall*/
27174 #else
27175 NULL, /*tp_vectorcall*/
27176 #endif
27177 #endif
27178 #if __PYX_NEED_TP_PRINT_SLOT == 1
27179 0, /*tp_print*/
27180 #endif
27181 #if PY_VERSION_HEX >= 0x030C0000
27182 0, /*tp_watched*/
27183 #endif
27184 #if PY_VERSION_HEX >= 0x030d00A4
27185 0, /*tp_versions_used*/
27186 #endif
27187 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
27188 0, /*tp_pypy_flags*/
27189 #endif
27190};
27191#endif
27192
27193static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_defaults(PyObject *o,
27194#if CYTHON_VECTORCALL_TPNEW
27195 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
27196#else
27197 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
27198#endif
27199) {
27200 return o;
27201}
27202
27203static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults(PyTypeObject *t,
27204#if CYTHON_VECTORCALL_TPNEW
27205 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
27206#else
27207 PyObject *a, PyObject *k
27208#endif
27209) {
27210 PyObject *o;
27211 o = __Pyx_AllocateExtensionType(t, 1);
27212 if (unlikely(!o)) return 0;
27213 return __pyx_tp_new__initialisation_18BoundaryConditions___pyx_defaults(o,
27214#if CYTHON_VECTORCALL_TPNEW
27215 args, nargs, kwnames
27216#else
27217 a, k
27218#endif
27219);
27220}
27221
27222#if CYTHON_VECTORCALL_TPNEW
27223static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k) {
27224 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults, t, a, k);
27225}
27226#endif
27227
27228#if CYTHON_VECTORCALL_TPNEW
27229static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_defaults(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
27230 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_defaults || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
27231 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
27232 }
27233 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
27234 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults((PyTypeObject*)t, args, nargs, kwnames);
27235 return o;
27236}
27237#endif
27238
27239static void __pyx_tp_dealloc_18BoundaryConditions___pyx_defaults(PyObject *o) {
27240 struct __pyx_defaults *p = (struct __pyx_defaults *)o;
27241 #if CYTHON_USE_TP_FINALIZE
27242 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
27243 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18BoundaryConditions___pyx_defaults) {
27244 if (PyObject_CallFinalizerFromDealloc(o)) return;
27245 }
27246 }
27247 #endif
27248 PyObject_GC_UnTrack(o);
27249 Py_CLEAR(p->arg0);
27250 PyTypeObject *tp = Py_TYPE(o);
27251 #if CYTHON_USE_TYPE_SLOTS
27252 (*tp->tp_free)(o);
27253 #else
27254 {
27255 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27256 if (tp_free) tp_free(o);
27257 }
27258 #endif
27259 #if CYTHON_USE_TYPE_SPECS
27260 Py_DECREF(tp);
27261 #endif
27262}
27263
27264static int __pyx_tp_traverse_18BoundaryConditions___pyx_defaults(PyObject *o, visitproc v, void *a) {
27265 int e;
27266 struct __pyx_defaults *p = (struct __pyx_defaults *)o;
27267 {
27268 e = __Pyx_call_type_traverse(o, 1, v, a);
27269 if (e) return e;
27270 }
27271 if (p->arg0) {
27272 e = (*v)(p->arg0, a); if (e) return e;
27273 }
27274 return 0;
27275}
27276
27277static int __pyx_tp_clear_18BoundaryConditions___pyx_defaults(PyObject *o) {
27278 PyObject* tmp;
27279 struct __pyx_defaults *p = (struct __pyx_defaults *)o;
27280 tmp = ((PyObject*)p->arg0);
27281 p->arg0 = Py_None; Py_INCREF(Py_None);
27282 Py_XDECREF(tmp);
27283 return 0;
27284}
27285#if CYTHON_USE_TYPE_SPECS
27286static PyType_Slot __pyx_type_18BoundaryConditions___pyx_defaults_slots[] = {
27287 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18BoundaryConditions___pyx_defaults},
27288 {Py_tp_traverse, (void *)__pyx_tp_traverse_18BoundaryConditions___pyx_defaults},
27289 {Py_tp_clear, (void *)__pyx_tp_clear_18BoundaryConditions___pyx_defaults},
27290 {Py_tp_new, (void *)__pyx_tp_new_18BoundaryConditions___pyx_defaults},
27291 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27292 #if CYTHON_VECTORCALL_TPNEW
27293 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_18BoundaryConditions___pyx_defaults},
27294 #endif
27295 #endif
27296 {0, 0},
27297};
27298static PyType_Spec __pyx_type_18BoundaryConditions___pyx_defaults_spec = {
27299 "BoundaryConditions.__pyx_defaults",
27300 sizeof(struct __pyx_defaults),
27301 0,
27302 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27303 __pyx_type_18BoundaryConditions___pyx_defaults_slots,
27304};
27305#else
27306
27307static PyTypeObject __pyx_type_18BoundaryConditions___pyx_defaults = {
27308 PyVarObject_HEAD_INIT(0, 0)
27309 "BoundaryConditions.""__pyx_defaults", /*tp_name*/
27310 sizeof(struct __pyx_defaults), /*tp_basicsize*/
27311 0, /*tp_itemsize*/
27312 __pyx_tp_dealloc_18BoundaryConditions___pyx_defaults, /*tp_dealloc*/
27313 0, /*tp_vectorcall_offset*/
27314 0, /*tp_getattr*/
27315 0, /*tp_setattr*/
27316 0, /*tp_as_async*/
27317 0, /*tp_repr*/
27318 0, /*tp_as_number*/
27319 0, /*tp_as_sequence*/
27320 0, /*tp_as_mapping*/
27321 0, /*tp_hash*/
27322 0, /*tp_call*/
27323 0, /*tp_str*/
27324 0, /*tp_getattro*/
27325 0, /*tp_setattro*/
27326 0, /*tp_as_buffer*/
27327 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
27328 0, /*tp_doc*/
27329 __pyx_tp_traverse_18BoundaryConditions___pyx_defaults, /*tp_traverse*/
27330 __pyx_tp_clear_18BoundaryConditions___pyx_defaults, /*tp_clear*/
27331 0, /*tp_richcompare*/
27332 0, /*tp_weaklistoffset*/
27333 0, /*tp_iter*/
27334 0, /*tp_iternext*/
27335 0, /*tp_methods*/
27336 0, /*tp_members*/
27337 0, /*tp_getset*/
27338 0, /*tp_base*/
27339 0, /*tp_dict*/
27340 0, /*tp_descr_get*/
27341 0, /*tp_descr_set*/
27342 #if !CYTHON_USE_TYPE_SPECS
27343 0, /*tp_dictoffset*/
27344 #endif
27345 0, /*tp_init*/
27346 0, /*tp_alloc*/
27347 __pyx_tp_new_18BoundaryConditions___pyx_defaults, /*tp_new*/
27348 0, /*tp_free*/
27349 0, /*tp_is_gc*/
27350 0, /*tp_bases*/
27351 0, /*tp_mro*/
27352 0, /*tp_cache*/
27353 0, /*tp_subclasses*/
27354 0, /*tp_weaklist*/
27355 0, /*tp_del*/
27356 0, /*tp_version_tag*/
27357 #if CYTHON_USE_TP_FINALIZE
27358 0, /*tp_finalize*/
27359 #else
27360 NULL, /*tp_finalize*/
27361 #endif
27362 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27363 #if CYTHON_VECTORCALL_TPNEW
27364 __pyx_tp_vectorcall_18BoundaryConditions___pyx_defaults, /*tp_vectorcall*/
27365 #else
27366 NULL, /*tp_vectorcall*/
27367 #endif
27368 #endif
27369 #if __PYX_NEED_TP_PRINT_SLOT == 1
27370 0, /*tp_print*/
27371 #endif
27372 #if PY_VERSION_HEX >= 0x030C0000
27373 0, /*tp_watched*/
27374 #endif
27375 #if PY_VERSION_HEX >= 0x030d00A4
27376 0, /*tp_versions_used*/
27377 #endif
27378 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
27379 0, /*tp_pypy_flags*/
27380 #endif
27381};
27382#endif
27383
27384static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o,
27385#if CYTHON_VECTORCALL_TPNEW
27386 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
27387#else
27388 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
27389#endif
27390) {
27391 return o;
27392}
27393
27394static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t,
27395#if CYTHON_VECTORCALL_TPNEW
27396 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
27397#else
27398 PyObject *a, PyObject *k
27399#endif
27400) {
27401 PyObject *o;
27402 #if CYTHON_USE_FREELISTS
27403 if (likely((int)(__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct__setConstantBC > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC))))
27404 {
27405 o = (PyObject*)__pyx_mstate_global->__pyx_freelist_18BoundaryConditions___pyx_scope_struct__setConstantBC[--__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct__setConstantBC];
27406 #if CYTHON_USE_TYPE_SPECS
27407 Py_DECREF(Py_TYPE(o));
27408 #endif
27409 memset(o, 0, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC));
27410 #if CYTHON_COMPILING_IN_LIMITED_API
27411 (void) PyObject_Init(o, t);
27412 #else
27413 (void) PyObject_INIT(o, t);
27414 #endif
27415 PyObject_GC_Track(o);
27416 } else
27417 #endif
27418 {
27419 o = __Pyx_AllocateExtensionType(t, 1);
27420 }
27421 if (unlikely(!o)) return 0;
27422 return __pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct__setConstantBC(o,
27423#if CYTHON_VECTORCALL_TPNEW
27424 args, nargs, kwnames
27425#else
27426 a, k
27427#endif
27428);
27429}
27430
27431#if CYTHON_VECTORCALL_TPNEW
27432static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t, PyObject *a, PyObject *k) {
27433 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC, t, a, k);
27434}
27435#endif
27436
27437#if CYTHON_VECTORCALL_TPNEW
27438static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
27439 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
27440 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
27441 }
27442 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
27443 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC((PyTypeObject*)t, args, nargs, kwnames);
27444 return o;
27445}
27446#endif
27447
27448static void __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o) {
27449 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)o;
27450 #if CYTHON_USE_TP_FINALIZE
27451 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
27452 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct__setConstantBC) {
27453 if (PyObject_CallFinalizerFromDealloc(o)) return;
27454 }
27455 }
27456 #endif
27457 PyObject_GC_UnTrack(o);
27458 Py_CLEAR(p->__pyx_v_value);
27459 #if CYTHON_USE_FREELISTS
27460 if (likely((int)(__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct__setConstantBC < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC))))
27461 {
27462 __pyx_mstate_global->__pyx_freelist_18BoundaryConditions___pyx_scope_struct__setConstantBC[__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct__setConstantBC++] = ((struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)o);
27463 } else
27464 #endif
27465 {
27466 PyTypeObject *tp = Py_TYPE(o);
27467 #if CYTHON_USE_TYPE_SLOTS
27468 (*tp->tp_free)(o);
27469 #else
27470 {
27471 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27472 if (tp_free) tp_free(o);
27473 }
27474 #endif
27475 #if CYTHON_USE_TYPE_SPECS
27476 Py_DECREF(tp);
27477 #endif
27478 }
27479}
27480
27481static int __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o, visitproc v, void *a) {
27482 int e;
27483 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)o;
27484 {
27485 e = __Pyx_call_type_traverse(o, 1, v, a);
27486 if (e) return e;
27487 }
27488 if (p->__pyx_v_value) {
27489 e = (*v)(p->__pyx_v_value, a); if (e) return e;
27490 }
27491 return 0;
27492}
27493
27494static int __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o) {
27495 PyObject* tmp;
27496 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)o;
27497 tmp = ((PyObject*)p->__pyx_v_value);
27498 p->__pyx_v_value = Py_None; Py_INCREF(Py_None);
27499 Py_XDECREF(tmp);
27500 return 0;
27501}
27502#if CYTHON_USE_TYPE_SPECS
27503static PyType_Slot __pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC_slots[] = {
27504 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct__setConstantBC},
27505 {Py_tp_traverse, (void *)__pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct__setConstantBC},
27506 {Py_tp_clear, (void *)__pyx_tp_clear_18BoundaryConditions___pyx_scope_struct__setConstantBC},
27507 {Py_tp_new, (void *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC},
27508 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27509 #if CYTHON_VECTORCALL_TPNEW
27510 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC},
27511 #endif
27512 #endif
27513 {0, 0},
27514};
27515static PyType_Spec __pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC_spec = {
27516 "BoundaryConditions.__pyx_scope_struct__setConstantBC",
27517 sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC),
27518 0,
27519 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27520 __pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC_slots,
27521};
27522#else
27523
27524static PyTypeObject __pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC = {
27525 PyVarObject_HEAD_INIT(0, 0)
27526 "BoundaryConditions.""__pyx_scope_struct__setConstantBC", /*tp_name*/
27527 sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC), /*tp_basicsize*/
27528 0, /*tp_itemsize*/
27529 __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct__setConstantBC, /*tp_dealloc*/
27530 0, /*tp_vectorcall_offset*/
27531 0, /*tp_getattr*/
27532 0, /*tp_setattr*/
27533 0, /*tp_as_async*/
27534 0, /*tp_repr*/
27535 0, /*tp_as_number*/
27536 0, /*tp_as_sequence*/
27537 0, /*tp_as_mapping*/
27538 0, /*tp_hash*/
27539 0, /*tp_call*/
27540 0, /*tp_str*/
27541 0, /*tp_getattro*/
27542 0, /*tp_setattro*/
27543 0, /*tp_as_buffer*/
27544 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
27545 0, /*tp_doc*/
27546 __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct__setConstantBC, /*tp_traverse*/
27547 __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct__setConstantBC, /*tp_clear*/
27548 0, /*tp_richcompare*/
27549 0, /*tp_weaklistoffset*/
27550 0, /*tp_iter*/
27551 0, /*tp_iternext*/
27552 0, /*tp_methods*/
27553 0, /*tp_members*/
27554 0, /*tp_getset*/
27555 0, /*tp_base*/
27556 0, /*tp_dict*/
27557 0, /*tp_descr_get*/
27558 0, /*tp_descr_set*/
27559 #if !CYTHON_USE_TYPE_SPECS
27560 0, /*tp_dictoffset*/
27561 #endif
27562 0, /*tp_init*/
27563 0, /*tp_alloc*/
27564 __pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC, /*tp_new*/
27565 0, /*tp_free*/
27566 0, /*tp_is_gc*/
27567 0, /*tp_bases*/
27568 0, /*tp_mro*/
27569 0, /*tp_cache*/
27570 0, /*tp_subclasses*/
27571 0, /*tp_weaklist*/
27572 0, /*tp_del*/
27573 0, /*tp_version_tag*/
27574 #if CYTHON_USE_TP_FINALIZE
27575 0, /*tp_finalize*/
27576 #else
27577 NULL, /*tp_finalize*/
27578 #endif
27579 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27580 #if CYTHON_VECTORCALL_TPNEW
27581 __pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC, /*tp_vectorcall*/
27582 #else
27583 NULL, /*tp_vectorcall*/
27584 #endif
27585 #endif
27586 #if __PYX_NEED_TP_PRINT_SLOT == 1
27587 0, /*tp_print*/
27588 #endif
27589 #if PY_VERSION_HEX >= 0x030C0000
27590 0, /*tp_watched*/
27591 #endif
27592 #if PY_VERSION_HEX >= 0x030d00A4
27593 0, /*tp_versions_used*/
27594 #endif
27595 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
27596 0, /*tp_pypy_flags*/
27597 #endif
27598};
27599#endif
27600
27601static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o,
27602#if CYTHON_VECTORCALL_TPNEW
27603 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
27604#else
27605 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
27606#endif
27607) {
27608 return o;
27609}
27610
27611static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t,
27612#if CYTHON_VECTORCALL_TPNEW
27613 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
27614#else
27615 PyObject *a, PyObject *k
27616#endif
27617) {
27618 PyObject *o;
27619 #if CYTHON_USE_FREELISTS
27620 if (likely((int)(__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_1_setLinearBC > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC))))
27621 {
27622 o = (PyObject*)__pyx_mstate_global->__pyx_freelist_18BoundaryConditions___pyx_scope_struct_1_setLinearBC[--__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_1_setLinearBC];
27623 #if CYTHON_USE_TYPE_SPECS
27624 Py_DECREF(Py_TYPE(o));
27625 #endif
27626 memset(o, 0, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC));
27627 #if CYTHON_COMPILING_IN_LIMITED_API
27628 (void) PyObject_Init(o, t);
27629 #else
27630 (void) PyObject_INIT(o, t);
27631 #endif
27632 PyObject_GC_Track(o);
27633 } else
27634 #endif
27635 {
27636 o = __Pyx_AllocateExtensionType(t, 1);
27637 }
27638 if (unlikely(!o)) return 0;
27639 return __pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(o,
27640#if CYTHON_VECTORCALL_TPNEW
27641 args, nargs, kwnames
27642#else
27643 a, k
27644#endif
27645);
27646}
27647
27648#if CYTHON_VECTORCALL_TPNEW
27649static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t, PyObject *a, PyObject *k) {
27650 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, t, a, k);
27651}
27652#endif
27653
27654#if CYTHON_VECTORCALL_TPNEW
27655static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
27656 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
27657 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
27658 }
27659 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
27660 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC((PyTypeObject*)t, args, nargs, kwnames);
27661 return o;
27662}
27663#endif
27664
27665static void __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o) {
27666 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)o;
27667 #if CYTHON_USE_TP_FINALIZE
27668 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
27669 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_1_setLinearBC) {
27670 if (PyObject_CallFinalizerFromDealloc(o)) return;
27671 }
27672 }
27673 #endif
27674 PyObject_GC_UnTrack(o);
27675 Py_CLEAR(p->__pyx_v_a);
27676 Py_CLEAR(p->__pyx_v_a0);
27677 #if CYTHON_USE_FREELISTS
27678 if (likely((int)(__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_1_setLinearBC < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC))))
27679 {
27680 __pyx_mstate_global->__pyx_freelist_18BoundaryConditions___pyx_scope_struct_1_setLinearBC[__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_1_setLinearBC++] = ((struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)o);
27681 } else
27682 #endif
27683 {
27684 PyTypeObject *tp = Py_TYPE(o);
27685 #if CYTHON_USE_TYPE_SLOTS
27686 (*tp->tp_free)(o);
27687 #else
27688 {
27689 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27690 if (tp_free) tp_free(o);
27691 }
27692 #endif
27693 #if CYTHON_USE_TYPE_SPECS
27694 Py_DECREF(tp);
27695 #endif
27696 }
27697}
27698
27699static int __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o, visitproc v, void *a) {
27700 int e;
27701 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)o;
27702 {
27703 e = __Pyx_call_type_traverse(o, 1, v, a);
27704 if (e) return e;
27705 }
27706 if (p->__pyx_v_a) {
27707 e = (*v)(p->__pyx_v_a, a); if (e) return e;
27708 }
27709 if (p->__pyx_v_a0) {
27710 e = (*v)(p->__pyx_v_a0, a); if (e) return e;
27711 }
27712 return 0;
27713}
27714
27715static int __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o) {
27716 PyObject* tmp;
27717 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)o;
27718 tmp = ((PyObject*)p->__pyx_v_a);
27719 p->__pyx_v_a = Py_None; Py_INCREF(Py_None);
27720 Py_XDECREF(tmp);
27721 tmp = ((PyObject*)p->__pyx_v_a0);
27722 p->__pyx_v_a0 = Py_None; Py_INCREF(Py_None);
27723 Py_XDECREF(tmp);
27724 return 0;
27725}
27726#if CYTHON_USE_TYPE_SPECS
27727static PyType_Slot __pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC_slots[] = {
27728 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_1_setLinearBC},
27729 {Py_tp_traverse, (void *)__pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_1_setLinearBC},
27730 {Py_tp_clear, (void *)__pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_1_setLinearBC},
27731 {Py_tp_new, (void *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC},
27732 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27733 #if CYTHON_VECTORCALL_TPNEW
27734 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC},
27735 #endif
27736 #endif
27737 {0, 0},
27738};
27739static PyType_Spec __pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC_spec = {
27740 "BoundaryConditions.__pyx_scope_struct_1_setLinearBC",
27741 sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC),
27742 0,
27743 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27744 __pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC_slots,
27745};
27746#else
27747
27748static PyTypeObject __pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC = {
27749 PyVarObject_HEAD_INIT(0, 0)
27750 "BoundaryConditions.""__pyx_scope_struct_1_setLinearBC", /*tp_name*/
27751 sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC), /*tp_basicsize*/
27752 0, /*tp_itemsize*/
27753 __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, /*tp_dealloc*/
27754 0, /*tp_vectorcall_offset*/
27755 0, /*tp_getattr*/
27756 0, /*tp_setattr*/
27757 0, /*tp_as_async*/
27758 0, /*tp_repr*/
27759 0, /*tp_as_number*/
27760 0, /*tp_as_sequence*/
27761 0, /*tp_as_mapping*/
27762 0, /*tp_hash*/
27763 0, /*tp_call*/
27764 0, /*tp_str*/
27765 0, /*tp_getattro*/
27766 0, /*tp_setattro*/
27767 0, /*tp_as_buffer*/
27768 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
27769 0, /*tp_doc*/
27770 __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, /*tp_traverse*/
27771 __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, /*tp_clear*/
27772 0, /*tp_richcompare*/
27773 0, /*tp_weaklistoffset*/
27774 0, /*tp_iter*/
27775 0, /*tp_iternext*/
27776 0, /*tp_methods*/
27777 0, /*tp_members*/
27778 0, /*tp_getset*/
27779 0, /*tp_base*/
27780 0, /*tp_dict*/
27781 0, /*tp_descr_get*/
27782 0, /*tp_descr_set*/
27783 #if !CYTHON_USE_TYPE_SPECS
27784 0, /*tp_dictoffset*/
27785 #endif
27786 0, /*tp_init*/
27787 0, /*tp_alloc*/
27788 __pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, /*tp_new*/
27789 0, /*tp_free*/
27790 0, /*tp_is_gc*/
27791 0, /*tp_bases*/
27792 0, /*tp_mro*/
27793 0, /*tp_cache*/
27794 0, /*tp_subclasses*/
27795 0, /*tp_weaklist*/
27796 0, /*tp_del*/
27797 0, /*tp_version_tag*/
27798 #if CYTHON_USE_TP_FINALIZE
27799 0, /*tp_finalize*/
27800 #else
27801 NULL, /*tp_finalize*/
27802 #endif
27803 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27804 #if CYTHON_VECTORCALL_TPNEW
27805 __pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, /*tp_vectorcall*/
27806 #else
27807 NULL, /*tp_vectorcall*/
27808 #endif
27809 #endif
27810 #if __PYX_NEED_TP_PRINT_SLOT == 1
27811 0, /*tp_print*/
27812 #endif
27813 #if PY_VERSION_HEX >= 0x030C0000
27814 0, /*tp_watched*/
27815 #endif
27816 #if PY_VERSION_HEX >= 0x030d00A4
27817 0, /*tp_versions_used*/
27818 #endif
27819 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
27820 0, /*tp_pypy_flags*/
27821 #endif
27822};
27823#endif
27824
27825static PyObject *__pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o,
27826#if CYTHON_VECTORCALL_TPNEW
27827 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
27828#else
27829 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
27830#endif
27831) {
27832 return o;
27833}
27834
27835static PyObject *__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t,
27836#if CYTHON_VECTORCALL_TPNEW
27837 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
27838#else
27839 PyObject *a, PyObject *k
27840#endif
27841) {
27842 PyObject *o;
27843 #if CYTHON_USE_FREELISTS
27844 if (likely((int)(__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp))))
27845 {
27846 o = (PyObject*)__pyx_mstate_global->__pyx_freelist_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp[--__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp];
27847 #if CYTHON_USE_TYPE_SPECS
27848 Py_DECREF(Py_TYPE(o));
27849 #endif
27850 memset(o, 0, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp));
27851 #if CYTHON_COMPILING_IN_LIMITED_API
27852 (void) PyObject_Init(o, t);
27853 #else
27854 (void) PyObject_INIT(o, t);
27855 #endif
27856 PyObject_GC_Track(o);
27857 } else
27858 #endif
27859 {
27860 o = __Pyx_AllocateExtensionType(t, 1);
27861 }
27862 if (unlikely(!o)) return 0;
27863 return __pyx_tp_new__initialisation_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(o,
27864#if CYTHON_VECTORCALL_TPNEW
27865 args, nargs, kwnames
27866#else
27867 a, k
27868#endif
27869);
27870}
27871
27872#if CYTHON_VECTORCALL_TPNEW
27873static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t, PyObject *a, PyObject *k) {
27874 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, t, a, k);
27875}
27876#endif
27877
27878#if CYTHON_VECTORCALL_TPNEW
27879static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
27880 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
27881 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
27882 }
27883 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
27884 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp((PyTypeObject*)t, args, nargs, kwnames);
27885 return o;
27886}
27887#endif
27888
27889static void __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o) {
27890 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)o;
27891 #if CYTHON_USE_TP_FINALIZE
27892 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
27893 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp) {
27894 if (PyObject_CallFinalizerFromDealloc(o)) return;
27895 }
27896 }
27897 #endif
27898 PyObject_GC_UnTrack(o);
27899 Py_CLEAR(p->__pyx_v_t1);
27900 Py_CLEAR(p->__pyx_v_value);
27901 #if CYTHON_USE_FREELISTS
27902 if (likely((int)(__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp))))
27903 {
27904 __pyx_mstate_global->__pyx_freelist_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp[__pyx_mstate_global->__pyx_freecount_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp++] = ((struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)o);
27905 } else
27906 #endif
27907 {
27908 PyTypeObject *tp = Py_TYPE(o);
27909 #if CYTHON_USE_TYPE_SLOTS
27910 (*tp->tp_free)(o);
27911 #else
27912 {
27913 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27914 if (tp_free) tp_free(o);
27915 }
27916 #endif
27917 #if CYTHON_USE_TYPE_SPECS
27918 Py_DECREF(tp);
27919 #endif
27920 }
27921}
27922
27923static int __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o, visitproc v, void *a) {
27924 int e;
27925 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)o;
27926 {
27927 e = __Pyx_call_type_traverse(o, 1, v, a);
27928 if (e) return e;
27929 }
27930 if (p->__pyx_v_t1) {
27931 e = (*v)(p->__pyx_v_t1, a); if (e) return e;
27932 }
27933 if (p->__pyx_v_value) {
27934 e = (*v)(p->__pyx_v_value, a); if (e) return e;
27935 }
27936 return 0;
27937}
27938
27939static int __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o) {
27940 PyObject* tmp;
27941 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *p = (struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)o;
27942 tmp = ((PyObject*)p->__pyx_v_t1);
27943 p->__pyx_v_t1 = Py_None; Py_INCREF(Py_None);
27944 Py_XDECREF(tmp);
27945 tmp = ((PyObject*)p->__pyx_v_value);
27946 p->__pyx_v_value = Py_None; Py_INCREF(Py_None);
27947 Py_XDECREF(tmp);
27948 return 0;
27949}
27950#if CYTHON_USE_TYPE_SPECS
27951static PyType_Slot __pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp_slots[] = {
27952 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp},
27953 {Py_tp_traverse, (void *)__pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp},
27954 {Py_tp_clear, (void *)__pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp},
27955 {Py_tp_new, (void *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp},
27956 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
27957 #if CYTHON_VECTORCALL_TPNEW
27958 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp},
27959 #endif
27960 #endif
27961 {0, 0},
27962};
27963static PyType_Spec __pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp_spec = {
27964 "BoundaryConditions.__pyx_scope_struct_2_setLinearRamp",
27965 sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp),
27966 0,
27967 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27968 __pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp_slots,
27969};
27970#else
27971
27972static PyTypeObject __pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp = {
27973 PyVarObject_HEAD_INIT(0, 0)
27974 "BoundaryConditions.""__pyx_scope_struct_2_setLinearRamp", /*tp_name*/
27975 sizeof(struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp), /*tp_basicsize*/
27976 0, /*tp_itemsize*/
27977 __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, /*tp_dealloc*/
27978 0, /*tp_vectorcall_offset*/
27979 0, /*tp_getattr*/
27980 0, /*tp_setattr*/
27981 0, /*tp_as_async*/
27982 0, /*tp_repr*/
27983 0, /*tp_as_number*/
27984 0, /*tp_as_sequence*/
27985 0, /*tp_as_mapping*/
27986 0, /*tp_hash*/
27987 0, /*tp_call*/
27988 0, /*tp_str*/
27989 0, /*tp_getattro*/
27990 0, /*tp_setattro*/
27991 0, /*tp_as_buffer*/
27992 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
27993 0, /*tp_doc*/
27994 __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, /*tp_traverse*/
27995 __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, /*tp_clear*/
27996 0, /*tp_richcompare*/
27997 0, /*tp_weaklistoffset*/
27998 0, /*tp_iter*/
27999 0, /*tp_iternext*/
28000 0, /*tp_methods*/
28001 0, /*tp_members*/
28002 0, /*tp_getset*/
28003 0, /*tp_base*/
28004 0, /*tp_dict*/
28005 0, /*tp_descr_get*/
28006 0, /*tp_descr_set*/
28007 #if !CYTHON_USE_TYPE_SPECS
28008 0, /*tp_dictoffset*/
28009 #endif
28010 0, /*tp_init*/
28011 0, /*tp_alloc*/
28012 __pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, /*tp_new*/
28013 0, /*tp_free*/
28014 0, /*tp_is_gc*/
28015 0, /*tp_bases*/
28016 0, /*tp_mro*/
28017 0, /*tp_cache*/
28018 0, /*tp_subclasses*/
28019 0, /*tp_weaklist*/
28020 0, /*tp_del*/
28021 0, /*tp_version_tag*/
28022 #if CYTHON_USE_TP_FINALIZE
28023 0, /*tp_finalize*/
28024 #else
28025 NULL, /*tp_finalize*/
28026 #endif
28027 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28028 #if CYTHON_VECTORCALL_TPNEW
28029 __pyx_tp_vectorcall_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, /*tp_vectorcall*/
28030 #else
28031 NULL, /*tp_vectorcall*/
28032 #endif
28033 #endif
28034 #if __PYX_NEED_TP_PRINT_SLOT == 1
28035 0, /*tp_print*/
28036 #endif
28037 #if PY_VERSION_HEX >= 0x030C0000
28038 0, /*tp_watched*/
28039 #endif
28040 #if PY_VERSION_HEX >= 0x030d00A4
28041 0, /*tp_versions_used*/
28042 #endif
28043 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28044 0, /*tp_pypy_flags*/
28045 #endif
28046};
28047#endif
28048static struct __pyx_vtabstruct_array __pyx_vtable_array;
28049
28050static PyObject *__pyx_tp_new__initialisation_array(PyObject *o,
28051#if CYTHON_VECTORCALL_TPNEW
28052 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
28053#else
28054 PyObject *a, PyObject *k
28055#endif
28056) {
28057 struct __pyx_array_obj *p = ((struct __pyx_array_obj *)o);
28058 p->__pyx_vtab = __pyx_vtabptr_array;
28059 p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
28060 p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
28061 {
28062 int cinit_result = __pyx_array___cinit__(o,
28063#if CYTHON_VECTORCALL_TPNEW
28064 args, nargs, kwnames
28065#else
28066 a, k
28067#endif
28068);
28069 if (unlikely(cinit_result)) goto bad;
28070 }
28071 return o;
28072 bad:
28073 Py_DECREF(o); o = 0;
28074 return NULL;
28075}
28076
28077static PyObject *__pyx_tp_new_vectorcall_array(PyTypeObject *t,
28078#if CYTHON_VECTORCALL_TPNEW
28079 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
28080#else
28081 PyObject *a, PyObject *k
28082#endif
28083) {
28084 PyObject *o;
28085 o = __Pyx_AllocateExtensionType(t, 0);
28086 if (unlikely(!o)) return 0;
28087 return __pyx_tp_new__initialisation_array(o,
28088#if CYTHON_VECTORCALL_TPNEW
28089 args, nargs, kwnames
28090#else
28091 a, k
28092#endif
28093);
28094}
28095
28096#if CYTHON_VECTORCALL_TPNEW
28097static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
28098 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_array, t, a, k);
28099}
28100#endif
28101
28102#if CYTHON_VECTORCALL_TPNEW
28103static PyObject *__pyx_tp_vectorcall_array(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
28104 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_array_type || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
28105 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
28106 }
28107 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28108 PyObject *o = __pyx_tp_new_vectorcall_array((PyTypeObject*)t, args, nargs, kwnames);
28109 return o;
28110}
28111#endif
28112
28113static void __pyx_tp_dealloc_array(PyObject *o) {
28114 struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
28115 #if CYTHON_USE_TP_FINALIZE
28116 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
28117 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
28118 if (PyObject_CallFinalizerFromDealloc(o)) return;
28119 }
28120 }
28121 #endif
28122 {
28123 PyObject *etype, *eval, *etb;
28124 __Pyx_PyErr_FetchException(&etype, &eval, &etb);
28125 __Pyx_DeallocKeepAliveBegin(o);
28126 __pyx_array___dealloc__(o);
28127 __Pyx_DeallocKeepAliveEnd(o);
28128 __Pyx_PyErr_RestoreException(etype, eval, etb);
28129 }
28130 Py_CLEAR(p->mode);
28131 Py_CLEAR(p->_format);
28132 PyTypeObject *tp = Py_TYPE(o);
28133 #if CYTHON_USE_TYPE_SLOTS
28134 (*tp->tp_free)(o);
28135 #else
28136 {
28137 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
28138 if (tp_free) tp_free(o);
28139 }
28140 #endif
28141 #if CYTHON_USE_TYPE_SPECS
28142 Py_DECREF(tp);
28143 #endif
28144}
28145
28146static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
28147 PyObject *r;
28148 PyObject *x = PyLong_FromSsize_t(i); if (unlikely(!x)) return NULL;
28149 #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
28150 binaryfunc f = Py_TYPE(o)->tp_as_mapping->mp_subscript;
28151 #else
28152 binaryfunc f = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript));
28153 #endif
28154 r = f(o, x);
28155 Py_DECREF(x);
28156 return r;
28157}
28158
28159static PyObject *__pyx_mp_subscript_array(PyObject *o, PyObject *i) {
28160 return __pyx_array___getitem__(o, i);
28161}
28162
28163static int __pyx_sq_ass_item_array(PyObject *o, Py_ssize_t i, PyObject *v) {
28164 if (likely(v)) {
28165 PyObject *x = PyLong_FromSsize_t(i); if (unlikely(!x)) return -1;
28166 int r = __pyx_array___setitem__(o, x, v);
28167 Py_DECREF(x);
28168 return r;
28169 } else {
28170 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError, "Subscript %.10s not supported by " __Pyx_FMT_TYPENAME, "deletion", o);
28171 return -1;
28172 }
28173}
28174
28175static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
28176 if (likely(v)) {
28177 return __pyx_array___setitem__(o, i, v);
28178 } else {
28179 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError, "Subscript %.10s not supported by " __Pyx_FMT_TYPENAME, "deletion", o);
28180 return -1;
28181 }
28182}
28183
28184static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
28185 PyObject *v = PyObject_GenericGetAttr(o, n);
28186 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
28187 PyErr_Clear();
28188 v = __pyx_array___getattr__(o, n);
28189 }
28190 return v;
28191}
28192
28193static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
28194 return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
28195}
28196
28197static PyMethodDef __pyx_methods_array[] = {
28198 {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
28199 {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28200 {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28201 {0, 0, 0, 0}
28202};
28203
28204static struct PyGetSetDef __pyx_getsets_array[] = {
28205 {"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0},
28206 {0, 0, 0, 0, 0}
28207};
28208#if CYTHON_USE_TYPE_SPECS
28209#if !CYTHON_COMPILING_IN_LIMITED_API
28210
28211static PyBufferProcs __pyx_tp_as_buffer_array = {
28212 __pyx_array_getbuffer, /*bf_getbuffer*/
28213 0, /*bf_releasebuffer*/
28214};
28215#endif
28216static PyType_Slot __pyx_type___pyx_array_slots[] = {
28217 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
28218 {Py_sq_length, (void *)__pyx_array___len__},
28219 {Py_sq_item, (void *)__pyx_sq_item_array},
28220 {Py_sq_ass_item, (void *)__pyx_sq_ass_item_array},
28221 {Py_mp_length, (void *)__pyx_array___len__},
28222 {Py_mp_subscript, (void *)__pyx_mp_subscript_array},
28223 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
28224 {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
28225 #if defined(Py_bf_getbuffer)
28226 {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
28227 #endif
28228 {Py_tp_methods, (void *)__pyx_methods_array},
28229 {Py_tp_getset, (void *)__pyx_getsets_array},
28230 {Py_tp_new, (void *)__pyx_tp_new_array},
28231 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28232 #if CYTHON_VECTORCALL_TPNEW
28233 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_array},
28234 #endif
28235 #endif
28236 {0, 0},
28237};
28238static PyType_Spec __pyx_type___pyx_array_spec = {
28239 "BoundaryConditions.array",
28240 sizeof(struct __pyx_array_obj),
28241 0,
28242 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
28243 __pyx_type___pyx_array_slots,
28244};
28245#else
28246
28247static PySequenceMethods __pyx_tp_as_sequence_array = {
28248 __pyx_array___len__, /*sq_length*/
28249 0, /*sq_concat*/
28250 0, /*sq_repeat*/
28251 __pyx_sq_item_array, /*sq_item*/
28252 0, /*sq_slice*/
28253 __pyx_sq_ass_item_array, /*sq_ass_item*/
28254 0, /*sq_ass_slice*/
28255 0, /*sq_contains*/
28256 0, /*sq_inplace_concat*/
28257 0, /*sq_inplace_repeat*/
28258};
28259
28260static PyMappingMethods __pyx_tp_as_mapping_array = {
28261 __pyx_array___len__, /*mp_length*/
28262 __pyx_mp_subscript_array, /*mp_subscript*/
28263 __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
28264};
28265
28266static PyBufferProcs __pyx_tp_as_buffer_array = {
28267 __pyx_array_getbuffer, /*bf_getbuffer*/
28268 0, /*bf_releasebuffer*/
28269};
28270
28271static PyTypeObject __pyx_type___pyx_array = {
28272 PyVarObject_HEAD_INIT(0, 0)
28273 "BoundaryConditions.""array", /*tp_name*/
28274 sizeof(struct __pyx_array_obj), /*tp_basicsize*/
28275 0, /*tp_itemsize*/
28276 __pyx_tp_dealloc_array, /*tp_dealloc*/
28277 0, /*tp_vectorcall_offset*/
28278 0, /*tp_getattr*/
28279 0, /*tp_setattr*/
28280 0, /*tp_as_async*/
28281 0, /*tp_repr*/
28282 0, /*tp_as_number*/
28283 &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
28284 &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
28285 0, /*tp_hash*/
28286 0, /*tp_call*/
28287 0, /*tp_str*/
28288 __pyx_tp_getattro_array, /*tp_getattro*/
28289 0, /*tp_setattro*/
28290 &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
28291 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
28292 0, /*tp_doc*/
28293 0, /*tp_traverse*/
28294 0, /*tp_clear*/
28295 0, /*tp_richcompare*/
28296 0, /*tp_weaklistoffset*/
28297 0, /*tp_iter*/
28298 0, /*tp_iternext*/
28299 __pyx_methods_array, /*tp_methods*/
28300 0, /*tp_members*/
28301 __pyx_getsets_array, /*tp_getset*/
28302 0, /*tp_base*/
28303 0, /*tp_dict*/
28304 0, /*tp_descr_get*/
28305 0, /*tp_descr_set*/
28306 #if !CYTHON_USE_TYPE_SPECS
28307 0, /*tp_dictoffset*/
28308 #endif
28309 0, /*tp_init*/
28310 0, /*tp_alloc*/
28311 __pyx_tp_new_array, /*tp_new*/
28312 0, /*tp_free*/
28313 0, /*tp_is_gc*/
28314 0, /*tp_bases*/
28315 0, /*tp_mro*/
28316 0, /*tp_cache*/
28317 0, /*tp_subclasses*/
28318 0, /*tp_weaklist*/
28319 0, /*tp_del*/
28320 0, /*tp_version_tag*/
28321 #if CYTHON_USE_TP_FINALIZE
28322 0, /*tp_finalize*/
28323 #else
28324 NULL, /*tp_finalize*/
28325 #endif
28326 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28327 #if CYTHON_VECTORCALL_TPNEW
28328 __pyx_tp_vectorcall_array, /*tp_vectorcall*/
28329 #else
28330 NULL, /*tp_vectorcall*/
28331 #endif
28332 #endif
28333 #if __PYX_NEED_TP_PRINT_SLOT == 1
28334 0, /*tp_print*/
28335 #endif
28336 #if PY_VERSION_HEX >= 0x030C0000
28337 0, /*tp_watched*/
28338 #endif
28339 #if PY_VERSION_HEX >= 0x030d00A4
28340 0, /*tp_versions_used*/
28341 #endif
28342 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28343 0, /*tp_pypy_flags*/
28344 #endif
28345};
28346#endif
28347
28348static PyObject *__pyx_tp_new__initialisation_Enum(PyObject *o,
28349#if CYTHON_VECTORCALL_TPNEW
28350 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
28351#else
28352 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
28353#endif
28354) {
28355 struct __pyx_MemviewEnum_obj *p = ((struct __pyx_MemviewEnum_obj *)o);
28356 p->name = Py_None; Py_INCREF(Py_None);
28357 return o;
28358}
28359
28360static PyObject *__pyx_tp_new_vectorcall_Enum(PyTypeObject *t,
28361#if CYTHON_VECTORCALL_TPNEW
28362 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
28363#else
28364 PyObject *a, PyObject *k
28365#endif
28366) {
28367 PyObject *o;
28368 o = __Pyx_AllocateExtensionType(t, 0);
28369 if (unlikely(!o)) return 0;
28370 return __pyx_tp_new__initialisation_Enum(o,
28371#if CYTHON_VECTORCALL_TPNEW
28372 args, nargs, kwnames
28373#else
28374 a, k
28375#endif
28376);
28377}
28378
28379#if CYTHON_VECTORCALL_TPNEW
28380static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k) {
28381 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_Enum, t, a, k);
28382}
28383#endif
28384
28385#if CYTHON_VECTORCALL_TPNEW
28386static PyObject *__pyx_tp_vectorcall_Enum(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
28387 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_MemviewEnum_type || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
28388 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
28389 }
28390 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28391 PyObject *o = __pyx_tp_new_vectorcall_Enum((PyTypeObject*)t, args, nargs, kwnames);
28392 if (likely(o)) {
28393 assert(Py_TYPE(o) == (PyTypeObject*)t);
28394 if (unlikely(__pyx_MemviewEnum___init__(o, args, nargs, kwnames) < 0)) {
28395 Py_CLEAR(o);
28396 }
28397 }
28398 return o;
28399}
28400#endif
28401
28402#if CYTHON_VECTORCALL_TPNEW
28403static int __pyx_tp_init_Enum(PyObject *o, PyObject *args, PyObject *kwds) {
28404 return __Pyx_CallTpinitAsVectorcall(__pyx_MemviewEnum___init__, o, args, kwds);
28405}
28406#endif
28407
28408static void __pyx_tp_dealloc_Enum(PyObject *o) {
28409 struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
28410 #if CYTHON_USE_TP_FINALIZE
28411 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
28412 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
28413 if (PyObject_CallFinalizerFromDealloc(o)) return;
28414 }
28415 }
28416 #endif
28417 PyObject_GC_UnTrack(o);
28418 Py_CLEAR(p->name);
28419 PyTypeObject *tp = Py_TYPE(o);
28420 #if CYTHON_USE_TYPE_SLOTS
28421 (*tp->tp_free)(o);
28422 #else
28423 {
28424 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
28425 if (tp_free) tp_free(o);
28426 }
28427 #endif
28428 #if CYTHON_USE_TYPE_SPECS
28429 Py_DECREF(tp);
28430 #endif
28431}
28432
28433static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
28434 int e;
28435 struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
28436 {
28437 e = __Pyx_call_type_traverse(o, 1, v, a);
28438 if (e) return e;
28439 }
28440 if (p->name) {
28441 e = (*v)(p->name, a); if (e) return e;
28442 }
28443 return 0;
28444}
28445
28446static int __pyx_tp_clear_Enum(PyObject *o) {
28447 PyObject* tmp;
28448 struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
28449 tmp = ((PyObject*)p->name);
28450 p->name = Py_None; Py_INCREF(Py_None);
28451 Py_XDECREF(tmp);
28452 return 0;
28453}
28454
28455static PyMethodDef __pyx_methods_Enum[] = {
28456 {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28457 {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28458 {0, 0, 0, 0}
28459};
28460#if CYTHON_USE_TYPE_SPECS
28461static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
28462 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
28463 {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
28464 {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
28465 {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
28466 {Py_tp_methods, (void *)__pyx_methods_Enum},
28467 {Py_tp_init, (void *)__pyx_tp_init_Enum},
28468 {Py_tp_new, (void *)__pyx_tp_new_Enum},
28469 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28470 #if CYTHON_VECTORCALL_TPNEW
28471 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_Enum},
28472 #endif
28473 #endif
28474 {0, 0},
28475};
28476static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
28477 "BoundaryConditions.Enum",
28478 sizeof(struct __pyx_MemviewEnum_obj),
28479 0,
28480 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
28481 __pyx_type___pyx_MemviewEnum_slots,
28482};
28483#else
28484
28485static PyTypeObject __pyx_type___pyx_MemviewEnum = {
28486 PyVarObject_HEAD_INIT(0, 0)
28487 "BoundaryConditions.""Enum", /*tp_name*/
28488 sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
28489 0, /*tp_itemsize*/
28490 __pyx_tp_dealloc_Enum, /*tp_dealloc*/
28491 0, /*tp_vectorcall_offset*/
28492 0, /*tp_getattr*/
28493 0, /*tp_setattr*/
28494 0, /*tp_as_async*/
28495 __pyx_MemviewEnum___repr__, /*tp_repr*/
28496 0, /*tp_as_number*/
28497 0, /*tp_as_sequence*/
28498 0, /*tp_as_mapping*/
28499 0, /*tp_hash*/
28500 0, /*tp_call*/
28501 0, /*tp_str*/
28502 0, /*tp_getattro*/
28503 0, /*tp_setattro*/
28504 0, /*tp_as_buffer*/
28505 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
28506 0, /*tp_doc*/
28507 __pyx_tp_traverse_Enum, /*tp_traverse*/
28508 __pyx_tp_clear_Enum, /*tp_clear*/
28509 0, /*tp_richcompare*/
28510 0, /*tp_weaklistoffset*/
28511 0, /*tp_iter*/
28512 0, /*tp_iternext*/
28513 __pyx_methods_Enum, /*tp_methods*/
28514 0, /*tp_members*/
28515 0, /*tp_getset*/
28516 0, /*tp_base*/
28517 0, /*tp_dict*/
28518 0, /*tp_descr_get*/
28519 0, /*tp_descr_set*/
28520 #if !CYTHON_USE_TYPE_SPECS
28521 0, /*tp_dictoffset*/
28522 #endif
28523 __pyx_tp_init_Enum, /*tp_init*/
28524 0, /*tp_alloc*/
28525 __pyx_tp_new_Enum, /*tp_new*/
28526 0, /*tp_free*/
28527 0, /*tp_is_gc*/
28528 0, /*tp_bases*/
28529 0, /*tp_mro*/
28530 0, /*tp_cache*/
28531 0, /*tp_subclasses*/
28532 0, /*tp_weaklist*/
28533 0, /*tp_del*/
28534 0, /*tp_version_tag*/
28535 #if CYTHON_USE_TP_FINALIZE
28536 0, /*tp_finalize*/
28537 #else
28538 NULL, /*tp_finalize*/
28539 #endif
28540 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28541 #if CYTHON_VECTORCALL_TPNEW
28542 __pyx_tp_vectorcall_Enum, /*tp_vectorcall*/
28543 #else
28544 NULL, /*tp_vectorcall*/
28545 #endif
28546 #endif
28547 #if __PYX_NEED_TP_PRINT_SLOT == 1
28548 0, /*tp_print*/
28549 #endif
28550 #if PY_VERSION_HEX >= 0x030C0000
28551 0, /*tp_watched*/
28552 #endif
28553 #if PY_VERSION_HEX >= 0x030d00A4
28554 0, /*tp_versions_used*/
28555 #endif
28556 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28557 0, /*tp_pypy_flags*/
28558 #endif
28559};
28560#endif
28561static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
28562
28563static PyObject *__pyx_tp_new__initialisation_memoryview(PyObject *o,
28564#if CYTHON_VECTORCALL_TPNEW
28565 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
28566#else
28567 PyObject *a, PyObject *k
28568#endif
28569) {
28570 struct __pyx_memoryview_obj *p = ((struct __pyx_memoryview_obj *)o);
28571 p->__pyx_vtab = __pyx_vtabptr_memoryview;
28572 p->obj = Py_None; Py_INCREF(Py_None);
28573 p->_size = Py_None; Py_INCREF(Py_None);
28574 p->view.obj = NULL;
28575 {
28576 int cinit_result = __pyx_memoryview___cinit__(o,
28577#if CYTHON_VECTORCALL_TPNEW
28578 args, nargs, kwnames
28579#else
28580 a, k
28581#endif
28582);
28583 if (unlikely(cinit_result)) goto bad;
28584 }
28585 return o;
28586 bad:
28587 Py_DECREF(o); o = 0;
28588 return NULL;
28589}
28590
28591static PyObject *__pyx_tp_new_vectorcall_memoryview(PyTypeObject *t,
28592#if CYTHON_VECTORCALL_TPNEW
28593 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
28594#else
28595 PyObject *a, PyObject *k
28596#endif
28597) {
28598 PyObject *o;
28599 o = __Pyx_AllocateExtensionType(t, 0);
28600 if (unlikely(!o)) return 0;
28601 return __pyx_tp_new__initialisation_memoryview(o,
28602#if CYTHON_VECTORCALL_TPNEW
28603 args, nargs, kwnames
28604#else
28605 a, k
28606#endif
28607);
28608}
28609
28610#if CYTHON_VECTORCALL_TPNEW
28611static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
28612 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_memoryview, t, a, k);
28613}
28614#endif
28615
28616#if CYTHON_VECTORCALL_TPNEW
28617static PyObject *__pyx_tp_vectorcall_memoryview(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
28618 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_memoryview_type || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
28619 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
28620 }
28621 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28622 PyObject *o = __pyx_tp_new_vectorcall_memoryview((PyTypeObject*)t, args, nargs, kwnames);
28623 return o;
28624}
28625#endif
28626
28627static void __pyx_tp_dealloc_memoryview(PyObject *o) {
28628 struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
28629 #if CYTHON_USE_TP_FINALIZE
28630 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
28631 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
28632 if (PyObject_CallFinalizerFromDealloc(o)) return;
28633 }
28634 }
28635 #endif
28636 PyObject_GC_UnTrack(o);
28637 {
28638 PyObject *etype, *eval, *etb;
28639 __Pyx_PyErr_FetchException(&etype, &eval, &etb);
28640 __Pyx_DeallocKeepAliveBegin(o);
28641 __pyx_memoryview___dealloc__(o);
28642 __Pyx_DeallocKeepAliveEnd(o);
28643 __Pyx_PyErr_RestoreException(etype, eval, etb);
28644 }
28645 Py_CLEAR(p->obj);
28646 Py_CLEAR(p->_size);
28647 PyTypeObject *tp = Py_TYPE(o);
28648 #if CYTHON_USE_TYPE_SLOTS
28649 (*tp->tp_free)(o);
28650 #else
28651 {
28652 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
28653 if (tp_free) tp_free(o);
28654 }
28655 #endif
28656 #if CYTHON_USE_TYPE_SPECS
28657 Py_DECREF(tp);
28658 #endif
28659}
28660
28661static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
28662 int e;
28663 struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
28664 {
28665 e = __Pyx_call_type_traverse(o, 1, v, a);
28666 if (e) return e;
28667 }
28668 if (p->obj) {
28669 e = (*v)(p->obj, a); if (e) return e;
28670 }
28671 if (p->_size) {
28672 e = (*v)(p->_size, a); if (e) return e;
28673 }
28674 if (p->view.obj) {
28675 e = (*v)(p->view.obj, a); if (e) return e;
28676 }
28677 return 0;
28678}
28679
28680static int __pyx_tp_clear_memoryview(PyObject *o) {
28681 PyObject* tmp;
28682 struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
28683 tmp = ((PyObject*)p->obj);
28684 p->obj = Py_None; Py_INCREF(Py_None);
28685 Py_XDECREF(tmp);
28686 tmp = ((PyObject*)p->_size);
28687 p->_size = Py_None; Py_INCREF(Py_None);
28688 Py_XDECREF(tmp);
28689 Py_CLEAR(p->view.obj);
28690 return 0;
28691}
28692
28693static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
28694 PyObject *r;
28695 PyObject *x = PyLong_FromSsize_t(i); if (unlikely(!x)) return NULL;
28696 #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
28697 binaryfunc f = Py_TYPE(o)->tp_as_mapping->mp_subscript;
28698 #else
28699 binaryfunc f = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript));
28700 #endif
28701 r = f(o, x);
28702 Py_DECREF(x);
28703 return r;
28704}
28705
28706static PyObject *__pyx_mp_subscript_memoryview(PyObject *o, PyObject *i) {
28707 return __pyx_memoryview___getitem__(o, i);
28708}
28709
28710static int __pyx_sq_ass_item_memoryview(PyObject *o, Py_ssize_t i, PyObject *v) {
28711 if (likely(v)) {
28712 PyObject *x = PyLong_FromSsize_t(i); if (unlikely(!x)) return -1;
28713 int r = __pyx_memoryview___setitem__(o, x, v);
28714 Py_DECREF(x);
28715 return r;
28716 } else {
28717 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError, "Subscript %.10s not supported by " __Pyx_FMT_TYPENAME, "deletion", o);
28718 return -1;
28719 }
28720}
28721
28722static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
28723 if (likely(v)) {
28724 return __pyx_memoryview___setitem__(o, i, v);
28725 } else {
28726 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError, "Subscript %.10s not supported by " __Pyx_FMT_TYPENAME, "deletion", o);
28727 return -1;
28728 }
28729}
28730
28731static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
28732 return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
28733}
28734
28735static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
28736 return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
28737}
28738
28739static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
28740 return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
28741}
28742
28743static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
28744 return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
28745}
28746
28747static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
28748 return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
28749}
28750
28751static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
28752 return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
28753}
28754
28755static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
28756 return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
28757}
28758
28759static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
28760 return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
28761}
28762
28763static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
28764 return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
28765}
28766
28767static PyMethodDef __pyx_methods_memoryview[] = {
28768 {"is_c_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28769 {"is_f_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28770 {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28771 {"copy_fortran", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28772 {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28773 {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28774 {0, 0, 0, 0}
28775};
28776
28777static struct PyGetSetDef __pyx_getsets_memoryview[] = {
28778 {"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0},
28779 {"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0},
28780 {"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0},
28781 {"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0},
28782 {"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0},
28783 {"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0},
28784 {"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0},
28785 {"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0},
28786 {"size", __pyx_getprop___pyx_memoryview_size, 0, 0, 0},
28787 {0, 0, 0, 0, 0}
28788};
28789#if CYTHON_USE_TYPE_SPECS
28790#if !CYTHON_COMPILING_IN_LIMITED_API
28791
28792static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
28793 __pyx_memoryview_getbuffer, /*bf_getbuffer*/
28794 0, /*bf_releasebuffer*/
28795};
28796#endif
28797static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
28798 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
28799 {Py_tp_repr, (void *)__pyx_memoryview___repr__},
28800 {Py_sq_length, (void *)__pyx_memoryview___len__},
28801 {Py_sq_item, (void *)__pyx_sq_item_memoryview},
28802 {Py_sq_ass_item, (void *)__pyx_sq_ass_item_memoryview},
28803 {Py_mp_length, (void *)__pyx_memoryview___len__},
28804 {Py_mp_subscript, (void *)__pyx_mp_subscript_memoryview},
28805 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
28806 {Py_tp_str, (void *)__pyx_memoryview___str__},
28807 #if defined(Py_bf_getbuffer)
28808 {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
28809 #endif
28810 {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
28811 {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
28812 {Py_tp_methods, (void *)__pyx_methods_memoryview},
28813 {Py_tp_getset, (void *)__pyx_getsets_memoryview},
28814 {Py_tp_new, (void *)__pyx_tp_new_memoryview},
28815 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28816 #if CYTHON_VECTORCALL_TPNEW
28817 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall_memoryview},
28818 #endif
28819 #endif
28820 {0, 0},
28821};
28822static PyType_Spec __pyx_type___pyx_memoryview_spec = {
28823 "BoundaryConditions.memoryview",
28824 sizeof(struct __pyx_memoryview_obj),
28825 0,
28826 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
28827 __pyx_type___pyx_memoryview_slots,
28828};
28829#else
28830
28831static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
28832 __pyx_memoryview___len__, /*sq_length*/
28833 0, /*sq_concat*/
28834 0, /*sq_repeat*/
28835 __pyx_sq_item_memoryview, /*sq_item*/
28836 0, /*sq_slice*/
28837 __pyx_sq_ass_item_memoryview, /*sq_ass_item*/
28838 0, /*sq_ass_slice*/
28839 0, /*sq_contains*/
28840 0, /*sq_inplace_concat*/
28841 0, /*sq_inplace_repeat*/
28842};
28843
28844static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
28845 __pyx_memoryview___len__, /*mp_length*/
28846 __pyx_mp_subscript_memoryview, /*mp_subscript*/
28847 __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
28848};
28849
28850static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
28851 __pyx_memoryview_getbuffer, /*bf_getbuffer*/
28852 0, /*bf_releasebuffer*/
28853};
28854
28855static PyTypeObject __pyx_type___pyx_memoryview = {
28856 PyVarObject_HEAD_INIT(0, 0)
28857 "BoundaryConditions.""memoryview", /*tp_name*/
28858 sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
28859 0, /*tp_itemsize*/
28860 __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
28861 0, /*tp_vectorcall_offset*/
28862 0, /*tp_getattr*/
28863 0, /*tp_setattr*/
28864 0, /*tp_as_async*/
28865 __pyx_memoryview___repr__, /*tp_repr*/
28866 0, /*tp_as_number*/
28867 &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
28868 &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
28869 0, /*tp_hash*/
28870 0, /*tp_call*/
28871 __pyx_memoryview___str__, /*tp_str*/
28872 0, /*tp_getattro*/
28873 0, /*tp_setattro*/
28874 &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
28875 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
28876 0, /*tp_doc*/
28877 __pyx_tp_traverse_memoryview, /*tp_traverse*/
28878 __pyx_tp_clear_memoryview, /*tp_clear*/
28879 0, /*tp_richcompare*/
28880 0, /*tp_weaklistoffset*/
28881 0, /*tp_iter*/
28882 0, /*tp_iternext*/
28883 __pyx_methods_memoryview, /*tp_methods*/
28884 0, /*tp_members*/
28885 __pyx_getsets_memoryview, /*tp_getset*/
28886 0, /*tp_base*/
28887 0, /*tp_dict*/
28888 0, /*tp_descr_get*/
28889 0, /*tp_descr_set*/
28890 #if !CYTHON_USE_TYPE_SPECS
28891 0, /*tp_dictoffset*/
28892 #endif
28893 0, /*tp_init*/
28894 0, /*tp_alloc*/
28895 __pyx_tp_new_memoryview, /*tp_new*/
28896 0, /*tp_free*/
28897 0, /*tp_is_gc*/
28898 0, /*tp_bases*/
28899 0, /*tp_mro*/
28900 0, /*tp_cache*/
28901 0, /*tp_subclasses*/
28902 0, /*tp_weaklist*/
28903 0, /*tp_del*/
28904 0, /*tp_version_tag*/
28905 #if CYTHON_USE_TP_FINALIZE
28906 0, /*tp_finalize*/
28907 #else
28908 NULL, /*tp_finalize*/
28909 #endif
28910 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
28911 #if CYTHON_VECTORCALL_TPNEW
28912 __pyx_tp_vectorcall_memoryview, /*tp_vectorcall*/
28913 #else
28914 NULL, /*tp_vectorcall*/
28915 #endif
28916 #endif
28917 #if __PYX_NEED_TP_PRINT_SLOT == 1
28918 0, /*tp_print*/
28919 #endif
28920 #if PY_VERSION_HEX >= 0x030C0000
28921 0, /*tp_watched*/
28922 #endif
28923 #if PY_VERSION_HEX >= 0x030d00A4
28924 0, /*tp_versions_used*/
28925 #endif
28926 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28927 0, /*tp_pypy_flags*/
28928 #endif
28929};
28930#endif
28931static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
28932
28933static PyObject *__pyx_tp_new__initialisation__memoryviewslice(PyObject *o,
28934#if CYTHON_VECTORCALL_TPNEW
28935 CYTHON_UNUSED PyObject *const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
28936#else
28937 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
28938#endif
28939) {
28940 struct __pyx_memoryviewslice_obj *p = ((struct __pyx_memoryviewslice_obj *)o);
28941 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
28942 __Pyx_default_placement_construct(&(p->from_slice));
28943 p->from_object = Py_None; Py_INCREF(Py_None);
28944 p->from_slice.memview = NULL;
28945 return o;
28946}
28947
28948static PyObject *__pyx_tp_new_vectorcall__memoryviewslice(PyTypeObject *t,
28949#if CYTHON_VECTORCALL_TPNEW
28950 PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames
28951#else
28952 PyObject *a, PyObject *k
28953#endif
28954) {
28955 PyObject *o;
28956 o = __pyx_tp_new_vectorcall_memoryview(t,
28957#if CYTHON_VECTORCALL_TPNEW
28958 args, nargs, kwnames
28959#else
28960 a, k
28961#endif
28962);
28963 if (unlikely(!o)) return 0;
28964 return __pyx_tp_new__initialisation__memoryviewslice(o,
28965#if CYTHON_VECTORCALL_TPNEW
28966 args, nargs, kwnames
28967#else
28968 a, k
28969#endif
28970);
28971}
28972
28973#if CYTHON_VECTORCALL_TPNEW
28974static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
28975 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall__memoryviewslice, t, a, k);
28976}
28977#endif
28978
28979#if CYTHON_VECTORCALL_TPNEW
28980static PyObject *__pyx_tp_vectorcall__memoryviewslice(PyObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
28981 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_memoryviewslice_type || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
28982 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
28983 }
28984 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28985 PyObject *o = __pyx_tp_new_vectorcall__memoryviewslice((PyTypeObject*)t, args, nargs, kwnames);
28986 return o;
28987}
28988#endif
28989
28990static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
28991 struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
28992 #if CYTHON_USE_TP_FINALIZE
28993 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
28994 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
28995 if (PyObject_CallFinalizerFromDealloc(o)) return;
28996 }
28997 }
28998 #endif
28999 PyObject_GC_UnTrack(o);
29000 {
29001 PyObject *etype, *eval, *etb;
29002 __Pyx_PyErr_FetchException(&etype, &eval, &etb);
29003 __Pyx_DeallocKeepAliveBegin(o);
29004 __pyx_memoryviewslice___dealloc__(o);
29005 __Pyx_DeallocKeepAliveEnd(o);
29006 __Pyx_PyErr_RestoreException(etype, eval, etb);
29007 }
29008 __Pyx_call_destructor(p->from_slice);
29009 Py_CLEAR(p->from_object);
29010 PyObject_GC_Track(o);
29011 __pyx_tp_dealloc_memoryview(o);
29012}
29013
29014static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
29015 int e;
29016 struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
29017 e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
29018 if (p->from_object) {
29019 e = (*v)(p->from_object, a); if (e) return e;
29020 }
29021 return 0;
29022}
29023
29024static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
29025 PyObject* tmp;
29026 struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
29027 __pyx_tp_clear_memoryview(o);
29028 tmp = ((PyObject*)p->from_object);
29029 p->from_object = Py_None; Py_INCREF(Py_None);
29030 Py_XDECREF(tmp);
29031 __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
29032 return 0;
29033}
29034
29035static PyMethodDef __pyx_methods__memoryviewslice[] = {
29036 {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
29037 {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
29038 {0, 0, 0, 0}
29039};
29040#if CYTHON_USE_TYPE_SPECS
29041static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
29042 {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
29043 {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
29044 {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
29045 {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
29046 {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
29047 {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
29048 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
29049 #if CYTHON_VECTORCALL_TPNEW
29050 {Py_tp_vectorcall, (void *)__pyx_tp_vectorcall__memoryviewslice},
29051 #endif
29052 #endif
29053 {0, 0},
29054};
29055static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
29056 "BoundaryConditions._memoryviewslice",
29057 sizeof(struct __pyx_memoryviewslice_obj),
29058 0,
29059 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
29060 __pyx_type___pyx_memoryviewslice_slots,
29061};
29062#else
29063
29064static PyTypeObject __pyx_type___pyx_memoryviewslice = {
29065 PyVarObject_HEAD_INIT(0, 0)
29066 "BoundaryConditions.""_memoryviewslice", /*tp_name*/
29067 sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
29068 0, /*tp_itemsize*/
29069 __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
29070 0, /*tp_vectorcall_offset*/
29071 0, /*tp_getattr*/
29072 0, /*tp_setattr*/
29073 0, /*tp_as_async*/
29074 #if CYTHON_COMPILING_IN_PYPY || 0
29075 __pyx_memoryview___repr__, /*tp_repr*/
29076 #else
29077 0, /*tp_repr*/
29078 #endif
29079 0, /*tp_as_number*/
29080 0, /*tp_as_sequence*/
29081 0, /*tp_as_mapping*/
29082 0, /*tp_hash*/
29083 0, /*tp_call*/
29084 #if CYTHON_COMPILING_IN_PYPY || 0
29085 __pyx_memoryview___str__, /*tp_str*/
29086 #else
29087 0, /*tp_str*/
29088 #endif
29089 0, /*tp_getattro*/
29090 0, /*tp_setattro*/
29091 0, /*tp_as_buffer*/
29092 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
29093 PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
29094 __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
29095 __pyx_tp_clear__memoryviewslice, /*tp_clear*/
29096 0, /*tp_richcompare*/
29097 0, /*tp_weaklistoffset*/
29098 0, /*tp_iter*/
29099 0, /*tp_iternext*/
29100 __pyx_methods__memoryviewslice, /*tp_methods*/
29101 0, /*tp_members*/
29102 0, /*tp_getset*/
29103 0, /*tp_base*/
29104 0, /*tp_dict*/
29105 0, /*tp_descr_get*/
29106 0, /*tp_descr_set*/
29107 #if !CYTHON_USE_TYPE_SPECS
29108 0, /*tp_dictoffset*/
29109 #endif
29110 0, /*tp_init*/
29111 0, /*tp_alloc*/
29112 __pyx_tp_new__memoryviewslice, /*tp_new*/
29113 0, /*tp_free*/
29114 0, /*tp_is_gc*/
29115 0, /*tp_bases*/
29116 0, /*tp_mro*/
29117 0, /*tp_cache*/
29118 0, /*tp_subclasses*/
29119 0, /*tp_weaklist*/
29120 0, /*tp_del*/
29121 0, /*tp_version_tag*/
29122 #if CYTHON_USE_TP_FINALIZE
29123 0, /*tp_finalize*/
29124 #else
29125 NULL, /*tp_finalize*/
29126 #endif
29127 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
29128 #if CYTHON_VECTORCALL_TPNEW
29129 __pyx_tp_vectorcall__memoryviewslice, /*tp_vectorcall*/
29130 #else
29131 NULL, /*tp_vectorcall*/
29132 #endif
29133 #endif
29134 #if __PYX_NEED_TP_PRINT_SLOT == 1
29135 0, /*tp_print*/
29136 #endif
29137 #if PY_VERSION_HEX >= 0x030C0000
29138 0, /*tp_watched*/
29139 #endif
29140 #if PY_VERSION_HEX >= 0x030d00A4
29141 0, /*tp_versions_used*/
29142 #endif
29143 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
29144 0, /*tp_pypy_flags*/
29145 #endif
29146};
29147#endif
29148
29149static PyMethodDef __pyx_methods[] = {
29150 {0, 0, 0, 0}
29151};
29152/* #### Code section: initfunc_declarations ### */
29153static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
29154static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
29155static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
29156static CYTHON_SMALL_CODE int __Pyx_InitAfterSharedUtility(void); /*proto*/
29157static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
29158static CYTHON_SMALL_CODE int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
29159static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
29160static CYTHON_SMALL_CODE int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
29161static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BC_Base(__pyx_mstatetype *__pyx_mstate); /*proto*/
29162static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BoundaryCondition(__pyx_mstatetype *__pyx_mstate); /*proto*/
29163static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_defaults(__pyx_mstatetype *__pyx_mstate); /*proto*/
29164static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC(__pyx_mstatetype *__pyx_mstate); /*proto*/
29165static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(__pyx_mstatetype *__pyx_mstate); /*proto*/
29166static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(__pyx_mstatetype *__pyx_mstate); /*proto*/
29167static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_array_obj(__pyx_mstatetype *__pyx_mstate); /*proto*/
29168static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_MemviewEnum_obj(__pyx_mstatetype *__pyx_mstate); /*proto*/
29169static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_memoryview_obj(__pyx_mstatetype *__pyx_mstate); /*proto*/
29170static CYTHON_SMALL_CODE int __Pyx_modinit_Exttype___pyx_memoryviewslice_obj(__pyx_mstatetype *__pyx_mstate); /*proto*/
29171static CYTHON_SMALL_CODE int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
29172static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
29173static CYTHON_SMALL_CODE int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
29174static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
29175/* #### Code section: init_module ### */
29176
29177static int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate) {
29178 __Pyx_RefNannyDeclarations
29179 CYTHON_UNUSED_VAR(__pyx_mstate);
29180 __Pyx_RefNannySetupContext("__Pyx_modinit_Global_init_code", 0);
29181 /*--- Global init code ---*/
29182 __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
29183 generic = Py_None; Py_INCREF(Py_None);
29184 strided = Py_None; Py_INCREF(Py_None);
29185 indirect = Py_None; Py_INCREF(Py_None);
29186 contiguous = Py_None; Py_INCREF(Py_None);
29187 indirect_contiguous = Py_None; Py_INCREF(Py_None);
29188 __Pyx_RefNannyFinishContext();
29189 return 0;
29190}
29191
29192static int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate) {
29193 __Pyx_RefNannyDeclarations
29194 CYTHON_UNUSED_VAR(__pyx_mstate);
29195 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_export_code", 0);
29196 /*--- Variable export code ---*/
29197 __Pyx_RefNannyFinishContext();
29198 return 0;
29199}
29200
29201static int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate) {
29202 __Pyx_RefNannyDeclarations
29203 CYTHON_UNUSED_VAR(__pyx_mstate);
29204 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_export_code", 0);
29205 /*--- Function export code ---*/
29206 __Pyx_RefNannyFinishContext();
29207 return 0;
29208}
29209
29210static int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BC_Base(__pyx_mstatetype *__pyx_mstate) {
29211 __Pyx_RefNannyDeclarations
29212 int __pyx_lineno = 0;
29213 const char *__pyx_filename = NULL;
29214 int __pyx_clineno = 0;
29215 CYTHON_UNUSED_VAR(__pyx_mstate);
29216 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BC_Base", 0);
29217 /*--- Exttype __pyx_obj_18BoundaryConditions_BC_Base ---*/
29218 #if CYTHON_USE_TYPE_SPECS
29219 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18BoundaryConditions_BC_Base_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base)) __PYX_ERR(0, 20, __pyx_L1_error)
29220 #else
29221 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base = &__pyx_type_18BoundaryConditions_BC_Base;
29222 #endif
29223 #if !CYTHON_COMPILING_IN_LIMITED_API
29224 #endif
29225 #if !CYTHON_USE_TYPE_SPECS
29226 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
29227 #endif
29228 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29229 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base);
29230 #endif
29231 #if !CYTHON_COMPILING_IN_LIMITED_API
29232 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base->tp_dictoffset && __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base->tp_getattro == PyObject_GenericGetAttr)) {
29233 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base->tp_getattro = PyObject_GenericGetAttr;
29234 }
29235 #endif
29236 if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BC_Base, (PyObject *) __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
29237 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
29238 __Pyx_RefNannyFinishContext();
29239 return 0;
29240 __pyx_L1_error:;
29241 __Pyx_RefNannyFinishContext();
29242 return -1;
29243}
29244
29245static int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BoundaryCondition(__pyx_mstatetype *__pyx_mstate) {
29246 __Pyx_RefNannyDeclarations
29247 int __pyx_lineno = 0;
29248 const char *__pyx_filename = NULL;
29249 int __pyx_clineno = 0;
29250 CYTHON_UNUSED_VAR(__pyx_mstate);
29251 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BoundaryCondition", 0);
29252 /*--- Exttype __pyx_obj_18BoundaryConditions_BoundaryCondition ---*/
29253 __pyx_vtabptr_18BoundaryConditions_BoundaryCondition = &__pyx_vtable_18BoundaryConditions_BoundaryCondition;
29254 __pyx_vtable_18BoundaryConditions_BoundaryCondition.resetBC = (void (*)(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *, int __pyx_skip_dispatch))__pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC;
29255 #if CYTHON_USE_TYPE_SPECS
29256 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18BoundaryConditions_BoundaryCondition_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition)) __PYX_ERR(0, 68, __pyx_L1_error)
29257 #else
29258 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition = &__pyx_type_18BoundaryConditions_BoundaryCondition;
29259 #endif
29260 #if !CYTHON_COMPILING_IN_LIMITED_API
29261 #endif
29262 #if !CYTHON_USE_TYPE_SPECS
29263 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition) < (0)) __PYX_ERR(0, 68, __pyx_L1_error)
29264 #endif
29265 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29266 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition);
29267 #endif
29268 #if !CYTHON_COMPILING_IN_LIMITED_API
29269 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition->tp_dictoffset && __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition->tp_getattro == PyObject_GenericGetAttr)) {
29270 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition->tp_getattro = PyObject_GenericGetAttr;
29271 }
29272 #endif
29273 if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition, __pyx_vtabptr_18BoundaryConditions_BoundaryCondition) < (0)) __PYX_ERR(0, 68, __pyx_L1_error)
29274 if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BoundaryCondition, (PyObject *) __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition) < (0)) __PYX_ERR(0, 68, __pyx_L1_error)
29275 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition) < (0)) __PYX_ERR(0, 68, __pyx_L1_error)
29276 __Pyx_RefNannyFinishContext();
29277 return 0;
29278 __pyx_L1_error:;
29279 __Pyx_RefNannyFinishContext();
29280 return -1;
29281}
29282
29283static int __Pyx_modinit_Exttype___pyx_defaults(__pyx_mstatetype *__pyx_mstate) {
29284 __Pyx_RefNannyDeclarations
29285 int __pyx_lineno = 0;
29286 const char *__pyx_filename = NULL;
29287 int __pyx_clineno = 0;
29288 CYTHON_UNUSED_VAR(__pyx_mstate);
29289 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_defaults", 0);
29290 /*--- Exttype __pyx_defaults ---*/
29291 #if CYTHON_USE_TYPE_SPECS
29292 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18BoundaryConditions___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults)) __PYX_ERR(0, 97, __pyx_L1_error)
29293 #else
29294 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults = &__pyx_type_18BoundaryConditions___pyx_defaults;
29295 #endif
29296 #if !CYTHON_COMPILING_IN_LIMITED_API
29297 #endif
29298 #if !CYTHON_USE_TYPE_SPECS
29299 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults) < (0)) __PYX_ERR(0, 97, __pyx_L1_error)
29300 #endif
29301 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29302 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults);
29303 #endif
29304 #if !CYTHON_COMPILING_IN_LIMITED_API
29305 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults->tp_dictoffset && __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults->tp_getattro == PyObject_GenericGetAttr)) {
29306 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults->tp_getattro = PyObject_GenericGetAttr;
29307 }
29308 #endif
29309 __Pyx_RefNannyFinishContext();
29310 return 0;
29311 __pyx_L1_error:;
29312 __Pyx_RefNannyFinishContext();
29313 return -1;
29314}
29315
29316static int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC(__pyx_mstatetype *__pyx_mstate) {
29317 __Pyx_RefNannyDeclarations
29318 int __pyx_lineno = 0;
29319 const char *__pyx_filename = NULL;
29320 int __pyx_clineno = 0;
29321 CYTHON_UNUSED_VAR(__pyx_mstate);
29322 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC", 0);
29323 /*--- Exttype __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC ---*/
29324 #if CYTHON_USE_TYPE_SPECS
29325 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC)) __PYX_ERR(0, 87, __pyx_L1_error)
29326 #else
29327 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC = &__pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC;
29328 #endif
29329 #if !CYTHON_COMPILING_IN_LIMITED_API
29330 #endif
29331 #if !CYTHON_USE_TYPE_SPECS
29332 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC) < (0)) __PYX_ERR(0, 87, __pyx_L1_error)
29333 #endif
29334 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29335 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC);
29336 #endif
29337 #if !CYTHON_COMPILING_IN_LIMITED_API
29338 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC->tp_dictoffset && __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC->tp_getattro == PyObject_GenericGetAttr)) {
29339 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC->tp_getattro = PyObject_GenericGetAttr;
29340 }
29341 #endif
29342 __Pyx_RefNannyFinishContext();
29343 return 0;
29344 __pyx_L1_error:;
29345 __Pyx_RefNannyFinishContext();
29346 return -1;
29347}
29348
29349static int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(__pyx_mstatetype *__pyx_mstate) {
29350 __Pyx_RefNannyDeclarations
29351 int __pyx_lineno = 0;
29352 const char *__pyx_filename = NULL;
29353 int __pyx_clineno = 0;
29354 CYTHON_UNUSED_VAR(__pyx_mstate);
29355 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC", 0);
29356 /*--- Exttype __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC ---*/
29357 #if CYTHON_USE_TYPE_SPECS
29358 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC)) __PYX_ERR(0, 100, __pyx_L1_error)
29359 #else
29360 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC = &__pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
29361 #endif
29362 #if !CYTHON_COMPILING_IN_LIMITED_API
29363 #endif
29364 #if !CYTHON_USE_TYPE_SPECS
29365 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
29366 #endif
29367 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29368 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC);
29369 #endif
29370 #if !CYTHON_COMPILING_IN_LIMITED_API
29371 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC->tp_dictoffset && __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC->tp_getattro == PyObject_GenericGetAttr)) {
29372 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC->tp_getattro = PyObject_GenericGetAttr;
29373 }
29374 #endif
29375 __Pyx_RefNannyFinishContext();
29376 return 0;
29377 __pyx_L1_error:;
29378 __Pyx_RefNannyFinishContext();
29379 return -1;
29380}
29381
29382static int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(__pyx_mstatetype *__pyx_mstate) {
29383 __Pyx_RefNannyDeclarations
29384 int __pyx_lineno = 0;
29385 const char *__pyx_filename = NULL;
29386 int __pyx_clineno = 0;
29387 CYTHON_UNUSED_VAR(__pyx_mstate);
29388 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp", 0);
29389 /*--- Exttype __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp ---*/
29390 #if CYTHON_USE_TYPE_SPECS
29391 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp)) __PYX_ERR(0, 115, __pyx_L1_error)
29392 #else
29393 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp = &__pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
29394 #endif
29395 #if !CYTHON_COMPILING_IN_LIMITED_API
29396 #endif
29397 #if !CYTHON_USE_TYPE_SPECS
29398 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp) < (0)) __PYX_ERR(0, 115, __pyx_L1_error)
29399 #endif
29400 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29401 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp);
29402 #endif
29403 #if !CYTHON_COMPILING_IN_LIMITED_API
29404 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp->tp_dictoffset && __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp->tp_getattro == PyObject_GenericGetAttr)) {
29405 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp->tp_getattro = PyObject_GenericGetAttr;
29406 }
29407 #endif
29408 __Pyx_RefNannyFinishContext();
29409 return 0;
29410 __pyx_L1_error:;
29411 __Pyx_RefNannyFinishContext();
29412 return -1;
29413}
29414
29415static int __Pyx_modinit_Exttype___pyx_array_obj(__pyx_mstatetype *__pyx_mstate) {
29416 __Pyx_RefNannyDeclarations
29417 int __pyx_lineno = 0;
29418 const char *__pyx_filename = NULL;
29419 int __pyx_clineno = 0;
29420 CYTHON_UNUSED_VAR(__pyx_mstate);
29421 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_array_obj", 0);
29422 /*--- Exttype __pyx_array_obj ---*/
29423 __pyx_vtabptr_array = &__pyx_vtable_array;
29424 __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
29425 #if CYTHON_USE_TYPE_SPECS
29426 __pyx_mstate->__pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_array_type)) __PYX_ERR(1, 128, __pyx_L1_error)
29427 #if !CYTHON_COMPILING_IN_LIMITED_API
29428 __pyx_mstate->__pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
29429 if (!__pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
29430 __pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
29431 }
29432 #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
29433 /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
29434 #elif defined(_MSC_VER)
29435 #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
29436 #else
29437 #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
29438 #endif
29439 #else
29440 __pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array;
29441 #endif
29442 if (__Pyx_ApplySequenceOrMappingFlag(__pyx_mstate->__pyx_array_type, 1) < (0)) __PYX_ERR(1, 128, __pyx_L1_error)
29443 #if !CYTHON_COMPILING_IN_LIMITED_API
29444 #endif
29445 #if !CYTHON_USE_TYPE_SPECS
29446 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 128, __pyx_L1_error)
29447 #endif
29448 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29449 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_array_type);
29450 #endif
29451 if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < (0)) __PYX_ERR(1, 128, __pyx_L1_error)
29452 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 128, __pyx_L1_error)
29453 __Pyx_RefNannyFinishContext();
29454 return 0;
29455 __pyx_L1_error:;
29456 __Pyx_RefNannyFinishContext();
29457 return -1;
29458}
29459
29460static int __Pyx_modinit_Exttype___pyx_MemviewEnum_obj(__pyx_mstatetype *__pyx_mstate) {
29461 __Pyx_RefNannyDeclarations
29462 int __pyx_lineno = 0;
29463 const char *__pyx_filename = NULL;
29464 int __pyx_clineno = 0;
29465 CYTHON_UNUSED_VAR(__pyx_mstate);
29466 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_MemviewEnum_obj", 0);
29467 /*--- Exttype __pyx_MemviewEnum_obj ---*/
29468 #if CYTHON_USE_TYPE_SPECS
29469 __pyx_mstate->__pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_MemviewEnum_type)) __PYX_ERR(1, 318, __pyx_L1_error)
29470 #else
29471 __pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
29472 #endif
29473 #if !CYTHON_COMPILING_IN_LIMITED_API
29474 #endif
29475 #if !CYTHON_USE_TYPE_SPECS
29476 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 318, __pyx_L1_error)
29477 #endif
29478 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29479 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_MemviewEnum_type);
29480 #endif
29481 #if !CYTHON_COMPILING_IN_LIMITED_API
29482 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_MemviewEnum_type->tp_dictoffset && __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
29483 __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro = PyObject_GenericGetAttr;
29484 }
29485 #endif
29486 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 318, __pyx_L1_error)
29487 __Pyx_RefNannyFinishContext();
29488 return 0;
29489 __pyx_L1_error:;
29490 __Pyx_RefNannyFinishContext();
29491 return -1;
29492}
29493
29494static int __Pyx_modinit_Exttype___pyx_memoryview_obj(__pyx_mstatetype *__pyx_mstate) {
29495 __Pyx_RefNannyDeclarations
29496 int __pyx_lineno = 0;
29497 const char *__pyx_filename = NULL;
29498 int __pyx_clineno = 0;
29499 CYTHON_UNUSED_VAR(__pyx_mstate);
29500 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_memoryview_obj", 0);
29501 /*--- Exttype __pyx_memoryview_obj ---*/
29502 __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
29503 __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
29504 __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
29505 __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
29506 __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
29507 __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
29508 __pyx_vtable_memoryview.setitem_indexed1 = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed1;
29509 __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
29510 __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
29511 __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
29512 #if CYTHON_USE_TYPE_SPECS
29513 __pyx_mstate->__pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_memoryview_type)) __PYX_ERR(1, 353, __pyx_L1_error)
29514 #if !CYTHON_COMPILING_IN_LIMITED_API
29515 __pyx_mstate->__pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
29516 if (!__pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
29517 __pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
29518 }
29519 #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
29520 /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
29521 #elif defined(_MSC_VER)
29522 #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
29523 #else
29524 #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
29525 #endif
29526 #else
29527 __pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview;
29528 #endif
29529 #if !CYTHON_COMPILING_IN_LIMITED_API
29530 #endif
29531 #if !CYTHON_USE_TYPE_SPECS
29532 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 353, __pyx_L1_error)
29533 #endif
29534 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29535 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryview_type);
29536 #endif
29537 #if !CYTHON_COMPILING_IN_LIMITED_API
29538 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryview_type->tp_dictoffset && __pyx_mstate->__pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
29539 __pyx_mstate->__pyx_memoryview_type->tp_getattro = PyObject_GenericGetAttr;
29540 }
29541 #endif
29542 if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < (0)) __PYX_ERR(1, 353, __pyx_L1_error)
29543 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 353, __pyx_L1_error)
29544 __Pyx_RefNannyFinishContext();
29545 return 0;
29546 __pyx_L1_error:;
29547 __Pyx_RefNannyFinishContext();
29548 return -1;
29549}
29550
29551static int __Pyx_modinit_Exttype___pyx_memoryviewslice_obj(__pyx_mstatetype *__pyx_mstate) {
29552 __Pyx_RefNannyDeclarations
29553 PyObject *__pyx_t_1 = NULL;
29554 int __pyx_lineno = 0;
29555 const char *__pyx_filename = NULL;
29556 int __pyx_clineno = 0;
29557 CYTHON_UNUSED_VAR(__pyx_mstate);
29558 __Pyx_RefNannySetupContext("__Pyx_modinit_Exttype___pyx_memoryviewslice_obj", 0);
29559 /*--- Exttype __pyx_memoryviewslice_obj ---*/
29560 __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
29561 __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
29562 __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
29563 __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
29564 __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
29565 #if CYTHON_USE_TYPE_SPECS
29566 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 947, __pyx_L1_error)
29567 __Pyx_GOTREF(__pyx_t_1);
29568 __pyx_mstate->__pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
29569 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
29570 if (unlikely(!__pyx_mstate->__pyx_memoryviewslice_type)) __PYX_ERR(1, 947, __pyx_L1_error)
29571 #else
29572 __pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
29573 #endif
29574 if (__Pyx_ApplySequenceOrMappingFlag(__pyx_mstate->__pyx_memoryviewslice_type, 1) < (0)) __PYX_ERR(1, 947, __pyx_L1_error)
29575 #if !CYTHON_COMPILING_IN_LIMITED_API
29576 __pyx_mstate_global->__pyx_memoryviewslice_type->tp_base = __pyx_mstate_global->__pyx_memoryview_type;
29577 #endif
29578 #if !CYTHON_USE_TYPE_SPECS
29579 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 947, __pyx_L1_error)
29580 #endif
29581 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29582 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryviewslice_type);
29583 #endif
29584 #if !CYTHON_COMPILING_IN_LIMITED_API
29585 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryviewslice_type->tp_dictoffset && __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
29586 __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro = PyObject_GenericGetAttr;
29587 }
29588 #endif
29589 if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < (0)) __PYX_ERR(1, 947, __pyx_L1_error)
29590 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 947, __pyx_L1_error)
29591 __Pyx_RefNannyFinishContext();
29592 return 0;
29593 __pyx_L1_error:;
29594 __Pyx_XDECREF(__pyx_t_1);
29595 __Pyx_RefNannyFinishContext();
29596 return -1;
29597}
29598
29599static int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate) {
29600 __Pyx_RefNannyDeclarations
29601 PyObject *__pyx_t_1 = NULL;
29602 int __pyx_lineno = 0;
29603 const char *__pyx_filename = NULL;
29604 int __pyx_clineno = 0;
29605 CYTHON_UNUSED_VAR(__pyx_mstate);
29606 __Pyx_RefNannySetupContext("__Pyx_modinit_Type_import_code", 0);
29607 /*--- Type import code ---*/
29608 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
29609 __Pyx_GOTREF(__pyx_t_1);
29610 __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_3_0(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
29611 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29612 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyTypeObject),
29613 #elif CYTHON_COMPILING_IN_LIMITED_API
29614 0, 0,
29615 #else
29616 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
29617 #endif
29618 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
29619 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29620 __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 229, __pyx_L1_error)
29621 __Pyx_GOTREF(__pyx_t_1);
29622 __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "dtype",
29623 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29624 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
29625 #elif CYTHON_COMPILING_IN_LIMITED_API
29626 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
29627 #else
29628 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
29629 #endif
29630 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 229, __pyx_L1_error)
29631 __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flatiter",
29632 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29633 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
29634 #elif CYTHON_COMPILING_IN_LIMITED_API
29635 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
29636 #else
29637 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
29638 #endif
29639 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 286, __pyx_L1_error)
29640 __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "broadcast",
29641 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29642 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
29643 #elif CYTHON_COMPILING_IN_LIMITED_API
29644 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
29645 #else
29646 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
29647 #endif
29648 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 290, __pyx_L1_error)
29649 __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ndarray",
29650 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29651 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
29652 #elif CYTHON_COMPILING_IN_LIMITED_API
29653 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
29654 #else
29655 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
29656 #endif
29657 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 329, __pyx_L1_error)
29658 __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "generic",
29659 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29660 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29661 #elif CYTHON_COMPILING_IN_LIMITED_API
29662 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29663 #else
29664 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29665 #endif
29666 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(2, 847, __pyx_L1_error)
29667 __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "number",
29668 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29669 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29670 #elif CYTHON_COMPILING_IN_LIMITED_API
29671 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29672 #else
29673 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29674 #endif
29675 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(2, 849, __pyx_L1_error)
29676 __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "integer",
29677 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29678 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29679 #elif CYTHON_COMPILING_IN_LIMITED_API
29680 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29681 #else
29682 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29683 #endif
29684 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(2, 851, __pyx_L1_error)
29685 __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "signedinteger",
29686 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29687 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29688 #elif CYTHON_COMPILING_IN_LIMITED_API
29689 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29690 #else
29691 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29692 #endif
29693 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 853, __pyx_L1_error)
29694 __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "unsignedinteger",
29695 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29696 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29697 #elif CYTHON_COMPILING_IN_LIMITED_API
29698 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29699 #else
29700 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29701 #endif
29702 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 855, __pyx_L1_error)
29703 __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "inexact",
29704 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29705 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29706 #elif CYTHON_COMPILING_IN_LIMITED_API
29707 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29708 #else
29709 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29710 #endif
29711 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 857, __pyx_L1_error)
29712 __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "floating",
29713 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29714 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29715 #elif CYTHON_COMPILING_IN_LIMITED_API
29716 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29717 #else
29718 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29719 #endif
29720 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(2, 859, __pyx_L1_error)
29721 __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "complexfloating",
29722 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29723 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29724 #elif CYTHON_COMPILING_IN_LIMITED_API
29725 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29726 #else
29727 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29728 #endif
29729 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 861, __pyx_L1_error)
29730 __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flexible",
29731 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29732 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29733 #elif CYTHON_COMPILING_IN_LIMITED_API
29734 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29735 #else
29736 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29737 #endif
29738 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 863, __pyx_L1_error)
29739 __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "character",
29740 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29741 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29742 #elif CYTHON_COMPILING_IN_LIMITED_API
29743 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29744 #else
29745 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
29746 #endif
29747 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(2, 865, __pyx_L1_error)
29748 __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ufunc",
29749 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
29750 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
29751 #elif CYTHON_COMPILING_IN_LIMITED_API
29752 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
29753 #else
29754 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
29755 #endif
29756 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 946, __pyx_L1_error)
29757 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29758 __Pyx_RefNannyFinishContext();
29759 return 0;
29760 __pyx_L1_error:;
29761 __Pyx_XDECREF(__pyx_t_1);
29762 __Pyx_RefNannyFinishContext();
29763 return -1;
29764}
29765
29766static int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate) {
29767 __Pyx_RefNannyDeclarations
29768 CYTHON_UNUSED_VAR(__pyx_mstate);
29769 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_import_code", 0);
29770 /*--- Variable import code ---*/
29771 __Pyx_RefNannyFinishContext();
29772 return 0;
29773}
29774
29775static int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate) {
29776 __Pyx_RefNannyDeclarations
29777 CYTHON_UNUSED_VAR(__pyx_mstate);
29778 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_import_code", 0);
29779 /*--- Function import code ---*/
29780 __Pyx_RefNannyFinishContext();
29781 return 0;
29782}
29783
29784#if CYTHON_PEP489_MULTI_PHASE_INIT
29785static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
29786static int __pyx_pymod_exec_BoundaryConditions(PyObject* module); /*proto*/
29787static PyModuleDef_Slot __pyx_moduledef_slots[] = {
29788 {Py_mod_create, (void*)__pyx_pymod_create},
29789 {Py_mod_exec, (void*)__pyx_pymod_exec_BoundaryConditions},
29790 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
29791 {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
29792 #endif
29793 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
29794 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
29795 #endif
29796 {0, NULL}
29797};
29798#endif
29799
29800#ifdef __cplusplus
29801namespace {
29802 struct PyModuleDef __pyx_moduledef =
29803 #else
29804 static struct PyModuleDef __pyx_moduledef =
29805 #endif
29806 {
29807 PyModuleDef_HEAD_INIT,
29808 "BoundaryConditions",
29809 0, /* m_doc */
29810 #if CYTHON_USE_MODULE_STATE
29811 sizeof(__pyx_mstatetype), /* m_size */
29812 #else
29813 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
29814 #endif
29815 __pyx_methods /* m_methods */,
29816 #if CYTHON_PEP489_MULTI_PHASE_INIT
29817 __pyx_moduledef_slots, /* m_slots */
29818 #else
29819 NULL, /* m_reload */
29820 #endif
29821 #if CYTHON_USE_MODULE_STATE
29822 __pyx_m_traverse, /* m_traverse */
29823 __pyx_m_clear, /* m_clear */
29824 NULL /* m_free */
29825 #else
29826 NULL, /* m_traverse */
29827 NULL, /* m_clear */
29828 NULL /* m_free */
29829 #endif
29830 };
29831 #ifdef __cplusplus
29832} /* anonymous namespace */
29833#endif
29834
29835/* PyModInitFuncType */
29836#ifndef CYTHON_NO_PYINIT_EXPORT
29837 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
29838#else
29839 #ifdef __cplusplus
29840 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
29841 #else
29842 #define __Pyx_PyMODINIT_FUNC PyObject *
29843 #endif
29844#endif
29845
29846__Pyx_PyMODINIT_FUNC PyInit_BoundaryConditions(void) CYTHON_SMALL_CODE; /*proto*/
29847__Pyx_PyMODINIT_FUNC PyInit_BoundaryConditions(void)
29848#if CYTHON_PEP489_MULTI_PHASE_INIT
29849{
29850 return PyModuleDef_Init(&__pyx_moduledef);
29851}
29852/* ModuleCreationPEP489 */
29853#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
29854 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
29855static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
29856 {
29857 PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
29858 if (!module) {
29859 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
29860 goto bad; // BaseException
29861 }
29862 PyErr_Clear(); // just try the 3.8-3.12 version
29863 module = PyImport_ImportModule("_xxsubinterpreters");
29864 if (!module) goto bad;
29865 }
29866 PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
29867 Py_DECREF(module);
29868 if (!current) goto bad;
29869 if (PyTuple_Check(current)) {
29870 PyObject *new_current = PySequence_GetItem(current, 0);
29871 Py_DECREF(current);
29872 current = new_current;
29873 if (!new_current) goto bad;
29874 }
29875 long long as_c_int = PyLong_AsLongLong(current);
29876 Py_DECREF(current);
29877 return as_c_int;
29878 }
29879 bad:
29880 PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
29881 return -1;
29882}
29883#endif
29884#if !CYTHON_USE_MODULE_STATE
29885static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
29886 static PY_INT64_T main_interpreter_id = -1;
29887#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
29888 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
29889#elif CYTHON_COMPILING_IN_GRAAL
29890 PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
29891#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
29892 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
29893 PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
29894#elif CYTHON_COMPILING_IN_LIMITED_API
29895 PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
29896#else
29897 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
29898#endif
29899 if (unlikely(current_id == -1)) {
29900 return -1;
29901 }
29902 if (main_interpreter_id == -1) {
29903 main_interpreter_id = current_id;
29904 return 0;
29905 } else if (unlikely(main_interpreter_id != current_id)) {
29906 PyErr_SetString(
29907 PyExc_ImportError,
29908 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
29909 return -1;
29910 }
29911 return 0;
29912}
29913#endif
29914static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
29915{
29916 PyObject *value = PyObject_GetAttrString(spec, from_name);
29917 int result = 0;
29918 if (likely(value)) {
29919 if (allow_none || value != Py_None) {
29920 result = PyDict_SetItemString(moddict, to_name, value);
29921 }
29922 Py_DECREF(value);
29923 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
29924 PyErr_Clear();
29925 } else {
29926 result = -1;
29927 }
29928 return result;
29929}
29930static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
29931 PyObject *module = NULL, *moddict, *modname;
29932 CYTHON_UNUSED_VAR(def);
29933 #if !CYTHON_USE_MODULE_STATE
29934 if (__Pyx_check_single_interpreter())
29935 return NULL;
29936 #endif
29937 if (__pyx_m)
29938 return __Pyx_NewRef(__pyx_m);
29939 modname = PyObject_GetAttrString(spec, "name");
29940 if (unlikely(!modname)) goto bad;
29941 module = PyModule_NewObject(modname);
29942 Py_DECREF(modname);
29943 if (unlikely(!module)) goto bad;
29944 moddict = PyModule_GetDict(module);
29945 if (unlikely(!moddict)) goto bad;
29946 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
29947 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
29948 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
29949 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
29950 return module;
29951bad:
29952 Py_XDECREF(module);
29953 return NULL;
29954}
29955
29956
29957static CYTHON_SMALL_CODE int __pyx_pymod_exec_BoundaryConditions(PyObject *__pyx_pyinit_module)
29958#endif
29959{
29960 int stringtab_initialized = 0;
29961 #if CYTHON_USE_MODULE_STATE
29962 int pystate_addmodule_run = 0;
29963 #endif
29964 __pyx_mstatetype *__pyx_mstate = NULL;
29965 __Pyx_TraceDeclarationsFunc
29966 PyObject *__pyx_t_1 = NULL;
29967 PyObject *__pyx_t_2 = NULL;
29968 PyObject *__pyx_t_3 = NULL;
29969 PyObject *__pyx_t_4 = NULL;
29970 PyObject *__pyx_t_5 = NULL;
29971 size_t __pyx_t_6;
29972 static PyThread_type_lock __pyx_t_7[8];
29973 int __pyx_t_8;
29974 int __pyx_lineno = 0;
29975 const char *__pyx_filename = NULL;
29976 int __pyx_clineno = 0;
29977 __Pyx_RefNannyDeclarations
29978 #if CYTHON_PEP489_MULTI_PHASE_INIT
29979 if (__pyx_m) {
29980 if (__pyx_m == __pyx_pyinit_module) return 0;
29981 PyErr_SetString(PyExc_RuntimeError, "Module 'BoundaryConditions' has already been imported. Re-initialisation is not supported.");
29982 return -1;
29983 }
29984 #else
29985 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
29986 #endif
29987 /*--- Module creation code ---*/
29988 #if CYTHON_PEP489_MULTI_PHASE_INIT
29989 __pyx_t_1 = __pyx_pyinit_module;
29990 Py_INCREF(__pyx_t_1);
29991 #else
29992 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
29993 #endif
29994 #if CYTHON_USE_MODULE_STATE
29995 {
29996 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
29997 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "BoundaryConditions" pseudovariable */
29998 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
29999 pystate_addmodule_run = 1;
30000 }
30001 #else
30002 __pyx_m = __pyx_t_1;
30003 #endif
30004 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
30005 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
30006 #endif
30007 __pyx_mstate = __pyx_mstate_global;
30008 CYTHON_UNUSED_VAR(__pyx_t_1);
30009 __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
30010 Py_INCREF(__pyx_mstate->__pyx_d);
30011 __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
30012 __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
30013 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30014 /* ImportRefnannyAPI */
30015 #if CYTHON_REFNANNY
30016 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
30017 if (!__Pyx_RefNanny) {
30018 if (PyErr_ExceptionMatches(PyExc_Exception)) {
30019 PyErr_Clear();
30020 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
30021 }
30022 if (!__Pyx_RefNanny)
30023 Py_FatalError("failed to import 'refnanny' module");
30024 }
30025 #endif
30026
30027__Pyx_RefNannySetupContext("PyInit_BoundaryConditions", 0);
30028 __Pyx_init_runtime_version();
30029 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)
30030 __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
30031 __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
30032 __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
30033 /*--- Library function declarations ---*/
30034 /*--- Initialize various global constants etc. ---*/
30035 if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30036 stringtab_initialized = 1;
30037 if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30038 if (__pyx_module_is_main_BoundaryConditions) {
30039 if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30040 }
30041 {
30042 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
30043 if (!PyDict_GetItemString(modules, "BoundaryConditions")) {
30044 if (unlikely((PyDict_SetItemString(modules, "BoundaryConditions", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30045 }
30046 }
30047 /*--- Builtin init code ---*/
30048 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30049 /*--- Constants init code ---*/
30050 if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30051 if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30052 /*--- Global type/function init code ---*/
30053 (void)__Pyx_modinit_Global_init_code(__pyx_mstate);
30054 (void)__Pyx_modinit_Variable_export_code(__pyx_mstate);
30055 (void)__Pyx_modinit_Function_export_code(__pyx_mstate);
30056 /*--- Type init code ---*/
30057 if (unlikely((__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BC_Base(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30058 if (unlikely((__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BoundaryCondition(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30059 if (unlikely((__Pyx_modinit_Exttype___pyx_defaults(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30060 if (unlikely((__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30061 if (unlikely((__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30062 if (unlikely((__Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30063 if (unlikely((__Pyx_modinit_Exttype___pyx_array_obj(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30064 if (unlikely((__Pyx_modinit_Exttype___pyx_MemviewEnum_obj(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30065 if (unlikely((__Pyx_modinit_Exttype___pyx_memoryview_obj(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30066 if (unlikely((__Pyx_modinit_Exttype___pyx_memoryviewslice_obj(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30067 if (unlikely((__Pyx_modinit_Type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
30068 (void)__Pyx_modinit_Variable_import_code(__pyx_mstate);
30069 (void)__Pyx_modinit_Function_import_code(__pyx_mstate);
30070 if (__Pyx_InitAfterSharedUtility() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30071 /*--- Execution code ---*/
30072 __Pyx_TraceStartFunc("PyInit_BoundaryConditions", __pyx_f[0], 1, 1, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error));
30073
30074 /* "View.MemoryView":118
30075 *
30076 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
30077 * try: # <<<<<<<<<<<<<<
30078 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
30079 * except:
30080*/
30081 {
30082 __Pyx_PyThreadState_declare
30083 __Pyx_PyThreadState_assign
30084 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
30085 __Pyx_XGOTREF(__pyx_t_1);
30086 __Pyx_XGOTREF(__pyx_t_2);
30087 __Pyx_XGOTREF(__pyx_t_3);
30088 /*try:*/ {
30089
30090 /* "View.MemoryView":119
30091 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
30092 * try:
30093 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<<
30094 * except:
30095 *
30096*/
30097 __pyx_t_5 = NULL;
30098 __pyx_t_6 = 1;
30099 {
30100 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_collections_abc};
30101 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin___import__, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30102 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30103 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 119, __pyx_L2_error)
30104 __Pyx_GOTREF(__pyx_t_4);
30105 }
30106 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 119, __pyx_L2_error)
30107 __Pyx_GOTREF(__pyx_t_5);
30108 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30109 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 119, __pyx_L2_error)
30110 __Pyx_GOTREF(__pyx_t_4);
30111 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30112 __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
30113 __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
30114 __Pyx_GIVEREF(__pyx_t_4);
30115 __pyx_t_4 = 0;
30116
30117 /* "View.MemoryView":118
30118 *
30119 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
30120 * try: # <<<<<<<<<<<<<<
30121 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
30122 * except:
30123*/
30124 }
30125 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
30126 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
30127 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
30128 goto __pyx_L7_try_end;
30129 __pyx_L2_error:;
30130 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30131 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30132
30133 /* "View.MemoryView":120
30134 * try:
30135 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
30136 * except: # <<<<<<<<<<<<<<
30137 *
30138 * __pyx_collections_abc_Sequence = None
30139*/
30140 /*except:*/ {
30141 __Pyx_ErrRestore(0,0,0);
30142
30143 /* "View.MemoryView":122
30144 * except:
30145 *
30146 * __pyx_collections_abc_Sequence = None # <<<<<<<<<<<<<<
30147 *
30148 *
30149*/
30150 __Pyx_INCREF(Py_None);
30151 __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
30152 __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
30153 __Pyx_GIVEREF(Py_None);
30154 goto __pyx_L3_exception_handled;
30155 }
30156 __pyx_L3_exception_handled:;
30157 __Pyx_XGIVEREF(__pyx_t_1);
30158 __Pyx_XGIVEREF(__pyx_t_2);
30159 __Pyx_XGIVEREF(__pyx_t_3);
30160 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
30161 __pyx_L7_try_end:;
30162 }
30163
30164 /* "View.MemoryView":258
30165 *
30166 *
30167 * try: # <<<<<<<<<<<<<<
30168 * count = __pyx_collections_abc_Sequence.count
30169 * index = __pyx_collections_abc_Sequence.index
30170*/
30171 {
30172 __Pyx_PyThreadState_declare
30173 __Pyx_PyThreadState_assign
30174 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
30175 __Pyx_XGOTREF(__pyx_t_3);
30176 __Pyx_XGOTREF(__pyx_t_2);
30177 __Pyx_XGOTREF(__pyx_t_1);
30178 /*try:*/ {
30179
30180 /* "View.MemoryView":259
30181 *
30182 * try:
30183 * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<<
30184 * index = __pyx_collections_abc_Sequence.index
30185 * except:
30186*/
30187 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 259, __pyx_L10_error)
30188 __Pyx_GOTREF(__pyx_t_4);
30189 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 259, __pyx_L10_error)
30190 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30191
30192 /* "View.MemoryView":260
30193 * try:
30194 * count = __pyx_collections_abc_Sequence.count
30195 * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<<
30196 * except:
30197 * pass
30198*/
30199 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 260, __pyx_L10_error)
30200 __Pyx_GOTREF(__pyx_t_4);
30201 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 260, __pyx_L10_error)
30202 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30203
30204 /* "View.MemoryView":258
30205 *
30206 *
30207 * try: # <<<<<<<<<<<<<<
30208 * count = __pyx_collections_abc_Sequence.count
30209 * index = __pyx_collections_abc_Sequence.index
30210*/
30211 }
30212 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
30213 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
30214 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
30215 goto __pyx_L15_try_end;
30216 __pyx_L10_error:;
30217 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30218 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30219
30220 /* "View.MemoryView":261
30221 * count = __pyx_collections_abc_Sequence.count
30222 * index = __pyx_collections_abc_Sequence.index
30223 * except: # <<<<<<<<<<<<<<
30224 * pass
30225 *
30226*/
30227 /*except:*/ {
30228 __Pyx_ErrRestore(0,0,0);
30229 goto __pyx_L11_exception_handled;
30230 }
30231 __pyx_L11_exception_handled:;
30232 __Pyx_XGIVEREF(__pyx_t_3);
30233 __Pyx_XGIVEREF(__pyx_t_2);
30234 __Pyx_XGIVEREF(__pyx_t_1);
30235 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
30236 __pyx_L15_try_end:;
30237 }
30238
30239 /* "View.MemoryView":326
30240 * return self.name
30241 *
30242 * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
30243 * cdef strided = Enum("<strided and direct>") # default
30244 * cdef indirect = Enum("<strided and indirect>")
30245*/
30246 __pyx_t_5 = NULL;
30247 __pyx_t_6 = 1;
30248 {
30249 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct_or_indirect};
30250 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30251 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30252 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 326, __pyx_L1_error)
30253 __Pyx_GOTREF((PyObject *)__pyx_t_4);
30254 }
30255 __Pyx_XGOTREF(generic);
30256 __Pyx_DECREF_SET(generic, ((PyObject *)__pyx_t_4));
30257 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
30258 __pyx_t_4 = 0;
30259
30260 /* "View.MemoryView":327
30261 *
30262 * cdef generic = Enum("<strided and direct or indirect>")
30263 * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
30264 * cdef indirect = Enum("<strided and indirect>")
30265 *
30266*/
30267 __pyx_t_5 = NULL;
30268 __pyx_t_6 = 1;
30269 {
30270 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct};
30271 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30272 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30273 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 327, __pyx_L1_error)
30274 __Pyx_GOTREF((PyObject *)__pyx_t_4);
30275 }
30276 __Pyx_XGOTREF(strided);
30277 __Pyx_DECREF_SET(strided, ((PyObject *)__pyx_t_4));
30278 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
30279 __pyx_t_4 = 0;
30280
30281 /* "View.MemoryView":328
30282 * cdef generic = Enum("<strided and direct or indirect>")
30283 * cdef strided = Enum("<strided and direct>") # default
30284 * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
30285 *
30286 *
30287*/
30288 __pyx_t_5 = NULL;
30289 __pyx_t_6 = 1;
30290 {
30291 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_indirect};
30292 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30293 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30294 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 328, __pyx_L1_error)
30295 __Pyx_GOTREF((PyObject *)__pyx_t_4);
30296 }
30297 __Pyx_XGOTREF(indirect);
30298 __Pyx_DECREF_SET(indirect, ((PyObject *)__pyx_t_4));
30299 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
30300 __pyx_t_4 = 0;
30301
30302 /* "View.MemoryView":331
30303 *
30304 *
30305 * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
30306 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
30307 *
30308*/
30309 __pyx_t_5 = NULL;
30310 __pyx_t_6 = 1;
30311 {
30312 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_direct};
30313 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30314 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30315 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 331, __pyx_L1_error)
30316 __Pyx_GOTREF((PyObject *)__pyx_t_4);
30317 }
30318 __Pyx_XGOTREF(contiguous);
30319 __Pyx_DECREF_SET(contiguous, ((PyObject *)__pyx_t_4));
30320 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
30321 __pyx_t_4 = 0;
30322
30323 /* "View.MemoryView":332
30324 *
30325 * cdef contiguous = Enum("<contiguous and direct>")
30326 * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
30327 *
30328 *
30329*/
30330 __pyx_t_5 = NULL;
30331 __pyx_t_6 = 1;
30332 {
30333 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_indirect};
30334 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30335 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30336 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 332, __pyx_L1_error)
30337 __Pyx_GOTREF((PyObject *)__pyx_t_4);
30338 }
30339 __Pyx_XGOTREF(indirect_contiguous);
30340 __Pyx_DECREF_SET(indirect_contiguous, ((PyObject *)__pyx_t_4));
30341 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
30342 __pyx_t_4 = 0;
30343
30344 /* "View.MemoryView":340
30345 *
30346 *
30347 * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
30348 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
30349 * PyThread_allocate_lock(),
30350*/
30351 __pyx_memoryview_thread_locks_used = 0;
30352
30353 /* "View.MemoryView":341
30354 *
30355 * cdef int __pyx_memoryview_thread_locks_used = 0
30356 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
30357 * PyThread_allocate_lock(),
30358 * PyThread_allocate_lock(),
30359*/
30360 __pyx_t_7[0] = PyThread_allocate_lock();
30361 __pyx_t_7[1] = PyThread_allocate_lock();
30362 __pyx_t_7[2] = PyThread_allocate_lock();
30363 __pyx_t_7[3] = PyThread_allocate_lock();
30364 __pyx_t_7[4] = PyThread_allocate_lock();
30365 __pyx_t_7[5] = PyThread_allocate_lock();
30366 __pyx_t_7[6] = PyThread_allocate_lock();
30367 __pyx_t_7[7] = PyThread_allocate_lock();
30368 memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_7, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
30369
30370 /* "View.MemoryView":979
30371 *
30372 *
30373 * try: # <<<<<<<<<<<<<<
30374 * count = __pyx_collections_abc_Sequence.count
30375 * index = __pyx_collections_abc_Sequence.index
30376*/
30377 {
30378 __Pyx_PyThreadState_declare
30379 __Pyx_PyThreadState_assign
30380 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
30381 __Pyx_XGOTREF(__pyx_t_1);
30382 __Pyx_XGOTREF(__pyx_t_2);
30383 __Pyx_XGOTREF(__pyx_t_3);
30384 /*try:*/ {
30385
30386 /* "View.MemoryView":980
30387 *
30388 * try:
30389 * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<<
30390 * index = __pyx_collections_abc_Sequence.index
30391 * except:
30392*/
30393 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 980, __pyx_L18_error)
30394 __Pyx_GOTREF(__pyx_t_4);
30395 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 980, __pyx_L18_error)
30396 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30397
30398 /* "View.MemoryView":981
30399 * try:
30400 * count = __pyx_collections_abc_Sequence.count
30401 * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<<
30402 * except:
30403 * pass
30404*/
30405 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 981, __pyx_L18_error)
30406 __Pyx_GOTREF(__pyx_t_4);
30407 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 981, __pyx_L18_error)
30408 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30409
30410 /* "View.MemoryView":979
30411 *
30412 *
30413 * try: # <<<<<<<<<<<<<<
30414 * count = __pyx_collections_abc_Sequence.count
30415 * index = __pyx_collections_abc_Sequence.index
30416*/
30417 }
30418 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
30419 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
30420 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
30421 goto __pyx_L23_try_end;
30422 __pyx_L18_error:;
30423 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30424 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30425
30426 /* "View.MemoryView":982
30427 * count = __pyx_collections_abc_Sequence.count
30428 * index = __pyx_collections_abc_Sequence.index
30429 * except: # <<<<<<<<<<<<<<
30430 * pass
30431 *
30432*/
30433 /*except:*/ {
30434 __Pyx_ErrRestore(0,0,0);
30435 goto __pyx_L19_exception_handled;
30436 }
30437 __pyx_L19_exception_handled:;
30438 __Pyx_XGIVEREF(__pyx_t_1);
30439 __Pyx_XGIVEREF(__pyx_t_2);
30440 __Pyx_XGIVEREF(__pyx_t_3);
30441 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
30442 __pyx_L23_try_end:;
30443 }
30444
30445 /* "View.MemoryView":985
30446 * pass
30447 *
30448 * try: # <<<<<<<<<<<<<<
30449 * if __pyx_collections_abc_Sequence:
30450 *
30451*/
30452 {
30453 __Pyx_PyThreadState_declare
30454 __Pyx_PyThreadState_assign
30455 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
30456 __Pyx_XGOTREF(__pyx_t_3);
30457 __Pyx_XGOTREF(__pyx_t_2);
30458 __Pyx_XGOTREF(__pyx_t_1);
30459 /*try:*/ {
30460
30461 /* "View.MemoryView":986
30462 *
30463 * try:
30464 * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<<
30465 *
30466 *
30467*/
30468 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 986, __pyx_L26_error)
30469 if (__pyx_t_8) {
30470
30471
30472 /* "View.MemoryView":990
30473 *
30474 *
30475 * __pyx_collections_abc_Sequence.register(_memoryviewslice) # <<<<<<<<<<<<<<
30476 * __pyx_collections_abc_Sequence.register(array)
30477 * except:
30478*/
30479 __pyx_t_5 = __pyx_collections_abc_Sequence;
30480 __Pyx_INCREF(__pyx_t_5);
30481 __pyx_t_6 = 0;
30482 {
30483 PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_memoryviewslice_type)};
30484 __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30485 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30486 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 990, __pyx_L26_error)
30487 __Pyx_GOTREF(__pyx_t_4);
30488 }
30489 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30490
30491 /* "View.MemoryView":991
30492 *
30493 * __pyx_collections_abc_Sequence.register(_memoryviewslice)
30494 * __pyx_collections_abc_Sequence.register(array) # <<<<<<<<<<<<<<
30495 * except:
30496 * pass # ignore failure, it's a minor issue
30497*/
30498 __pyx_t_5 = __pyx_collections_abc_Sequence;
30499 __Pyx_INCREF(__pyx_t_5);
30500 __pyx_t_6 = 0;
30501 {
30502 PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_array_type)};
30503 __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
30504 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30505 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 991, __pyx_L26_error)
30506 __Pyx_GOTREF(__pyx_t_4);
30507 }
30508 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30509
30510 /* "View.MemoryView":986
30511 *
30512 * try:
30513 * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<<
30514 *
30515 *
30516*/
30517 }
30518
30519 /* "View.MemoryView":985
30520 * pass
30521 *
30522 * try: # <<<<<<<<<<<<<<
30523 * if __pyx_collections_abc_Sequence:
30524 *
30525*/
30526 }
30527 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
30528 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
30529 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
30530 goto __pyx_L31_try_end;
30531 __pyx_L26_error:;
30532 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30533 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30534
30535 /* "View.MemoryView":992
30536 * __pyx_collections_abc_Sequence.register(_memoryviewslice)
30537 * __pyx_collections_abc_Sequence.register(array)
30538 * except: # <<<<<<<<<<<<<<
30539 * pass # ignore failure, it's a minor issue
30540 *
30541*/
30542 /*except:*/ {
30543 __Pyx_ErrRestore(0,0,0);
30544 goto __pyx_L27_exception_handled;
30545 }
30546 __pyx_L27_exception_handled:;
30547 __Pyx_XGIVEREF(__pyx_t_3);
30548 __Pyx_XGIVEREF(__pyx_t_2);
30549 __Pyx_XGIVEREF(__pyx_t_1);
30550 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
30551 __pyx_L31_try_end:;
30552 }
30553
30554 /* "(tree fragment)":4
30555 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
30556 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
30557 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<<
30558 * cdef object __pyx_result
30559 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
30560*/
30561 __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_mstate_global->__pyx_n_u_View_MemoryView); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
30562 __Pyx_GOTREF(__pyx_t_4);
30563 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error)
30564 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30565
30566 /* "BoundaryConditions.py":9
30567 * # cython: language_level=3
30568 * import cython
30569 * import numpy as np # <<<<<<<<<<<<<<
30570 * """
30571 * Module for creating boundary conditions. Imported in SpatialTools.py
30572*/
30573 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
30574 __pyx_t_4 = __pyx_t_1;
30575 __Pyx_GOTREF(__pyx_t_4);
30576 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_4) < (0)) __PYX_ERR(0, 9, __pyx_L1_error)
30577 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30578
30579 /* "BoundaryConditions.py":17
30580 * """
30581 *
30582 * __all__ = ['BC_Base', # <<<<<<<<<<<<<<
30583 * 'BoundaryCondition']
30584 *
30585*/
30586 {
30587 PyObject* __pyx_temp[2] = {__pyx_mstate_global->__pyx_n_u_BC_Base, __pyx_mstate_global->__pyx_n_u_BoundaryCondition};
30588 __pyx_t_4 = __Pyx_PyList_FromArray(__pyx_temp, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 17, __pyx_L1_error)
30589 __Pyx_GOTREF(__pyx_t_4);
30590 }
30591 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_4) < (0)) __PYX_ERR(0, 17, __pyx_L1_error)
30592 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30593
30594 /* "BoundaryConditions.py":52
30595 * # setattr(BC_Base, name, default_value)
30596 *
30597 * def getContext(self, context=None): # <<<<<<<<<<<<<<
30598 * """
30599 * Gets context from proteus.Context or
30600*/
30601 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_7BC_Base_3getContext, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BC_Base_getContext, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
30602 __Pyx_GOTREF(__pyx_t_4);
30603 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30604 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30605 #endif
30606 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[2]);
30607 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BC_Base, __pyx_mstate_global->__pyx_n_u_getContext, __pyx_t_4) < (0)) __PYX_ERR(0, 52, __pyx_L1_error)
30608 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30609
30610 /* "(tree fragment)":1
30611 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
30612 * cdef tuple state
30613 * cdef object _dict
30614*/
30615 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_7BC_Base_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BC_Base___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
30616 __Pyx_GOTREF(__pyx_t_4);
30617 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30618 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30619 #endif
30620 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BC_Base, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
30621 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30622
30623 /* "(tree fragment)":17
30624 * else:
30625 * return __pyx_unpickle_BC_Base, (type(self), 0x4d41573, state)
30626 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
30627 * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
30628*/
30629 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_7BC_Base_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BC_Base___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 17, __pyx_L1_error)
30630 __Pyx_GOTREF(__pyx_t_4);
30631 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30632 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30633 #endif
30634 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BC_Base, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 17, __pyx_L1_error)
30635 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30636
30637 /* "BoundaryConditions.py":81
30638 * self.uOfXT = None
30639 *
30640 * def init_cython(self): # <<<<<<<<<<<<<<
30641 * return self.uOfXT
30642 *
30643*/
30644 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_3init_cython, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition_init_cython, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
30645 __Pyx_GOTREF(__pyx_t_4);
30646 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30647 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30648 #endif
30649 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition, __pyx_mstate_global->__pyx_n_u_init_cython, __pyx_t_4) < (0)) __PYX_ERR(0, 81, __pyx_L1_error)
30650 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30651
30652 /* "BoundaryConditions.py":84
30653 * return self.uOfXT
30654 *
30655 * def resetBC(self): # <<<<<<<<<<<<<<
30656 * self.uOfXT = None
30657 *
30658*/
30659 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_5resetBC, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition_resetBC, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
30660 __Pyx_GOTREF(__pyx_t_4);
30661 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30662 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30663 #endif
30664 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition, __pyx_mstate_global->__pyx_n_u_resetBC, __pyx_t_4) < (0)) __PYX_ERR(0, 84, __pyx_L1_error)
30665 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30666
30667 /* "BoundaryConditions.py":87
30668 * self.uOfXT = None
30669 *
30670 * def setConstantBC(self, value): # <<<<<<<<<<<<<<
30671 * """
30672 * function returning constant BC
30673*/
30674 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_7setConstantBC, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition_setConstantBC, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
30675 __Pyx_GOTREF(__pyx_t_4);
30676 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30677 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30678 #endif
30679 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition, __pyx_mstate_global->__pyx_n_u_setConstantBC, __pyx_t_4) < (0)) __PYX_ERR(0, 87, __pyx_L1_error)
30680 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30681
30682 /* "BoundaryConditions.py":100
30683 *
30684 *
30685 * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
30686 * """
30687 * function returning value=a0+ax*x+ay*y+az*z
30688*/
30689 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_9setLinearBC, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition_setLinearBC, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
30690 __Pyx_GOTREF(__pyx_t_4);
30691 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30692 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30693 #endif
30694 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition, __pyx_mstate_global->__pyx_n_u_setLinearBC, __pyx_t_4) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
30695 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30696
30697 /* "BoundaryConditions.py":115
30698 * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
30699 *
30700 * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
30701 * """
30702 * function setting a linear ramp from t=0 to t=t1
30703*/
30704 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearRamp, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition_setLinearRamp, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
30705 __Pyx_GOTREF(__pyx_t_4);
30706 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30707 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30708 #endif
30709 if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BoundaryCondition, __pyx_mstate_global->__pyx_n_u_setLinearRamp, __pyx_t_4) < (0)) __PYX_ERR(0, 115, __pyx_L1_error)
30710 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30711
30712 /* "(tree fragment)":1
30713 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
30714 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
30715 * def __setstate_cython__(self, __pyx_state):
30716*/
30717 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
30718 __Pyx_GOTREF(__pyx_t_4);
30719 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30720 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30721 #endif
30722 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
30723 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30724
30725 /* "(tree fragment)":3
30726 * def __reduce_cython__(self):
30727 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
30728 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
30729 * raise TypeError, "self.uuOfXT cannot be converted to a Python object for pickling"
30730*/
30731 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundaryCondition___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
30732 __Pyx_GOTREF(__pyx_t_4);
30733 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30734 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30735 #endif
30736 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
30737 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30738
30739 /* "(tree fragment)":4
30740 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
30741 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
30742 * def __pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<<
30743 * cdef object __pyx_result
30744 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x4d41573, 0x7d477a1, 0x96e6a1f, b'BC_type, Shape, _b_or, ct, name, nd')
30745*/
30746 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_1__pyx_unpickle_BC_Base, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BC_Base, NULL, __pyx_mstate_global->__pyx_n_u_BoundaryConditions, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
30747 __Pyx_GOTREF(__pyx_t_4);
30748 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
30749 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
30750 #endif
30751 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BC_Base, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error)
30752 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30753
30754 /* "BoundaryConditions.py":1
30755 * #!python # <<<<<<<<<<<<<<
30756 * # distutils: language = c++
30757 * # cython: profile=True, binding=True, embedsignature=True
30758*/
30759 __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
30760 __Pyx_GOTREF(__pyx_t_4);
30761 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
30762 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30763 __Pyx_TraceReturnValue(Py_None, 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
30764 __Pyx_PyMonitoring_ExitScope(0);
30765
30766 /*--- Wrapped vars code ---*/
30767
30768 goto __pyx_L0;
30769 __pyx_L1_error:;
30770 __Pyx_XDECREF(__pyx_t_4);
30771 __Pyx_XDECREF(__pyx_t_5);
30772 __Pyx_TraceException(__pyx_lineno, 0, 0);
30773 __Pyx_TraceExceptionUnwind(1, 0);
30774 if (__pyx_m) {
30775 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
30776 __Pyx_AddTraceback("init BoundaryConditions", __pyx_clineno, __pyx_lineno, __pyx_filename);
30777 }
30778 #if !CYTHON_USE_MODULE_STATE
30779 Py_CLEAR(__pyx_m);
30780 #else
30781 Py_DECREF(__pyx_m);
30782 if (pystate_addmodule_run) {
30783 PyObject *tp, *value, *tb;
30784 __Pyx_PyErr_FetchException(&tp, &value, &tb);
30785 __Pyx_State_RemoveModule(&__pyx_moduledef);
30786 __Pyx_PyErr_RestoreException(tp, value, tb);
30787 }
30788 #endif
30789 } else if (!PyErr_Occurred()) {
30790 PyErr_SetString(PyExc_ImportError, "init BoundaryConditions");
30791 }
30792 __pyx_L0:;
30793 __Pyx_RefNannyFinishContext();
30794 #if CYTHON_PEP489_MULTI_PHASE_INIT
30795 return (__pyx_m != NULL) ? 0 : -1;
30796 #else
30797 return __pyx_m;
30798 #endif
30799}
30800/* #### Code section: pystring_table ### */
30801/* #### Code section: cached_builtins ### */
30802
30803static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
30804 int __pyx_lineno = 0;
30805 const char *__pyx_filename = NULL;
30806 int __pyx_clineno = 0;
30807 CYTHON_UNUSED_VAR(__pyx_mstate);
30808 __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 113, __pyx_L1_error)
30809 __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 119, __pyx_L1_error)
30810 __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 175, __pyx_L1_error)
30811 __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 436, __pyx_L1_error)
30812 __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(1, 662, __pyx_L1_error)
30813
30814 /* Cached unbound methods */
30815 __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
30816 __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
30817 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
30818 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
30819 __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
30820 __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
30821 return 0;
30822 __pyx_L1_error:;
30823 return -1;
30824}
30825/* #### Code section: cached_constants ### */
30826
30827static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
30828 __Pyx_RefNannyDeclarations
30829 int __pyx_lineno = 0;
30830 const char *__pyx_filename = NULL;
30831 int __pyx_clineno = 0;
30832 CYTHON_UNUSED_VAR(__pyx_mstate);
30833 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
30834
30835 /* "View.MemoryView":625
30836 * def suboffsets(self):
30837 * if self.view.suboffsets == NULL:
30838 * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
30839 *
30840 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
30841*/
30842 __pyx_mstate_global->__pyx_tuple[0] = PyTuple_New(1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(1, 625, __pyx_L1_error)
30843 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
30844 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_1);
30845 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_neg_1);
30846 if (__Pyx_PyTuple_SET_ITEM(__pyx_mstate_global->__pyx_tuple[0], 0, __pyx_mstate_global->__pyx_int_neg_1) != (0)) __PYX_ERR(1, 625, __pyx_L1_error);
30847 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
30848
30849 /* "View.MemoryView":745
30850 *
30851 * if first_ellipsis_index >= 0:
30852 * result = [slice(None)] * ndim # <<<<<<<<<<<<<<
30853 *
30854 * for idx in range(first_ellipsis_index):
30855*/
30856 __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(1, 745, __pyx_L1_error)
30857 __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
30858 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
30859
30860 /* "View.MemoryView":763
30861 *
30862 * have_slices = True
30863 * index_tuple += (slice(None),) * (ndim - idx) # <<<<<<<<<<<<<<
30864 *
30865 * return have_slices, index_tuple
30866*/
30867 __pyx_mstate_global->__pyx_tuple[1] = PyTuple_New(1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(1, 763, __pyx_L1_error)
30868 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
30869 __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
30870 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
30871 if (__Pyx_PyTuple_SET_ITEM(__pyx_mstate_global->__pyx_tuple[1], 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 763, __pyx_L1_error);
30872 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
30873
30874 /* "BoundaryConditions.py":52
30875 * # setattr(BC_Base, name, default_value)
30876 *
30877 * def getContext(self, context=None): # <<<<<<<<<<<<<<
30878 * """
30879 * Gets context from proteus.Context or
30880*/
30881 {
30882 PyObject* __pyx_temp[1] = {Py_None};
30883 __pyx_mstate_global->__pyx_tuple[2] = __Pyx_PyTuple_FromArray(__pyx_temp, 1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 52, __pyx_L1_error)
30884 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
30885 }
30886 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
30887 #if CYTHON_IMMORTAL_CONSTANTS
30888 {
30889 PyObject **table = __pyx_mstate->__pyx_tuple;
30890 for (Py_ssize_t i=0; i<3; ++i) {
30891 #if PY_VERSION_HEX >= 0x030F0000
30892 PyUnstable_SetImmortal(table[i]);
30893 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
30894 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
30895 #if PY_VERSION_HEX < 0x030E0000
30896 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
30897 #else
30898 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
30899 #endif
30900 {
30901 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
30902 }
30903 #else
30904 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
30905 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
30906 #endif
30907 }
30908 }
30909 #endif
30910 #if CYTHON_IMMORTAL_CONSTANTS
30911 {
30912 PyObject **table = __pyx_mstate->__pyx_slice;
30913 for (Py_ssize_t i=0; i<1; ++i) {
30914 #if PY_VERSION_HEX >= 0x030F0000
30915 PyUnstable_SetImmortal(table[i]);
30916 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
30917 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
30918 #if PY_VERSION_HEX < 0x030E0000
30919 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
30920 #else
30921 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
30922 #endif
30923 {
30924 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
30925 }
30926 #else
30927 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
30928 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
30929 #endif
30930 }
30931 }
30932 #endif
30933 __Pyx_RefNannyFinishContext();
30934 return 0;
30935 __pyx_L1_error:;
30936 __Pyx_RefNannyFinishContext();
30937 return -1;
30938}
30939/* #### Code section: init_constants ### */
30940
30941static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
30942 int __pyx_lineno = 0;
30943 const char *__pyx_filename = NULL;
30944 int __pyx_clineno = 0;
30945 CYTHON_UNUSED_VAR(__pyx_mstate);
30946 {
30947 const struct { const unsigned int length: 8; } str_length_index[] = {{6},{8},{15},{1},{2},{15},{23},{25},{32},{20},{22},{1},{1},{37},{45},{22},{179},{32},{8},{15},{7},{6},{2},{9},{50},{39},{34},{30},{29},{63},{30},{37},{8},{5},{7},{25},{27},{18},{17},{35},{37},{29},{25},{31},{29},{31},{18},{7},{6},{8},{4},{8},{15},{20},{7},{12},{9},{17},{7},{8},{8},{7},{12},{10},{8},{8},{10},{8},{7},{14},{12},{11},{10},{22},{33},{19},{14},{12},{10},{17},{13},{7},{12},{12},{19},{8},{5},{13},{1},{2},{3},{15},{18},{3},{4},{4},{1},{18},{7},{5},{15},{6},{9},{5},{5},{6},{7},{3},{10},{2},{5},{11},{5},{8},{7},{4},{1},{4},{2},{4},{2},{5},{3},{4},{3},{7},{8},{7},{4},{13},{31},{11},{29},{13},{31},{10},{5},{4},{5},{5},{4},{4},{6},{3},{1},{2},{6},{6},{12},{5},{6},{1},{5}};
30948 const struct { const unsigned int length: 8; } bytes_length_index[] = {{1},{9},{11},{55},{160},{9},{9},{11},{11},{11},{2},{2},{2},{12},{28},{22},{157},{108},{37}};
30949 #ifndef CYTHON_COMPRESS_STRINGS
30950 #define CYTHON_COMPRESS_STRINGS 90
30951 #endif
30952 #if (CYTHON_COMPRESS_STRINGS) == 1 /* compression: zlib (1481 bytes) */
30953static const char cstring[] = "x\332}\025KO\033G\030\033+%\2014q\202\032\251U\225\241QE\322&nPI\233&\210\n\003\r4\r\301<\362 \221V\343\335\261=ewf\2753c\354(\007\216>\356q\217>\372\350\243\217>\372\270G\037\371\t\374\204~\263k\033S\023,y\277o\346{?\007a\211\036W\021\317\377KL\271|_z\204\240\202\207\213\016a\362A\346\031ZzE\034\356\325\336Pr\204x\001-\231\234IZT\\\t\204\231\205,\352i\271\377_S6 \010\351Q\213X#\314\210{\227\322\317\337\r9\227\377\\\305\214q\211\260\020\264\310\220\344\310#\330z\304\231]CN\344d\005\234\334d\025lS\0139\334\"\017\021\251\272 \013\252\346\315ymw\276\300=\351a6\377\020\025A\325\200Y\224\260K\300\024\302U*\320\026\227\004\311\022$f\265&K\234!\270\263\210M\363\304\303\222\2005\355\037h\3654\023C\333\353\333\217\026\237.F\336zD\247Q \241\362\246\r\216\022\241\223\226W\324\226\240]\326\\\"2h\263\200j\\!F\300/\210\302\005\276Q\001Y\"\014\t\"5\202\346\243\230\261\244\234\031 NYq\276\237&Z!Z\372/l\013\222\331\215\002\200\000\301\007G\t\211\362$\322\033[\310\256b\3132@\0171\271mkY\316D\006\347M\213\n\234\267\ta\372[4\251\2101\213q\010\270\200\225-\221ax\304R&1\014d\251\310\"\343\354\021$\240B\261\rT\2232*\r\203)\307\255e\014\223{$\343\200\034\305\236\207k\250\200\251\035\373@\035\027R?\312\246\034,Kc\034\256\007n*\361K\226+fa\257\266\312\241\001b\207\335\252u\031\265&\210]\310(\365\272\360n\017\231q\257@\032\2403+\304\223\261\r\214\266\343\222\306\375\216\240\035\220K\315C\033\022\253\242\330#.\333\346&\224\032\305AXX\342\314\005\324\270kt\331\343\206\025\231%\033;y\013/\257\354\256nnfW\215,\026\244\0172\303D\232\221\007\206qF\200b\013\250\3618\251H$D(IU\216\005<vq\201\201\013X\306M\2151E\005\215\311\343D\217\200\206\354\3528AD\256\202n\366%\362?\224\021\354]J\334\301\216;^\332~\n\326\270\203)[\267m\352\n*\2668#\273\244\254\0103\211^N\231\263=e\030\333\265*\374\327`H\215-\220\334!\005\303\200\262\031\360\353\317\023\321x4qg\010d\233J\342\350\013\030\367\010h\r\360+(fj\010\034} \006:\342\256\215\260h\020\014C{\031An);\342a\330\211\241\366\3150\\\360\316,\021\363P(\047>AVafb\274""\257Y\243z_\304\230bQ\227\222Ag|\351\02629\252`\310\260\316\006\246*R\367\261v\243\254\260=\360l0\343c=4\274 U}\020q\0024\030\210\212\221d\214u\227aH\"\344 \223T\350\311\347J\352b\343\307\260\200\006\263d\344U\241\000\353U\324\230Iyf\310%\362\006\315\033\334\313Ct\246\tSJ \315\006lp\223\344\261yh\306\235aB\313H+\312\026\230\210G\033\372\002^\000\002qG[\233x\036\367\n6.\n\030yX<\375w\000*y6c\324\202\307\206TG\372_\267\203\210?\237\010\2741\372\201\321\017\013\323\3013\013\032\324an\264\323\300\250\013\016\271\334\355\257(\217\024\251\2007\242?0z7\235\033\221s\007X\034\220\006[,\0177\310\310\274\214\240\227\360\351\3219w\270\220\267\277\325\243\315\245c\002\373^\\2\360\325\025\222\303\337S\360\202)G\312\005h\037\210I\271\260\000!\"2,/<\232*\376\210\352\047\342q\361\3728\321K]\253\377\354\3474\362c#\327(4W\216\023\047\251\273A9D\217[\323\355\347\235\3030\267\323K\335\366\177\017\3567\346\032\013\275\324W\307\237\3410\327\233z\320L7\177jmu\346z\251\351\372\302q\342tj\342\332w\232\220\366g\375\203@6\2366\027\233\325\226l?\351\244:/\272\213\335ro\352\246\377\225_\016\256\004vsNk\252\324\337\372\353\301l\220\353M\335\362A\362\216_>\201\217\014\376h\274h>iM\266\026[G\355bg\277{\257\273\027\346\366\303\375\217\341G\034b+\264Ja\211\205L\205\252\242\365\200\346\033\341\215\373\315Ts\245\371\266\365\262}\324\301\047\347o\312\307+\275\251\231\372&\204\n\310\215\272\364\027\216WNg\047\256^\217\357N\2779C\277\355\243\365\225z\331O\373F#\253\363\322\334o\315\215\340?\264VZ\273\355D;\335\276\327\316\265q\273<\244\035\264\312p?\333\336i\227;\211p\342\357.\204z\323\237\016\2367pC6\227Z\265\316tw\241\273\026nC0$$n\350\226\303\262:\235\230\250$\262I\000\331\344\206\006\033\311]\rv\223{\032\354%\337i\360.ii`%m\r\354\344\221\006G\311\252\006\325\344g\r>\0477&\265\370\344\226\006[\223\3575x?y\240\301\301\344\207\311^\352\373 \027\260\346\253v:\004\364Cs\272\365\254\375\246\263\320O\217\006\033~\224\254\227>\344u\272\376\233\177\047H\364\256}]/\370kP\272b#\327\273\036\325\2617s\323\277\342""\343\223\231\333\376\257~1x\003\335\001\354O\006\244\253\272\260\001\2205\n\266\346\032\351\323[\023Wg\352\013\275\231\264\177\267\221\210\345\213\301^#}\022\253\372\017\340g/y";
30954 PyObject *data = __Pyx_DecompressString(cstring, 1481, 1);
30955 #define __Pyx_DecompressString_LZSS_UNUSED
30956 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
30957 const char* const bytes = __Pyx_PyBytes_AsString(data);
30958 #if !CYTHON_ASSUME_SAFE_MACROS
30959 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
30960 #endif
30961 #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90 /* compression: lzss (1941 bytes) */
30962static const char cstring[] = "\377 at 0x o\377bject>(t\377ree frag\377ment).: \377<MemoryV\377iew of <\377contiguo\377us and d\263ir4\001\007\rin\021\005s\277trided\"\010 7or \004\031><(\tA\006\377>?Cannot\377 assign \377to read-\277only m\240\002v\376\242\000Invalid\377 mode, esxp\324\000|\000\047c\047t\001\377\047fortran\317\047, gH\000%\005sh\367ape\222\000 axi\377s Note t\375h\226 Cython\375 \021\000delibe\317ratek\000\320\001ct\373er!\001n PEPo-484\212\"re\303!\177s subcl\246\000\373es\261!built\375i\260\000ypes. \377If you n\311e\224 \303\000p\316\000%\tth\277en set\200\000e\373 \047\357\002ation\377_typing\047\366\355$iv\242\000o Fa\037lse.S\274\002\326 \220@\377must be \374T\001\\\003BCadd_>\271 ecoll\345@K\000\377s.abcdis\277ableen\002\001g\367cis\004\003dno \377default \377__reduce\337__ dum\002no{n-\322@vial\033\000\377cinit__n\377umpy._co\357re.m5\000iar\377ray fail\316\340\003imp\370 \033\tum\267ath\021\016pr\373 u\377s/Bounda\317ryCo\310`\373\001s.\367pxd\002\031ysel\377f.uuOfXT\363 c\246c\204 convwert\346#a P\315C\372\352\204\003 \214` pick\345l\326 u\201\"\324aall\353oc\350@ \277\003dat\303a.\013\020\260c\202\205\001\337\204\003s.\377<lambda>\377ASCIIBC_\257Base\000\004.\300&cf\320b__\017\007\352@st\330`\335_\013\rget\375\000te\003xt\376\016\217.N\020\263-\201\000Y\017\360\024\016\314B\237\003S\017rese\227tBCl\017s\246\002\304\000n~\007\025Linear%\024\236\027\003Ramp\347O\374\004D\377omainEll\377ipsisNon\377eSequenc\365e\231\210\001.\236\210\007__Py\375x\001\000Dict_N\276\272 Ref__\322@_A_\004\000\300\207\001\350!\n\000\236\206\002_\000\006\336\353 item\"\001de\361l\002\002>\0013\000func\0009\001\215@\000\004\252CN\000\322\204\003V\001\203\205\003\363__\242\001f\001modu\273lep\001nam\002\003e\365w\177\001p\233\000chec\307ksuj\000\n\001\323 ul\307t__\026\001S\004!\001ty[pe\017\003un\241\204\002e\255e~\000\023__set_6\0106.\006Enc\005vt\356\206\001\206!\017qual\222\005\334\206\005\224\204\016\366\206\006\023ex\272!\\\001_a\003\315\005\264\204\006\374\022\003\273\204\013__test\332""\365 d\210Ais\235\207\001ou}t\206aa0abc\342\205\005\377_buffera\377syncio.c\373or \003sb_ib\377_orbasec\373cl\277`_in_t\377raceback\376\211\214\001extcoun\303td\251\"`\000\305\214\003\225`od\337eenum\261\212\002er\377rorflags\277format\201\213\004g\373et\332\205\007idind\323ex\365\204\010\213as\000\002izOemem\335\213\001\325\213\001n\316A\377ndndimnp\336\366\210\002objp\216\000po\375p\272\210\004regist`t\000\253\205\003\230\210\001\226\205\n\243\205\n.<\355\207\001wls>\271\207\006set\250\205\005\000\000\010\r\030\267\205\001,\006\304\205\001?\022\317\212\004\353\214\002}s\321\000start\367\207\002\336\251\000psto\001\000ru\377ctsumtt1\374\363`\342 update\357use_\240\210\005val\373ue\000\002sxzer\377osO\200\001\330\004\n\357\210+\220Q\005\001%\240Q\377\240f\250A\200\001\340\004\377\037\230q\320 0\260\013\377\270;\300k\320QR\330\377\004\023\2207\230(\240!\177\2401\330\004\007\200|\n\000\377!\330\010)\250\021\250*\377\260N\300!\330\004\013\210\3771\200\001\360\010\000\n\033\375\230\026\000\021\220\024\220Z\230\377t\2408\2504\250x\260\377t\2705\300\004\300G\310\3774\310q\330\010\020\220\007\177\220q\230\006\230l\2503\000\377\007\200v\210W\220E\230\177\024\230Q\330\010\022\220P\000\377\027\220q\340\010\027\220t\377\2309\240G\2505\260\003\377\2604\260w\270g\300U\377\310#\310T\320QU\320\377U\\\320\\a\320ad\377\320dh\320hn\320n\317u\320uv\216\001W\000\017\320\377\017(\250\004\250A\250W\377\260K\270w\300a\340\010\376\005\nq\200A\330\010\014\210\371I\350\000\006\000\017\210t\2201\177\200A\360\024\000\t\r\016\003\353\360\026\001\007\032\017\004\210A\210\177q\220\021\220_\240B\224!\357\250U\260!\001\010\"\260A\377\260S\270\001\270\021\270#\277\270Q\270a\270q\037\006Z\373\260q\025\000\024\270R\270q\277\300\001\320\000J\310\236 \020\377\220\013\230;\240a\240t\377\250<\260y\300\013\3101\357\310D\320P\312\000e\320e\377p\320pq\320qu\360\277\000\000v\001B\002\004\000B\273\002H\003\001H\002S\n\001S\273\002T\021\001T\002X\030\001X\273\002d\037\001d\002l&\001l\273\002w-\001w\002x4\001x{""\002|;\001|\002H\003J\000wH\003N\003\001N\003Y\n\001\367Y\003Z\021\001Z\003[\003\377\330\004\035\230Q\230n\250\357M\270\021\320\010\000[\250\013?\260:\270V\3001\230$\242!\333H\220\250\"K\220\257@\013\210\3776\220\027\230\001\330\n\016\357\210f\220D\270@g\240Q\373\330\r\303B\330\014\020\220\006\377\220a\340\014\023\2203\220\367g\230V\233`\010\013\2105\324\337A\027\001\t\325A\230\034\000\020\220\373\t\230i\000!\240\021\360\022\377\000\t\014\2101\330\014\021\357\220\037\240\001:\003g\230T\007\240\021\340E\003";
30963 PyObject *data = __Pyx_DecompressString_LZSS(cstring, 1941, 2774);
30964 #define __Pyx_DecompressString_UNUSED
30965 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
30966 const char* const bytes = __Pyx_PyBytes_AsString(data);
30967 #if !CYTHON_ASSUME_SAFE_MACROS
30968 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
30969 #endif
30970 #else /* compression: none (2774 bytes) */
30971static const char bytes[] = " at 0x object>(tree fragment).: <MemoryView of <contiguous and direct><contiguous and indirect><strided and direct or indirect><strided and direct><strided and indirect>>?Cannot assign to read-only memoryviewInvalid mode, expected \047c\047 or \047fortran\047, got Invalid shape in axis Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the \047annotation_typing\047 directive to False.Shape or nd must be passed to BCadd_notecollections.abcdisableenablegcisenabledno default __reduce__ due to non-trivial __cinit__numpy._core.multiarray failed to importnumpy._core.umath failed to importproteus/BoundaryConditions.pxdproteus/BoundaryConditions.pyself.uuOfXT cannot be converted to a Python object for picklingunable to allocate array data.unable to allocate shape and strides.<lambda>ASCIIBC_BaseBC_Base.__reduce_cython__BC_Base.__setstate_cython__BC_Base.getContextBoundaryConditionBoundaryCondition.__reduce_cython__BoundaryCondition.__setstate_cython__BoundaryCondition.init_cythonBoundaryCondition.resetBCBoundaryCondition.setConstantBCBoundaryCondition.setLinearBCBoundaryCondition.setLinearRampBoundaryConditionsContextDomainEllipsisNoneSequenceView.MemoryView__Pyx_PyDict_NextRef__all____annotate____class____class_getitem____del____dict____func____get____getstate____import____init____main____module____name____new____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_BC_Base__pyx_unpickle_BC_Base__set_state__pyx_unpickle_Enum__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex____set____set_name____setstate____setstate_cython____test___dict_is_coroutineaa0abcallocate_bufferasyncio.coroutinesb_ib_orbaseccline_in_tracebackcontextcountdtype_is_objectencodeenumerateerrorflagsformatfortrangetgetContextidindexinit_cythonitemsitemsizememviewmodennamendndimnpnumpyobjpackpopproteusregisterresetBCselfsetConstantBCsetConstantBC.<locals>.<lambda>setLinearBCsetLinearBC.<locals>.<lambda"">setLinearRampsetLinearRamp.<locals>.<lambda>setdefaultshapesizestartstatestepstopstructsumtt1unpackupdateuse_setstatevaluevaluesxzerosO\200\001\330\004\n\210+\220Q\200\001\330\004%\240Q\240f\250A\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2207\230(\240!\2401\330\004\007\200|\2207\230!\330\010)\250\021\250*\260N\300!\330\004\013\2101\200\001\360\010\000\n\033\230!\330\010\021\220\024\220Z\230t\2408\2504\250x\260t\2705\300\004\300G\3104\310q\330\010\020\220\007\220q\230\006\230l\250!\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2309\240G\2505\260\003\2604\260w\270g\300U\310#\310T\320QU\320U\\\320\\a\320ad\320dh\320hn\320nu\320uv\330\004\007\200q\330\010\017\320\017(\250\004\250A\250W\260K\270w\300a\340\010\017\320\017(\250\004\250A\250W\260K\270q\200A\330\010\014\210I\220Q\200A\330\010\017\210t\2201\200A\360\024\000\t\r\210I\220Q\200A\360\026\000\t\r\210I\220Q\200A\360\032\000\t\r\210I\220Q\210A\210q\220\021\220_\240B\240f\250A\250U\260!\220_\240B\240f\250A\250U\260\"\260A\260S\270\001\270\021\270#\270Q\270a\270q\220_\240B\240f\250A\250Z\260q\270\001\270\024\270R\270q\300\001\320\000J\310!\330\004\020\220\013\230;\240a\240t\250<\260y\300\013\3101\310D\320P\\\320\\e\320ep\320pq\320qu\360\000\000v\001B\002\360\000\000B\002H\002\360\000\000H\002S\002\360\000\000S\002T\002\360\000\000T\002X\002\360\000\000X\002d\002\360\000\000d\002l\002\360\000\000l\002w\002\360\000\000w\002x\002\360\000\000x\002|\002\360\000\000|\002H\003\360\000\000H\003N\003\360\000\000N\003Y\003\360\000\000Y\003Z\003\360\000\000Z\003[\003\330\004\035\230Q\230n\250M\270\021\320\004\035\230[\250\013\260:\270V\3001\330\010\014\210I\220Q\330\010\014\210H\220A\330\010\014\210K\220q\330\010\013\2106\220\027\230\001\330\n\016\210f\220D\230\006\230g\240Q\330\r\020\220\007\220q\330\014\020\220\006\220a\340\014\023\2203\220g\230V\2401\330\010\013\2105\220\007\220q\330\014\020\220\t\230\024\230Q\230a\340\014\020\220\t\230\021\320\004!\240""\021\360\022\000\t\014\2101\330\014\021\220\037\240\001\330\014\020\220\006\220g\230T\240\021\340\014\020\220\006\220a";
30972 PyObject *data = NULL;
30973 #define __Pyx_DecompressString_UNUSED
30974 #define __Pyx_DecompressString_LZSS_UNUSED
30975 #endif
30976 PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
30977 Py_ssize_t pos = 0;
30978 for (int i = 0; i < 153; i++) {
30979 Py_ssize_t bytes_length = str_length_index[i].length;
30980 PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
30981 if (likely(string) && i >= 32) PyUnicode_InternInPlace(&string);
30982 if (unlikely(!string)) {
30983 Py_XDECREF(data);
30984 __PYX_ERR(0, 1, __pyx_L1_error)
30985 }
30986 stringtab[i] = string;
30987 pos += bytes_length;
30988 }
30989 for (int i = 153; i < 172; i++) {
30990 Py_ssize_t bytes_length = bytes_length_index[i-153].length;
30991 PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
30992 stringtab[i] = string;
30993 pos += bytes_length;
30994 if (unlikely(!string)) {
30995 Py_XDECREF(data);
30996 __PYX_ERR(0, 1, __pyx_L1_error)
30997 }
30998 }
30999 Py_XDECREF(data);
31000 for (Py_ssize_t i = 0; i < 172; i++) {
31001 if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
31002 __PYX_ERR(0, 1, __pyx_L1_error)
31003 }
31004 }
31005 #if CYTHON_IMMORTAL_CONSTANTS
31006 {
31007 PyObject **table = stringtab + 153;
31008 for (Py_ssize_t i=0; i<19; ++i) {
31009 #if PY_VERSION_HEX >= 0x030F0000
31010 PyUnstable_SetImmortal(table[i]);
31011 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
31012 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
31013 #if PY_VERSION_HEX < 0x030E0000
31014 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
31015 #else
31016 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
31017 #endif
31018 {
31019 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
31020 }
31021 #else
31022 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
31023 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
31024 #endif
31025 }
31026 }
31027 #endif
31028 }
31029 {
31030 PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
31031 int8_t const cint_constants_1[] = {0,-1,3};
31032 int32_t const cint_constants_4[] = {81007987L,136983863L};
31033 for (int i = 0; i < 5; i++) {
31034 numbertab[i] = PyLong_FromLong((i < 3 ? cint_constants_1[i - 0] : cint_constants_4[i - 3]));
31035 if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
31036 }
31037 }
31038 #if CYTHON_IMMORTAL_CONSTANTS
31039 {
31040 PyObject **table = __pyx_mstate->__pyx_number_tab;
31041 for (Py_ssize_t i=0; i<5; ++i) {
31042 #if PY_VERSION_HEX >= 0x030F0000
31043 PyUnstable_SetImmortal(table[i]);
31044 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
31045 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
31046 #if PY_VERSION_HEX < 0x030E0000
31047 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
31048 #else
31049 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
31050 #endif
31051 {
31052 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
31053 }
31054 #else
31055 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
31056 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
31057 #endif
31058 }
31059 }
31060 #endif
31061 return 0;
31062 __pyx_L1_error:;
31063 return -1;
31064}
31065/* #### Code section: init_codeobjects ### */
31066#ifdef __cplusplus
31067namespace {
31068#endif
31069typedef struct {
31070 unsigned int argcount : 3;
31071 unsigned int num_posonly_args : 1;
31072 unsigned int num_kwonly_args : 1;
31073 unsigned int nlocals : 3;
31074 unsigned int flags : 10;
31075 unsigned int first_line : 7;
31076} __Pyx_PyCode_New_function_description;
31077#ifdef __cplusplus
31078} /* anonymous namespace */
31079#endif
31080/* NewCodeObj.proto */
31081static PyObject* __Pyx_PyCode_New(
31082 const __Pyx_PyCode_New_function_description descr,
31083 PyObject * const *varnames,
31084 PyObject *filename,
31085 PyObject *funcname,
31086 PyObject *line_table,
31087 PyObject *tuple_dedup_map
31088);
31089
31090
31091static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
31092 PyObject* tuple_dedup_map = PyDict_New();
31093 if (unlikely(!tuple_dedup_map)) return -1;
31094 {
31095 const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 24};
31096 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_b_or, __pyx_mstate->__pyx_n_u_b_i, __pyx_mstate->__pyx_n_u_nd};
31097 __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_V1_IQ_HA_Kq_6_fD_gQ_q_a_3gV1_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
31098 }
31099 {
31100 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 52};
31101 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_context, __pyx_mstate->__pyx_n_u_Context};
31102 __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_getContext, __pyx_mstate->__pyx_kp_b_iso88591_1_gT_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
31103 }
31104 {
31105 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 9};
31106 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31107 __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
31108 }
31109 {
31110 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 9};
31111 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31112 __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
31113 }
31114 {
31115 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 10};
31116 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31117 __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
31118 }
31119 {
31120 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 10};
31121 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31122 __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
31123 }
31124 {
31125 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 10};
31126 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31127 __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_del, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
31128 }
31129 {
31130 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11};
31131 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31132 __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
31133 }
31134 {
31135 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11};
31136 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31137 __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
31138 }
31139 {
31140 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11};
31141 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31142 __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_del, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
31143 }
31144 {
31145 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 12};
31146 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31147 __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
31148 }
31149 {
31150 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 12};
31151 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31152 __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
31153 }
31154 {
31155 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 12};
31156 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31157 __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_del, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
31158 }
31159 {
31160 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 13};
31161 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31162 __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
31163 }
31164 {
31165 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 13};
31166 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31167 __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
31168 }
31169 {
31170 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 13};
31171 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31172 __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_del, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
31173 }
31174 {
31175 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
31176 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate};
31177 __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Zt84xt5_G4q_q_l_vWE_Q_q_t9G5_4w, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
31178 }
31179 {
31180 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 17};
31181 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
31182 __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
31183 }
31184 {
31185 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 78};
31186 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31187 __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
31188 }
31189 {
31190 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 81};
31191 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31192 __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_init_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
31193 }
31194 {
31195 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 84};
31196 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31197 __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_resetBC, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
31198 }
31199 {
31200 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97};
31201 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_n};
31202 __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_BfAU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
31203 }
31204 {
31205 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 87};
31206 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31207 __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_setConstantBC, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
31208 }
31209 {
31210 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 113};
31211 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_n};
31212 __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_BfAU_AS_Qaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
31213 }
31214 {
31215 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 100};
31216 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_a0, __pyx_mstate->__pyx_n_u_a};
31217 __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_setLinearBC, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
31218 }
31219 {
31220 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 126};
31221 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_n};
31222 __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_BfAZq_Rq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
31223 }
31224 {
31225 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 115};
31226 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_t1, __pyx_mstate->__pyx_n_u_value};
31227 __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_py, __pyx_mstate->__pyx_n_u_setLinearRamp, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
31228 }
31229 {
31230 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 21};
31231 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31232 __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
31233 }
31234 {
31235 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 21};
31236 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
31237 __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
31238 }
31239 {
31240 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 21};
31241 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31242 __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_BoundaryConditions_pxd, __pyx_mstate->__pyx_n_u_del, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
31243 }
31244 {
31245 const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
31246 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
31247 __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
31248 }
31249 {
31250 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
31251 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
31252 __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
31253 }
31254 {
31255 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
31256 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
31257 __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle_BC_Base, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_1_7_N_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
31258 }
31259 {
31260 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11};
31261 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_result, __pyx_mstate->__pyx_n_u_pyx_state};
31262 __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle_BC_Base__set_stat, __pyx_mstate->__pyx_kp_b_iso88591_J_at_y_1DP_eeppqqu_v_B_B_H_H_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
31263 }
31264 Py_DECREF(tuple_dedup_map);
31265 return 0;
31266 bad:
31267 Py_DECREF(tuple_dedup_map);
31268 return -1;
31269}
31270/* #### Code section: init_globals ### */
31271
31272static int __Pyx_InitGlobals(void) {
31273 int __pyx_lineno = 0;
31274 const char *__pyx_filename = NULL;
31275 int __pyx_clineno = 0;
31276 /* PythonCompatibility.init */
31277 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0)); else
31278
31279 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31280
31281 /* PyFrozenDict.init */
31282 #if CYTHON_COMPILING_IN_LIMITED_API
31283 {
31284 PyObject *builtins = PyEval_GetBuiltins(); // borrowed
31285 if (likely(builtins)) {
31286 PyObject *type_name = PyUnicode_FromStringAndSize("frozendict", sizeof("frozendict")-1);
31287 if (likely(type_name)) {
31288 PyObject *frozendict_type = PyObject_GetItem(builtins, type_name);
31289 Py_DECREF(type_name);
31290 if (!frozendict_type && PyErr_ExceptionMatches(PyExc_KeyError)) {
31291 PyErr_Clear();
31292 frozendict_type = (PyObject*) &PyDict_Type;
31293 Py_INCREF(frozendict_type);
31294 }
31295 __pyx_mstate_global->__Pyx_PyFrozenDictType = frozendict_type;
31296 }
31297 }
31298 } // error handling follows
31299 #endif
31300
31301 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31302
31303 /* AssertionsEnabled.init */
31304 if (likely(__Pyx_init_assertions_enabled() == 0)); else
31305
31306 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31307
31308 /* CommonTypesMetaclass.init */
31309 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
31310
31311 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31312
31313 /* CachedMethodType.init */
31314 #if CYTHON_COMPILING_IN_LIMITED_API
31315 {
31316 PyObject *typesModule=NULL;
31317 typesModule = PyImport_ImportModule("types");
31318 if (typesModule) {
31319 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
31320 Py_DECREF(typesModule);
31321 }
31322 } // error handling follows
31323 #endif
31324
31325 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31326
31327 return 0;
31328 __pyx_L1_error:;
31329 return -1;
31330}
31331/* #### Code section: init_after_shared_utility ### */
31332
31333static int __Pyx_InitAfterSharedUtility(void) {
31334 int __pyx_lineno = 0;
31335 const char *__pyx_filename = NULL;
31336 int __pyx_clineno = 0;
31337 /* CythonFunctionPerModule.init */
31338 if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
31339
31340 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31341
31342 return 0;
31343 __pyx_L1_error:;
31344 return -1;
31345}
31346/* #### Code section: cleanup_globals ### */
31347/* #### Code section: cleanup_module ### */
31348/* #### Code section: main_method ### */
31349/* #### Code section: utility_code_pragmas ### */
31350#ifdef _MSC_VER
31351#pragma warning( push )
31352/* Warning 4127: conditional expression is constant
31353 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
31354 * compile-time, so this warning is not useful
31355 */
31356#pragma warning( disable : 4127 )
31357#endif
31358
31359
31360
31361/* #### Code section: utility_code_def ### */
31362
31363/* --- Runtime support code --- */
31364/* Refnanny */
31365#if CYTHON_REFNANNY
31366static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
31367 PyObject *m = NULL, *p = NULL;
31368 void *r = NULL;
31369 m = PyImport_ImportModule(modname);
31370 if (!m) goto end;
31371 p = PyObject_GetAttrString(m, "RefNannyAPI");
31372 if (!p) goto end;
31373 r = PyLong_AsVoidPtr(p);
31374end:
31375 Py_XDECREF(p);
31376 Py_XDECREF(m);
31377 return (__Pyx_RefNannyAPIStruct *)r;
31378}
31379#endif
31380
31381/* FastTypeChecks (used by GivenExceptionMatches) */
31382#if CYTHON_COMPILING_IN_CPYTHON
31383static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
31384 while (a) {
31385 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
31386 if (a == b)
31387 return 1;
31388 }
31389 return b == &PyBaseObject_Type;
31390}
31391static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
31392 PyObject *mro;
31393 if (a == b) return 1;
31394 mro = a->tp_mro;
31395 if (likely(mro)) {
31396 Py_ssize_t i, n;
31397 n = PyTuple_GET_SIZE(mro);
31398 for (i = 0; i < n; i++) {
31399 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
31400 return 1;
31401 }
31402 return 0;
31403 }
31404 return __Pyx_InBases(a, b);
31405}
31406static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
31407 PyObject *mro;
31408 if (cls == a || cls == b) return 1;
31409 mro = cls->tp_mro;
31410 if (likely(mro)) {
31411 Py_ssize_t i, n;
31412 n = PyTuple_GET_SIZE(mro);
31413 for (i = 0; i < n; i++) {
31414 PyObject *base = PyTuple_GET_ITEM(mro, i);
31415 if (base == (PyObject *)a || base == (PyObject *)b)
31416 return 1;
31417 }
31418 return 0;
31419 }
31420 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
31421}
31422#endif
31423
31424/* PyErrFetchRestore (used by GivenExceptionMatches) */
31425#if CYTHON_FAST_THREAD_STATE
31426static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
31427#if PY_VERSION_HEX >= 0x030C00A6
31428 PyObject *tmp_value;
31429 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
31430 if (value) {
31431 #if CYTHON_COMPILING_IN_CPYTHON
31432 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
31433 #endif
31434 PyException_SetTraceback(value, tb);
31435 }
31436 tmp_value = tstate->current_exception;
31437 tstate->current_exception = value;
31438 Py_XDECREF(tmp_value);
31439 Py_XDECREF(type);
31440 Py_XDECREF(tb);
31441#else
31442 PyObject *tmp_type, *tmp_value, *tmp_tb;
31443 tmp_type = tstate->curexc_type;
31444 tmp_value = tstate->curexc_value;
31445 tmp_tb = tstate->curexc_traceback;
31446 tstate->curexc_type = type;
31447 tstate->curexc_value = value;
31448 tstate->curexc_traceback = tb;
31449 Py_XDECREF(tmp_type);
31450 Py_XDECREF(tmp_value);
31451 Py_XDECREF(tmp_tb);
31452#endif
31453}
31454static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
31455#if PY_VERSION_HEX >= 0x030C00A6
31456 PyObject* exc_value;
31457 exc_value = tstate->current_exception;
31458 tstate->current_exception = 0;
31459 *value = exc_value;
31460 *type = NULL;
31461 *tb = NULL;
31462 if (exc_value) {
31463 *type = (PyObject*) Py_TYPE(exc_value);
31464 Py_INCREF(*type);
31465 #if CYTHON_COMPILING_IN_CPYTHON
31466 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
31467 Py_XINCREF(*tb);
31468 #else
31469 *tb = PyException_GetTraceback(exc_value);
31470 #endif
31471 }
31472#else
31473 *type = tstate->curexc_type;
31474 *value = tstate->curexc_value;
31475 *tb = tstate->curexc_traceback;
31476 tstate->curexc_type = 0;
31477 tstate->curexc_value = 0;
31478 tstate->curexc_traceback = 0;
31479#endif
31480}
31481#endif
31482
31483/* GivenExceptionMatches (used by PyErrExceptionMatches) */
31484#if CYTHON_COMPILING_IN_CPYTHON
31485static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
31486 if (exc_type1) {
31487 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
31488 } else {
31489 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
31490 }
31491}
31492static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
31493 Py_ssize_t i, n;
31494 assert(PyExceptionClass_Check(exc_type));
31495 n = PyTuple_GET_SIZE(tuple);
31496 for (i=0; i<n; i++) {
31497 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
31498 }
31499 for (i=0; i<n; i++) {
31500 PyObject *t = PyTuple_GET_ITEM(tuple, i);
31501 if (likely(PyExceptionClass_Check(t))) {
31502 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
31503 } else {
31504 }
31505 }
31506 return 0;
31507}
31508static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
31509 if (likely(err == exc_type)) return 1;
31510 if (likely(PyExceptionClass_Check(err))) {
31511 if (likely(PyExceptionClass_Check(exc_type))) {
31512 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
31513 } else if (likely(PyTuple_Check(exc_type))) {
31514 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
31515 } else {
31516 }
31517 }
31518 return PyErr_GivenExceptionMatches(err, exc_type);
31519}
31520static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
31521 assert(PyExceptionClass_Check(exc_type1));
31522 assert(PyExceptionClass_Check(exc_type2));
31523 if (likely(err == exc_type1 || err == exc_type2)) return 1;
31524 if (likely(PyExceptionClass_Check(err))) {
31525 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
31526 }
31527 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
31528}
31529#endif
31530
31531/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
31532#if CYTHON_FAST_THREAD_STATE
31533static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
31534 Py_ssize_t i, n;
31535 n = PyTuple_GET_SIZE(tuple);
31536 for (i=0; i<n; i++) {
31537 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
31538 }
31539 for (i=0; i<n; i++) {
31540 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
31541 }
31542 return 0;
31543}
31544static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
31545 int result;
31546 PyObject *exc_type;
31547#if PY_VERSION_HEX >= 0x030C00A6
31548 PyObject *current_exception = tstate->current_exception;
31549 if (unlikely(!current_exception)) return 0;
31550 exc_type = (PyObject*) Py_TYPE(current_exception);
31551 if (exc_type == err) return 1;
31552#else
31553 exc_type = tstate->curexc_type;
31554 if (exc_type == err) return 1;
31555 if (unlikely(!exc_type)) return 0;
31556#endif
31557 #if CYTHON_AVOID_BORROWED_REFS
31558 Py_INCREF(exc_type);
31559 #endif
31560 if (unlikely(PyTuple_Check(err))) {
31561 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
31562 } else {
31563 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
31564 }
31565 #if CYTHON_AVOID_BORROWED_REFS
31566 Py_DECREF(exc_type);
31567 #endif
31568 return result;
31569}
31570#endif
31571
31572/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
31573#if CYTHON_USE_TYPE_SLOTS
31574static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
31575 PyTypeObject* tp = Py_TYPE(obj);
31576 if (likely(tp->tp_getattro))
31577 return tp->tp_getattro(obj, attr_name);
31578 return PyObject_GetAttr(obj, attr_name);
31579}
31580#endif
31581
31582/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
31583#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
31584static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
31585 __Pyx_PyThreadState_declare
31586 __Pyx_PyThreadState_assign
31587 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
31588 __Pyx_PyErr_Clear();
31589}
31590#endif
31591static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
31592 PyObject *result;
31593#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
31594 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
31595 return result;
31596#else
31597#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
31598 PyTypeObject* tp = Py_TYPE(obj);
31599 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
31600 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
31601 }
31602#endif
31603 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
31604 if (unlikely(!result)) {
31605 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
31606 }
31607 return result;
31608#endif
31609}
31610
31611/* GetBuiltinName */
31612static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
31613 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
31614 if (unlikely(!result) && !PyErr_Occurred()) {
31615 PyErr_Format(PyExc_NameError,
31616 "name '%U' is not defined", name);
31617 }
31618 return result;
31619}
31620
31621/* CopyObjectArray (used by TupleOrListFromArrayImpl) */
31622#if CYTHON_COMPILING_IN_CPYTHON
31623static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
31624 PyObject *v;
31625 Py_ssize_t i;
31626 for (i = 0; i < length; i++) {
31627 v = dest[i] = src[i];
31628 Py_INCREF(v);
31629 }
31630}
31631#endif
31632
31633/* TupleOrListFromArrayImpl (used by TupleFromArray) */
31634#if !(PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API)
31635CYTHON_UNUSED static PyObject *
31636__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) {
31637 if (n <= 0) {
31638 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
31639 }
31640 PyObject *res = PyTuple_New(n);
31641 if (unlikely(res == NULL)) return NULL;
31642 #if CYTHON_COMPILING_IN_CPYTHON
31643 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
31644 #else
31645 Py_ssize_t i;
31646 for (i = 0; i < n; i++) {
31647 Py_INCREF(src[i]);
31648 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
31649 Py_DECREF(res);
31650 return NULL;
31651 }
31652 }
31653 #endif
31654 return res;
31655}
31656#endif
31657
31658/* PyObjectCompare (used by UnicodeEquals) */
31659#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
31660#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
31661static CYTHON_INLINE int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
31662 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
31663 int result = PyUnicode_Equal(s1, s2);
31664 #if !CYTHON_COMPILING_IN_CPYTHON
31665 if (unlikely(result == -1)) return -1;
31666 #endif
31667 if (result == 0) goto __pyx_return_false; else goto __pyx_return_true;
31668 #else
31669 int result = PyUnicode_Compare(s1, s2);
31670 if (unlikely((result == -1) && PyErr_Occurred())) return -1;
31671 if (result == 0) goto __pyx_return_true; else goto __pyx_return_false;
31672 #endif
31673__pyx_return_true:
31674 return 1;
31675__pyx_return_false:
31676 return 0;
31677}
31678#endif
31679static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop) {
31680 CYTHON_UNUSED_VAR(pyop);
31681 if (unlikely(op1 == Py_None)) {
31682 if (op2 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
31683 }
31684 if (unlikely(op2 == Py_None)) {
31685 if (op1 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
31686 }
31687
31688 if (likely(op1 != Py_None)) {
31689 if (op1 == op2) goto __pyx_return_true;
31690 if (likely(op2 != Py_None)) {
31691 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
31692 }
31693 goto __pyx_richcmp;
31694 }
31695
31696 if ((0)) goto __pyx_richcmp;
31697 if ((0)) goto __pyx_return_true;
31698 if ((0)) goto __pyx_return_false;
31699__pyx_richcmp:
31700 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
31701__pyx_return_true:
31702 return 1;
31703__pyx_return_false:
31704 return 0;
31705}
31706
31707/* fastcall */
31708#if CYTHON_VECTORCALL
31709static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
31710{
31711 Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
31712 #if !CYTHON_ASSUME_SAFE_SIZE
31713 if (unlikely(n == -1)) return NULL;
31714 #endif
31715 for (i = 0; i < n; i++)
31716 {
31717 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
31718 #if !CYTHON_ASSUME_SAFE_MACROS
31719 if (unlikely(!namei)) return NULL;
31720 #endif
31721 if (s == namei) return kwvalues[i];
31722 }
31723 for (i = 0; i < n; i++)
31724 {
31725 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
31726 #if !CYTHON_ASSUME_SAFE_MACROS
31727 if (unlikely(!namei)) return NULL;
31728 #endif
31729 int eq = __Pyx_PyUnicode_Equals(s, namei);
31730 if (unlikely(eq != 0)) {
31731 if (unlikely(eq < 0)) return NULL;
31732 return kwvalues[i];
31733 }
31734 }
31735 return NULL;
31736}
31737#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
31738CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
31739 Py_ssize_t i, nkwargs;
31740 PyObject *dict;
31741#if !CYTHON_ASSUME_SAFE_SIZE
31742 nkwargs = PyTuple_Size(kwnames);
31743 if (unlikely(nkwargs < 0)) return NULL;
31744#else
31745 nkwargs = PyTuple_GET_SIZE(kwnames);
31746#endif
31747 dict = PyDict_New();
31748 if (unlikely(!dict))
31749 return NULL;
31750 for (i=0; i<nkwargs; i++) {
31751#if !CYTHON_ASSUME_SAFE_MACROS
31752 PyObject *key = PyTuple_GetItem(kwnames, i);
31753 if (!key) goto bad;
31754#else
31755 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
31756#endif
31757 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
31758 goto bad;
31759 }
31760 return dict;
31761bad:
31762 Py_DECREF(dict);
31763 return NULL;
31764}
31765#endif
31766#endif
31767
31768/* PyObjectCall (used by PyObjectFastCall) */
31769#if CYTHON_COMPILING_IN_CPYTHON
31770static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
31771 PyObject *result;
31772 ternaryfunc call = Py_TYPE(func)->tp_call;
31773 if (unlikely(!call))
31774 return PyObject_Call(func, arg, kw);
31775 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
31776 return NULL;
31777 result = (*call)(func, arg, kw);
31778 Py_LeaveRecursiveCall();
31779 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31780 PyErr_SetString(
31781 PyExc_SystemError,
31782 "NULL result without error in PyObject_Call");
31783 }
31784 return result;
31785}
31786#endif
31787
31788/* PyObjectCallMethO (used by PyObjectFastCall) */
31789#if CYTHON_COMPILING_IN_CPYTHON
31790static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
31791 PyObject *self, *result;
31792 PyCFunction cfunc;
31793 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
31794 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
31795 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
31796 return NULL;
31797 result = cfunc(self, arg);
31798 Py_LeaveRecursiveCall();
31799 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31800 PyErr_SetString(
31801 PyExc_SystemError,
31802 "NULL result without error in PyObject_Call");
31803 }
31804 return result;
31805}
31806#endif
31807
31808/* PyObjectFastCall (used by PyObjectCallOneArg) */
31809#if CYTHON_COMPILING_IN_LIMITED_API
31810static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
31811 PyObject *argstuple;
31812 PyObject *result = 0;
31813 size_t i;
31814 argstuple = PyTuple_New((Py_ssize_t)nargs);
31815 if (unlikely(!argstuple)) return NULL;
31816 for (i = 0; i < nargs; i++) {
31817 Py_INCREF(args[i]);
31818 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
31819 }
31820 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
31821 bad:
31822 Py_DECREF(argstuple);
31823 return result;
31824}
31825#endif
31826#if CYTHON_VECTORCALL && !(CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY)
31827 #if CYTHON_COMPILING_IN_CPYTHON
31828static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
31829 PyTypeObject *tp = Py_TYPE(callable);
31830 #if defined(__Pyx_CyFunction_USED)
31831 if (__Pyx_CyFunction_CheckExact(callable)) {
31832 return __Pyx_CyFunction_func_vectorcall(callable);
31833 }
31834 #endif
31835 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
31836 return NULL;
31837 }
31838 assert(PyCallable_Check(callable));
31839 Py_ssize_t offset = tp->tp_vectorcall_offset;
31840 assert(offset > 0);
31841 vectorcallfunc ptr;
31842 memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
31843 return ptr;
31844}
31845 #else
31846 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
31847 #endif
31848#endif
31849static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwargs) {
31850 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
31851#if CYTHON_COMPILING_IN_CPYTHON
31852 if (nargs == 0 && kwargs == NULL) {
31853 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
31854 return __Pyx_PyObject_CallMethO(func, NULL);
31855 }
31856 else if (nargs == 1 && kwargs == NULL) {
31857 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
31858 return __Pyx_PyObject_CallMethO(func, args[0]);
31859 }
31860#endif
31861 if (kwargs == NULL) {
31862 #if CYTHON_VECTORCALL
31863 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
31864 return PyObject_Vectorcall(func, args, nargsf, NULL);
31865 #else
31866 vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
31867 if (f) {
31868 return f(func, args, nargsf, NULL);
31869 }
31870 #endif
31871 #endif
31872 }
31873 if (nargs == 0) {
31874 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
31875 }
31876 #if CYTHON_COMPILING_IN_LIMITED_API
31877 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
31878 #elif CYTHON_COMPILING_IN_PYPY
31879 return PyObject_VectorcallDict(func, args, (size_t) nargs, kwargs);
31880 #else
31881 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
31882 #endif
31883}
31884
31885/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
31886static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31887 PyObject *args[2] = {NULL, arg};
31888 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
31889}
31890
31891/* IgnoreException (used by UnpackUnboundCMethod_impl) */
31892static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
31893 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
31894 PyErr_Clear();
31895 return 1;
31896 }
31897 return 0;
31898}
31899
31900/* UnpackUnboundCMethod_impl (used by UnpackUnboundCMethod) */
31901#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
31902static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
31903 PyObject *result;
31904 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
31905 if (unlikely(!selfless_args)) return NULL;
31906 result = PyObject_Call(method, selfless_args, kwargs);
31907 Py_DECREF(selfless_args);
31908 return result;
31909}
31910#else
31911static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
31912 return PyObject_Vectorcall(method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
31913}
31914#endif
31915static PyMethodDef __Pyx_UnboundCMethod_Def = {
31916 "CythonUnboundCMethod",
31917 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
31918#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
31919 METH_VARARGS | METH_KEYWORDS,
31920#else
31921 METH_FASTCALL | METH_KEYWORDS,
31922#endif
31923 NULL
31924};
31925static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
31926 PyObject *method, *result=NULL;
31927 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
31928 if (unlikely(!method))
31929 return -1;
31930 result = method;
31931#if CYTHON_COMPILING_IN_CPYTHON
31932 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
31933 {
31934 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
31935 target->func = descr->d_method->ml_meth;
31936 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
31937 } else
31938#endif
31939#if CYTHON_COMPILING_IN_PYPY
31940#else
31941 if (PyCFunction_Check(method))
31942#endif
31943 {
31944 PyObject *self;
31945 int self_found;
31946#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
31947 self = PyObject_GetAttrString(method, "__self__");
31948 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
31949 return -1;
31950 }
31951#else
31952 self = PyCFunction_GET_SELF(method);
31953#endif
31954 self_found = (self && self != Py_None);
31955#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
31956 Py_XDECREF(self);
31957#endif
31958 if (self_found) {
31959 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
31960 if (unlikely(!unbound_method)) return -1;
31961 Py_DECREF(method);
31962 result = unbound_method;
31963 }
31964 }
31965#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
31966 if (unlikely(target->method)) {
31967 Py_DECREF(result);
31968 } else
31969#endif
31970 target->method = result;
31971 return 0;
31972}
31973
31974/* CallUnboundCMethod0 */
31975#if CYTHON_COMPILING_IN_CPYTHON
31976static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
31977 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
31978 if (likely(was_initialized == 2 && cfunc->func)) {
31979 if (likely(cfunc->flag == METH_NOARGS))
31980 return __Pyx_CallCFunction(cfunc, self, NULL);
31981 if (likely(cfunc->flag == METH_FASTCALL))
31982 return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
31983 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
31984 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
31985 if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
31986 return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
31987 if (cfunc->flag == METH_VARARGS)
31988 return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
31989 return __Pyx__CallUnboundCMethod0(cfunc, self);
31990 }
31991#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
31992 else if (unlikely(was_initialized == 1)) {
31993 __Pyx_CachedCFunction tmp_cfunc = {
31994#ifndef __cplusplus
31995 0
31996#endif
31997 };
31998 tmp_cfunc.type = cfunc->type;
31999 tmp_cfunc.method_name = cfunc->method_name;
32000 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
32001 }
32002#endif
32003 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
32004 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
32005 return result;
32006}
32007#endif
32008static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
32009 PyObject *result;
32010 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
32011 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
32012 return result;
32013}
32014
32015/* py_dict_items (used by OwnedDictNext) */
32016static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
32017 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
32018}
32019
32020/* py_dict_values (used by OwnedDictNext) */
32021static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
32022 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
32023}
32024
32025/* OwnedDictNext (used by ParseKeywordsImpl) */
32026#if CYTHON_AVOID_BORROWED_REFS
32027static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
32028 PyObject *next = NULL;
32029 if (!*ppos) {
32030 if (pvalue) {
32031 PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
32032 if (unlikely(!dictview)) goto bad;
32033 *ppos = PyObject_GetIter(dictview);
32034 Py_DECREF(dictview);
32035 } else {
32036 *ppos = PyObject_GetIter(p);
32037 }
32038 if (unlikely(!*ppos)) goto bad;
32039 }
32040 next = PyIter_Next(*ppos);
32041 if (!next) {
32042 if (PyErr_Occurred()) goto bad;
32043 return 0;
32044 }
32045 if (pkey && pvalue) {
32046 *pkey = __Pyx_PySequence_ITEM(next, 0);
32047 if (unlikely(*pkey)) goto bad;
32048 *pvalue = __Pyx_PySequence_ITEM(next, 1);
32049 if (unlikely(*pvalue)) goto bad;
32050 Py_DECREF(next);
32051 } else if (pkey) {
32052 *pkey = next;
32053 } else {
32054 assert(pvalue);
32055 *pvalue = next;
32056 }
32057 return 1;
32058 bad:
32059 Py_XDECREF(next);
32060#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
32061 PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
32062#else
32063 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
32064#endif
32065 if (pkey) *pkey = NULL;
32066 if (pvalue) *pvalue = NULL;
32067 return 0;
32068}
32069#else // !CYTHON_AVOID_BORROWED_REFS
32070static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
32071 int result = PyDict_Next(p, ppos, pkey, pvalue);
32072 if (likely(result == 1)) {
32073 if (pkey) Py_INCREF(*pkey);
32074 if (pvalue) Py_INCREF(*pvalue);
32075 }
32076 return result;
32077}
32078#endif
32079
32080/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
32081static void __Pyx_RaiseDoubleKeywordsError(
32082 const char* func_name,
32083 PyObject* kw_name)
32084{
32085 PyErr_Format(PyExc_TypeError,
32086 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
32087}
32088
32089/* CallUnboundCMethod2 */
32090#if CYTHON_COMPILING_IN_CPYTHON
32091static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
32092 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
32093 if (likely(was_initialized == 2 && cfunc->func)) {
32094 PyObject *args[2] = {arg1, arg2};
32095 if (cfunc->flag == METH_FASTCALL) {
32096 return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
32097 }
32098 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
32099 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
32100 }
32101#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
32102 else if (unlikely(was_initialized == 1)) {
32103 __Pyx_CachedCFunction tmp_cfunc = {
32104#ifndef __cplusplus
32105 0
32106#endif
32107 };
32108 tmp_cfunc.type = cfunc->type;
32109 tmp_cfunc.method_name = cfunc->method_name;
32110 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
32111 }
32112#endif
32113 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
32114 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
32115 return result;
32116}
32117#endif
32118static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
32119 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
32120#if CYTHON_COMPILING_IN_CPYTHON
32121 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
32122 PyObject *result = NULL;
32123 PyObject *args = PyTuple_New(2);
32124 if (unlikely(!args)) return NULL;
32125 Py_INCREF(arg1);
32126 PyTuple_SET_ITEM(args, 0, arg1);
32127 Py_INCREF(arg2);
32128 PyTuple_SET_ITEM(args, 1, arg2);
32129 if (cfunc->flag & METH_KEYWORDS)
32130 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
32131 else
32132 result = __Pyx_CallCFunction(cfunc, self, args);
32133 Py_DECREF(args);
32134 return result;
32135 }
32136#endif
32137 {
32138 PyObject *args[4] = {NULL, self, arg1, arg2};
32139 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
32140 }
32141}
32142
32143/* ParseKeywordsImpl (used by ParseKeywords) */
32144static int __Pyx_ValidateDuplicatePosArgs(
32145 PyObject *kwds,
32146 PyObject ** const argnames[],
32147 PyObject ** const *first_kw_arg,
32148 const char* function_name)
32149{
32150 PyObject ** const *name = argnames;
32151 while (name != first_kw_arg) {
32152 PyObject *key = **name;
32153 int found = PyDict_Contains(kwds, key);
32154 if (unlikely(found)) {
32155 if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
32156 goto bad;
32157 }
32158 name++;
32159 }
32160 return 0;
32161bad:
32162 return -1;
32163}
32164#if CYTHON_USE_UNICODE_INTERNALS
32165static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
32166 int kind;
32167 Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
32168 if (len != PyUnicode_GET_LENGTH(s2)) return 0;
32169 kind = PyUnicode_KIND(s1);
32170 if (kind != PyUnicode_KIND(s2)) return 0;
32171 const void *data1 = PyUnicode_DATA(s1);
32172 const void *data2 = PyUnicode_DATA(s2);
32173 return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
32174}
32175#endif
32176static int __Pyx_MatchKeywordArg_str(
32177 PyObject *key,
32178 PyObject ** const argnames[],
32179 PyObject ** const *first_kw_arg,
32180 size_t *index_found,
32181 const char *function_name)
32182{
32183 PyObject ** const *name;
32184 #if CYTHON_USE_UNICODE_INTERNALS
32185 Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
32186 if (unlikely(key_hash == -1)) {
32187 key_hash = PyObject_Hash(key);
32188 if (unlikely(key_hash == -1))
32189 goto bad;
32190 }
32191 #endif
32192 name = first_kw_arg;
32193 while (*name) {
32194 PyObject *name_str = **name;
32195 #if CYTHON_USE_UNICODE_INTERNALS
32196 if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
32197 *index_found = (size_t) (name - argnames);
32198 return 1;
32199 }
32200 #else
32201 #if CYTHON_ASSUME_SAFE_SIZE
32202 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
32203 #endif
32204 {
32205 int cmp = PyUnicode_Compare(name_str, key);
32206 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
32207 if (cmp == 0) {
32208 *index_found = (size_t) (name - argnames);
32209 return 1;
32210 }
32211 }
32212 #endif
32213 name++;
32214 }
32215 name = argnames;
32216 while (name != first_kw_arg) {
32217 PyObject *name_str = **name;
32218 #if CYTHON_USE_UNICODE_INTERNALS
32219 if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
32220 if (__Pyx_UnicodeKeywordsEqual(name_str, key))
32221 goto arg_passed_twice;
32222 }
32223 #else
32224 #if CYTHON_ASSUME_SAFE_SIZE
32225 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
32226 #endif
32227 {
32228 if (unlikely(name_str == key)) goto arg_passed_twice;
32229 int cmp = PyUnicode_Compare(name_str, key);
32230 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
32231 if (cmp == 0) goto arg_passed_twice;
32232 }
32233 #endif
32234 name++;
32235 }
32236 return 0;
32237arg_passed_twice:
32238 __Pyx_RaiseDoubleKeywordsError(function_name, key);
32239 goto bad;
32240bad:
32241 return -1;
32242}
32243static int __Pyx_MatchKeywordArg_nostr(
32244 PyObject *key,
32245 PyObject ** const argnames[],
32246 PyObject ** const *first_kw_arg,
32247 size_t *index_found,
32248 const char *function_name)
32249{
32250 PyObject ** const *name;
32251 if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
32252 name = first_kw_arg;
32253 while (*name) {
32254 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
32255 if (cmp == 1) {
32256 *index_found = (size_t) (name - argnames);
32257 return 1;
32258 }
32259 if (unlikely(cmp == -1)) goto bad;
32260 name++;
32261 }
32262 name = argnames;
32263 while (name != first_kw_arg) {
32264 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
32265 if (unlikely(cmp != 0)) {
32266 if (cmp == 1) goto arg_passed_twice;
32267 else goto bad;
32268 }
32269 name++;
32270 }
32271 return 0;
32272arg_passed_twice:
32273 __Pyx_RaiseDoubleKeywordsError(function_name, key);
32274 goto bad;
32275invalid_keyword_type:
32276 PyErr_Format(PyExc_TypeError,
32277 "%.200s() keywords must be strings", function_name);
32278 goto bad;
32279bad:
32280 return -1;
32281}
32282static CYTHON_INLINE int __Pyx_MatchKeywordArg(
32283 PyObject *key,
32284 PyObject ** const argnames[],
32285 PyObject ** const *first_kw_arg,
32286 size_t *index_found,
32287 const char *function_name)
32288{
32289 return likely(PyUnicode_CheckExact(key)) ?
32290 __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
32291 __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
32292}
32293static void __Pyx_RejectUnknownKeyword(
32294 PyObject *kwds,
32295 PyObject ** const argnames[],
32296 PyObject ** const *first_kw_arg,
32297 const char *function_name)
32298{
32299 #if CYTHON_AVOID_BORROWED_REFS
32300 PyObject *pos = NULL;
32301 #else
32302 Py_ssize_t pos = 0;
32303 #endif
32304 PyObject *key = NULL;
32305 __Pyx_BEGIN_CRITICAL_SECTION(kwds);
32306 #if CYTHON_AVOID_BORROWED_REFS
32307 while (__Pyx_PyDict_NextRef(kwds, &pos, &key, NULL))
32308 #else
32309 (void) __Pyx_PyDict_NextRef;
32310 while (PyDict_Next(kwds, &pos, &key, NULL))
32311 #endif
32312 {
32313 PyObject** const *name = first_kw_arg;
32314 while (*name && (**name != key)) name++;
32315 if (!*name) {
32316 size_t index_found = 0;
32317 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
32318 if (cmp != 1) {
32319 if (cmp == 0) {
32320 PyErr_Format(PyExc_TypeError,
32321 "%s() got an unexpected keyword argument '%U'",
32322 function_name, key);
32323 }
32324 #if CYTHON_AVOID_BORROWED_REFS
32325 Py_DECREF(key);
32326 #endif
32327 break;
32328 }
32329 }
32330 #if CYTHON_AVOID_BORROWED_REFS
32331 Py_DECREF(key);
32332 #endif
32333 }
32334 __Pyx_END_CRITICAL_SECTION();
32335 #if CYTHON_AVOID_BORROWED_REFS
32336 Py_XDECREF(pos);
32337 #endif
32338 assert(PyErr_Occurred());
32339}
32340static int __Pyx_ParseKeywordDict(
32341 PyObject *kwds,
32342 PyObject ** const argnames[],
32343 PyObject *values[],
32344 Py_ssize_t num_pos_args,
32345 Py_ssize_t num_kwargs,
32346 const char* function_name,
32347 int ignore_unknown_kwargs)
32348{
32349 PyObject** const *name;
32350 PyObject** const *first_kw_arg = argnames + num_pos_args;
32351 Py_ssize_t extracted = 0;
32352#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
32353 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
32354#endif
32355 name = first_kw_arg;
32356 while (*name && num_kwargs > extracted) {
32357 PyObject * key = **name;
32358 PyObject *value;
32359 int found = 0;
32360 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
32361 found = PyDict_GetItemRef(kwds, key, &value);
32362 #else
32363 value = PyDict_GetItemWithError(kwds, key);
32364 if (value) {
32365 Py_INCREF(value);
32366 found = 1;
32367 } else {
32368 if (unlikely(PyErr_Occurred())) goto bad;
32369 }
32370 #endif
32371 if (found) {
32372 if (unlikely(found < 0)) goto bad;
32373 values[name-argnames] = value;
32374 extracted++;
32375 }
32376 name++;
32377 }
32378 if (num_kwargs > extracted) {
32379 if (ignore_unknown_kwargs) {
32380 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
32381 goto bad;
32382 } else {
32383 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
32384 goto bad;
32385 }
32386 }
32387 return 0;
32388bad:
32389 return -1;
32390}
32391static int __Pyx_ParseKeywordDictToDict(
32392 PyObject *kwds,
32393 PyObject ** const argnames[],
32394 PyObject *kwds2,
32395 PyObject *values[],
32396 Py_ssize_t num_pos_args,
32397 const char* function_name)
32398{
32399 PyObject** const *name;
32400 PyObject** const *first_kw_arg = argnames + num_pos_args;
32401 Py_ssize_t len;
32402#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
32403 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
32404#endif
32405 if (PyDict_Update(kwds2, kwds) < 0) goto bad;
32406 name = first_kw_arg;
32407 while (*name) {
32408 PyObject *key = **name;
32409 PyObject *value;
32410#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
32411 int found = PyDict_Pop(kwds2, key, &value);
32412 if (found) {
32413 if (unlikely(found < 0)) goto bad;
32414 values[name-argnames] = value;
32415 }
32416#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
32417 int found = PyDict_GetItemRef(kwds2, key, &value);
32418 if (found) {
32419 if (unlikely(found < 0)) goto bad;
32420 values[name-argnames] = value;
32421 if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
32422 }
32423#else
32424 #if CYTHON_COMPILING_IN_CPYTHON
32425 value = _PyDict_Pop(kwds2, key, kwds2);
32426 #else
32427 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
32428 #endif
32429 if (value == kwds2) {
32430 Py_DECREF(value);
32431 } else {
32432 if (unlikely(!value)) goto bad;
32433 values[name-argnames] = value;
32434 }
32435#endif
32436 name++;
32437 }
32438 len = PyDict_Size(kwds2);
32439 if (len > 0) {
32440 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
32441 } else if (unlikely(len == -1)) {
32442 goto bad;
32443 }
32444 return 0;
32445bad:
32446 return -1;
32447}
32448static int __Pyx_ParseKeywordsTuple(
32449 PyObject *kwds,
32450 PyObject * const *kwvalues,
32451 PyObject ** const argnames[],
32452 PyObject *kwds2,
32453 PyObject *values[],
32454 Py_ssize_t num_pos_args,
32455 Py_ssize_t num_kwargs,
32456 const char* function_name,
32457 int ignore_unknown_kwargs)
32458{
32459 PyObject *key = NULL;
32460 PyObject** const * name;
32461 PyObject** const *first_kw_arg = argnames + num_pos_args;
32462 for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
32463#if CYTHON_AVOID_BORROWED_REFS
32464 key = __Pyx_PySequence_ITEM(kwds, pos);
32465#else
32466 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
32467#endif
32468#if !CYTHON_ASSUME_SAFE_MACROS
32469 if (unlikely(!key)) goto bad;
32470#endif
32471 name = first_kw_arg;
32472 while (*name && (**name != key)) name++;
32473 if (*name) {
32474 PyObject *value = kwvalues[pos];
32475 values[name-argnames] = __Pyx_NewRef(value);
32476 } else {
32477 size_t index_found = 0;
32478 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
32479 if (cmp == 1) {
32480 PyObject *value = kwvalues[pos];
32481 values[index_found] = __Pyx_NewRef(value);
32482 } else {
32483 if (unlikely(cmp == -1)) goto bad;
32484 if (kwds2) {
32485 PyObject *value = kwvalues[pos];
32486 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
32487 } else if (!ignore_unknown_kwargs) {
32488 goto invalid_keyword;
32489 }
32490 }
32491 }
32492 #if CYTHON_AVOID_BORROWED_REFS
32493 Py_DECREF(key);
32494 key = NULL;
32495 #endif
32496 }
32497 return 0;
32498invalid_keyword:
32499 PyErr_Format(PyExc_TypeError,
32500 "%s() got an unexpected keyword argument '%U'",
32501 function_name, key);
32502 goto bad;
32503bad:
32504 #if CYTHON_AVOID_BORROWED_REFS
32505 Py_XDECREF(key);
32506 #endif
32507 return -1;
32508}
32509
32510/* ParseKeywords */
32511static int __Pyx_ParseKeywords(
32512 PyObject *kwds,
32513 PyObject * const *kwvalues,
32514 PyObject ** const argnames[],
32515 PyObject *kwds2,
32516 PyObject *values[],
32517 Py_ssize_t num_pos_args,
32518 Py_ssize_t num_kwargs,
32519 const char* function_name,
32520 int ignore_unknown_kwargs)
32521{
32522 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds)))
32523 return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
32524 else if (kwds2)
32525 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
32526 else
32527 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
32528}
32529
32530/* RaiseArgTupleInvalid */
32531static void __Pyx_RaiseArgtupleInvalid(
32532 const char* func_name,
32533 int exact,
32534 Py_ssize_t num_min,
32535 Py_ssize_t num_max,
32536 Py_ssize_t num_found)
32537{
32538 Py_ssize_t num_expected;
32539 const char *more_or_less;
32540 if (num_found < num_min) {
32541 num_expected = num_min;
32542 more_or_less = "at least";
32543 } else {
32544 num_expected = num_max;
32545 more_or_less = "at most";
32546 }
32547 if (exact) {
32548 more_or_less = "exactly";
32549 }
32550 PyErr_Format(PyExc_TypeError,
32551 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
32552 func_name, more_or_less, num_expected,
32553 (num_expected == 1) ? "" : "s", num_found);
32554}
32555
32556/* ArgTypeTestError (used by ArgTypeTest) */
32557static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type, const char *name, int exact)
32558{
32559 __Pyx_TypeName type_name;
32560 __Pyx_TypeName obj_type_name;
32561 PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
32562 int from_annotation_subclass = 0;
32563 if (unlikely(!type)) {
32564 PyErr_SetString(PyExc_SystemError, "Missing type object");
32565 return;
32566 } else if (exact == 2) {
32567 if (__Pyx_TypeCheck(obj, type)) {
32568 from_annotation_subclass = 1;
32569 extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
32570 }
32571 }
32572 type_name = __Pyx_PyType_GetFullyQualifiedName(type);
32573 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32574 if (unlikely(!type_name)) return;
32575 #endif
32576 obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
32577 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32578 if (unlikely(!obj_type_name)) goto obj_type_name_failed;
32579 #endif
32580 PyErr_Format(PyExc_TypeError,
32581 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")"
32582#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
32583 "%s%U"
32584#endif
32585 , name, type_name, obj_type_name
32586#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
32587 , (from_annotation_subclass ? ". " : ""), extra_info
32588#endif
32589 );
32590#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
32591 if (exact == 2 && from_annotation_subclass) {
32592 PyObject *res;
32593 PyObject *vargs[2];
32594 vargs[0] = PyErr_GetRaisedException();
32595 vargs[1] = extra_info;
32596 res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
32597 Py_XDECREF(res);
32598 PyErr_SetRaisedException(vargs[0]);
32599 }
32600#endif
32601 __Pyx_DECREF_TypeName(obj_type_name);
32602#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32603obj_type_name_failed:
32604#endif
32605 __Pyx_DECREF_TypeName(type_name);
32606 return;
32607}
32608
32609/* ArgTypeTest */
32610static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) {
32611 if (likely(Py_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None))))
32612 return 1;
32613 if (!exact && likely(type) && likely(__Pyx_TypeCheck(obj, type)))
32614 return 1;
32615 __Pyx_ArgTypeError(obj, type, name, exact);
32616 return 0;
32617}
32618
32619/* PyObjectFastCallMethod */
32620#if !CYTHON_VECTORCALL
32621static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
32622 PyObject *result;
32623 switch (__Pyx_PyVectorcall_NARGS(nargsf)) {
32624 case 1:
32625 return PyObject_CallMethodObjArgs(args[0], name, NULL);
32626 case 2:
32627 return PyObject_CallMethodObjArgs(args[0], name, args[1], NULL);
32628 case 3:
32629 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], NULL);
32630 case 4:
32631 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], NULL);
32632 case 5:
32633 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], args[4], NULL);
32634 }
32635 PyObject *attr = PyObject_GetAttr(args[0], name);
32636 if (unlikely(!attr))
32637 return NULL;
32638 result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
32639 Py_DECREF(attr);
32640 return result;
32641}
32642#endif
32643
32644/* FormatTypeName (used by RaiseErrorWithObjectType1) */
32645#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32646static __Pyx_TypeName
32647__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
32648{
32649 PyObject *module = NULL, *name = NULL, *result = NULL;
32650 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
32651 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
32652 __pyx_mstate_global->__pyx_n_u_qualname);
32653 #else
32654 name = PyType_GetQualName(tp);
32655 #endif
32656 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
32657 module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
32658 __pyx_mstate_global->__pyx_n_u_module);
32659 if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
32660 if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
32661 result = name;
32662 name = NULL;
32663 goto done;
32664 }
32665 result = PyUnicode_FromFormat("%U.%U", module, name);
32666 if (unlikely(result == NULL)) goto bad;
32667 done:
32668 Py_XDECREF(name);
32669 Py_XDECREF(module);
32670 return result;
32671 bad:
32672 PyErr_Clear();
32673 if (name) {
32674 result = name;
32675 name = NULL;
32676 } else {
32677 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
32678 }
32679 goto done;
32680}
32681#endif
32682
32683/* RaiseErrorWithObjectType1 (used by RaiseUnexpectedTypeError) */
32684static void __Pyx_RaiseErrorWithType1(PyObject* exc_type, const char* message, const char *arg, PyTypeObject *type_obj) {
32685 __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(type_obj);
32686 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32687 if (unlikely(!type_name)) return;
32688 #endif
32689 PyErr_Format(exc_type, message, arg, type_name);
32690 __Pyx_DECREF_TypeName(type_name);
32691}
32692
32693/* RaiseUnexpectedTypeError */
32694static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) {
32695 __Pyx_RaiseTypeErrorWithObjectType1(
32696 "Expected %.42s, got " __Pyx_FMT_TYPENAME,
32697 expected, obj);
32698 return 0;
32699}
32700
32701/* RaiseException */
32702static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
32703 PyObject* owned_instance = NULL;
32704 if (tb == Py_None) {
32705 tb = 0;
32706 } else if (tb && !PyTraceBack_Check(tb)) {
32707 PyErr_SetString(PyExc_TypeError,
32708 "raise: arg 3 must be a traceback or None");
32709 goto bad;
32710 }
32711 if (value == Py_None)
32712 value = 0;
32713 if (PyExceptionInstance_Check(type)) {
32714 if (value) {
32715 PyErr_SetString(PyExc_TypeError,
32716 "instance exception may not have a separate value");
32717 goto bad;
32718 }
32719 value = type;
32720 type = (PyObject*) Py_TYPE(value);
32721 } else if (PyExceptionClass_Check(type)) {
32722 PyObject *instance_class = NULL;
32723 if (value && PyExceptionInstance_Check(value)) {
32724 instance_class = (PyObject*) Py_TYPE(value);
32725 if (instance_class != type) {
32726 int is_subclass = PyObject_IsSubclass(instance_class, type);
32727 if (!is_subclass) {
32728 instance_class = NULL;
32729 } else if (unlikely(is_subclass == -1)) {
32730 goto bad;
32731 } else {
32732 type = instance_class;
32733 }
32734 }
32735 }
32736 if (!instance_class) {
32737 PyObject *args;
32738 if (!value)
32739 args = PyTuple_New(0);
32740 else if (PyTuple_Check(value)) {
32741 Py_INCREF(value);
32742 args = value;
32743 } else
32744 args = PyTuple_Pack(1, value);
32745 if (!args)
32746 goto bad;
32747 owned_instance = PyObject_Call(type, args, NULL);
32748 Py_DECREF(args);
32749 if (!owned_instance)
32750 goto bad;
32751 value = owned_instance;
32752 if (!PyExceptionInstance_Check(value)) {
32753 PyErr_Format(PyExc_TypeError,
32754 "calling %R should have returned an instance of "
32755 "BaseException, not %R",
32756 type, Py_TYPE(value));
32757 goto bad;
32758 }
32759 }
32760 } else {
32761 PyErr_SetString(PyExc_TypeError,
32762 "raise: exception class must be a subclass of BaseException");
32763 goto bad;
32764 }
32765 if (cause) {
32766 PyObject *fixed_cause;
32767 if (cause == Py_None) {
32768 fixed_cause = NULL;
32769 } else if (PyExceptionClass_Check(cause)) {
32770 fixed_cause = PyObject_CallObject(cause, NULL);
32771 if (fixed_cause == NULL)
32772 goto bad;
32773 } else if (PyExceptionInstance_Check(cause)) {
32774 fixed_cause = cause;
32775 Py_INCREF(fixed_cause);
32776 } else {
32777 PyErr_SetString(PyExc_TypeError,
32778 "exception causes must derive from "
32779 "BaseException");
32780 goto bad;
32781 }
32782 PyException_SetCause(value, fixed_cause);
32783 }
32784 PyErr_SetObject(type, value);
32785 if (tb) {
32786#if PY_VERSION_HEX >= 0x030C00A6
32787 PyException_SetTraceback(value, tb);
32788#elif CYTHON_FAST_THREAD_STATE
32789 PyThreadState *tstate = __Pyx_PyThreadState_Current;
32790 PyObject* tmp_tb = tstate->curexc_traceback;
32791 if (tb != tmp_tb) {
32792 Py_INCREF(tb);
32793 tstate->curexc_traceback = tb;
32794 Py_XDECREF(tmp_tb);
32795 }
32796#else
32797 PyObject *tmp_type, *tmp_value, *tmp_tb;
32798 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
32799 Py_INCREF(tb);
32800 PyErr_Restore(tmp_type, tmp_value, tb);
32801 Py_XDECREF(tmp_tb);
32802#endif
32803 }
32804bad:
32805 Py_XDECREF(owned_instance);
32806 return;
32807}
32808
32809/* CIntToDigits (used by CIntToPyUnicode) */
32810static const char DIGIT_PAIRS_10[2*10*10+1] = {
32811 "00010203040506070809"
32812 "10111213141516171819"
32813 "20212223242526272829"
32814 "30313233343536373839"
32815 "40414243444546474849"
32816 "50515253545556575859"
32817 "60616263646566676869"
32818 "70717273747576777879"
32819 "80818283848586878889"
32820 "90919293949596979899"
32821};
32822static const char DIGIT_PAIRS_8[2*8*8+1] = {
32823 "0001020304050607"
32824 "1011121314151617"
32825 "2021222324252627"
32826 "3031323334353637"
32827 "4041424344454647"
32828 "5051525354555657"
32829 "6061626364656667"
32830 "7071727374757677"
32831};
32832static const char DIGITS_HEX[2*16+1] = {
32833 "0123456789abcdef"
32834 "0123456789ABCDEF"
32835};
32836
32837/* BuildPyUnicode (used by COrdinalToPyUnicode) */
32838static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
32839 int prepend_sign, char padding_char) {
32840 PyObject *uval;
32841 Py_ssize_t uoffset = ulength - clength;
32842#if CYTHON_USE_UNICODE_INTERNALS
32843 Py_ssize_t i;
32844 void *udata;
32845 uval = PyUnicode_New(ulength, 127);
32846 if (unlikely(!uval)) return NULL;
32847 udata = PyUnicode_DATA(uval);
32848 if (uoffset > 0) {
32849 i = 0;
32850 if (prepend_sign) {
32851 __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
32852 i++;
32853 }
32854 for (; i < uoffset; i++) {
32855 __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
32856 }
32857 }
32858 for (i=0; i < clength; i++) {
32859 __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
32860 }
32861#else
32862 {
32863 PyObject *sign = NULL, *padding = NULL;
32864 uval = NULL;
32865 if (uoffset > 0) {
32866 prepend_sign = !!prepend_sign;
32867 if (uoffset > prepend_sign) {
32868 padding = PyUnicode_FromOrdinal(padding_char);
32869 if (likely(padding) && uoffset > prepend_sign + 1) {
32870 PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign);
32871 Py_DECREF(padding);
32872 padding = tmp;
32873 }
32874 if (unlikely(!padding)) goto done_or_error;
32875 }
32876 if (prepend_sign) {
32877 sign = PyUnicode_FromOrdinal('-');
32878 if (unlikely(!sign)) goto done_or_error;
32879 }
32880 }
32881 uval = PyUnicode_DecodeASCII(chars, clength, NULL);
32882 if (likely(uval) && padding) {
32883 PyObject *tmp = PyUnicode_Concat(padding, uval);
32884 Py_DECREF(uval);
32885 uval = tmp;
32886 }
32887 if (likely(uval) && sign) {
32888 PyObject *tmp = PyUnicode_Concat(sign, uval);
32889 Py_DECREF(uval);
32890 uval = tmp;
32891 }
32892done_or_error:
32893 Py_XDECREF(padding);
32894 Py_XDECREF(sign);
32895 }
32896#endif
32897 return uval;
32898}
32899
32900/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
32901static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
32902 return value <= 1114111;
32903}
32904static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
32905 Py_ssize_t padding_length = ulength - 1;
32906 if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
32907 char chars[256];
32908 if (value <= 255) {
32909 memset(chars, padding_char, (size_t) padding_length);
32910 chars[ulength-1] = (char) value;
32911 return PyUnicode_DecodeLatin1(chars, ulength, NULL);
32912 }
32913 char *cpos = chars + sizeof(chars);
32914 if (value < 0x800) {
32915 *--cpos = (char) (0x80 | (value & 0x3f));
32916 value >>= 6;
32917 *--cpos = (char) (0xc0 | (value & 0x1f));
32918 } else if (value < 0x10000) {
32919 *--cpos = (char) (0x80 | (value & 0x3f));
32920 value >>= 6;
32921 *--cpos = (char) (0x80 | (value & 0x3f));
32922 value >>= 6;
32923 *--cpos = (char) (0xe0 | (value & 0x0f));
32924 } else {
32925 *--cpos = (char) (0x80 | (value & 0x3f));
32926 value >>= 6;
32927 *--cpos = (char) (0x80 | (value & 0x3f));
32928 value >>= 6;
32929 *--cpos = (char) (0x80 | (value & 0x3f));
32930 value >>= 6;
32931 *--cpos = (char) (0xf0 | (value & 0x07));
32932 }
32933 cpos -= padding_length;
32934 memset(cpos, padding_char, (size_t) padding_length);
32935 return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
32936 }
32937 if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
32938 const char chars[1] = {(char) value};
32939 return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
32940 }
32941 {
32942 PyObject *uchar, *padding_uchar, *padding, *result;
32943 padding_uchar = PyUnicode_FromOrdinal(padding_char);
32944 if (unlikely(!padding_uchar)) return NULL;
32945 padding = PySequence_Repeat(padding_uchar, padding_length);
32946 Py_DECREF(padding_uchar);
32947 if (unlikely(!padding)) return NULL;
32948 uchar = PyUnicode_FromOrdinal(value);
32949 if (unlikely(!uchar)) {
32950 Py_DECREF(padding);
32951 return NULL;
32952 }
32953 result = PyUnicode_Concat(padding, uchar);
32954 Py_DECREF(padding);
32955 Py_DECREF(uchar);
32956 return result;
32957 }
32958}
32959
32960/* CIntToPyUnicode */
32961static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
32962#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32963#pragma GCC diagnostic push
32964#pragma GCC diagnostic ignored "-Wconversion"
32965#endif
32966 const int neg_one = (int) -1, const_zero = (int) 0;
32967#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32968#pragma GCC diagnostic pop
32969#endif
32970 const int is_unsigned = neg_one > const_zero;
32971 if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
32972 !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
32973 PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
32974 return NULL;
32975 }
32976 if (width <= 1) {
32977 return PyUnicode_FromOrdinal((int) value);
32978 }
32979 return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
32980}
32981static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
32982 char digits[sizeof(int)*3+2];
32983 char *dpos, *end = digits + sizeof(int)*3+2;
32984 const char *hex_digits = DIGITS_HEX;
32985 Py_ssize_t length, ulength;
32986 int prepend_sign, last_one_off;
32987 int remaining;
32988#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32989#pragma GCC diagnostic push
32990#pragma GCC diagnostic ignored "-Wconversion"
32991#endif
32992 const int neg_one = (int) -1, const_zero = (int) 0;
32993#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32994#pragma GCC diagnostic pop
32995#endif
32996 const int is_unsigned = neg_one > const_zero;
32997 if (format_char == 'X') {
32998 hex_digits += 16;
32999 format_char = 'x';
33000 }
33001 remaining = value;
33002 last_one_off = 0;
33003 dpos = end;
33004 do {
33005 int digit_pos;
33006 switch (format_char) {
33007 case 'o':
33008 digit_pos = abs((int)(remaining % (8*8)));
33009 remaining = (int) (remaining / (8*8));
33010 dpos -= 2;
33011 memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
33012 last_one_off = (digit_pos < 8);
33013 break;
33014 case 'd':
33015 digit_pos = abs((int)(remaining % (10*10)));
33016 remaining = (int) (remaining / (10*10));
33017 dpos -= 2;
33018 memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
33019 last_one_off = (digit_pos < 10);
33020 break;
33021 case 'x':
33022 *(--dpos) = hex_digits[abs((int)(remaining % 16))];
33023 remaining = (int) (remaining / 16);
33024 break;
33025 default:
33026 assert(0);
33027 break;
33028 }
33029 } while (unlikely(remaining != 0));
33030 assert(!last_one_off || *dpos == '0');
33031 dpos += last_one_off;
33032 length = end - dpos;
33033 ulength = length;
33034 prepend_sign = 0;
33035 if (!is_unsigned && value <= neg_one) {
33036 if (padding_char == ' ' || width <= length + 1) {
33037 *(--dpos) = '-';
33038 ++length;
33039 } else {
33040 prepend_sign = 1;
33041 }
33042 ++ulength;
33043 }
33044 if (width > ulength) {
33045 ulength = width;
33046 }
33047 if (ulength == 1) {
33048 return PyUnicode_FromOrdinal(*dpos);
33049 }
33050 return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
33051}
33052
33053/* CIntToPyUnicode */
33054static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) {
33055#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33056#pragma GCC diagnostic push
33057#pragma GCC diagnostic ignored "-Wconversion"
33058#endif
33059 const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
33060#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33061#pragma GCC diagnostic pop
33062#endif
33063 const int is_unsigned = neg_one > const_zero;
33064 if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
33065 !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
33066 PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
33067 return NULL;
33068 }
33069 if (width <= 1) {
33070 return PyUnicode_FromOrdinal((int) value);
33071 }
33072 return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
33073}
33074static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
33075 char digits[sizeof(Py_ssize_t)*3+2];
33076 char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
33077 const char *hex_digits = DIGITS_HEX;
33078 Py_ssize_t length, ulength;
33079 int prepend_sign, last_one_off;
33080 Py_ssize_t remaining;
33081#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33082#pragma GCC diagnostic push
33083#pragma GCC diagnostic ignored "-Wconversion"
33084#endif
33085 const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
33086#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33087#pragma GCC diagnostic pop
33088#endif
33089 const int is_unsigned = neg_one > const_zero;
33090 if (format_char == 'X') {
33091 hex_digits += 16;
33092 format_char = 'x';
33093 }
33094 remaining = value;
33095 last_one_off = 0;
33096 dpos = end;
33097 do {
33098 int digit_pos;
33099 switch (format_char) {
33100 case 'o':
33101 digit_pos = abs((int)(remaining % (8*8)));
33102 remaining = (Py_ssize_t) (remaining / (8*8));
33103 dpos -= 2;
33104 memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
33105 last_one_off = (digit_pos < 8);
33106 break;
33107 case 'd':
33108 digit_pos = abs((int)(remaining % (10*10)));
33109 remaining = (Py_ssize_t) (remaining / (10*10));
33110 dpos -= 2;
33111 memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
33112 last_one_off = (digit_pos < 10);
33113 break;
33114 case 'x':
33115 *(--dpos) = hex_digits[abs((int)(remaining % 16))];
33116 remaining = (Py_ssize_t) (remaining / 16);
33117 break;
33118 default:
33119 assert(0);
33120 break;
33121 }
33122 } while (unlikely(remaining != 0));
33123 assert(!last_one_off || *dpos == '0');
33124 dpos += last_one_off;
33125 length = end - dpos;
33126 ulength = length;
33127 prepend_sign = 0;
33128 if (!is_unsigned && value <= neg_one) {
33129 if (padding_char == ' ' || width <= length + 1) {
33130 *(--dpos) = '-';
33131 ++length;
33132 } else {
33133 prepend_sign = 1;
33134 }
33135 ++ulength;
33136 }
33137 if (width > ulength) {
33138 ulength = width;
33139 }
33140 if (ulength == 1) {
33141 return PyUnicode_FromOrdinal(*dpos);
33142 }
33143 return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
33144}
33145
33146/* JoinPyUnicode */
33147static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, int kind) {
33148#if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH && CYTHON_USE_UNICODE_INTERNALS
33149 PyObject *result_uval;
33150 int result_ukind, kind_shift;
33151 Py_ssize_t i, char_pos;
33152 void *result_udata;
33153 static const Py_UCS4 max_char[5] = {0x7fU, 0xffU, 0xffffU, 0xffffU, 0x10ffffU};
33154 assert (kind >= 0);
33155 if (kind > PyUnicode_4BYTE_KIND) kind = PyUnicode_4BYTE_KIND;
33156 result_uval = PyUnicode_New(result_ulength, max_char[kind]);
33157 if (unlikely(!result_uval)) return NULL;
33158 kind_shift = kind >> 1; // 0, 1, 2
33159 result_ukind = 1 << kind_shift; // 1, 2, 4
33160 result_udata = PyUnicode_DATA(result_uval);
33161 assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
33162 if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
33163 goto overflow;
33164 char_pos = 0;
33165 for (i=0; i < value_count; i++) {
33166 int ukind;
33167 Py_ssize_t ulength;
33168 void *udata;
33169 PyObject *uval = values[i];
33170 if (__Pyx_PyUnicode_READY(uval) == (-1))
33171 goto bad;
33172 ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
33173 #if !CYTHON_ASSUME_SAFE_SIZE
33174 if (unlikely(ulength < 0)) goto bad;
33175 #endif
33176 if (unlikely(!ulength))
33177 continue;
33178 if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
33179 goto overflow;
33180 ukind = __Pyx_PyUnicode_KIND(uval);
33181 udata = __Pyx_PyUnicode_DATA(uval);
33182 if (ukind == result_ukind) {
33183 memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
33184 } else {
33185 #if PY_VERSION_HEX >= 0x030d0000
33186 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
33187 #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
33188 _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
33189 #else
33190 Py_ssize_t j;
33191 for (j=0; j < ulength; j++) {
33192 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
33193 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
33194 }
33195 #endif
33196 }
33197 char_pos += ulength;
33198 }
33199 return result_uval;
33200overflow:
33201 PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
33202bad:
33203 Py_DECREF(result_uval);
33204 return NULL;
33205#else
33206 Py_ssize_t i;
33207 PyObject *result = NULL;
33208 PyObject *value_tuple = PyTuple_New(value_count);
33209 if (unlikely(!value_tuple)) return NULL;
33210 CYTHON_UNUSED_VAR(kind);
33211 CYTHON_UNUSED_VAR(result_ulength);
33212 for (i=0; i<value_count; i++) {
33213 Py_INCREF(values[i]);
33214 if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
33215 }
33216 result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
33217bad:
33218 Py_DECREF(value_tuple);
33219 return result;
33220#endif
33221}
33222
33223/* UnicodeEqualsUCS4 (used by UnicodeEquals_uchar) */
33224#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL)
33225static CYTHON_INLINE int __Pyx__PyUnicode_EqualsUCS4(PyObject* s1, Py_UCS4 ch2, int equals) {
33226 Py_ssize_t length;
33227 Py_UCS4 ch1;
33228 int kind;
33229 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0)) goto bad;
33230 length = __Pyx_PyUnicode_GET_LENGTH(s1);
33231 #if !CYTHON_ASSUME_SAFE_SIZE
33232 if (unlikely(length < 0)) goto bad;
33233 #endif
33234 if (length != 1) goto return_ne;
33235 kind = PyUnicode_KIND(s1);
33236 if (ch2 < 256) {
33237 if (likely(kind == PyUnicode_1BYTE_KIND)) {
33238 ch1 = PyUnicode_1BYTE_DATA(s1)[0];
33239 } else if (kind == PyUnicode_2BYTE_KIND) {
33240 ch1 = PyUnicode_2BYTE_DATA(s1)[0];
33241 } else {
33242 ch1 = PyUnicode_4BYTE_DATA(s1)[0];
33243 }
33244 } else if (ch2 < 65536) {
33245 if (kind == PyUnicode_2BYTE_KIND) {
33246 ch1 = PyUnicode_2BYTE_DATA(s1)[0];
33247 } else if (kind == PyUnicode_4BYTE_KIND) {
33248 ch1 = PyUnicode_4BYTE_DATA(s1)[0];
33249 } else {
33250 goto return_ne;
33251 }
33252 } else {
33253 if (kind == PyUnicode_4BYTE_KIND){
33254 ch1 = PyUnicode_4BYTE_DATA(s1)[0];
33255 } else {
33256 goto return_ne;
33257 }
33258 }
33259 if (ch1 == ch2) {
33260 goto return_eq;
33261 } else {
33262 goto return_ne;
33263 }
33264return_eq:
33265 return (equals == Py_EQ);
33266return_ne:
33267 return (equals == Py_NE);
33268bad:
33269 return -1;
33270}
33271#endif
33272
33273/* PyObjectCompare */
33274#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
33275#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
33276static CYTHON_INLINE int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
33277 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
33278 int result = PyUnicode_Equal(s1, s2);
33279 #if !CYTHON_COMPILING_IN_CPYTHON
33280 if (unlikely(result == -1)) return -1;
33281 #endif
33282 if (result == 0) goto __pyx_return_false; else goto __pyx_return_true;
33283 #else
33284 int result = PyUnicode_Compare(s1, s2);
33285 if (unlikely((result == -1) && PyErr_Occurred())) return -1;
33286 if (result == 0) goto __pyx_return_true; else goto __pyx_return_false;
33287 #endif
33288__pyx_return_true:
33289 return 1;
33290__pyx_return_false:
33291 return 0;
33292}
33293#endif
33294static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_object_str(PyObject *op1, PyObject *op2, int pyop) {
33295 CYTHON_UNUSED_VAR(pyop);
33296 if (unlikely(op2 == Py_None)) {
33297 if (op1 == Py_None) goto __pyx_return_true; else goto __pyx_richcmp;
33298 }
33299 if (PyFloat_CheckExact(op1)) {
33300 goto __pyx_richcmp;
33301 }
33302 if (PyLong_CheckExact(op1)) {
33303 if (op1 == op2) goto __pyx_return_true;
33304 goto __pyx_richcmp;
33305 }
33306
33307 if (likely(PyUnicode_CheckExact(op1))) {
33308 if (op1 == op2) goto __pyx_return_true;
33309 if (likely(op2 != Py_None)) {
33310 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
33311 }
33312 goto __pyx_richcmp;
33313 }
33314
33315 if ((0)) goto __pyx_richcmp;
33316 if ((0)) goto __pyx_return_true;
33317 if ((0)) goto __pyx_return_false;
33318__pyx_richcmp:
33319 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
33320__pyx_return_true:
33321 return 1;
33322__pyx_return_false:
33323 return 0;
33324}
33325
33326/* PyObjectCompare */
33327#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
33328#ifndef __Pyx_DEFINED_PyObject_ComparePyBytesPyBytesEq
33329#define __Pyx_DEFINED_PyObject_ComparePyBytesPyBytesEq
33330static CYTHON_INLINE PyObject* __Pyx_PyObject_ComparePyBytesPyBytesEq(PyObject* s1, PyObject* s2) {
33331 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
33332 const char *ps1, *ps2;
33333 Py_ssize_t length = PyBytes_GET_SIZE(s1);
33334 if (length != PyBytes_GET_SIZE(s2)) goto __pyx_return_false;
33335 ps1 = PyBytes_AS_STRING(s1);
33336 ps2 = PyBytes_AS_STRING(s2);
33337 #else
33338 char *ps1, *ps2;
33339 Py_ssize_t length, length2;
33340 if (unlikely(PyBytes_AsStringAndSize(s1, &ps1, &length) == -1)) return NULL;
33341 if (unlikely(PyBytes_AsStringAndSize(s2, &ps2, &length2) == -1)) return NULL;
33342 if (length != length2) goto __pyx_return_false;
33343 #endif
33344 if (ps1[0] != ps2[0]) goto __pyx_return_false;
33345 if (length == 1) goto __pyx_return_true;
33346 {
33347 int cmp;
33348#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
33349 Py_hash_t hash1 = ((PyBytesObject*)s1)->ob_shash;
33350 Py_hash_t hash2 = ((PyBytesObject*)s2)->ob_shash;
33351 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) goto __pyx_return_false;
33352#endif
33353 cmp = memcmp(ps1, ps2, (size_t)length);
33354 if (cmp == 0) goto __pyx_return_true; else goto __pyx_return_false;
33355 }
33356__pyx_return_true:
33357 Py_RETURN_TRUE;
33358__pyx_return_false:
33359 Py_RETURN_FALSE;
33360}
33361#endif
33362#endif
33363#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
33364#ifndef __Pyx_DEFINED_PyObject_ComparePyByteArrayPyBytesEq
33365#define __Pyx_DEFINED_PyObject_ComparePyByteArrayPyBytesEq
33366static CYTHON_INLINE PyObject* __Pyx_PyObject_ComparePyByteArrayPyBytesEq(PyObject* s1, PyObject* s2) {
33367 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
33368 const char *ps1, *ps2;
33369 Py_ssize_t length = PyByteArray_GET_SIZE(s1);
33370 if (length != PyBytes_GET_SIZE(s2)) goto __pyx_return_false;
33371 ps1 = PyByteArray_AS_STRING(s1);
33372 ps2 = PyBytes_AS_STRING(s2);
33373 #else
33374 char *ps1, *ps2;
33375 Py_ssize_t length, length2;
33376 ps1 = __Pyx_PyByteArray_AsString(s1); if (unlikely(!ps1)) return NULL;
33377 length = __Pyx_PyByteArray_GET_SIZE(s1); if (unlikely(length == -1)) return NULL;
33378 if (unlikely(PyBytes_AsStringAndSize(s2, &ps2, &length2) == -1)) return NULL;
33379 if (length != length2) goto __pyx_return_false;
33380 #endif
33381 if (length == 0) goto __pyx_return_true;
33382 if (ps1[0] != ps2[0]) goto __pyx_return_false;
33383 if (length == 1) goto __pyx_return_true;
33384 {
33385 int cmp;
33386 cmp = memcmp(ps1, ps2, (size_t)length);
33387 if (cmp == 0) goto __pyx_return_true; else goto __pyx_return_false;
33388 }
33389__pyx_return_true:
33390 Py_RETURN_TRUE;
33391__pyx_return_false:
33392 Py_RETURN_FALSE;
33393}
33394#endif
33395#endif
33396static CYTHON_INLINE PyObject* __Pyx_PyObject_CompareEq_object_bytes(PyObject *op1, PyObject *op2, int pyop) {
33397 CYTHON_UNUSED_VAR(pyop);
33398 if (unlikely(op2 == Py_None)) {
33399 if (op1 == Py_None) goto __pyx_return_true; else goto __pyx_richcmp;
33400 }
33401 if (PyFloat_CheckExact(op1)) {
33402 goto __pyx_richcmp;
33403 }
33404 if (PyLong_CheckExact(op1)) {
33405 if (op1 == op2) goto __pyx_return_true;
33406 goto __pyx_richcmp;
33407 }
33408 #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
33409 if (likely(PyBytes_CheckExact(op1))) {
33410 if (op1 == op2) goto __pyx_return_true;
33411 if (likely(op2 != Py_None)) {
33412 return __Pyx_PyObject_ComparePyBytesPyBytesEq(op1, op2);
33413 }
33414 goto __pyx_richcmp;
33415 }
33416 #endif
33417 if ((0)) goto __pyx_richcmp;
33418 if ((0)) goto __pyx_return_true;
33419 if ((0)) goto __pyx_return_false;
33420__pyx_richcmp:
33421 return PyObject_RichCompare(op1, op2, Py_EQ);
33422__pyx_return_true:
33423 Py_RETURN_TRUE;
33424__pyx_return_false:
33425 Py_RETURN_FALSE;
33426}
33427
33428/* GetAttr */
33429static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
33430#if CYTHON_USE_TYPE_SLOTS
33431 if (likely(PyUnicode_Check(n)))
33432 return __Pyx_PyObject_GetAttrStr(o, n);
33433#endif
33434 return PyObject_GetAttr(o, n);
33435}
33436
33437/* PyFrozenDict (used by GetItemInt) */
33438#if CYTHON_COMPILING_IN_LIMITED_API
33439static CYTHON_INLINE PyObject* __Pyx__PyFrozenDict_New(PyObject* frozendict_type, PyObject* it) {
33440 return PyObject_CallFunctionObjArgs(frozendict_type, it, NULL);
33441}
33442#endif
33443
33444/* GettItemInt_wraparound (used by GetItemInt) */
33445#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
33446static int __Pyx_GetItemInt_wraparound(PyObject *o, PySequenceMethods *sm, Py_ssize_t *i) {
33447 assert(*i < 0);
33448 if (likely(sm->sq_length)) {
33449 Py_ssize_t l = sm->sq_length(o);
33450 if (likely(l >= 0)) {
33451 *i += l;
33452 } else {
33453 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
33454 return -1;
33455 PyErr_Clear();
33456 }
33457 }
33458 return 0;
33459}
33460#endif
33461
33462/* GetItemInt */
33463static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
33464 PyObject *r;
33465 if (unlikely(!j)) return NULL;
33466 r = PyObject_GetItem(o, j);
33467 Py_DECREF(j);
33468 return r;
33469}
33470static PyObject *__Pyx_GetItemInt_Generic_size(PyObject *o, Py_ssize_t i) {
33471 return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
33472}
33473static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
33474 int wraparound, int boundscheck, int unsafe_shared) {
33475 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
33476#if CYTHON_AVOID_BORROWED_REFS
33477 CYTHON_UNUSED_VAR(boundscheck);
33478 Py_ssize_t wrapped_i = i;
33479 if (wraparound & unlikely(i < 0)) {
33480 Py_ssize_t size = __Pyx_PyList_GET_SIZE(o);
33481 #if !CYTHON_ASSUME_SAFE_SIZE
33482 if (unlikely(size < 0)) return NULL;
33483 #endif
33484 wrapped_i += size;
33485 }
33486 return __Pyx_PyList_GetItemRef(o, wrapped_i);
33487#elif CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
33488 Py_ssize_t wrapped_i = i;
33489 Py_ssize_t size = (wraparound | boundscheck) ? PyList_GET_SIZE(o) : -1;
33490 if (wraparound & unlikely(i < 0)) {
33491 wrapped_i += size;
33492 }
33493 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
33494 return __Pyx_PyList_GET_ITEM_REF(o, wrapped_i, unsafe_shared);
33495 }
33496 return __Pyx_GetItemInt_Generic_size(o, i);
33497#else
33498 (void)wraparound;
33499 (void)boundscheck;
33500 return PySequence_GetItem(o, i);
33501#endif
33502}
33503static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
33504 int wraparound, int boundscheck, int unsafe_shared) {
33505 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
33506#if CYTHON_AVOID_BORROWED_REFS
33507 CYTHON_UNUSED_VAR(boundscheck);
33508 Py_ssize_t wrapped_i = i;
33509 if (wraparound & unlikely(i < 0)) {
33510 Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(o);
33511 #if !CYTHON_ASSUME_SAFE_SIZE
33512 if (unlikely(size < 0)) return NULL;
33513 #endif
33514 wrapped_i += size;
33515 }
33516 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_LIMITED_API
33517 return PySequence_ITEM(o, wrapped_i);
33518 #else
33519 if (unlikely(wrapped_i < 0)) {
33520 PyErr_SetString(PyExc_IndexError, "tuple index out of range");
33521 return NULL;
33522 }
33523 return PySequence_GetItem(o, wrapped_i);
33524 #endif
33525#elif CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
33526 Py_ssize_t wrapped_i = i;
33527 Py_ssize_t size = (wraparound | boundscheck) ? PyTuple_GET_SIZE(o) : -1;
33528 if (wraparound & unlikely(i < 0)) {
33529 wrapped_i += size;
33530 }
33531 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
33532 return __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(o, wrapped_i));
33533 }
33534 return __Pyx_GetItemInt_Generic_size(o, i);
33535#else
33536 (void)wraparound;
33537 (void)boundscheck;
33538 return PySequence_GetItem(o, i);
33539#endif
33540}
33541#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
33542static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast_mapping(PyObject *o, binaryfunc getitem, Py_ssize_t i) {
33543 PyObject *r, *key = PyLong_FromSsize_t(i);
33544 if (unlikely(!key)) return NULL;
33545 r = getitem(o, key);
33546 Py_DECREF(key);
33547 return r;
33548}
33549#endif
33550static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
33551 int wraparound, int boundscheck, int unsafe_shared) {
33552 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
33553#if CYTHON_ASSUME_SAFE_SIZE
33554 if (PyList_CheckExact(o)) {
33555 return __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck, unsafe_shared);
33556 } else
33557 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33558 if (PyTuple_CheckExact(o)) {
33559 return __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck, unsafe_shared);
33560 } else
33561 #endif
33562#else
33563 if ((!wraparound || i >= 0) & PyList_CheckExact(o)) {
33564 return boundscheck ? __Pyx_PyList_GetItemRef(o, i) : __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared);
33565 } else
33566#endif
33567#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
33568 if (PyDict_CheckExact(o)) {
33569 return __Pyx_GetItemInt_Fast_mapping(o, PyDict_Type.tp_as_mapping->mp_subscript, i);
33570 #if defined(PyFrozenDict_CheckExact)
33571 } else if (PyFrozenDict_CheckExact(o)) {
33572 return __Pyx_GetItemInt_Fast_mapping(o, PyFrozenDict_Type.tp_as_mapping->mp_subscript, i);
33573 #endif
33574 } else
33575 {
33576 PyTypeObject *obj_type = Py_TYPE(o);
33577 int seq_or_mapping = __Pyx_PyType_GetFlags(obj_type) & (Py_TPFLAGS_SEQUENCE|Py_TPFLAGS_MAPPING);
33578 if (seq_or_mapping != Py_TPFLAGS_SEQUENCE) {
33579 PyMappingMethods *mm = obj_type->tp_as_mapping;
33580 if (mm && mm->mp_subscript)
33581 return __Pyx_GetItemInt_Fast_mapping(o, mm->mp_subscript, i);
33582 }
33583 PySequenceMethods *sm = obj_type->tp_as_sequence;
33584 if (likely(sm && sm->sq_item)) {
33585 if (wraparound && (i < 0) && unlikely(__Pyx_GetItemInt_wraparound(o, sm, &i) == -1))
33586 return NULL;
33587 return sm->sq_item(o, i);
33588 }
33589 if (seq_or_mapping == Py_TPFLAGS_SEQUENCE) {
33590 PyMappingMethods *mm = obj_type->tp_as_mapping;
33591 if (likely(mm && mm->mp_subscript))
33592 return __Pyx_GetItemInt_Fast_mapping(o, mm->mp_subscript, i);
33593 }
33594 }
33595#else
33596 if (!PyMapping_Check(o)) {
33597 return PySequence_GetItem(o, i);
33598 }
33599#endif
33600 (void)wraparound;
33601 (void)boundscheck;
33602 return __Pyx_GetItemInt_Generic_size(o, i);
33603}
33604
33605/* RaiseErrorWithObjectType (used by ObjectGetItem) */
33606static void __Pyx_RaiseErrorWithType(PyObject* exc_type, const char* message, PyTypeObject *type_obj) {
33607 __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(type_obj);
33608 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
33609 if (unlikely(!type_name)) return;
33610 #endif
33611 PyErr_Format(exc_type, message, type_name);
33612 __Pyx_DECREF_TypeName(type_name);
33613}
33614
33615/* ObjectGetItem */
33616#if CYTHON_USE_TYPE_SLOTS
33617static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
33618 PyObject *runerr = NULL;
33619 Py_ssize_t key_value;
33620 key_value = __Pyx_PyIndex_AsSsize_t(index);
33621 if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
33622 return __Pyx_GetItemInt_Fast(obj, key_value, 1, 1, 1);
33623 }
33624 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
33625 PyErr_Clear();
33626 __Pyx_RaiseErrorWithObjectType(
33627 PyExc_IndexError,
33628 "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer",
33629 index);
33630 }
33631 return NULL;
33632}
33633static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
33634 if (likely(PyType_Check(obj))) {
33635 if ((PyTypeObject*)obj == &PyType_Type) {
33636 return Py_GenericAlias(obj, key);
33637 }
33638 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
33639 if (!meth) {
33640 if (PyErr_Occurred()) {
33641 return NULL;
33642 }
33643 } else {
33644 PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
33645 Py_DECREF(meth);
33646 return result;
33647 }
33648 }
33649 __Pyx_RaiseTypeErrorWithObjectType(
33650 "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj);
33651 return NULL;
33652}
33653static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
33654 PyTypeObject *tp = Py_TYPE(obj);
33655 PyMappingMethods *mm = tp->tp_as_mapping;
33656 PySequenceMethods *sm = tp->tp_as_sequence;
33657 if (likely(mm && mm->mp_subscript)) {
33658 return mm->mp_subscript(obj, key);
33659 }
33660 if (likely(sm && sm->sq_item)) {
33661 return __Pyx_PyObject_GetIndex(obj, key);
33662 }
33663 return __Pyx_PyObject_GetItem_Slow(obj, key);
33664}
33665#endif
33666
33667/* RejectKeywords */
33668static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
33669 PyObject *key = NULL;
33670 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds))) {
33671 key = __Pyx_PySequence_ITEM(kwds, 0);
33672 } else {
33673#if CYTHON_AVOID_BORROWED_REFS
33674 PyObject *pos = NULL;
33675#else
33676 Py_ssize_t pos = 0;
33677#endif
33678#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
33679 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
33680#endif
33681 __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
33682#if CYTHON_AVOID_BORROWED_REFS
33683 Py_XDECREF(pos);
33684#endif
33685 }
33686 if (likely(key)) {
33687 PyErr_Format(PyExc_TypeError,
33688 "%s() got an unexpected keyword argument '%U'",
33689 function_name, key);
33690 Py_DECREF(key);
33691 }
33692}
33693
33694/* DivInt[Py_ssize_t] */
33695static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b, int b_is_constant) {
33696 Py_ssize_t q = a / b;
33697 Py_ssize_t r = a - q*b;
33698 Py_ssize_t adapt_python = (b_is_constant ?
33699 ((r != 0) & ((r < 0) ^ (b < 0))) :
33700 ((r != 0) & ((r ^ b) < 0))
33701 );
33702 return q - adapt_python;
33703}
33704
33705/* GetAttr3 */
33706#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
33707static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
33708 __Pyx_PyThreadState_declare
33709 __Pyx_PyThreadState_assign
33710 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
33711 return NULL;
33712 __Pyx_PyErr_Clear();
33713 Py_INCREF(d);
33714 return d;
33715}
33716#endif
33717static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
33718 PyObject *r;
33719#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
33720 int res = PyObject_GetOptionalAttr(o, n, &r);
33721 return (res != 0) ? r : __Pyx_NewRef(d);
33722#else
33723 #if CYTHON_USE_TYPE_SLOTS
33724 if (likely(PyUnicode_Check(n))) {
33725 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
33726 if (unlikely(!r) && likely(!PyErr_Occurred())) {
33727 r = __Pyx_NewRef(d);
33728 }
33729 return r;
33730 }
33731 #endif
33732 r = PyObject_GetAttr(o, n);
33733 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
33734#endif
33735}
33736
33737/* PyDictVersioning (used by GetModuleGlobalName) */
33738#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
33739static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
33740 PyObject *dict = Py_TYPE(obj)->tp_dict;
33741 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
33742}
33743static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
33744 PyObject **dictptr = NULL;
33745 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
33746 if (offset) {
33747#if CYTHON_COMPILING_IN_CPYTHON
33748 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
33749#else
33750 dictptr = _PyObject_GetDictPtr(obj);
33751#endif
33752 }
33753 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
33754}
33755static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
33756 PyObject *dict = Py_TYPE(obj)->tp_dict;
33757 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
33758 return 0;
33759 return obj_dict_version == __Pyx_get_object_dict_version(obj);
33760}
33761#endif
33762
33763/* GetModuleGlobalName */
33764#if CYTHON_USE_DICT_VERSIONS
33765static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
33766#else
33767static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
33768#endif
33769{
33770 PyObject *result;
33771#if CYTHON_COMPILING_IN_LIMITED_API
33772 if (unlikely(!__pyx_m)) {
33773 if (!PyErr_Occurred())
33774 PyErr_SetNone(PyExc_NameError);
33775 return NULL;
33776 }
33777 result = PyObject_GetAttr(__pyx_m, name);
33778 if (likely(result)) {
33779 return result;
33780 }
33781 if (!__Pyx_IgnoreException(PyExc_Exception)) {
33782 return NULL; // BaseException
33783 }
33784#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
33785 if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) {
33786 if (!__Pyx_IgnoreException(PyExc_Exception)) {
33787 return NULL; // BaseException
33788 }
33789 }
33790 __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
33791 if (likely(result)) {
33792 return result;
33793 }
33794#else
33795 result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
33796 __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
33797 if (likely(result)) {
33798 return __Pyx_NewRef(result);
33799 }
33800 PyObject *exc = PyErr_Occurred();
33801 if (unlikely(exc) && !__Pyx_IgnoreGivenException(exc, PyExc_Exception)) {
33802 return NULL; // BaseException
33803 }
33804#endif
33805 return __Pyx_GetBuiltinName(name);
33806}
33807
33808/* RaiseTooManyValuesToUnpack */
33809static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
33810 PyErr_Format(PyExc_ValueError,
33811 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
33812}
33813
33814/* RaiseNeedMoreValuesToUnpack */
33815static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
33816 PyErr_Format(PyExc_ValueError,
33817 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
33818 index, (index == 1) ? "" : "s");
33819}
33820
33821/* RaiseNoneIterError */
33822static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
33823 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
33824}
33825
33826/* GetTopmostException (used by SaveResetException) */
33827#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
33828static _PyErr_StackItem *
33829__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
33830{
33831 _PyErr_StackItem *exc_info = tstate->exc_info;
33832 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
33833 exc_info->previous_item != NULL)
33834 {
33835 exc_info = exc_info->previous_item;
33836 }
33837 return exc_info;
33838}
33839#endif
33840
33841/* SaveResetException */
33842#if CYTHON_FAST_THREAD_STATE
33843static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
33844 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
33845 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
33846 PyObject *exc_value = exc_info->exc_value;
33847 if (exc_value == NULL || exc_value == Py_None) {
33848 *value = NULL;
33849 *type = NULL;
33850 *tb = NULL;
33851 } else {
33852 *value = exc_value;
33853 Py_INCREF(*value);
33854 *type = (PyObject*) Py_TYPE(exc_value);
33855 Py_INCREF(*type);
33856 *tb = PyException_GetTraceback(exc_value);
33857 }
33858 #elif CYTHON_USE_EXC_INFO_STACK
33859 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
33860 *type = exc_info->exc_type;
33861 *value = exc_info->exc_value;
33862 *tb = exc_info->exc_traceback;
33863 Py_XINCREF(*type);
33864 Py_XINCREF(*value);
33865 Py_XINCREF(*tb);
33866 #else
33867 *type = tstate->exc_type;
33868 *value = tstate->exc_value;
33869 *tb = tstate->exc_traceback;
33870 Py_XINCREF(*type);
33871 Py_XINCREF(*value);
33872 Py_XINCREF(*tb);
33873 #endif
33874}
33875static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
33876 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
33877 _PyErr_StackItem *exc_info = tstate->exc_info;
33878 PyObject *tmp_value = exc_info->exc_value;
33879 exc_info->exc_value = value;
33880 Py_XDECREF(tmp_value);
33881 Py_XDECREF(type);
33882 Py_XDECREF(tb);
33883 #else
33884 PyObject *tmp_type, *tmp_value, *tmp_tb;
33885 #if CYTHON_USE_EXC_INFO_STACK
33886 _PyErr_StackItem *exc_info = tstate->exc_info;
33887 tmp_type = exc_info->exc_type;
33888 tmp_value = exc_info->exc_value;
33889 tmp_tb = exc_info->exc_traceback;
33890 exc_info->exc_type = type;
33891 exc_info->exc_value = value;
33892 exc_info->exc_traceback = tb;
33893 #else
33894 tmp_type = tstate->exc_type;
33895 tmp_value = tstate->exc_value;
33896 tmp_tb = tstate->exc_traceback;
33897 tstate->exc_type = type;
33898 tstate->exc_value = value;
33899 tstate->exc_traceback = tb;
33900 #endif
33901 Py_XDECREF(tmp_type);
33902 Py_XDECREF(tmp_value);
33903 Py_XDECREF(tmp_tb);
33904 #endif
33905}
33906#endif
33907
33908/* RaiseErrorWithObjectTypes (used by ExtTypeTest) */
33909static void __Pyx_RaiseErrorWithTypes1(PyObject* exc_type, const char *message, const char *arg, PyTypeObject *type_obj1, PyTypeObject *type_obj2) {
33910 __Pyx_TypeName type_name1 = __Pyx_PyType_GetFullyQualifiedName(type_obj1);
33911 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
33912 if (unlikely(!type_name1)) return;
33913 #endif
33914 __Pyx_TypeName type_name2 = __Pyx_PyType_GetFullyQualifiedName(type_obj2);
33915 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
33916 if (unlikely(!type_name2)) goto type2_failed;
33917 #endif
33918 PyErr_Format(exc_type, message, arg, type_name1, type_name2);
33919 __Pyx_DECREF_TypeName(type_name2);
33920#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
33921type2_failed:
33922#endif
33923 __Pyx_DECREF_TypeName(type_name1);
33924}
33925
33926/* ExtTypeTest */
33927static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
33928 if (unlikely(!type)) {
33929 PyErr_SetString(PyExc_SystemError, "Missing type object");
33930 return 0;
33931 }
33932 if (likely(__Pyx_TypeCheck(obj, type)))
33933 return 1;
33934 __Pyx_RaiseTypeErrorWithTypes(
33935 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
33936 Py_TYPE(obj), type);
33937 return 0;
33938}
33939
33940/* GetException */
33941#if CYTHON_FAST_THREAD_STATE
33942static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
33943#else
33944static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
33945#endif
33946{
33947 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
33948#if CYTHON_FAST_THREAD_STATE
33949 PyObject *tmp_type, *tmp_value, *tmp_tb;
33950 #if PY_VERSION_HEX >= 0x030C0000
33951 local_value = tstate->current_exception;
33952 tstate->current_exception = 0;
33953 #else
33954 local_type = tstate->curexc_type;
33955 local_value = tstate->curexc_value;
33956 local_tb = tstate->curexc_traceback;
33957 tstate->curexc_type = 0;
33958 tstate->curexc_value = 0;
33959 tstate->curexc_traceback = 0;
33960 #endif
33961#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
33962 local_value = PyErr_GetRaisedException();
33963#else
33964 PyErr_Fetch(&local_type, &local_value, &local_tb);
33965#endif
33966#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
33967 if (likely(local_value)) {
33968 local_type = (PyObject*) Py_TYPE(local_value);
33969 Py_INCREF(local_type);
33970 local_tb = PyException_GetTraceback(local_value);
33971 }
33972#else
33973 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
33974#if CYTHON_FAST_THREAD_STATE
33975 if (unlikely(tstate->curexc_type))
33976#else
33977 if (unlikely(PyErr_Occurred()))
33978#endif
33979 goto bad;
33980 if (local_tb) {
33981 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
33982 goto bad;
33983 }
33984#endif // __PYX_LIMITED_VERSION_HEX >= 0x030C0000
33985 Py_XINCREF(local_tb);
33986 Py_XINCREF(local_type);
33987 Py_XINCREF(local_value);
33988 *type = local_type;
33989 *value = local_value;
33990 *tb = local_tb;
33991#if CYTHON_FAST_THREAD_STATE
33992 #if CYTHON_USE_EXC_INFO_STACK
33993 {
33994 _PyErr_StackItem *exc_info = tstate->exc_info;
33995 #if PY_VERSION_HEX >= 0x030B00a4
33996 tmp_value = exc_info->exc_value;
33997 exc_info->exc_value = local_value;
33998 tmp_type = NULL;
33999 tmp_tb = NULL;
34000 Py_XDECREF(local_type);
34001 Py_XDECREF(local_tb);
34002 #else
34003 tmp_type = exc_info->exc_type;
34004 tmp_value = exc_info->exc_value;
34005 tmp_tb = exc_info->exc_traceback;
34006 exc_info->exc_type = local_type;
34007 exc_info->exc_value = local_value;
34008 exc_info->exc_traceback = local_tb;
34009 #endif
34010 }
34011 #else
34012 tmp_type = tstate->exc_type;
34013 tmp_value = tstate->exc_value;
34014 tmp_tb = tstate->exc_traceback;
34015 tstate->exc_type = local_type;
34016 tstate->exc_value = local_value;
34017 tstate->exc_traceback = local_tb;
34018 #endif
34019 Py_XDECREF(tmp_type);
34020 Py_XDECREF(tmp_value);
34021 Py_XDECREF(tmp_tb);
34022#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
34023 PyErr_SetHandledException(local_value);
34024 Py_XDECREF(local_value);
34025 Py_XDECREF(local_type);
34026 Py_XDECREF(local_tb);
34027#else
34028 PyErr_SetExcInfo(local_type, local_value, local_tb);
34029#endif
34030 return 0;
34031#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
34032bad:
34033 *type = 0;
34034 *value = 0;
34035 *tb = 0;
34036 Py_XDECREF(local_type);
34037 Py_XDECREF(local_value);
34038 Py_XDECREF(local_tb);
34039 return -1;
34040#endif
34041}
34042
34043/* SwapException */
34044#if CYTHON_FAST_THREAD_STATE
34045static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
34046 PyObject *tmp_type, *tmp_value, *tmp_tb;
34047 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
34048 _PyErr_StackItem *exc_info = tstate->exc_info;
34049 tmp_value = exc_info->exc_value;
34050 exc_info->exc_value = *value;
34051 if (tmp_value == NULL || tmp_value == Py_None) {
34052 Py_XDECREF(tmp_value);
34053 tmp_value = NULL;
34054 tmp_type = NULL;
34055 tmp_tb = NULL;
34056 } else {
34057 tmp_type = (PyObject*) Py_TYPE(tmp_value);
34058 Py_INCREF(tmp_type);
34059 #if CYTHON_COMPILING_IN_CPYTHON
34060 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
34061 Py_XINCREF(tmp_tb);
34062 #else
34063 tmp_tb = PyException_GetTraceback(tmp_value);
34064 #endif
34065 }
34066 #elif CYTHON_USE_EXC_INFO_STACK
34067 _PyErr_StackItem *exc_info = tstate->exc_info;
34068 tmp_type = exc_info->exc_type;
34069 tmp_value = exc_info->exc_value;
34070 tmp_tb = exc_info->exc_traceback;
34071 exc_info->exc_type = *type;
34072 exc_info->exc_value = *value;
34073 exc_info->exc_traceback = *tb;
34074 #else
34075 tmp_type = tstate->exc_type;
34076 tmp_value = tstate->exc_value;
34077 tmp_tb = tstate->exc_traceback;
34078 tstate->exc_type = *type;
34079 tstate->exc_value = *value;
34080 tstate->exc_traceback = *tb;
34081 #endif
34082 *type = tmp_type;
34083 *value = tmp_value;
34084 *tb = tmp_tb;
34085}
34086#else
34087static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
34088 PyObject *tmp_type, *tmp_value, *tmp_tb;
34089 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
34090 PyErr_SetExcInfo(*type, *value, *tb);
34091 *type = tmp_type;
34092 *value = tmp_value;
34093 *tb = tmp_tb;
34094}
34095#endif
34096
34097/* HasAttr (used by ImportImpl) */
34098#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
34099static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
34100 PyObject *r;
34101 if (unlikely(!PyUnicode_Check(n))) {
34102 PyErr_SetString(PyExc_TypeError,
34103 "hasattr(): attribute name must be string");
34104 return -1;
34105 }
34106 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
34107 if (!r) {
34108 return (unlikely(PyErr_Occurred())) ? -1 : 0;
34109 } else {
34110 Py_DECREF(r);
34111 return 1;
34112 }
34113}
34114#endif
34115
34116/* TupleOrListFromArrayImpl (used by ListFromArray) */
34117CYTHON_UNUSED static PyObject *
34118__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) {
34119 PyObject *res = PyList_New(n);
34120 if (unlikely(res == NULL)) return NULL;
34121 #if CYTHON_COMPILING_IN_CPYTHON
34122 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
34123 #else
34124 Py_ssize_t i;
34125 for (i = 0; i < n; i++) {
34126 Py_INCREF(src[i]);
34127 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
34128 Py_DECREF(res);
34129 return NULL;
34130 }
34131 }
34132 #endif
34133 return res;
34134}
34135
34136/* ImportImpl (used by Import) */
34137static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
34138 PyObject *imported_module = PyImport_GetModule(qualname);
34139 if (unlikely(!imported_module)) {
34140 *module = NULL;
34141 if (PyErr_Occurred()) {
34142 return -1;
34143 }
34144 return 0;
34145 }
34146 *module = imported_module;
34147 return 1;
34148}
34149static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
34150 PyObject *imported_module;
34151 PyObject *top_level_package_name;
34152 Py_ssize_t i;
34153 int status, module_found;
34154 Py_ssize_t dot_index;
34155 module_found = __Pyx__Import_GetModule(qualname, &imported_module);
34156 if (unlikely(!module_found || module_found == -1)) {
34157 *module = NULL;
34158 return module_found;
34159 }
34160 if (imported_names) {
34161 for (i = 0; i < len_imported_names; i++) {
34162 PyObject *imported_name = imported_names[i];
34163#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
34164 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
34165#else
34166 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
34167 if (unlikely(has_imported_attribute == -1)) goto error;
34168#endif
34169 if (!has_imported_attribute) {
34170 goto not_found;
34171 }
34172 }
34173 *module = imported_module;
34174 return 1;
34175 }
34176 dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
34177 if (dot_index == -1) {
34178 *module = imported_module;
34179 return 1;
34180 }
34181 if (unlikely(dot_index == -2)) goto error;
34182 top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
34183 if (unlikely(!top_level_package_name)) goto error;
34184 Py_DECREF(imported_module);
34185 status = __Pyx__Import_GetModule(top_level_package_name, module);
34186 Py_DECREF(top_level_package_name);
34187 return status;
34188error:
34189 Py_DECREF(imported_module);
34190 *module = NULL;
34191 return -1;
34192not_found:
34193 Py_DECREF(imported_module);
34194 *module = NULL;
34195 return 0;
34196}
34197static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
34198 PyObject *module = 0;
34199 PyObject *empty_dict = 0;
34200 PyObject *from_list = 0;
34201 int module_found;
34202 if (!qualname) {
34203 qualname = name;
34204 }
34205 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
34206 if (likely(module_found == 1)) {
34207 return module;
34208 } else if (unlikely(module_found == -1)) {
34209 return NULL;
34210 }
34211 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
34212 empty_dict = PyFrozenDict_New(NULL);
34213 #else
34214 empty_dict = PyDict_New();
34215 #endif
34216 if (unlikely(!empty_dict))
34217 goto bad;
34218 if (imported_names) {
34219 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
34220 if (unlikely(!from_list))
34221 goto bad;
34222 }
34223 if (level == -1) {
34224 const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
34225 if (package_sep != (0)) {
34226 module = PyImport_ImportModuleLevelObject(
34227 name, moddict, empty_dict, from_list, 1);
34228 if (unlikely(!module)) {
34229 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
34230 goto bad;
34231 PyErr_Clear();
34232 }
34233 }
34234 level = 0;
34235 }
34236 if (!module) {
34237 module = PyImport_ImportModuleLevelObject(
34238 name, moddict, empty_dict, from_list, level);
34239 }
34240bad:
34241 Py_XDECREF(from_list);
34242 Py_XDECREF(empty_dict);
34243 return module;
34244}
34245
34246/* Import */
34247static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
34248 return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
34249}
34250
34251/* ListAppendAndDecrefInternal (used by ListCompAppendAndDecref) */
34252#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
34253static CYTHON_INLINE void __Pyx__ListComp_AppendAndDecref(PyObject* list, Py_ssize_t len, PyObject* x) {
34254 PyList_SET_ITEM(list, len, x);
34255 Py_SET_SIZE(list, len + 1);
34256}
34257#endif
34258
34259/* ListCompAppendAndDecref */
34260#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
34261static CYTHON_INLINE int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x) {
34262 PyListObject* L = (PyListObject*) list;
34263 Py_ssize_t len = Py_SIZE(list);
34264 if (likely(L->allocated > len)) {
34265 __Pyx__ListComp_AppendAndDecref(list, len, x);
34266 return 0;
34267 }
34268 int result = PyList_Append(list, x);
34269 Py_DECREF(x);
34270 return result;
34271}
34272#else
34273static CYTHON_INLINE int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x) {
34274 int result = PyList_Append(list, x);
34275 Py_DECREF(x);
34276 return result;
34277}
34278#endif
34279
34280/* PySequenceMultiply */
34281#if CYTHON_USE_TYPE_SLOTS
34282static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
34283 PyObject *result, *pymul = PyLong_FromSsize_t(mul);
34284 if (unlikely(!pymul))
34285 return NULL;
34286 result = PyNumber_Multiply(seq, pymul);
34287 Py_DECREF(pymul);
34288 return result;
34289}
34290static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
34291 PyTypeObject *type = Py_TYPE(seq);
34292 if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
34293 return type->tp_as_sequence->sq_repeat(seq, mul);
34294 } else {
34295 return __Pyx_PySequence_Multiply_Generic(seq, mul);
34296 }
34297}
34298#endif
34299
34300/* PyNumberBinop */
34301#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
34302#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
34303#ifndef __Pyx_DEFINED_BinopTypeError
34304#define __Pyx_DEFINED_BinopTypeError
34305static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2, const char* op, int inplace) {
34306 char opname[4] = {op[0], op[1], 0, 0};
34307 if (inplace) {
34308 opname[op[1] ? 2 : 1] = '=';
34309 }
34310 __Pyx_RaiseErrorWithObjectTypes1(
34311 PyExc_TypeError,
34312 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'",
34313 opname, op1, op2);
34314}
34315#endif
34316#endif
34317#ifndef __Pyx_DEFINED_PyNumber_Multiply_xfloat_int
34318#define __Pyx_DEFINED_PyNumber_Multiply_xfloat_int
34319static PyObject* __Pyx_PyNumber_Multiply_xfloat_int(PyObject *op1, PyObject *op2, int inplace) {
34320 if (likely(op2 != Py_None)) {
34321 double int_op2;
34322 #if CYTHON_USE_PYLONG_INTERNALS
34323 if (__Pyx_PyLong_IsCompact(op2)) {
34324 Py_ssize_t compact_op2 = __Pyx_PyLong_CompactValue(op2);
34325 int_op2 = (double) compact_op2;
34326 } else
34327 #endif
34328 {
34329 int_op2 = PyLong_AsDouble(op2);
34330 if (unlikely((int_op2 == -1.) && PyErr_Occurred())) return NULL;
34331 }
34332 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
34333 #if !CYTHON_ASSUME_SAFE_MACROS
34334 if (unlikely((float_op1 == -1.) && PyErr_Occurred())) return NULL;
34335 #endif
34336 if (float_op1 == 0.) return __Pyx_NewRef(op1);
34337 return PyFloat_FromDouble(float_op1 * int_op2);
34338 }
34339 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
34340 {
34341 PyTypeObject *type_op2 = Py_TYPE(op2);
34342 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
34343 if (likely(slot_func)) {
34344 PyObject *result = slot_func(op1, op2);
34345 if (likely(result != Py_NotImplemented)) {
34346 return result;
34347 }
34348 Py_DECREF(result);
34349 }
34350 __Pyx_BinopTypeError(op1, op2, "*", inplace);
34351 return NULL;
34352 }
34353 #else
34354 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
34355 #endif
34356}
34357#endif
34358#ifndef __Pyx_DEFINED_PyNumber_Multiply_xint_int
34359#define __Pyx_DEFINED_PyNumber_Multiply_xint_int
34360static PyObject* __Pyx_PyNumber_Multiply_xint_int(PyObject *op1, PyObject *op2, int inplace) {
34361 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
34362 {
34363 PyTypeObject *type_op2 = Py_TYPE(op2);
34364 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
34365 if (likely(slot_func)) {
34366 PyObject *result = slot_func(op1, op2);
34367 if (likely(result != Py_NotImplemented)) {
34368 return result;
34369 }
34370 Py_DECREF(result);
34371 }
34372 ssizeargfunc repeat_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_sequence, sq_repeat, ssizeargfunc);
34373 if (likely(repeat_func)) {
34374 Py_ssize_t count;
34375 #if CYTHON_USE_PYLONG_INTERNALS
34376 if (__Pyx_PyLong_IsCompact(op1)) {
34377 count = __Pyx_PyLong_CompactValue(op1);
34378 } else
34379 #endif
34380 {
34381 count = PyLong_AsSsize_t(op1);
34382 if (unlikely((count == -1) && PyErr_Occurred())) return NULL;
34383 }
34384 return repeat_func(op2, count);
34385 }
34386 __Pyx_BinopTypeError(op1, op2, "*", inplace);
34387 return NULL;
34388 }
34389 #else
34390 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
34391 #endif
34392}
34393#endif
34394static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_object_int(PyObject *op1, PyObject *op2, int inplace) {
34395 if (PyFloat_CheckExact(op1)) {
34396 return __Pyx_PyNumber_Multiply_xfloat_int(op1, op2, inplace);
34397 }
34398 if (likely(PyLong_CheckExact(op1))) {
34399 if (likely(op2 != Py_None)) {
34400 #if CYTHON_USE_PYLONG_INTERNALS
34401 if (__Pyx_PyLong_IsCompact(op1)) {
34402 long long int_op1 = (long long) __Pyx_PyLong_CompactValue(op1);
34403 if (int_op1 == 0) return __Pyx_NewRef(op1);
34404 if (__Pyx_PyLong_IsCompact(op2)) {
34405 long long int_op2 = (long long) __Pyx_PyLong_CompactValue(op2);
34406 if (int_op2 == 0) return __Pyx_NewRef(op2);
34407 return PyLong_FromLongLong(int_op1 * int_op2);
34408 }
34409 }
34410 else if (__Pyx_PyLong_IsZero(op2)) return __Pyx_NewRef(op2);
34411 #endif
34412 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyLong_Type, tp_as_number, nb_multiply, binaryfunc);
34413 if (likely(slot_func)) {
34414 return slot_func(op1, op2);
34415 }
34416 }
34417 return __Pyx_PyNumber_Multiply_xint_int(op1, op2, inplace);
34418 }
34419 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
34420}
34421#endif
34422
34423/* PyObjectFormatAndDecref */
34424static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
34425 if (unlikely(!s)) return NULL;
34426 if (likely(PyUnicode_CheckExact(s))) return s;
34427 return __Pyx_PyObject_FormatAndDecref(s, f);
34428}
34429static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
34430 PyObject *result;
34431 if (unlikely(!s)) return NULL;
34432 result = PyObject_Format(s, f);
34433 Py_DECREF(s);
34434 return result;
34435}
34436
34437/* PyObjectFormat */
34438#if CYTHON_USE_UNICODE_WRITER
34439static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
34440 int ret;
34441 _PyUnicodeWriter writer;
34442 if (likely(PyFloat_CheckExact(obj))) {
34443 _PyUnicodeWriter_Init(&writer);
34444 ret = _PyFloat_FormatAdvancedWriter(
34445 &writer,
34446 obj,
34447 format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
34448 } else if (likely(PyLong_CheckExact(obj))) {
34449 _PyUnicodeWriter_Init(&writer);
34450 ret = _PyLong_FormatAdvancedWriter(
34451 &writer,
34452 obj,
34453 format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
34454 } else {
34455 return PyObject_Format(obj, format_spec);
34456 }
34457 if (unlikely(ret == -1)) {
34458 _PyUnicodeWriter_Dealloc(&writer);
34459 return NULL;
34460 }
34461 return _PyUnicodeWriter_Finish(&writer);
34462}
34463#endif
34464
34465/* SetItemInt */
34466static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
34467 int r;
34468 if (unlikely(!j)) return -1;
34469 r = PyObject_SetItem(o, j, v);
34470 Py_DECREF(j);
34471 return r;
34472}
34473#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
34474static CYTHON_INLINE int __Pyx_SetItemInt_Fast_mapping(PyObject *o, objobjargproc setitem, Py_ssize_t i, PyObject *value) {
34475 PyObject *key = PyLong_FromSsize_t(i);
34476 if (unlikely(!key)) return -1;
34477 int r = setitem(o, key, value);
34478 Py_DECREF(key);
34479 return r;
34480}
34481#endif
34482static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
34483 int wraparound, int boundscheck, int unsafe_shared) {
34484 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
34485#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS
34486 if (PyList_CheckExact(o)) {
34487 Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
34488 if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) {
34489 Py_INCREF(v);
34490 return PyList_SetItem(o, n, v);
34491 } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
34492 PyObject* old;
34493 Py_INCREF(v);
34494 old = PyList_GET_ITEM(o, n);
34495 PyList_SET_ITEM(o, n, v);
34496 Py_DECREF(old);
34497 return 0;
34498 }
34499 } else
34500#endif
34501#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
34502 if (PyDict_CheckExact(o)) {
34503 return __Pyx_SetItemInt_Fast_mapping(o, PyDict_Type.tp_as_mapping->mp_ass_subscript, i, v);
34504 } else
34505 {
34506 PyTypeObject *obj_type = Py_TYPE(o);
34507 int seq_or_mapping = __Pyx_PyType_GetFlags(obj_type) & (Py_TPFLAGS_SEQUENCE|Py_TPFLAGS_MAPPING);
34508 if (seq_or_mapping != Py_TPFLAGS_SEQUENCE) {
34509 PyMappingMethods *mm = obj_type->tp_as_mapping;
34510 if (mm && mm->mp_ass_subscript)
34511 return __Pyx_SetItemInt_Fast_mapping(o, mm->mp_ass_subscript, i, v);
34512 }
34513 PySequenceMethods *sm = obj_type->tp_as_sequence;
34514 if (likely(sm && sm->sq_ass_item)) {
34515 if (wraparound && (i < 0) && unlikely(__Pyx_GetItemInt_wraparound(o, sm, &i) == -1))
34516 return -1;
34517 return sm->sq_ass_item(o, i, v);
34518 }
34519 if (seq_or_mapping == Py_TPFLAGS_SEQUENCE) {
34520 PyMappingMethods *mm = obj_type->tp_as_mapping;
34521 if (likely(mm && mm->mp_ass_subscript))
34522 return __Pyx_SetItemInt_Fast_mapping(o, mm->mp_ass_subscript, i, v);
34523 }
34524 }
34525#else
34526 if (!PyMapping_Check(o)) {
34527 return PySequence_SetItem(o, i, v);
34528 }
34529#endif
34530 (void)wraparound;
34531 (void)boundscheck;
34532 return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v);
34533}
34534
34535/* RaiseUnboundLocalError */
34536static void __Pyx_RaiseUnboundLocalError(const char *varname) {
34537 PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
34538}
34539
34540/* DivInt[long] */
34541static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) {
34542 long q = a / b;
34543 long r = a - q*b;
34544 long adapt_python = (b_is_constant ?
34545 ((r != 0) & ((r < 0) ^ (b < 0))) :
34546 ((r != 0) & ((r ^ b) < 0))
34547 );
34548 return q - adapt_python;
34549}
34550
34551/* Profile */
34552#if CYTHON_PROFILE || CYTHON_TRACE
34553#if CYTHON_TRACE && !CYTHON_USE_SYS_MONITORING
34554static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int line) {
34555 int ret;
34556 PyObject *type, *value, *traceback;
34557 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
34558 __Pyx_PyFrame_SetLineNumber(frame, line);
34559 __Pyx_EnterTracing(tstate);
34560 ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
34561 __Pyx_LeaveTracing(tstate);
34562 if (likely(!ret)) {
34563 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
34564 } else {
34565 Py_XDECREF(type);
34566 Py_XDECREF(value);
34567 Py_XDECREF(traceback);
34568 }
34569 return ret;
34570}
34571#endif
34572CYTHON_UNUSED static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
34573 PyCodeObject *py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
34574 if (likely(py_code)) {
34575 py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
34576 }
34577 return py_code;
34578}
34579#if CYTHON_USE_SYS_MONITORING
34580CYTHON_UNUSED static int __Pyx__TraceStartFunc(PyMonitoringState *state_array, PyObject *code_obj, int offset, int skip_event) {
34581 int ret;
34582 __pyx_monitoring_version_type version = 0;
34583 ret = PyMonitoring_EnterScope(state_array, &version, __Pyx_MonitoringEventTypes, __Pyx_MonitoringEventTypes_CyFunc_count);
34584 if (unlikely(ret == -1)) return -1;
34585 return skip_event ? 0 : PyMonitoring_FirePyStartEvent(&state_array[__Pyx_Monitoring_PY_START], code_obj, offset);
34586}
34587CYTHON_UNUSED static int __Pyx__TraceStartGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset) {
34588 int ret;
34589 ret = PyMonitoring_EnterScope(state_array, version, __Pyx_MonitoringEventTypes, __Pyx_MonitoringEventTypes_CyGen_count);
34590 if (unlikely(ret == -1)) return -1;
34591 return PyMonitoring_FirePyStartEvent(&state_array[__Pyx_Monitoring_PY_START], code_obj, offset);
34592}
34593CYTHON_UNUSED static int __Pyx__TraceResumeGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj, int offset) {
34594 int ret;
34595 ret = PyMonitoring_EnterScope(state_array, version, __Pyx_MonitoringEventTypes, __Pyx_MonitoringEventTypes_CyGen_count);
34596 if (unlikely(ret == -1)) return -1;
34597 return PyMonitoring_FirePyResumeEvent(&state_array[__Pyx_Monitoring_PY_RESUME], code_obj, offset);
34598}
34599CYTHON_UNUSED static void __Pyx__TraceException(PyMonitoringState *monitoring_state, PyObject *code_obj, int offset, int reraised) {
34600 if (reraised) {
34601 (void) PyMonitoring_FireReraiseEvent(monitoring_state, code_obj, offset);
34602 } else {
34603 (void) PyMonitoring_FireRaiseEvent(monitoring_state, code_obj, offset);
34604 }
34605}
34606#if CYTHON_TRACE
34607CYTHON_UNUSED static int __Pyx__TraceLine(PyMonitoringState *monitoring_state, PyObject *code_obj, int line, int offset) {
34608 int ret;
34609 PyObject *exc = PyErr_GetRaisedException();
34610 ret = PyMonitoring_FireLineEvent(monitoring_state, code_obj, offset, line);
34611 if (exc) PyErr_SetRaisedException(exc);
34612 return ret;
34613}
34614#endif
34615#else
34616static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
34617 PyFrameObject** frame,
34618 PyThreadState* tstate,
34619 const char *funcname,
34620 const char *srcfile,
34621 int firstlineno,
34622 int skip_event) {
34623 if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
34624 int needs_new_code_obj = (*code == NULL);
34625 if (needs_new_code_obj) {
34626 *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
34627 if (*code == NULL) return 0;
34628 }
34629 *frame = PyFrame_New(
34630 tstate, /*PyThreadState *tstate*/
34631 *code, /*PyCodeObject *code*/
34632 __pyx_mstate_global->__pyx_d, /*PyObject *globals*/
34633 0 /*PyObject *locals*/
34634 );
34635 if (needs_new_code_obj && !CYTHON_PROFILE_REUSE_CODEOBJ)
34636 Py_CLEAR(*code); // otherwise the reference is owned externally
34637 if (*frame == NULL) return 0;
34638 if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
34639 Py_INCREF(Py_None);
34640 (*frame)->f_trace = Py_None;
34641 }
34642 }
34643 if (!skip_event) {
34644 PyObject *type, *value, *traceback;
34645 int retval = 1;
34646 __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
34647 __Pyx_EnterTracing(tstate);
34648 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
34649 #if CYTHON_TRACE
34650 if (tstate->c_tracefunc)
34651 retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
34652 if (retval && tstate->c_profilefunc)
34653 #endif
34654 retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
34655 __Pyx_LeaveTracing(tstate);
34656 if (unlikely(!retval)) {
34657 Py_XDECREF(type);
34658 Py_XDECREF(value);
34659 Py_XDECREF(traceback);
34660 return -1;
34661 }
34662 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
34663 }
34664 return __Pyx_IsTracing(tstate, 0, 0);
34665}
34666#endif
34667#endif
34668
34669/* ImportFrom */
34670static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
34671 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
34672 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
34673 const char* module_name_str = 0;
34674 PyObject* module_name = 0;
34675 PyObject* module_dot = 0;
34676 PyObject* full_name = 0;
34677 PyErr_Clear();
34678 module_name_str = PyModule_GetName(module);
34679 if (unlikely(!module_name_str)) { goto modbad; }
34680 module_name = PyUnicode_FromString(module_name_str);
34681 if (unlikely(!module_name)) { goto modbad; }
34682 module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3);
34683 if (unlikely(!module_dot)) { goto modbad; }
34684 full_name = PyUnicode_Concat(module_dot, name);
34685 if (unlikely(!full_name)) { goto modbad; }
34686 #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\
34687 CYTHON_COMPILING_IN_GRAAL
34688 {
34689 PyObject *modules = PyImport_GetModuleDict();
34690 if (unlikely(!modules))
34691 goto modbad;
34692 value = PyObject_GetItem(modules, full_name);
34693 }
34694 #else
34695 value = PyImport_GetModule(full_name);
34696 #endif
34697 modbad:
34698 Py_XDECREF(full_name);
34699 Py_XDECREF(module_dot);
34700 Py_XDECREF(module_name);
34701 }
34702 if (unlikely(!value)) {
34703 PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
34704 }
34705 return value;
34706}
34707
34708/* RaiseClosureNameError */
34709static void __Pyx_RaiseClosureNameError(const char *varname) {
34710 PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
34711}
34712
34713/* dict_setdefault (used by FetchCommonType) */
34714static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
34715 PyObject* value;
34716#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
34717 PyDict_SetDefaultRef(d, key, default_value, &value);
34718#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
34719 PyObject *args[] = {d, key, default_value};
34720 value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
34721#elif CYTHON_COMPILING_IN_LIMITED_API
34722 value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
34723#else
34724 value = PyDict_SetDefault(d, key, default_value);
34725 if (unlikely(!value)) return NULL;
34726 Py_INCREF(value);
34727#endif
34728 return value;
34729}
34730
34731/* AddModuleRef (used by FetchSharedCythonModule) */
34732#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3
34733 static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
34734 PyObject *module_dict = PyImport_GetModuleDict();
34735 PyObject *m;
34736 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
34737 return NULL;
34738 }
34739 if (m != NULL && PyModule_Check(m)) {
34740 return m;
34741 }
34742 Py_XDECREF(m);
34743 m = PyModule_NewObject(name);
34744 if (m == NULL)
34745 return NULL;
34746 if (PyDict_CheckExact(module_dict)) {
34747 PyObject *new_m;
34748 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
34749 Py_DECREF(m);
34750 return new_m;
34751 } else {
34752 if (PyObject_SetItem(module_dict, name, m) != 0) {
34753 Py_DECREF(m);
34754 return NULL;
34755 }
34756 return m;
34757 }
34758 }
34759 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
34760 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
34761 return PyImport_AddModuleRef(name);
34762 }
34763 PyObject *py_name = PyUnicode_FromString(name);
34764 if (!py_name) return NULL;
34765 PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
34766 Py_DECREF(py_name);
34767 return module;
34768 }
34769#elif __PYX_LIMITED_VERSION_HEX < 0x030d0000
34770 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
34771 PyObject *module = PyImport_AddModule(name);
34772 Py_XINCREF(module);
34773 return module;
34774 }
34775#endif
34776
34777/* FetchSharedCythonModule (used by FetchCommonType) */
34778static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
34779 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
34780}
34781
34782/* VerifyCachedType (used by FetchCommonType) */
34783static int __Pyx_VerifyCachedType(PyObject *cached_type,
34784 const char *name,
34785 Py_ssize_t expected_basicsize) {
34786 Py_ssize_t basicsize;
34787 if (!PyType_Check(cached_type)) {
34788 PyErr_Format(PyExc_TypeError,
34789 "Shared Cython type %.200s is not a type object", name);
34790 return -1;
34791 }
34792 if (expected_basicsize == 0) {
34793 return 0; // size is inherited, nothing useful to check
34794 }
34795#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
34796 if (expected_basicsize < 0) {
34797 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
34798 } else
34799#endif
34800 {
34801 #if CYTHON_COMPILING_IN_LIMITED_API
34802 PyObject *py_basicsize;
34803 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
34804 if (unlikely(!py_basicsize)) return -1;
34805 basicsize = PyLong_AsSsize_t(py_basicsize);
34806 Py_DECREF(py_basicsize);
34807 py_basicsize = NULL;
34808 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
34809 #else
34810 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
34811 #endif
34812 }
34813 if ((expected_basicsize >= 0) ?
34814 (basicsize != expected_basicsize) :
34815 (basicsize < -expected_basicsize)) {
34816 PyErr_Format(PyExc_TypeError,
34817 "Shared Cython type %.200s has the wrong size, try recompiling",
34818 name);
34819 return -1;
34820 }
34821 return 0;
34822}
34823
34824/* FetchCommonType (used by CommonTypesMetaclass) */
34825#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
34826static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
34827 PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
34828 if (result && metaclass) {
34829 PyObject *old_tp = (PyObject*)Py_TYPE(result);
34830 Py_INCREF((PyObject*)metaclass);
34831 Py_SET_TYPE(result, metaclass);
34832 Py_DECREF(old_tp);
34833 PyType_Modified((PyTypeObject*)result);
34834 }
34835 return result;
34836}
34837#else
34838#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
34839#endif
34840static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
34841 PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
34842 int get_item_ref_result;
34843 const char* object_name = strrchr(spec->name, '.');
34844 object_name = object_name ? object_name+1 : spec->name;
34845 py_object_name = PyUnicode_FromString(object_name);
34846 if (!py_object_name) return NULL;
34847 abi_module = __Pyx_FetchSharedCythonABIModule();
34848 if (!abi_module) goto done;
34849 abi_module_dict = PyModule_GetDict(abi_module);
34850 if (!abi_module_dict) goto done;
34851 get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
34852 if (get_item_ref_result == 1) {
34853 if (__Pyx_VerifyCachedType(
34854 cached_type,
34855 object_name,
34856 spec->basicsize) < 0) {
34857 goto bad;
34858 }
34859 goto done;
34860 } else if (unlikely(get_item_ref_result == -1)) {
34861 goto bad;
34862 }
34863 cached_type = __Pyx_PyType_FromMetaclass(
34864 metaclass,
34865 CYTHON_USE_MODULE_STATE ? module : abi_module,
34866 spec, bases);
34867 if (unlikely(!cached_type)) goto bad;
34868 new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
34869 if (unlikely(new_cached_type != cached_type)) {
34870 if (unlikely(!new_cached_type)) goto bad;
34871 Py_DECREF(cached_type);
34872 cached_type = new_cached_type;
34873 if (__Pyx_VerifyCachedType(
34874 cached_type,
34875 object_name,
34876 spec->basicsize) < 0) {
34877 goto bad;
34878 }
34879 goto done;
34880 } else {
34881 Py_DECREF(new_cached_type);
34882 }
34883done:
34884 Py_XDECREF(abi_module);
34885 Py_DECREF(py_object_name);
34886 assert(cached_type == NULL || PyType_Check(cached_type));
34887 return (PyTypeObject *) cached_type;
34888bad:
34889 Py_XDECREF(cached_type);
34890 cached_type = NULL;
34891 goto done;
34892}
34893
34894/* CommonTypesMetaclass (used by CythonFunctionShared) */
34895static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
34896 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
34897}
34898#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
34899static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
34900 PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
34901 return NULL;
34902}
34903static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
34904 PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
34905 return -1;
34906}
34907#endif
34908static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
34909 {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
34910 {0, 0, 0, 0, 0}
34911};
34912static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
34913 {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
34914 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
34915 {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
34916 {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
34917 {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
34918 #endif
34919 {0, 0}
34920};
34921static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
34922 __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
34923 0,
34924 0,
34925 Py_TPFLAGS_IMMUTABLETYPE |
34926 Py_TPFLAGS_DISALLOW_INSTANTIATION |
34927 Py_TPFLAGS_DEFAULT,
34928 __pyx_CommonTypesMetaclass_slots
34929};
34930static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
34931 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
34932 PyObject *bases = PyTuple_Pack(1, &PyType_Type);
34933 if (unlikely(!bases)) {
34934 return -1;
34935 }
34936 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
34937 Py_DECREF(bases);
34938 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
34939 return -1;
34940 }
34941 return 0;
34942}
34943
34944/* CythonFunctionPerModule (used by CythonFunctionShared) */
34945#if CYTHON_COMPILING_IN_LIMITED_API
34946static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
34947 if (__Pyx_CyFunction_Check(func)) {
34948 return __Pyx_as_CyFunctionObject(func)->func_methoddef->ml_meth == (PyCFunction) cfunc;
34949 } else if (PyCFunction_Check(func)) {
34950 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
34951 }
34952 return 0;
34953}
34954static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
34955 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
34956 int result;
34957 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
34958 if (unlikely(!newFunc)) {
34959 PyErr_Clear(); // It's only an optimization, so don't throw an error
34960 return 0;
34961 }
34962 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
34963 Py_DECREF(newFunc);
34964 return result;
34965 }
34966 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
34967}
34968#else
34969static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
34970 if (PyMethod_Check(func)) {
34971 func = PyMethod_GET_FUNCTION(func);
34972 }
34973 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
34974}
34975#endif
34976static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
34977#if CYTHON_COMPILING_IN_LIMITED_API
34978 __Pyx_Py_XDECREF_SET(
34979 __Pyx__CyFunction_GetClassObj(f),
34980 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
34981#else
34982 __Pyx_Py_XDECREF_SET(
34983 ((PyCMethodObject *) (f))->mm_class,
34984 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
34985#endif
34986}
34987static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
34988 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
34989 m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
34990 if (unlikely(!m->defaults))
34991 return NULL;
34992 return m->defaults;
34993}
34994static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
34995 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
34996 m->defaults_tuple = tuple;
34997 Py_INCREF(tuple);
34998}
34999static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
35000 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
35001 m->defaults_kwdict = dict;
35002 Py_INCREF(dict);
35003}
35004static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
35005 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
35006 m->func_annotations = dict;
35007 Py_INCREF(dict);
35008}
35009
35010/* CallTypeTraverse (used by CythonFunctionShared) */
35011#if !CYTHON_USE_TYPE_SPECS
35012#else
35013static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
35014 if (!always_call) {
35015 PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
35016 unsigned long flags = PyType_GetFlags(base);
35017 if (flags & Py_TPFLAGS_HEAPTYPE) {
35018 return 0;
35019 }
35020 }
35021 Py_VISIT((PyObject*)Py_TYPE(o));
35022 return 0;
35023}
35024#endif
35025
35026/* PyMethodNew (used by CythonFunctionShared) */
35027#if CYTHON_COMPILING_IN_LIMITED_API
35028static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
35029 PyObject *result;
35030 CYTHON_UNUSED_VAR(typ);
35031 if (!self)
35032 return __Pyx_NewRef(func);
35033 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
35034 {
35035 PyObject *args[] = {func, self};
35036 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
35037 }
35038 #else
35039 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
35040 #endif
35041 return result;
35042}
35043#else
35044static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
35045 CYTHON_UNUSED_VAR(typ);
35046 if (!self)
35047 return __Pyx_NewRef(func);
35048 return PyMethod_New(func, self);
35049}
35050#endif
35051
35052/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
35053#if CYTHON_VECTORCALL
35054static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
35055{
35056 PyObject *res = NULL;
35057 PyObject *kwnames;
35058 PyObject **newargs;
35059 PyObject **kwvalues;
35060 Py_ssize_t i;
35061 #if CYTHON_AVOID_BORROWED_REFS
35062 PyObject *pos;
35063 #else
35064 Py_ssize_t pos;
35065 #endif
35066 size_t j;
35067 PyObject *key, *value;
35068 unsigned long keys_are_strings;
35069 #if !CYTHON_ASSUME_SAFE_SIZE
35070 Py_ssize_t nkw = PyDict_Size(kw);
35071 if (unlikely(nkw == -1)) return NULL;
35072 #else
35073 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
35074 #endif
35075 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
35076 if (unlikely(newargs == NULL)) {
35077 PyErr_NoMemory();
35078 return NULL;
35079 }
35080 for (j = 0; j < nargs; j++) newargs[j] = args[j];
35081 kwnames = PyTuple_New(nkw);
35082 if (unlikely(kwnames == NULL)) {
35083 PyMem_Free(newargs);
35084 return NULL;
35085 }
35086 kwvalues = newargs + nargs;
35087 pos = 0;
35088 i = 0;
35089 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
35090 while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
35091 keys_are_strings &=
35092 #if CYTHON_COMPILING_IN_LIMITED_API
35093 PyType_GetFlags(Py_TYPE(key));
35094 #else
35095 Py_TYPE(key)->tp_flags;
35096 #endif
35097 #if !CYTHON_ASSUME_SAFE_MACROS
35098 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
35099 #else
35100 PyTuple_SET_ITEM(kwnames, i, key);
35101 #endif
35102 kwvalues[i] = value;
35103 i++;
35104 }
35105 if (unlikely(!keys_are_strings)) {
35106 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
35107 goto cleanup;
35108 }
35109 res = vc(func, newargs, nargs, kwnames);
35110cleanup:
35111 #if CYTHON_AVOID_BORROWED_REFS
35112 Py_DECREF(pos);
35113 #endif
35114 Py_DECREF(kwnames);
35115 for (i = 0; i < nkw; i++)
35116 Py_DECREF(kwvalues[i]);
35117 PyMem_Free(newargs);
35118 return res;
35119}
35120static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
35121{
35122 Py_ssize_t kw_size =
35123 likely(kw == NULL) ?
35124 0 :
35125#if !CYTHON_ASSUME_SAFE_SIZE
35126 PyDict_Size(kw);
35127#else
35128 PyDict_GET_SIZE(kw);
35129#endif
35130 if (kw_size == 0) {
35131 return vc(func, args, nargs, NULL);
35132 }
35133#if !CYTHON_ASSUME_SAFE_SIZE
35134 else if (unlikely(kw_size == -1)) {
35135 return NULL;
35136 }
35137#endif
35138 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
35139}
35140#endif
35141
35142/* CythonFunctionShared (used by CythonFunction) */
35143static PyObject *
35144__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
35145{
35146 if (unlikely(op->func_doc == NULL)) {
35147#if CYTHON_COMPILING_IN_LIMITED_API
35148 const char *doc = op->func_methoddef->ml_doc;
35149#else
35150 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
35151#endif
35152 if (doc) {
35153 op->func_doc = PyUnicode_FromString(doc);
35154 if (unlikely(op->func_doc == NULL))
35155 return NULL;
35156 } else {
35157 Py_INCREF(Py_None);
35158 return Py_None;
35159 }
35160 }
35161 Py_INCREF(op->func_doc);
35162 return op->func_doc;
35163}
35164static PyObject *
35165__Pyx_CyFunction_get_doc(PyObject *op_in, void *closure) {
35166 PyObject *result;
35167 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35168 CYTHON_UNUSED_VAR(closure);
35169 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35170 result = __Pyx_CyFunction_get_doc_locked(op);
35171 __Pyx_END_CRITICAL_SECTION();
35172 return result;
35173}
35174static int
35175__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value, void *context)
35176{
35177 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35178 CYTHON_UNUSED_VAR(context);
35179 if (value == NULL) {
35180 value = Py_None;
35181 }
35182 Py_INCREF(value);
35183 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35184 __Pyx_Py_XDECREF_SET(op->func_doc, value);
35185 __Pyx_END_CRITICAL_SECTION();
35186 return 0;
35187}
35188static PyObject *
35189__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
35190{
35191 if (unlikely(op->func_name == NULL)) {
35192#if CYTHON_COMPILING_IN_LIMITED_API
35193 const char *name = op->func_methoddef->ml_name;
35194#else
35195 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
35196#endif
35197 op->func_name = PyUnicode_InternFromString(name);
35198 if (unlikely(op->func_name == NULL))
35199 return NULL;
35200 }
35201 Py_INCREF(op->func_name);
35202 return op->func_name;
35203}
35204static PyObject *
35205__Pyx_CyFunction_get_name(PyObject *op, void *context)
35206{
35207 PyObject *result = NULL;
35208 CYTHON_UNUSED_VAR(context);
35209 __Pyx_BEGIN_CRITICAL_SECTION(op);
35210 result = __Pyx_CyFunction_get_name_locked(__Pyx_as_CyFunctionObject(op));
35211 __Pyx_END_CRITICAL_SECTION();
35212 return result;
35213}
35214static int
35215__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value, void *context)
35216{
35217 CYTHON_UNUSED_VAR(context);
35218 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
35219 PyErr_SetString(PyExc_TypeError,
35220 "__name__ must be set to a string object");
35221 return -1;
35222 }
35223 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35224 Py_INCREF(value);
35225 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35226 __Pyx_Py_XDECREF_SET(op->func_name, value);
35227 __Pyx_END_CRITICAL_SECTION();
35228 return 0;
35229}
35230static PyObject *
35231__Pyx_CyFunction_get_qualname(PyObject *op_in, void *context)
35232{
35233 CYTHON_UNUSED_VAR(context);
35234 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35235 PyObject *result;
35236 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35237 Py_INCREF(op->func_qualname);
35238 result = op->func_qualname;
35239 __Pyx_END_CRITICAL_SECTION();
35240 return result;
35241}
35242static int
35243__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value, void *context)
35244{
35245 CYTHON_UNUSED_VAR(context);
35246 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
35247 PyErr_SetString(PyExc_TypeError,
35248 "__qualname__ must be set to a string object");
35249 return -1;
35250 }
35251 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35252 Py_INCREF(value);
35253 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35254 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
35255 __Pyx_END_CRITICAL_SECTION();
35256 return 0;
35257}
35258#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
35259static PyObject *
35260__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
35261{
35262 CYTHON_UNUSED_VAR(context);
35263 if (unlikely(op->func_dict == NULL)) {
35264 op->func_dict = PyDict_New();
35265 if (unlikely(op->func_dict == NULL))
35266 return NULL;
35267 }
35268 Py_INCREF(op->func_dict);
35269 return op->func_dict;
35270}
35271#endif
35272static PyObject *
35273__Pyx_CyFunction_get_globals(PyObject *op_in, void *context)
35274{
35275 CYTHON_UNUSED_VAR(context);
35276 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35277 Py_INCREF(op->func_globals);
35278 return op->func_globals;
35279}
35280static PyObject *
35281__Pyx_CyFunction_get_closure(PyObject *op, void *context)
35282{
35283 CYTHON_UNUSED_VAR(op);
35284 CYTHON_UNUSED_VAR(context);
35285 Py_INCREF(Py_None);
35286 return Py_None;
35287}
35288static PyObject *
35289__Pyx_CyFunction_get_code(PyObject *op_in, void *context)
35290{
35291 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35292 PyObject* result = (op->func_code) ? op->func_code : Py_None;
35293 CYTHON_UNUSED_VAR(context);
35294 Py_INCREF(result);
35295 return result;
35296}
35297static int
35298__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
35299 int result = 0;
35300 PyObject *res = op->defaults_getter(op_obj);
35301 if (unlikely(!res))
35302 return -1;
35303 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
35304 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
35305 Py_INCREF(op->defaults_tuple);
35306 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
35307 Py_INCREF(op->defaults_kwdict);
35308 #else
35309 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
35310 if (unlikely(!op->defaults_tuple)) result = -1;
35311 else {
35312 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
35313 if (unlikely(!op->defaults_kwdict)) result = -1;
35314 }
35315 #endif
35316 Py_DECREF(res);
35317 return result;
35318}
35319static int
35320__Pyx_CyFunction_set_defaults(PyObject *op_in, PyObject* value, void *context) {
35321 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35322 CYTHON_UNUSED_VAR(context);
35323 if (!value) {
35324 value = Py_None;
35325 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
35326 PyErr_SetString(PyExc_TypeError,
35327 "__defaults__ must be set to a tuple object");
35328 return -1;
35329 }
35330 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
35331 "currently affect the values used in function calls", 1);
35332 Py_INCREF(value);
35333 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35334 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
35335 __Pyx_END_CRITICAL_SECTION();
35336 return 0;
35337}
35338static PyObject *
35339__Pyx_CyFunction_get_defaults_locked(PyObject *op_in) {
35340 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35341 PyObject* result = op->defaults_tuple;
35342 if (unlikely(!result)) {
35343 if (op->defaults_getter) {
35344 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
35345 result = op->defaults_tuple;
35346 } else {
35347 result = Py_None;
35348 }
35349 }
35350 Py_INCREF(result);
35351 return result;
35352}
35353static PyObject *
35354__Pyx_CyFunction_get_defaults(PyObject *op, void *context) {
35355 PyObject* result = NULL;
35356 CYTHON_UNUSED_VAR(context);
35357 __Pyx_BEGIN_CRITICAL_SECTION(op);
35358 result = __Pyx_CyFunction_get_defaults_locked(op);
35359 __Pyx_END_CRITICAL_SECTION();
35360 return result;
35361}
35362static int
35363__Pyx_CyFunction_set_kwdefaults(PyObject *op_in, PyObject* value, void *context) {
35364 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35365 CYTHON_UNUSED_VAR(context);
35366 if (!value) {
35367 value = Py_None;
35368 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
35369 PyErr_SetString(PyExc_TypeError,
35370 "__kwdefaults__ must be set to a dict object");
35371 return -1;
35372 }
35373 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
35374 "currently affect the values used in function calls", 1);
35375 Py_INCREF(value);
35376 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35377 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
35378 __Pyx_END_CRITICAL_SECTION();
35379 return 0;
35380}
35381static PyObject *
35382__Pyx_CyFunction_get_kwdefaults_locked(PyObject *op_in) {
35383 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35384 PyObject* result = op->defaults_kwdict;
35385 if (unlikely(!result)) {
35386 if (op->defaults_getter) {
35387 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
35388 result = op->defaults_kwdict;
35389 } else {
35390 result = Py_None;
35391 }
35392 }
35393 Py_INCREF(result);
35394 return result;
35395}
35396static PyObject *
35397__Pyx_CyFunction_get_kwdefaults(PyObject *op, void *context) {
35398 PyObject* result;
35399 CYTHON_UNUSED_VAR(context);
35400 __Pyx_BEGIN_CRITICAL_SECTION(op);
35401 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
35402 __Pyx_END_CRITICAL_SECTION();
35403 return result;
35404}
35405static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
35406static int
35407__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value, void *context) {
35408 CYTHON_UNUSED_VAR(context);
35409 if (!value || value == Py_None) {
35410 value = NULL;
35411 } else if (unlikely(!PyDict_Check(value))) {
35412 PyErr_SetString(PyExc_TypeError,
35413 "__annotations__ must be set to a dict object");
35414 return -1;
35415 }
35416 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35417 Py_XINCREF(value);
35418 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35419 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
35420 __Pyx_END_CRITICAL_SECTION();
35421 if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, Py_None) < 0)) return -1;
35422 return 0;
35423}
35424static int
35425__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
35426 /* Return 1 if the function dict exists, 0 otherwise. This cannot fail:
35427 * _PyObject_GetDictPtr() may clear errors internally, but never reports them. */
35428#if CYTHON_COMPILING_IN_PYPY
35429 *dict = PyObject_GenericGetDict(op_in, NULL);
35430#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
35431 *dict = __Pyx_as_CyFunctionObject(op_in)->func_dict;
35432#else
35433 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
35434 *dict = likely(dictptr) ? *dictptr : NULL;
35435#endif
35436 return *dict ? 1 : 0;
35437}
35438static int
35439__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
35440 PyObject *dict;
35441 int dict_found;
35442 *annotate = NULL;
35443 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
35444 if (!dict_found) return 0;
35445 return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
35446}
35447static int
35448__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
35449 PyObject *dict;
35450 int dict_found;
35451 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
35452 if (!dict_found) return 0;
35453 if (value) {
35454 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
35455 } else {
35456#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
35457 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
35458#else
35459 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
35460 if (result == 1) {
35461 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
35462 }
35463 return result;
35464#endif
35465 }
35466}
35467static int
35468__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
35469 PyObject *dict;
35470 int result;
35471#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
35472 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
35473#else
35474 dict = PyObject_GenericGetDict(op_in, NULL);
35475#endif
35476 if (unlikely(!dict)) return -1;
35477 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
35478 Py_DECREF(dict);
35479 return result;
35480}
35481static PyObject *
35482__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
35483 PyObject* result = op->func_annotations;
35484 if (unlikely(!result)) {
35485 result = PyDict_New();
35486 if (unlikely(!result)) return NULL;
35487 op->func_annotations = result;
35488 }
35489 Py_INCREF(result);
35490 return result;
35491}
35492static PyObject *
35493__Pyx_CyFunction_get_annotations(PyObject *op_in, void *context) {
35494 PyObject *annotate = NULL;
35495 PyObject *result = NULL;
35496 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35497 CYTHON_UNUSED_VAR(context);
35498 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35499 result = __Pyx_XNewRef(op->func_annotations);
35500 __Pyx_END_CRITICAL_SECTION();
35501 if (result) return result;
35502 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
35503 if (!annotate || annotate == Py_None) {
35504 Py_XDECREF(annotate);
35505 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35506 result = __Pyx_CyFunction_get_annotations_locked(op);
35507 __Pyx_END_CRITICAL_SECTION();
35508 return result;
35509 }
35510 PyObject *format = PyLong_FromLong(1L); // annotationlib.Format.VALUE
35511 if (likely(format)) {
35512 if (!Py_EnterRecursiveCall(" cyfunction __annotations__.__get__")) {
35513 result = __Pyx_PyObject_CallOneArg(annotate, format);
35514 Py_LeaveRecursiveCall();
35515 Py_DECREF(format);
35516 }
35517 }
35518 Py_DECREF(annotate);
35519 if (unlikely(!result)) return NULL;
35520 if (unlikely(!PyDict_Check(result))) {
35521 PyErr_SetString(PyExc_TypeError, "__annotate__ must return a dict");
35522 Py_DECREF(result);
35523 return NULL;
35524 }
35525 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35526 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
35527 __Pyx_END_CRITICAL_SECTION();
35528 return result;
35529}
35530static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *arg) {
35531 CYTHON_UNUSED_VAR(arg);
35532 if (unlikely(!self)) {
35533 PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument");
35534 return NULL;
35535 }
35536 PyObject *result;
35537 if (Py_EnterRecursiveCall(" in cyfunction annotate")) {
35538 return NULL;
35539 }
35540 result = __Pyx_CyFunction_get_annotations(self, NULL);
35541 Py_LeaveRecursiveCall();
35542 return result;
35543}
35544static PyObject *
35545__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context);
35546static int
35547__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) {
35548 CYTHON_UNUSED_VAR(context);
35549 if (value == NULL) {
35550 PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted");
35551 return -1;
35552 }
35553 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
35554 PyErr_SetString(PyExc_TypeError, "__annotate__ must be callable or None");
35555 return -1;
35556 }
35557 if (unlikely(__Pyx_TypeCheck(value, &PyCFunction_Type))) {
35558#if !CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_PYPY
35559 PyCFunction cfunction = PyCFunction_GetFunction(value);
35560 if (unlikely(!cfunction)) return -1;
35561 PyObject *value_self = PyCFunction_GetSelf(value);
35562 if (unlikely(!value_self && PyErr_Occurred())) return -1;
35563#else
35564 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
35565 PyObject *value_self = PyCFunction_GET_SELF(value);
35566#endif
35567 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
35568 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
35569 }
35570 }
35571 if (value != Py_None) {
35572 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35573 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35574 Py_CLEAR(op->func_annotations);
35575 __Pyx_END_CRITICAL_SECTION();
35576 }
35577 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
35578}
35579#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
35580static PyObject *
35581__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
35582 int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
35583 if (is_coroutine) {
35584 PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
35585 fromlist = PyList_New(1);
35586 if (unlikely(!fromlist)) return NULL;
35587 Py_INCREF(marker);
35588#if CYTHON_ASSUME_SAFE_MACROS
35589 PyList_SET_ITEM(fromlist, 0, marker);
35590#else
35591 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
35592 Py_DECREF(fromlist);
35593 return NULL;
35594 }
35595#endif
35596 module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
35597 Py_DECREF(fromlist);
35598 if (unlikely(!module)) {
35599 goto ignore_or_error;
35600 }
35601 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
35602 Py_DECREF(module);
35603 if (likely(is_coroutine_value)) {
35604 return is_coroutine_value;
35605 }
35606ignore_or_error:
35607 if (!__Pyx_IgnoreException(PyExc_Exception)) {
35608 return NULL;
35609 }
35610 }
35611 return __Pyx_PyBool_FromLong(is_coroutine);
35612}
35613static PyObject *
35614__Pyx_CyFunction_get_is_coroutine(PyObject *op_in, void *context) {
35615 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35616 PyObject *result;
35617 CYTHON_UNUSED_VAR(context);
35618 if (op->func_is_coroutine) {
35619 return __Pyx_NewRef(op->func_is_coroutine);
35620 }
35621 result = __Pyx_CyFunction_get_is_coroutine_value(op);
35622 if (unlikely(!result))
35623 return NULL;
35624 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35625 if (op->func_is_coroutine) {
35626 Py_DECREF(result);
35627 result = __Pyx_NewRef(op->func_is_coroutine);
35628 } else {
35629 op->func_is_coroutine = __Pyx_NewRef(result);
35630 }
35631 __Pyx_END_CRITICAL_SECTION();
35632 return result;
35633}
35634#endif
35635static void __Pyx_CyFunction_raise_argument_count_error(PyObject *func, const char* message, Py_ssize_t size) {
35636#if CYTHON_COMPILING_IN_LIMITED_API
35637 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
35638 if (!py_name) return;
35639 PyErr_Format(PyExc_TypeError,
35640 "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
35641 py_name, message, size);
35642 Py_DECREF(py_name);
35643#else
35644 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
35645 PyErr_Format(PyExc_TypeError,
35646 "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
35647 name, message, size);
35648#endif
35649}
35650static void __Pyx_CyFunction_raise_type_error(PyObject *func, const char* message) {
35651#if CYTHON_COMPILING_IN_LIMITED_API
35652 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
35653 if (!py_name) return;
35654 PyErr_Format(PyExc_TypeError,
35655 "%.200S() %s",
35656 py_name, message);
35657 Py_DECREF(py_name);
35658#else
35659 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
35660 PyErr_Format(PyExc_TypeError,
35661 "%.200s() %s",
35662 name, message);
35663#endif
35664}
35665#if CYTHON_COMPILING_IN_LIMITED_API
35666static PyObject *
35667__Pyx_CyFunction_get_module(PyObject *op_in, void *context) {
35668 CYTHON_UNUSED_VAR(context);
35669 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35670 Py_INCREF(op->func_module);
35671 return op->func_module;
35672}
35673static int
35674__Pyx_CyFunction_set_module(PyObject *op_in, PyObject* value, void *context) {
35675 CYTHON_UNUSED_VAR(context);
35676 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35677 if (value == NULL) {
35678 value = Py_None;
35679 }
35680 Py_INCREF(value);
35681 PyObject *old = op->func_module;
35682 op->func_module = value;
35683 Py_DECREF(old);
35684 return 0;
35685}
35686#endif
35687static PyGetSetDef __pyx_CyFunction_getsets[] = {
35688 {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
35689 {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
35690 {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
35691 {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
35692 {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
35693#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
35694 {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
35695 {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
35696#else
35697 {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
35698 {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
35699#endif
35700 {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
35701 {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
35702 {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
35703 {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
35704 {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
35705 {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
35706 {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
35707 {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
35708 {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
35709 {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
35710 {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
35711#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
35712 {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
35713#endif
35714#if CYTHON_COMPILING_IN_LIMITED_API
35715 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
35716#endif
35717 {0, 0, 0, 0, 0}
35718};
35719static PyMemberDef __pyx_CyFunction_members[] = {
35720#if !CYTHON_COMPILING_IN_LIMITED_API
35721 {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
35722#endif
35723#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
35724 {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict),
35725 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
35726#endif
35727#if CYTHON_VECTORCALL
35728#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
35729 {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall),
35730 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
35731#else
35732 {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
35733#endif
35734#if CYTHON_COMPILING_IN_LIMITED_API
35735 {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
35736 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
35737#else
35738 {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
35739#endif
35740#endif
35741 {0, 0, 0, 0, 0}
35742};
35743static PyObject *
35744__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
35745{
35746 PyObject *result = NULL;
35747 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
35748 CYTHON_UNUSED_VAR(args);
35749 __Pyx_BEGIN_CRITICAL_SECTION(m_in);
35750 Py_INCREF(m->func_qualname);
35751 result = m->func_qualname;
35752 __Pyx_END_CRITICAL_SECTION();
35753 return result;
35754}
35755static PyMethodDef __pyx_CyFunction_methods[] = {
35756 {"__annotate_cython__", __Pyx_CyFunction_annotate_impl, METH_O,
35757 "Placeholder __annotate__ function to allow 'functools.wraps' to work "
35758 "on Cython functions."},
35759 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_NOARGS, 0},
35760 {0, 0, 0, 0}
35761};
35762static PyObject *
35763__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) {
35764 PyObject *annotate = NULL;
35765 CYTHON_UNUSED_VAR(context);
35766 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
35767 if (annotate) return annotate;
35768 PyObject *method = PyCFunction_New(
35769 &__pyx_CyFunction_methods[0],
35770 op_in);
35771 return method;
35772}
35773#if CYTHON_COMPILING_IN_LIMITED_API
35774#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
35775#else
35776#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
35777#endif
35778static PyObject *__Pyx_CyFunction_Init(PyObject *op_in,
35779 PyMethodDef *ml, int flags, PyObject* qualname,
35780 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
35781 __pyx_CyFunctionObject* op = __Pyx_as_CyFunctionObject(op_in);
35782#if !CYTHON_COMPILING_IN_LIMITED_API
35783 PyCFunctionObject *cf = (PyCFunctionObject*) op;
35784#endif
35785 if (unlikely(op == NULL))
35786 return NULL;
35787#if CYTHON_COMPILING_IN_LIMITED_API
35788 op->func_methoddef = ml;
35789 Py_INCREF(module);
35790 op->func_module = module;
35791#endif
35792 op->flags = flags;
35793 __Pyx_CyFunction_weakreflist(op) = NULL;
35794#if !CYTHON_COMPILING_IN_LIMITED_API
35795 cf->m_ml = ml;
35796 cf->m_self = (PyObject *) op;
35797#endif
35798 Py_XINCREF(closure);
35799 op->func_closure = closure;
35800#if !CYTHON_COMPILING_IN_LIMITED_API
35801 Py_XINCREF(module);
35802 cf->m_module = module;
35803#endif
35804#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
35805 op->func_dict = NULL;
35806#endif
35807 op->func_name = NULL;
35808 Py_INCREF(qualname);
35809 op->func_qualname = qualname;
35810 op->func_doc = NULL;
35811#if CYTHON_COMPILING_IN_LIMITED_API
35812 op->func_classobj = NULL;
35813#else
35814 ((PyCMethodObject*)op)->mm_class = NULL;
35815#endif
35816 op->func_globals = globals;
35817 Py_INCREF(op->func_globals);
35818 Py_XINCREF(code);
35819 op->func_code = code;
35820 op->defaults = NULL;
35821 op->defaults_tuple = NULL;
35822 op->defaults_kwdict = NULL;
35823 op->defaults_getter = NULL;
35824 op->func_annotations = NULL;
35825#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
35826 op->func_is_coroutine = NULL;
35827#endif
35828#if CYTHON_VECTORCALL
35829 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
35830 case METH_NOARGS:
35831 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
35832 break;
35833 case METH_O:
35834 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
35835 break;
35836 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
35837 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
35838 break;
35839 case METH_FASTCALL | METH_KEYWORDS:
35840 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
35841 break;
35842 case METH_VARARGS | METH_KEYWORDS:
35843 __Pyx_CyFunction_func_vectorcall(op) = NULL;
35844 break;
35845 default:
35846 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
35847 Py_DECREF(op_in);
35848 return NULL;
35849 }
35850#endif
35851 return op_in;
35852}
35853static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
35854{
35855 Py_CLEAR(m->func_closure);
35856#if CYTHON_COMPILING_IN_LIMITED_API
35857 Py_CLEAR(m->func_module);
35858#else
35859 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
35860#endif
35861#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
35862 Py_CLEAR(m->func_dict);
35863#elif PY_VERSION_HEX < 0x030d0000
35864 _PyObject_ClearManagedDict((PyObject*)m);
35865#else
35866 PyObject_ClearManagedDict((PyObject*)m);
35867#endif
35868 Py_CLEAR(m->func_name);
35869 Py_CLEAR(m->func_qualname);
35870 Py_CLEAR(m->func_doc);
35871 Py_CLEAR(m->func_globals);
35872 Py_CLEAR(m->func_code);
35873#if CYTHON_COMPILING_IN_LIMITED_API
35874 Py_CLEAR(m->func_classobj);
35875#else
35876 {
35877 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
35878 ((PyCMethodObject *) (m))->mm_class = NULL;
35879 Py_XDECREF(cls);
35880 }
35881#endif
35882 Py_CLEAR(m->defaults_tuple);
35883 Py_CLEAR(m->defaults_kwdict);
35884 Py_CLEAR(m->func_annotations);
35885#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
35886 Py_CLEAR(m->func_is_coroutine);
35887#endif
35888 Py_CLEAR(m->defaults);
35889 return 0;
35890}
35891static int
35892__Pyx_CyFunction_clear(PyObject *m)
35893{
35894 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
35895}
35896static void __Pyx__CyFunction_dealloc(PyObject *m)
35897{
35898 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(m);
35899 if (__Pyx_CyFunction_weakreflist(cyfunc) != NULL)
35900 PyObject_ClearWeakRefs(m);
35901 __Pyx__CyFunction_clear(cyfunc);
35902 __Pyx_PyHeapTypeObject_GC_Del(m);
35903}
35904static void __Pyx_CyFunction_dealloc(PyObject *m)
35905{
35906 PyObject_GC_UnTrack(m);
35907 __Pyx__CyFunction_dealloc(m);
35908}
35909static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit, void *arg)
35910{
35911 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
35912 {
35913 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
35914 if (e) return e;
35915 }
35916 Py_VISIT(m->func_closure);
35917#if CYTHON_COMPILING_IN_LIMITED_API
35918 Py_VISIT(m->func_module);
35919#else
35920 Py_VISIT(((PyCFunctionObject*)m)->m_module);
35921#endif
35922#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
35923 Py_VISIT(m->func_dict);
35924#else
35925 {
35926 int e =
35927#if PY_VERSION_HEX < 0x030d0000
35928 _PyObject_VisitManagedDict
35929#else
35930 PyObject_VisitManagedDict
35931#endif
35932 ((PyObject*)m, visit, arg);
35933 if (e != 0) return e;
35934 }
35935#endif
35936 __Pyx_VISIT_CONST(m->func_name);
35937 __Pyx_VISIT_CONST(m->func_qualname);
35938 Py_VISIT(m->func_doc);
35939 Py_VISIT(m->func_globals);
35940 __Pyx_VISIT_CONST(m->func_code);
35941 Py_VISIT(__Pyx__CyFunction_GetClassObj(m));
35942 Py_VISIT(m->defaults_tuple);
35943 Py_VISIT(m->defaults_kwdict);
35944 Py_VISIT(m->func_annotations);
35945#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
35946 Py_VISIT(m->func_is_coroutine);
35947#endif
35948 Py_VISIT(m->defaults);
35949 return 0;
35950}
35951static PyObject*
35952__Pyx_CyFunction_repr(PyObject *op_in)
35953{
35954 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35955 PyObject *repr;
35956 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35957 repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
35958 op->func_qualname, (void *)op);
35959 __Pyx_END_CRITICAL_SECTION();
35960 return repr;
35961}
35962static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
35963#if CYTHON_COMPILING_IN_LIMITED_API
35964 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
35965 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
35966 int flags = cyfunc->func_methoddef->ml_flags;
35967#else
35968 PyCFunctionObject* f = (PyCFunctionObject*)func;
35969 PyCFunction meth = f->m_ml->ml_meth;
35970 int flags = f->m_ml->ml_flags;
35971#endif
35972 Py_ssize_t size;
35973 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
35974 case METH_VARARGS:
35975 if (likely(kw == NULL || PyDict_Size(kw) == 0))
35976 return (*meth)(self, arg);
35977 break;
35978 case METH_VARARGS | METH_KEYWORDS:
35979 return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
35980 case METH_NOARGS:
35981 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
35982#if CYTHON_ASSUME_SAFE_SIZE
35983 size = PyTuple_GET_SIZE(arg);
35984#else
35985 size = PyTuple_Size(arg);
35986 if (unlikely(size < 0)) return NULL;
35987#endif
35988 if (likely(size == 0))
35989 return (*meth)(self, NULL);
35990 __Pyx_CyFunction_raise_argument_count_error(
35991 func,
35992 "takes no arguments", size);
35993 return NULL;
35994 }
35995 break;
35996 case METH_O:
35997 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
35998#if CYTHON_ASSUME_SAFE_SIZE
35999 size = PyTuple_GET_SIZE(arg);
36000#else
36001 size = PyTuple_Size(arg);
36002 if (unlikely(size < 0)) return NULL;
36003#endif
36004 if (likely(size == 1)) {
36005 PyObject *result, *arg0;
36006 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36007 arg0 = PyTuple_GET_ITEM(arg, 0);
36008 #else
36009 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
36010 #endif
36011 result = (*meth)(self, arg0);
36012 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
36013 Py_DECREF(arg0);
36014 #endif
36015 return result;
36016 }
36017 __Pyx_CyFunction_raise_argument_count_error(
36018 func,
36019 "takes exactly one argument", size);
36020 return NULL;
36021 }
36022 break;
36023 default:
36024 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
36025 return NULL;
36026 }
36027 __Pyx_CyFunction_raise_type_error(
36028 func, "takes no keyword arguments");
36029 return NULL;
36030}
36031static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
36032 PyObject *result;
36033 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
36034 return result;
36035}
36036static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
36037 PyObject *result;
36038 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36039#if CYTHON_VECTORCALL
36040 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
36041 if (vc) {
36042#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
36043 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
36044#else
36045 (void) &__Pyx_PyVectorcall_FastCallDict;
36046 return PyVectorcall_Call(func, args, kw);
36047#endif
36048 }
36049#endif
36050 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
36051 Py_ssize_t argc;
36052 PyObject *new_args;
36053 PyObject *self;
36054#if CYTHON_ASSUME_SAFE_SIZE
36055 argc = PyTuple_GET_SIZE(args);
36056#else
36057 argc = PyTuple_Size(args);
36058 if (unlikely(argc < 0)) return NULL;
36059#endif
36060 new_args = PyTuple_GetSlice(args, 1, argc);
36061 if (unlikely(!new_args))
36062 return NULL;
36063 self = PyTuple_GetItem(args, 0);
36064 if (unlikely(!self)) {
36065 Py_DECREF(new_args);
36066 PyErr_Format(PyExc_TypeError,
36067 "unbound method %.200S() needs an argument",
36068 cyfunc->func_qualname);
36069 return NULL;
36070 }
36071 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
36072 Py_DECREF(new_args);
36073 } else {
36074 result = __Pyx_CyFunction_Call(func, args, kw);
36075 }
36076 return result;
36077}
36078#if CYTHON_VECTORCALL
36079static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
36080{
36081 int ret = 0;
36082 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
36083 if (unlikely(nargs < 1)) {
36084 __Pyx_CyFunction_raise_type_error(
36085 func, "needs an argument");
36086 return -1;
36087 }
36088 ret = 1;
36089 }
36090 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
36091 __Pyx_CyFunction_raise_type_error(
36092 func, "takes no keyword arguments");
36093 return -1;
36094 }
36095 return ret;
36096}
36097static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
36098{
36099 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36100 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36101 PyObject *self;
36102#if CYTHON_COMPILING_IN_LIMITED_API
36103 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36104 if (unlikely(!meth)) return NULL;
36105#else
36106 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36107#endif
36108 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
36109 case 1:
36110 self = args[0];
36111 args += 1;
36112 nargs -= 1;
36113 break;
36114 case 0:
36115 self = func;
36116 break;
36117 default:
36118 return NULL;
36119 }
36120 if (unlikely(nargs != 0)) {
36121 __Pyx_CyFunction_raise_argument_count_error(
36122 func, "takes no arguments", nargs);
36123 return NULL;
36124 }
36125 return meth(self, NULL);
36126}
36127static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
36128{
36129 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36130 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36131 PyObject *self;
36132#if CYTHON_COMPILING_IN_LIMITED_API
36133 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36134 if (unlikely(!meth)) return NULL;
36135#else
36136 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36137#endif
36138 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
36139 case 1:
36140 self = args[0];
36141 args += 1;
36142 nargs -= 1;
36143 break;
36144 case 0:
36145 self = func;
36146 break;
36147 default:
36148 return NULL;
36149 }
36150 if (unlikely(nargs != 1)) {
36151 __Pyx_CyFunction_raise_argument_count_error(
36152 func, "takes exactly one argument", nargs);
36153 return NULL;
36154 }
36155 return meth(self, args[0]);
36156}
36157static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
36158{
36159 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36160 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36161 PyObject *self;
36162#if CYTHON_COMPILING_IN_LIMITED_API
36163 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36164 if (unlikely(!meth)) return NULL;
36165#else
36166 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36167#endif
36168 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
36169 case 1:
36170 self = args[0];
36171 args += 1;
36172 nargs -= 1;
36173 break;
36174 case 0:
36175 self = func;
36176 break;
36177 default:
36178 return NULL;
36179 }
36180 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
36181}
36182static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
36183{
36184 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36185 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
36186 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36187 PyObject *self;
36188#if CYTHON_COMPILING_IN_LIMITED_API
36189 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36190 if (unlikely(!meth)) return NULL;
36191#else
36192 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36193#endif
36194 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
36195 case 1:
36196 self = args[0];
36197 args += 1;
36198 nargs -= 1;
36199 break;
36200 case 0:
36201 self = func;
36202 break;
36203 default:
36204 return NULL;
36205 }
36206 #if PY_VERSION_HEX < 0x030e00A6
36207 size_t nargs_value = (size_t) nargs;
36208 #else
36209 Py_ssize_t nargs_value = nargs;
36210 #endif
36211 return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
36212}
36213#endif
36214static PyType_Slot __pyx_CyFunctionType_slots[] = {
36215 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
36216 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
36217 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
36218 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
36219 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
36220 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
36221 {Py_tp_members, (void *)__pyx_CyFunction_members},
36222 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
36223 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
36224 {0, 0},
36225};
36226static PyType_Spec __pyx_CyFunctionType_spec = {
36227 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
36228 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
36229 0,
36230#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
36231 Py_TPFLAGS_METHOD_DESCRIPTOR |
36232#endif
36233#if CYTHON_VECTORCALL
36234#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
36235 Py_TPFLAGS_HAVE_VECTORCALL |
36236#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
36237 _Py_TPFLAGS_HAVE_VECTORCALL |
36238#endif
36239#endif // CYTHON_VECTORCALL
36240#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
36241 Py_TPFLAGS_MANAGED_DICT |
36242#endif
36243 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
36244 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
36245 __pyx_CyFunctionType_slots
36246};
36247static int __pyx_CyFunction_init(PyObject *module) {
36248 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
36249 mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
36250 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
36251 if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
36252 return -1;
36253 }
36254 return 0;
36255}
36256
36257/* CythonFunction */
36258static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
36259 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
36260 (void)&__Pyx_Get_CyFunction_Type;
36261 PyObject *op = __Pyx_CyFunction_Init(
36262 PyObject_GC_New(PyObject, __pyx_mstate_global->__pyx_CyFunctionType),
36263 ml, flags, qualname, closure, module, globals, code
36264 );
36265 if (likely(op)) {
36266 PyObject_GC_Track(op);
36267 }
36268 return op;
36269}
36270static PyTypeObject *__Pyx_Get_CyFunction_Type(void) {
36271 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
36272 Py_INCREF((PyObject*)tp);
36273 return tp;
36274}
36275
36276/* SliceObject */
36277static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
36278 Py_ssize_t cstart, Py_ssize_t cstop,
36279 PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
36280 int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
36281#if CYTHON_USE_TYPE_SLOTS
36282 PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
36283 if (likely(mp && mp->mp_subscript))
36284#else
36285 if ((1))
36286#endif
36287 {
36288 PyObject* result;
36289 PyObject *py_slice, *py_start, *py_stop;
36290 if (_py_slice) {
36291 py_slice = *_py_slice;
36292 } else {
36293 PyObject* owned_start = NULL;
36294 PyObject* owned_stop = NULL;
36295 if (_py_start) {
36296 py_start = *_py_start;
36297 } else {
36298 if (has_cstart) {
36299 owned_start = py_start = PyLong_FromSsize_t(cstart);
36300 if (unlikely(!py_start)) goto bad;
36301 } else
36302 py_start = Py_None;
36303 }
36304 if (_py_stop) {
36305 py_stop = *_py_stop;
36306 } else {
36307 if (has_cstop) {
36308 owned_stop = py_stop = PyLong_FromSsize_t(cstop);
36309 if (unlikely(!py_stop)) {
36310 Py_XDECREF(owned_start);
36311 goto bad;
36312 }
36313 } else
36314 py_stop = Py_None;
36315 }
36316 py_slice = PySlice_New(py_start, py_stop, Py_None);
36317 Py_XDECREF(owned_start);
36318 Py_XDECREF(owned_stop);
36319 if (unlikely(!py_slice)) goto bad;
36320 }
36321#if CYTHON_USE_TYPE_SLOTS
36322 result = mp->mp_subscript(obj, py_slice);
36323#else
36324 result = PyObject_GetItem(obj, py_slice);
36325#endif
36326 if (!_py_slice) {
36327 Py_DECREF(py_slice);
36328 }
36329 return result;
36330 } else {
36331 __Pyx_RaiseTypeErrorWithObjectType(
36332 "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj);
36333 }
36334bad:
36335 return NULL;
36336}
36337
36338/* PyNumberBinop */
36339#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
36340#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
36341#ifndef __Pyx_DEFINED_BinopTypeError
36342#define __Pyx_DEFINED_BinopTypeError
36343static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2, const char* op, int inplace) {
36344 char opname[4] = {op[0], op[1], 0, 0};
36345 if (inplace) {
36346 opname[op[1] ? 2 : 1] = '=';
36347 }
36348 __Pyx_RaiseErrorWithObjectTypes1(
36349 PyExc_TypeError,
36350 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'",
36351 opname, op1, op2);
36352}
36353#endif
36354#endif
36355#ifndef __Pyx_DEFINED_PyNumber_Multiply_xfloat_object
36356#define __Pyx_DEFINED_PyNumber_Multiply_xfloat_object
36357static PyObject* __Pyx_PyNumber_Multiply_xfloat_object(PyObject *op1, PyObject *op2, int inplace) {
36358 if (PyLong_CheckExact(op2)) {
36359 double int_op2;
36360 #if CYTHON_USE_PYLONG_INTERNALS
36361 if (__Pyx_PyLong_IsCompact(op2)) {
36362 Py_ssize_t compact_op2 = __Pyx_PyLong_CompactValue(op2);
36363 int_op2 = (double) compact_op2;
36364 } else
36365 #endif
36366 {
36367 int_op2 = PyLong_AsDouble(op2);
36368 if (unlikely((int_op2 == -1.) && PyErr_Occurred())) return NULL;
36369 }
36370 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
36371 #if !CYTHON_ASSUME_SAFE_MACROS
36372 if (unlikely((float_op1 == -1.) && PyErr_Occurred())) return NULL;
36373 #endif
36374 if (float_op1 == 0.) return __Pyx_NewRef(op1);
36375 return PyFloat_FromDouble(float_op1 * int_op2);
36376 }
36377 if (PyLong_Check(op2)) {
36378 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyFloat_Type, tp_as_number, nb_multiply, binaryfunc);
36379 if (likely(slot_func)) {
36380 return slot_func(op1, op2);
36381 }
36382 }
36383 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
36384 {
36385 PyTypeObject *type_op2 = Py_TYPE(op2);
36386 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
36387 if (likely(slot_func)) {
36388 PyObject *result = slot_func(op1, op2);
36389 if (likely(result != Py_NotImplemented)) {
36390 return result;
36391 }
36392 Py_DECREF(result);
36393 }
36394 __Pyx_BinopTypeError(op1, op2, "*", inplace);
36395 return NULL;
36396 }
36397 #else
36398 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
36399 #endif
36400}
36401#endif
36402#ifndef __Pyx_DEFINED_PyNumber_Multiply_xint_object
36403#define __Pyx_DEFINED_PyNumber_Multiply_xint_object
36404static PyObject* __Pyx_PyNumber_Multiply_xint_object(PyObject *op1, PyObject *op2, int inplace) {
36405 if (PyFloat_CheckExact(op2)) {
36406 double int_op1;
36407 #if CYTHON_USE_PYLONG_INTERNALS
36408 if (__Pyx_PyLong_IsCompact(op1)) {
36409 Py_ssize_t compact_op1 = __Pyx_PyLong_CompactValue(op1);
36410 int_op1 = (double) compact_op1;
36411 } else
36412 #endif
36413 {
36414 int_op1 = PyLong_AsDouble(op1);
36415 if (unlikely((int_op1 == -1.) && PyErr_Occurred())) return NULL;
36416 }
36417 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
36418 #if !CYTHON_ASSUME_SAFE_MACROS
36419 if (unlikely((float_op2 == -1.) && PyErr_Occurred())) return NULL;
36420 #endif
36421 return PyFloat_FromDouble(int_op1 * float_op2);
36422 }
36423 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
36424 {
36425 PyTypeObject *type_op2 = Py_TYPE(op2);
36426 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
36427 if (likely(slot_func)) {
36428 PyObject *result = slot_func(op1, op2);
36429 if (likely(result != Py_NotImplemented)) {
36430 return result;
36431 }
36432 Py_DECREF(result);
36433 }
36434 ssizeargfunc repeat_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_sequence, sq_repeat, ssizeargfunc);
36435 if (likely(repeat_func)) {
36436 Py_ssize_t count;
36437 #if CYTHON_USE_PYLONG_INTERNALS
36438 if (__Pyx_PyLong_IsCompact(op1)) {
36439 count = __Pyx_PyLong_CompactValue(op1);
36440 } else
36441 #endif
36442 {
36443 count = PyLong_AsSsize_t(op1);
36444 if (unlikely((count == -1) && PyErr_Occurred())) return NULL;
36445 }
36446 return repeat_func(op2, count);
36447 }
36448 __Pyx_BinopTypeError(op1, op2, "*", inplace);
36449 return NULL;
36450 }
36451 #else
36452 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
36453 #endif
36454}
36455#endif
36456static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_object_object(PyObject *op1, PyObject *op2, int inplace) {
36457 if (PyFloat_CheckExact(op1)) {
36458 if (PyFloat_CheckExact(op2)) {
36459 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
36460 #if !CYTHON_ASSUME_SAFE_MACROS
36461 if (unlikely((float_op2 == -1.) && PyErr_Occurred())) return NULL;
36462 #endif
36463 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
36464 #if !CYTHON_ASSUME_SAFE_MACROS
36465 if (unlikely((float_op1 == -1.) && PyErr_Occurred())) return NULL;
36466 #endif
36467 return PyFloat_FromDouble(float_op1 * float_op2);
36468 }
36469 return __Pyx_PyNumber_Multiply_xfloat_object(op1, op2, inplace);
36470 }
36471 if (PyLong_CheckExact(op1)) {
36472 if (PyLong_CheckExact(op2)) {
36473 #if CYTHON_USE_PYLONG_INTERNALS
36474 if (__Pyx_PyLong_IsCompact(op1)) {
36475 long long int_op1 = (long long) __Pyx_PyLong_CompactValue(op1);
36476 if (int_op1 == 0) return __Pyx_NewRef(op1);
36477 if (__Pyx_PyLong_IsCompact(op2)) {
36478 long long int_op2 = (long long) __Pyx_PyLong_CompactValue(op2);
36479 if (int_op2 == 0) return __Pyx_NewRef(op2);
36480 return PyLong_FromLongLong(int_op1 * int_op2);
36481 }
36482 }
36483 else if (__Pyx_PyLong_IsZero(op2)) return __Pyx_NewRef(op2);
36484 #endif
36485 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyLong_Type, tp_as_number, nb_multiply, binaryfunc);
36486 if (likely(slot_func)) {
36487 return slot_func(op1, op2);
36488 }
36489 }
36490 return __Pyx_PyNumber_Multiply_xint_object(op1, op2, inplace);
36491 }
36492 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
36493}
36494#endif
36495
36496/* PyNumberBinop */
36497#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
36498#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
36499#ifndef __Pyx_DEFINED_BinopTypeError
36500#define __Pyx_DEFINED_BinopTypeError
36501static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2, const char* op, int inplace) {
36502 char opname[4] = {op[0], op[1], 0, 0};
36503 if (inplace) {
36504 opname[op[1] ? 2 : 1] = '=';
36505 }
36506 __Pyx_RaiseErrorWithObjectTypes1(
36507 PyExc_TypeError,
36508 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'",
36509 opname, op1, op2);
36510}
36511#endif
36512#endif
36513#ifndef __Pyx_DEFINED_PyNumber_Add_xfloat_object
36514#define __Pyx_DEFINED_PyNumber_Add_xfloat_object
36515static PyObject* __Pyx_PyNumber_Add_xfloat_object(PyObject *op1, PyObject *op2, int inplace) {
36516 if (PyLong_CheckExact(op2)) {
36517 double int_op2;
36518 #if CYTHON_USE_PYLONG_INTERNALS
36519 if (__Pyx_PyLong_IsCompact(op2)) {
36520 Py_ssize_t compact_op2 = __Pyx_PyLong_CompactValue(op2);
36521 if (compact_op2 == 0) return __Pyx_NewRef(op1);
36522 int_op2 = (double) compact_op2;
36523 } else
36524 #endif
36525 {
36526 int_op2 = PyLong_AsDouble(op2);
36527 if (unlikely((int_op2 == -1.) && PyErr_Occurred())) return NULL;
36528 #if !CYTHON_USE_PYLONG_INTERNALS
36529 if (int_op2 == 0.) return __Pyx_NewRef(op1);
36530 #endif
36531 }
36532 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
36533 #if !CYTHON_ASSUME_SAFE_MACROS
36534 if (unlikely((float_op1 == -1.) && PyErr_Occurred())) return NULL;
36535 #endif
36536 return PyFloat_FromDouble(float_op1 + int_op2);
36537 }
36538 if (PyLong_Check(op2)) {
36539 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyFloat_Type, tp_as_number, nb_add, binaryfunc);
36540 if (likely(slot_func)) {
36541 return slot_func(op1, op2);
36542 }
36543 }
36544 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
36545 {
36546 PyTypeObject *type_op2 = Py_TYPE(op2);
36547 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_add, binaryfunc);
36548 if (likely(slot_func)) {
36549 PyObject *result = slot_func(op1, op2);
36550 if (likely(result != Py_NotImplemented)) {
36551 return result;
36552 }
36553 Py_DECREF(result);
36554 }
36555 __Pyx_BinopTypeError(op1, op2, "+", inplace);
36556 return NULL;
36557 }
36558 #else
36559 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
36560 #endif
36561}
36562#endif
36563#ifndef __Pyx_DEFINED_PyNumber_Add_xint_object
36564#define __Pyx_DEFINED_PyNumber_Add_xint_object
36565static PyObject* __Pyx_PyNumber_Add_xint_object(PyObject *op1, PyObject *op2, int inplace) {
36566 if (PyFloat_CheckExact(op2)) {
36567 double int_op1;
36568 #if CYTHON_USE_PYLONG_INTERNALS
36569 if (__Pyx_PyLong_IsCompact(op1)) {
36570 Py_ssize_t compact_op1 = __Pyx_PyLong_CompactValue(op1);
36571 if (compact_op1 == 0) return __Pyx_NewRef(op2);
36572 int_op1 = (double) compact_op1;
36573 } else
36574 #endif
36575 {
36576 int_op1 = PyLong_AsDouble(op1);
36577 if (unlikely((int_op1 == -1.) && PyErr_Occurred())) return NULL;
36578 #if !CYTHON_USE_PYLONG_INTERNALS
36579 if (int_op1 == 0.) return __Pyx_NewRef(op2);
36580 #endif
36581 }
36582 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
36583 #if !CYTHON_ASSUME_SAFE_MACROS
36584 if (unlikely((float_op2 == -1.) && PyErr_Occurred())) return NULL;
36585 #endif
36586 return PyFloat_FromDouble(int_op1 + float_op2);
36587 }
36588 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
36589 {
36590 PyTypeObject *type_op2 = Py_TYPE(op2);
36591 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_add, binaryfunc);
36592 if (likely(slot_func)) {
36593 PyObject *result = slot_func(op1, op2);
36594 if (likely(result != Py_NotImplemented)) {
36595 return result;
36596 }
36597 Py_DECREF(result);
36598 }
36599 __Pyx_BinopTypeError(op1, op2, "+", inplace);
36600 return NULL;
36601 }
36602 #else
36603 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
36604 #endif
36605}
36606#endif
36607static CYTHON_INLINE PyObject* __Pyx__PyNumber_Add_object_object(PyObject *op1, PyObject *op2, int inplace) {
36608 if (PyFloat_CheckExact(op1)) {
36609 if (PyFloat_CheckExact(op2)) {
36610 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
36611 #if !CYTHON_ASSUME_SAFE_MACROS
36612 if (unlikely((float_op2 == -1.) && PyErr_Occurred())) return NULL;
36613 #endif
36614 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
36615 #if !CYTHON_ASSUME_SAFE_MACROS
36616 if (unlikely((float_op1 == -1.) && PyErr_Occurred())) return NULL;
36617 #endif
36618 return PyFloat_FromDouble(float_op1 + float_op2);
36619 }
36620 return __Pyx_PyNumber_Add_xfloat_object(op1, op2, inplace);
36621 }
36622 if (PyLong_CheckExact(op1)) {
36623 if (PyLong_CheckExact(op2)) {
36624 #if CYTHON_USE_PYLONG_INTERNALS
36625 if (__Pyx_PyLong_IsCompact(op1)) {
36626 Py_ssize_t int_op1 = __Pyx_PyLong_CompactValue(op1);
36627 if (int_op1 == 0) return __Pyx_NewRef(op2);
36628 if (__Pyx_PyLong_IsCompact(op2)) {
36629 Py_ssize_t int_op2 = __Pyx_PyLong_CompactValue(op2);
36630 if (int_op2 == 0) return __Pyx_NewRef(op1);
36631 return PyLong_FromSsize_t(int_op1 + int_op2);
36632 }
36633 }
36634 else if (__Pyx_PyLong_IsZero(op2)) return __Pyx_NewRef(op1);
36635 #endif
36636 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyLong_Type, tp_as_number, nb_add, binaryfunc);
36637 if (likely(slot_func)) {
36638 return slot_func(op1, op2);
36639 }
36640 }
36641 return __Pyx_PyNumber_Add_xint_object(op1, op2, inplace);
36642 }
36643 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
36644}
36645#endif
36646
36647/* PyObjectCompare */
36648#ifndef __Pyx_DEFINED_PyObject_CompareIntFloatBoolLt
36649#define __Pyx_DEFINED_PyObject_CompareIntFloatBoolLt
36650static int __Pyx_PyObject_CompareIntFloatBoolLt(PyObject *op1, PyObject *op2) {
36651 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
36652 #if !CYTHON_ASSUME_SAFE_MACROS
36653 if (unlikely(float_op2 == -1. && PyErr_Occurred())) return -1;
36654 #endif
36655 #if CYTHON_USE_PYLONG_INTERNALS
36656 if (__Pyx_PyLong_IsCompact(op1)) {
36657 Py_ssize_t iop1 = __Pyx_PyLong_CompactValue(op1);
36658 if (((double)iop1) < float_op2) goto __pyx_return_true; else goto __pyx_return_false;
36659 }
36660 if (unlikely(!isfinite(float_op2))) {
36661 if (0.0 < float_op2) goto __pyx_return_true; else goto __pyx_return_false;
36662 } else {
36663 int sign1 = __Pyx_PyLong_Sign(op1);
36664 if (float_op2 >= 0.) {
36665 if (sign1 < 0) goto __pyx_return_true;
36666 if (float_op2 < (double) (1L << PyLong_SHIFT)) goto __pyx_return_false;
36667 } else {
36668 if (sign1 > 0) goto __pyx_return_false;
36669 if (float_op2 > -(double) (1L << PyLong_SHIFT)) goto __pyx_return_true;
36670 }
36671 }
36672 #else
36673 if (unlikely(!isfinite(float_op2))) {
36674 if (0.0 < float_op2) goto __pyx_return_true; else goto __pyx_return_false;
36675 } else {
36676 int overflow1;
36677 long iop1 = PyLong_AsLongAndOverflow(op1, &overflow1);
36678 if (likely(!overflow1)) {
36679 if ((long long) iop1 >= (1LL << 53)) {
36680 overflow1 = 1;
36681 } else if ((long long) iop1 <= - (1LL << 53)) {
36682 overflow1 = -1;
36683 } else {
36684 if (((double) iop1) < float_op2) goto __pyx_return_true; else goto __pyx_return_false;
36685 }
36686 }
36687 if (overflow1 < 0) {
36688 if (float_op2 > ((double) (1LL << 53))) goto __pyx_return_true;
36689 } else {
36690 if (float_op2 < - ((double) (1LL << 53))) goto __pyx_return_false;
36691 }
36692 }
36693 #endif
36694 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
36695__pyx_return_true:
36696 return 1;
36697__pyx_return_false:
36698 return 0;
36699}
36700#endif
36701#ifndef __Pyx_DEFINED_PyObject_CompareIntIntBoolLt
36702#define __Pyx_DEFINED_PyObject_CompareIntIntBoolLt
36703static int __Pyx_PyObject_CompareIntIntBoolLt(PyObject *op1, PyObject *op2) {
36704#if CYTHON_USE_PYLONG_INTERNALS
36705 Py_ssize_t cmp = __Pyx_PyLong_CompareSignAndSize(op1, op2);
36706 if (cmp == 0) {
36707 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
36708 if (size > 0) {
36709 const digit* digits1 = __Pyx_PyLong_Digits(op1);
36710 const digit* digits2 = __Pyx_PyLong_Digits(op2);
36711 if (size == 1) {
36712 cmp = (Py_ssize_t) digits1[0] - (Py_ssize_t) digits2[0];
36713 } else if ((size == 2) && (8 * sizeof(Py_ssize_t) >= 2 * PyLong_SHIFT)) {
36714 cmp = (Py_ssize_t) (((((size_t)digits1[1]) << PyLong_SHIFT) | (size_t)digits1[0])) - (Py_ssize_t) (((((size_t)digits2[1]) << PyLong_SHIFT) | (size_t)digits2[0]));
36715 } else {
36716 for (Py_ssize_t i=size-1; i >= 0 && !cmp; --i) {
36717 cmp = (Py_ssize_t) digits1[i] - (Py_ssize_t) digits2[i];
36718 }
36719 }
36720 }
36721 if (cmp == 0) goto __pyx_return_false;
36722 if (__Pyx_PyLong_IsNeg(op1)) cmp = -cmp;
36723 }
36724 if (cmp < 0) goto __pyx_return_true; else goto __pyx_return_false;
36725#else
36726 int overflow1, overflow2;
36727 long long iop1 = PyLong_AsLongLongAndOverflow(op1, &overflow1);
36728 long long iop2 = PyLong_AsLongLongAndOverflow(op2, &overflow2);
36729 if (likely(!(overflow1 | overflow2))) {
36730 if (iop1 < iop2) goto __pyx_return_true; else goto __pyx_return_false;
36731 } else if (overflow1 != overflow2) {
36732 if (overflow1 < overflow2) goto __pyx_return_true; else goto __pyx_return_false;
36733 } else {
36734 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
36735 }
36736#endif
36737__pyx_return_true:
36738 return 1;
36739__pyx_return_false:
36740 return 0;
36741}
36742#endif
36743static CYTHON_INLINE int __Pyx_PyObject_CompareBoolLt_int_object(PyObject *op1, PyObject *op2, int pyop) {
36744 CYTHON_UNUSED_VAR(pyop);
36745 if (unlikely(op1 == Py_None)) {
36746 goto __pyx_richcmp;
36747 }
36748 if (op1 == op2) goto __pyx_return_false;
36749 if (likely(op1 != Py_None)) {
36750 if (op1 == op2) goto __pyx_return_false;
36751 if (likely(PyLong_CheckExact(op2))) {
36752 return __Pyx_PyObject_CompareIntIntBoolLt(op1, op2);
36753 }
36754 if (PyFloat_CheckExact(op2)) {
36755 return __Pyx_PyObject_CompareIntFloatBoolLt(op1, op2);
36756 }
36757 goto __pyx_richcmp;
36758 }
36759 if ((0)) goto __pyx_richcmp;
36760 if ((0)) goto __pyx_return_true;
36761 if ((0)) goto __pyx_return_false;
36762__pyx_richcmp:
36763 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
36764__pyx_return_true:
36765 return 1;
36766__pyx_return_false:
36767 return 0;
36768}
36769
36770/* AllocateExtensionType */
36771static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
36772 if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
36773 allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
36774 return alloc_func(t, 0);
36775 } else {
36776 newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
36777 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
36778 if (!tp_new) {
36779 PyObject *new_str = PyUnicode_FromString("__new__");
36780 if (likely(new_str)) {
36781 PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
36782 Py_DECREF(new_str);
36783 return o;
36784 } else
36785 return NULL;
36786 } else
36787 #endif
36788 return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
36789 }
36790}
36791
36792/* CallSlotAsVectorcallUnpackDict (used by CallSlotAsVectorcall) */
36793static CYTHON_INLINE int __Pyx_CallSlotAsVectorcallUnpackDict(Py_ssize_t args_size, PyObject *keys_dict, PyObject **args, PyObject *kwnames) {
36794 Py_ssize_t pos = 0, i = 0;
36795 PyObject *key, *value;
36796 while (PyDict_Next(keys_dict, &pos, &key, &value)) {
36797 Py_INCREF(value);
36798 args[args_size+i] = value;
36799 Py_INCREF(key);
36800 if (unlikely(__Pyx_PyTuple_SET_ITEM(kwnames, i, key) == -1)) {
36801 return -1;
36802 }
36803 ++i;
36804 }
36805 return 0;
36806}
36807
36808/* CallSlotAsVectorcall */
36809#if CYTHON_VECTORCALL_TPNEW
36810static PyObject * __Pyx_CallTpnewAsVectorcall(__Pyx_tpnewvectorcallfunc f, PyTypeObject* o, PyObject *a, PyObject *k) {
36811 Py_ssize_t k_size = k ? __Pyx_PyDict_GET_SIZE(k) : 0;
36812#if !CYTHON_ASSUME_SAFE_SIZE
36813 if (unlikely(k_size < 0)) return NULL;
36814#endif
36815 Py_ssize_t a_size = __Pyx_PyTuple_GET_SIZE(a);
36816#if !CYTHON_ASSUME_SAFE_SIZE
36817 if (unlikely(a_size < 0)) return NULL;
36818#endif
36819#if CYTHON_ASSUME_SAFE_MACROS
36820 if (k_size == 0) {
36821 return f(o, &PyTuple_GET_ITEM(a, 0), a_size, NULL);
36822 }
36823#else
36824 if (k_size == 0 && a_size == 0) {
36825 return f(o, NULL, 0, NULL);
36826 }
36827#endif
36828 PyObject *stack_args[5];
36829 PyObject **args = stack_args;
36830 Py_ssize_t maxnargs = PY_SSIZE_T_MAX / sizeof(PyObject*) - 1;
36831 if (a_size > maxnargs - k_size) {
36832 PyErr_NoMemory();
36833 return NULL;
36834 }
36835 Py_ssize_t total_size = a_size + k_size;
36836 if (total_size > 5) {
36837 args = (PyObject**)PyMem_Malloc(((size_t)total_size)*sizeof(PyObject*));
36838 if (unlikely(!args)) {
36839 PyErr_NoMemory();
36840 return NULL;
36841 }
36842 }
36843 PyObject * result = NULL;
36844 PyObject *kwnames = NULL;
36845 int unpack_dict_result;
36846 Py_ssize_t i = 0;
36847 for (; i < a_size; ++i) {
36848 args[i] = __Pyx_PyTuple_GET_ITEM(a, i);
36849#if !CYTHON_ASSUME_SAFE_MACROS
36850 if (unlikely(!args[i])) goto cleanup;
36851#endif
36852 }
36853#if !CYTHON_ASSUME_SAFE_MACROS
36854 if (k) // There's a specific shortcut earlier for ASSUME_SAFE_MACROS with no keywords
36855#endif
36856 {
36857 kwnames = PyTuple_New(k_size);
36858 if (unlikely(!kwnames)) goto cleanup;
36859 __Pyx_BEGIN_CRITICAL_SECTION(k);
36860 unpack_dict_result = __Pyx_CallSlotAsVectorcallUnpackDict(a_size, k, args, kwnames);
36861 __Pyx_END_CRITICAL_SECTION();
36862 if (unlikely(unpack_dict_result == -1)) goto cleanup;
36863 }
36864 result = f(o, args, a_size, kwnames);
36865 cleanup:
36866 Py_XDECREF(kwnames);
36867 for (i=a_size; i<total_size; ++i) {
36868 Py_XDECREF(args[i]);
36869 }
36870 if (args != stack_args) {
36871 PyMem_Free(args);
36872 }
36873 return result;
36874}
36875#endif
36876
36877/* CallNewInitFromVectorcall */
36878#if CYTHON_VECTORCALL_TPNEW
36879static PyObject *__Pyx_CallNewInitFromVectorcall(PyTypeObject *t, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
36880 newfunc tp_new = __Pyx_PyType_GetSlot(t, tp_new, newfunc);
36881 if (unlikely(!tp_new)) {
36882 __Pyx_RaiseErrorWithType(PyExc_TypeError, "cannot create " __Pyx_FMT_TYPENAME " instances", t);
36883 return NULL;
36884 }
36885 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
36886 PyObject *result = NULL, *args_tuple = NULL, *kwds_dict = NULL;
36887 Py_ssize_t kw_size = kwnames ? __Pyx_PyTuple_GET_SIZE(kwnames) : 0;
36888#if !CYTHON_ASSUME_SAFE_SIZE
36889 if (unlikely(kw_size == -1)) {
36890 return NULL;
36891 }
36892#endif
36893 if (kw_size) {
36894 kwds_dict = __Pyx_PyDict_NewPresized(kw_size);
36895 if (unlikely(!kwds_dict)) {
36896 return NULL;
36897 }
36898 for (Py_ssize_t i=0; i<kw_size; ++i) {
36899 PyObject *v = args[nargs + i];
36900 PyObject *k = __Pyx_PyTuple_GET_ITEM(kwnames, i);
36901#if !CYTHON_ASSUME_SAFE_MACROS
36902 if (unlikely(!k)) {
36903 goto end;
36904 }
36905#endif
36906 if (unlikely(PyDict_SetItem(kwds_dict, k, v) < 0)) {
36907 goto end;
36908 }
36909 }
36910 }
36911 if (nargs) {
36912 args_tuple = __Pyx_PyTuple_FromArray(args, nargs);
36913 if (unlikely(!args_tuple)) {
36914 goto end;
36915 }
36916 } else {
36917 args_tuple = __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
36918 }
36919 result = tp_new(t, args_tuple, kwds_dict);
36920 if (unlikely(!result)) {
36921 goto end;
36922 }
36923 if (PyObject_TypeCheck(result, t)) {
36924 initproc tp_init = __Pyx_PyObject_GetSlot(result, tp_init, initproc);
36925 if (tp_init && unlikely(tp_init(result, args_tuple, kwds_dict) < 0)) {
36926 Py_CLEAR(result);
36927 }
36928 }
36929 end:
36930 Py_XDECREF(args_tuple);
36931 Py_XDECREF(kwds_dict);
36932 return result;
36933}
36934#endif
36935
36936/* CallSlotAsVectorcall */
36937#if CYTHON_VECTORCALL_TPNEW
36938static int __Pyx_CallTpinitAsVectorcall(__Pyx_tpinitvectorcallfunc f, PyObject* o, PyObject *a, PyObject *k) {
36939 Py_ssize_t k_size = k ? __Pyx_PyDict_GET_SIZE(k) : 0;
36940#if !CYTHON_ASSUME_SAFE_SIZE
36941 if (unlikely(k_size < 0)) return -1;
36942#endif
36943 Py_ssize_t a_size = __Pyx_PyTuple_GET_SIZE(a);
36944#if !CYTHON_ASSUME_SAFE_SIZE
36945 if (unlikely(a_size < 0)) return -1;
36946#endif
36947#if CYTHON_ASSUME_SAFE_MACROS
36948 if (k_size == 0) {
36949 return f(o, &PyTuple_GET_ITEM(a, 0), a_size, NULL);
36950 }
36951#else
36952 if (k_size == 0 && a_size == 0) {
36953 return f(o, NULL, 0, NULL);
36954 }
36955#endif
36956 PyObject *stack_args[5];
36957 PyObject **args = stack_args;
36958 Py_ssize_t maxnargs = PY_SSIZE_T_MAX / sizeof(PyObject*) - 1;
36959 if (a_size > maxnargs - k_size) {
36960 PyErr_NoMemory();
36961 return -1;
36962 }
36963 Py_ssize_t total_size = a_size + k_size;
36964 if (total_size > 5) {
36965 args = (PyObject**)PyMem_Malloc(((size_t)total_size)*sizeof(PyObject*));
36966 if (unlikely(!args)) {
36967 PyErr_NoMemory();
36968 return -1;
36969 }
36970 }
36971 int result = -1;
36972 PyObject *kwnames = NULL;
36973 int unpack_dict_result;
36974 Py_ssize_t i = 0;
36975 for (; i < a_size; ++i) {
36976 args[i] = __Pyx_PyTuple_GET_ITEM(a, i);
36977#if !CYTHON_ASSUME_SAFE_MACROS
36978 if (unlikely(!args[i])) goto cleanup;
36979#endif
36980 }
36981#if !CYTHON_ASSUME_SAFE_MACROS
36982 if (k) // There's a specific shortcut earlier for ASSUME_SAFE_MACROS with no keywords
36983#endif
36984 {
36985 kwnames = PyTuple_New(k_size);
36986 if (unlikely(!kwnames)) goto cleanup;
36987 __Pyx_BEGIN_CRITICAL_SECTION(k);
36988 unpack_dict_result = __Pyx_CallSlotAsVectorcallUnpackDict(a_size, k, args, kwnames);
36989 __Pyx_END_CRITICAL_SECTION();
36990 if (unlikely(unpack_dict_result == -1)) goto cleanup;
36991 }
36992 result = f(o, args, a_size, kwnames);
36993 cleanup:
36994 Py_XDECREF(kwnames);
36995 for (i=a_size; i<total_size; ++i) {
36996 Py_XDECREF(args[i]);
36997 }
36998 if (args != stack_args) {
36999 PyMem_Free(args);
37000 }
37001 return result;
37002}
37003#endif
37004
37005/* PyObjectCallMethod0 (used by PyType_Ready) */
37006static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
37007#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || !CYTHON_COMPILING_IN_LIMITED_API)
37008 return PyObject_VectorcallMethod(method_name, &obj, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
37009#elif CYTHON_COMPILING_IN_LIMITED_API
37010 return PyObject_CallMethodObjArgs(obj, method_name, NULL);
37011#else
37012 return PyObject_CallMethodNoArgs(obj, method_name);
37013#endif
37014}
37015
37016/* GetTypeDictOffset (used by ValidateBasesTuple) */
37017#if !CYTHON_USE_TYPE_SLOTS
37018CYTHON_UNUSED static Py_ssize_t __Pyx_GetTypeDictOffset(PyObject *tp, int require_cython_valid_result) {
37019 PyObject *tp_dictoffset_o;
37020 Py_ssize_t tp_dictoffset;
37021 tp_dictoffset_o = PyObject_GetAttrString(tp, "__dictoffset__");
37022 if (unlikely(!tp_dictoffset_o)) return -1;
37023 tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
37024 Py_DECREF(tp_dictoffset_o);
37025 if (unlikely(require_cython_valid_result && tp_dictoffset == 0)) {
37026 PyErr_SetString(
37027 PyExc_TypeError,
37028 "'type' doesn't have a dictoffset");
37029 return -1;
37030 } else if (unlikely(require_cython_valid_result && tp_dictoffset < 0)) {
37031 PyErr_SetString(
37032 PyExc_TypeError,
37033 "'type' has an unexpected negative dictoffset. "
37034 "Please report this as Cython bug");
37035 return -1;
37036 }
37037 return tp_dictoffset;
37038}
37039#endif
37040
37041/* ValidateBasesTuple (used by PyType_Ready) */
37042#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
37043static int __Pyx_validate_bases_tuple(const char *type_name, int has_dictoffset, PyObject *bases) {
37044 Py_ssize_t i, n;
37045#if CYTHON_ASSUME_SAFE_SIZE
37046 n = PyTuple_GET_SIZE(bases);
37047#else
37048 n = PyTuple_Size(bases);
37049 if (unlikely(n < 0)) return -1;
37050#endif
37051 if (!has_dictoffset) {
37052 PyObject *b;
37053#if CYTHON_AVOID_BORROWED_REFS
37054 b = PySequence_GetItem(bases, 0);
37055 if (!b) return -1;
37056#elif CYTHON_ASSUME_SAFE_MACROS
37057 b = PyTuple_GET_ITEM(bases, 0);
37058#else
37059 b = PyTuple_GetItem(bases, 0);
37060 if (!b) return -1;
37061#endif
37062#if CYTHON_USE_TYPE_SLOTS
37063 has_dictoffset = ((PyTypeObject*)b)->tp_dictoffset != 0;
37064#else
37065 Py_ssize_t dictoffset = __Pyx_GetTypeDictOffset(b, 0);
37066 has_dictoffset = dictoffset != 0;
37067#endif
37068#if CYTHON_AVOID_BORROWED_REFS
37069 Py_DECREF(b);
37070#endif
37071#if !CYTHON_USE_TYPE_SLOTS
37072 if (dictoffset == -1 && PyErr_Occurred()) return -1;
37073#endif
37074 }
37075 for (i = 1; i < n; i++)
37076 {
37077 PyTypeObject *b;
37078#if CYTHON_AVOID_BORROWED_REFS
37079 PyObject *b0 = PySequence_GetItem(bases, i);
37080 if (!b0) return -1;
37081#elif CYTHON_ASSUME_SAFE_MACROS
37082 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
37083#else
37084 PyObject *b0 = PyTuple_GetItem(bases, i);
37085 if (!b0) return -1;
37086#endif
37087 b = (PyTypeObject*) b0;
37088 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
37089 {
37090 __Pyx_RaiseErrorWithType(
37091 PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b);
37092#if CYTHON_AVOID_BORROWED_REFS
37093 Py_DECREF(b0);
37094#endif
37095 return -1;
37096 }
37097 if (!has_dictoffset)
37098 {
37099 Py_ssize_t b_dictoffset = 0;
37100#if CYTHON_USE_TYPE_SLOTS
37101 b_dictoffset = b->tp_dictoffset;
37102#else
37103 b_dictoffset = __Pyx_GetTypeDictOffset((PyObject*)b, 0);
37104 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
37105#endif
37106 if (b_dictoffset) {
37107 __Pyx_RaiseErrorWithType1(
37108 PyExc_TypeError,
37109 "extension type '%.200s' has no __dict__ slot, "
37110 "but base type '" __Pyx_FMT_TYPENAME "' has: "
37111 "either add 'cdef dict __dict__' to the extension type "
37112 "or add '__slots__ = [...]' to the base type",
37113 type_name, b);
37114#if !CYTHON_USE_TYPE_SLOTS
37115 dictoffset_return:
37116#endif
37117#if CYTHON_AVOID_BORROWED_REFS
37118 Py_DECREF(b0);
37119#endif
37120 return -1;
37121 }
37122 }
37123#if CYTHON_AVOID_BORROWED_REFS
37124 Py_DECREF(b0);
37125#endif
37126 }
37127 return 0;
37128}
37129#endif
37130
37131/* PyType_Ready */
37132CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
37133 while (t) {
37134 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
37135 if (bases) {
37136 return 1;
37137 }
37138 t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
37139 }
37140 return 0;
37141}
37142static int __Pyx_PyType_Ready(PyTypeObject *t) {
37143#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON
37144 (void)__Pyx_PyObject_CallMethod0;
37145#if CYTHON_USE_TYPE_SPECS
37146 (void)__Pyx_validate_bases_tuple;
37147#endif
37148 return PyType_Ready(t);
37149#else
37150 int r;
37151 if (!__Pyx_PyType_HasMultipleInheritance(t)) {
37152 return PyType_Ready(t);
37153 }
37154 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
37155 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset != 0, bases) == -1))
37156 return -1;
37157 {
37158 int gc_was_enabled;
37159 #if PY_VERSION_HEX >= 0x030A00b1
37160 gc_was_enabled = PyGC_Disable();
37161 (void)__Pyx_PyObject_CallMethod0;
37162 #else
37163 PyObject *ret, *py_status;
37164 PyObject *gc = NULL;
37165 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
37166 !CYTHON_COMPILING_IN_GRAAL
37167 gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
37168 #endif
37169 if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
37170 if (unlikely(!gc)) return -1;
37171 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
37172 if (unlikely(!py_status)) {
37173 Py_DECREF(gc);
37174 return -1;
37175 }
37176 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
37177 Py_DECREF(py_status);
37178 if (gc_was_enabled > 0) {
37179 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
37180 if (unlikely(!ret)) {
37181 Py_DECREF(gc);
37182 return -1;
37183 }
37184 Py_DECREF(ret);
37185 } else if (unlikely(gc_was_enabled == -1)) {
37186 Py_DECREF(gc);
37187 return -1;
37188 }
37189 #endif
37190 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
37191#if PY_VERSION_HEX >= 0x030A0000
37192 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
37193#endif
37194 r = PyType_Ready(t);
37195 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
37196 #if PY_VERSION_HEX >= 0x030A00b1
37197 if (gc_was_enabled)
37198 PyGC_Enable();
37199 #else
37200 if (gc_was_enabled) {
37201 PyObject *tp, *v, *tb;
37202 PyErr_Fetch(&tp, &v, &tb);
37203 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
37204 if (likely(ret || r == -1)) {
37205 Py_XDECREF(ret);
37206 PyErr_Restore(tp, v, tb);
37207 } else {
37208 Py_XDECREF(tp);
37209 Py_XDECREF(v);
37210 Py_XDECREF(tb);
37211 r = -1;
37212 }
37213 }
37214 Py_DECREF(gc);
37215 #endif
37216 }
37217 return r;
37218#endif
37219}
37220
37221/* LimitedApiGetTypeTypeDict (used by DelItemOnTypeDict) */
37222#if CYTHON_COMPILING_IN_LIMITED_API
37223static PyObject *__Pyx_GetTypeTypeDict(PyTypeObject *tp) {
37224 static Py_ssize_t tp_dictoffset = 0;
37225 if (unlikely(tp_dictoffset == 0)) {
37226 tp_dictoffset = __Pyx_GetTypeDictOffset((PyObject*)(&PyType_Type), 1);
37227 if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
37228 tp_dictoffset = 0; // try again next time?
37229 return NULL;
37230 }
37231 }
37232 return *(PyObject**)((char*)tp + tp_dictoffset);
37233}
37234#endif
37235
37236/* DelItemOnTypeDict (used by SetupReduce) */
37237static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
37238 int result;
37239 PyObject *tp_dict;
37240#if CYTHON_COMPILING_IN_LIMITED_API
37241 tp_dict = __Pyx_GetTypeTypeDict(tp);
37242 if (unlikely(!tp_dict)) return -1;
37243#else
37244 tp_dict = tp->tp_dict;
37245#endif
37246 result = PyDict_DelItem(tp_dict, k);
37247 if (likely(!result)) PyType_Modified(tp);
37248 return result;
37249}
37250
37251/* SetItemOnTypeDict (used by SetupReduce) */
37252static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
37253 int result;
37254 PyObject *tp_dict;
37255#if CYTHON_COMPILING_IN_LIMITED_API
37256 tp_dict = __Pyx_GetTypeTypeDict(tp);
37257 if (unlikely(!tp_dict)) return -1;
37258#else
37259 tp_dict = tp->tp_dict;
37260#endif
37261 result = PyDict_SetItem(tp_dict, k, v);
37262 if (likely(!result)) {
37263 PyType_Modified(tp);
37264 if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
37265 PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
37266 if (!setNameResult) return -1;
37267 Py_DECREF(setNameResult);
37268 }
37269 }
37270 return result;
37271}
37272
37273/* SetupReduce */
37274static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
37275 int ret;
37276 PyObject *name_attr;
37277 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2);
37278 if (likely(name_attr)) {
37279 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
37280 } else {
37281 ret = -1;
37282 }
37283 if (unlikely(ret < 0) && __Pyx_IgnoreException(PyExc_Exception)) {
37284 ret = 0; // But BaseException is still propagated.
37285 }
37286 Py_XDECREF(name_attr);
37287 return ret;
37288}
37289static PyObject *__Pyx_setup_reduce_get_reduce_attribute(PyObject *type_obj, PyObject *name, int allow_not_present) {
37290#if CYTHON_USE_PYTYPE_LOOKUP
37291 CYTHON_UNUSED_VAR(allow_not_present);
37292 return _PyType_Lookup((PyTypeObject*)type_obj, name);
37293#else
37294 if (allow_not_present) {
37295 return __Pyx_PyObject_GetAttrStrNoError(type_obj, name);
37296 } else {
37297 return __Pyx_PyObject_GetAttrStr(type_obj, name);
37298 }
37299#endif
37300}
37301static int __Pyx_setup_reduce(PyObject* type_obj) {
37302 int ret = 0;
37303 PyObject *object_reduce = NULL;
37304 PyObject *object_getstate = NULL;
37305 PyObject *object_reduce_ex = NULL;
37306 PyObject *reduce = NULL;
37307 PyObject *reduce_ex = NULL;
37308 PyObject *reduce_cython = NULL;
37309 PyObject *setstate = NULL;
37310 PyObject *setstate_cython = NULL;
37311 PyObject *getstate = NULL;
37312 getstate = __Pyx_setup_reduce_get_reduce_attribute(type_obj, __pyx_mstate_global->__pyx_n_u_getstate, 1);
37313 if (!getstate && PyErr_Occurred()) {
37314 goto __PYX_BAD;
37315 }
37316 if (getstate) {
37317 object_getstate = __Pyx_setup_reduce_get_reduce_attribute((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate, 1);
37318 if (!object_getstate && PyErr_Occurred()) {
37319 goto __PYX_BAD;
37320 }
37321 if (object_getstate != getstate) {
37322 goto __PYX_GOOD;
37323 }
37324 }
37325 object_reduce_ex = __Pyx_setup_reduce_get_reduce_attribute((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex, 0);
37326 if (unlikely(!object_reduce_ex)) goto __PYX_BAD;
37327 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
37328 if (reduce_ex == object_reduce_ex) {
37329 object_reduce = __Pyx_setup_reduce_get_reduce_attribute((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce, 0);
37330 if (!object_reduce) goto __PYX_BAD;
37331 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
37332 int try_to_replace_reduce = (reduce == object_reduce);
37333 if (!try_to_replace_reduce) {
37334 try_to_replace_reduce = __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython);
37335 if (unlikely(try_to_replace_reduce < 0)) {
37336 goto __PYX_BAD;
37337 }
37338 }
37339 if (try_to_replace_reduce) {
37340 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
37341 if (likely(reduce_cython)) {
37342 ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
37343 ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
37344 } else if (reduce == object_reduce || PyErr_Occurred()) {
37345 goto __PYX_BAD;
37346 }
37347 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
37348 int try_to_replace_setstate;
37349 if (!setstate) {
37350 PyObject *exc = PyErr_Occurred();
37351 if (exc && !__Pyx_IgnoreGivenException(exc, PyExc_Exception)) {
37352 goto __PYX_BAD;
37353 }
37354 try_to_replace_setstate = 1;
37355 } else {
37356 try_to_replace_setstate = __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython);
37357 if (unlikely(try_to_replace_setstate < 0)) {
37358 goto __PYX_BAD;
37359 }
37360 }
37361 if (try_to_replace_setstate) {
37362 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
37363 if (likely(setstate_cython)) {
37364 ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
37365 ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
37366 } else if (!setstate || PyErr_Occurred()) {
37367 goto __PYX_BAD;
37368 }
37369 }
37370 PyType_Modified((PyTypeObject*)type_obj);
37371 }
37372 }
37373 goto __PYX_GOOD;
37374__PYX_BAD:
37375 if (!PyErr_Occurred()) {
37376 __Pyx_RaiseErrorWithType(
37377 PyExc_RuntimeError,
37378 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME,
37379 (PyTypeObject*)type_obj);
37380 }
37381 ret = -1;
37382__PYX_GOOD:
37383#if !CYTHON_USE_PYTYPE_LOOKUP
37384 Py_XDECREF(object_reduce);
37385 Py_XDECREF(object_reduce_ex);
37386 Py_XDECREF(object_getstate);
37387 Py_XDECREF(getstate);
37388#endif
37389 Py_XDECREF(reduce);
37390 Py_XDECREF(reduce_ex);
37391 Py_XDECREF(reduce_cython);
37392 Py_XDECREF(setstate);
37393 Py_XDECREF(setstate_cython);
37394 return ret;
37395}
37396
37397/* GetVTable (used by MergeVTables) */
37398static int __Pyx_GetVtable(PyTypeObject *type, void** table) {
37399 void* ptr;
37400 *table = NULL;
37401#if CYTHON_COMPILING_IN_LIMITED_API
37402 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
37403#else
37404 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
37405#endif
37406 if (!ob)
37407 goto no_attr;
37408 ptr = PyCapsule_GetPointer(ob, 0);
37409 if (!ptr && !PyErr_Occurred())
37410 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
37411 Py_DECREF(ob);
37412 *table = ptr;
37413 return 1;
37414no_attr:
37415 if (PyErr_ExceptionMatches(CYTHON_COMPILING_IN_LIMITED_API ? PyExc_AttributeError : PyExc_KeyError)) {
37416 return 0;
37417 }
37418 Py_XDECREF(ob);
37419 return -1;
37420}
37421
37422/* MergeVTables (used by SetVTable) */
37423static int __Pyx_MergeVtables(PyTypeObject *type) {
37424 int i=0;
37425 Py_ssize_t size;
37426 void** base_vtables;
37427 void* unknown = (void*)-1;
37428 PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
37429 int base_depth = 0;
37430 {
37431 PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
37432 while (base) {
37433 base_depth += 1;
37434 base = __Pyx_PyType_TryGetSlot(base, tp_base, PyTypeObject*);
37435 }
37436 }
37437 base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
37438 if (unlikely(!base_vtables)) {
37439 PyErr_NoMemory();
37440 return -1;
37441 }
37442 base_vtables[0] = unknown;
37443#if CYTHON_COMPILING_IN_LIMITED_API
37444 size = PyTuple_Size(bases);
37445 if (size < 0) goto other_failure;
37446#else
37447 size = PyTuple_GET_SIZE(bases);
37448#endif
37449 for (i = 1; i < size; i++) {
37450 PyObject *basei;
37451 void* base_vtable;
37452#if CYTHON_AVOID_BORROWED_REFS
37453 basei = PySequence_GetItem(bases, i);
37454 if (unlikely(!basei)) goto other_failure;
37455#elif !CYTHON_ASSUME_SAFE_MACROS
37456 basei = PyTuple_GetItem(bases, i);
37457 if (unlikely(!basei)) goto other_failure;
37458#else
37459 basei = PyTuple_GET_ITEM(bases, i);
37460#endif
37461 int get_vtable_result = __Pyx_GetVtable((PyTypeObject*)basei, &base_vtable);
37462#if CYTHON_AVOID_BORROWED_REFS
37463 Py_DECREF(basei);
37464#endif
37465 if (get_vtable_result != 1) {
37466 if (get_vtable_result == -1) {
37467 goto other_failure;
37468 }
37469 PyErr_Clear(); // Class doesn't have a vtable.
37470 } else {
37471 assert(base_vtable != NULL);
37472 int j;
37473 PyTypeObject* base = __Pyx_PyType_TryGetSlot(type, tp_base, PyTypeObject*);
37474#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
37475 if (!base) goto bad;
37476#endif
37477 for (j = 0; j < base_depth; j++) {
37478 if (base_vtables[j] == unknown) {
37479 switch (__Pyx_GetVtable(base, &base_vtables[j])) {
37480 case 1:
37481 assert(base_vtables[j] == NULL);
37482 break;
37483 case 0:
37484 goto bad;
37485 case -1:
37486 default:
37487 goto other_failure;
37488 }
37489 base_vtables[j + 1] = unknown;
37490 }
37491 if (base_vtables[j] == base_vtable) {
37492 break;
37493 }
37494 base = __Pyx_PyType_TryGetSlot(base, tp_base, PyTypeObject*);
37495#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
37496 if (!base) goto bad;
37497#endif
37498 }
37499 }
37500 }
37501 PyMem_Free(base_vtables);
37502 return 0;
37503bad:
37504 {
37505 PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
37506 PyTypeObject* basei;
37507#if CYTHON_AVOID_BORROWED_REFS
37508 basei = (PyTypeObject*)PySequence_GetItem(bases, i);
37509 if (unlikely(!basei)) goto other_failure;
37510#elif !CYTHON_ASSUME_SAFE_MACROS
37511 basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
37512 if (unlikely(!basei)) goto other_failure;
37513#else
37514 basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
37515#endif
37516 __Pyx_RaiseTypeErrorWithTypes(
37517 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base, basei);
37518#if CYTHON_AVOID_BORROWED_REFS
37519 Py_DECREF(basei);
37520#endif
37521 }
37522other_failure:
37523 PyMem_Free(base_vtables);
37524 return -1;
37525}
37526
37527/* SetVTable */
37528static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
37529 PyObject *ob = PyCapsule_New(vtable, 0, 0);
37530 if (unlikely(!ob))
37531 goto bad;
37532#if CYTHON_COMPILING_IN_LIMITED_API
37533 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
37534#else
37535 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
37536#endif
37537 goto bad;
37538 Py_DECREF(ob);
37539 return __Pyx_MergeVtables(type);
37540bad:
37541 Py_XDECREF(ob);
37542 return -1;
37543}
37544
37545/* ApplySequenceOrMappingFlag */
37546#if CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_PYPY && CYTHON_USE_TYPE_SPECS)
37547int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence) {
37548 PyObject *abc;
37549 PyObject *collections_abc = PyImport_ImportModule("collections.abc");
37550 if (unlikely(!collections_abc)) return -1;
37551 abc = PyObject_GetAttrString(collections_abc, is_sequence ? "Sequence": "Mapping");
37552 Py_DECREF(collections_abc);
37553 if (unlikely(!abc)) return -1;
37554 PyObject *register_result = PyObject_CallMethod(abc, "register", "O", (PyObject*)tp);
37555 Py_DECREF(abc);
37556 if (unlikely(!register_result)) return -1;
37557 Py_DECREF(register_result);
37558 return 0;
37559}
37560#elif CYTHON_COMPILING_IN_PYPY // && !CYTHON_USE_TYPE_SPECS
37561int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence) {
37562 CYTHON_UNUSED_VAR(tp);
37563 CYTHON_UNUSED_VAR(is_sequence);
37564 return PyErr_WarnEx(
37565 PyExc_RuntimeWarning,
37566 "cython.collection_type only works on PyPy with the C flag CYTHON_USE_TYPE_SPECS=1",
37567 1
37568 );
37569}
37570#endif
37571
37572/* TypeImport */
37573#ifndef __PYX_HAVE_RT_ImportType_3_3_0
37574#define __PYX_HAVE_RT_ImportType_3_3_0
37575static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject *module, const char *module_name, const char *class_name,
37576 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_3_0 check_size)
37577{
37578 PyObject *result = 0;
37579 Py_ssize_t basicsize;
37580 Py_ssize_t itemsize;
37581#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
37582 PyObject *py_basicsize;
37583 PyObject *py_itemsize;
37584#endif
37585 result = PyObject_GetAttrString(module, class_name);
37586 if (!result)
37587 goto bad;
37588 if (!PyType_Check(result)) {
37589 PyErr_Format(PyExc_TypeError,
37590 "%.200s.%.200s is not a type object",
37591 module_name, class_name);
37592 goto bad;
37593 }
37594#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
37595 basicsize = ((PyTypeObject *)result)->tp_basicsize;
37596 itemsize = ((PyTypeObject *)result)->tp_itemsize;
37597#else
37598 if (size == 0) {
37599 return (PyTypeObject *)result;
37600 }
37601 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
37602 if (!py_basicsize)
37603 goto bad;
37604 basicsize = PyLong_AsSsize_t(py_basicsize);
37605 Py_DECREF(py_basicsize);
37606 py_basicsize = 0;
37607 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
37608 goto bad;
37609 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
37610 if (!py_itemsize)
37611 goto bad;
37612 itemsize = PyLong_AsSsize_t(py_itemsize);
37613 Py_DECREF(py_itemsize);
37614 py_itemsize = 0;
37615 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
37616 goto bad;
37617#endif
37618 if (itemsize) {
37619 if (size % alignment) {
37620 alignment = size % alignment;
37621 }
37622 if (itemsize < (Py_ssize_t)alignment)
37623 itemsize = (Py_ssize_t)alignment;
37624 }
37625 if ((size_t)(basicsize + itemsize) < size) {
37626 PyErr_Format(PyExc_ValueError,
37627 "%.200s.%.200s size changed, may indicate binary incompatibility. "
37628 "Expected %zd from C header, got %zd from PyObject",
37629 module_name, class_name, size, basicsize+itemsize);
37630 goto bad;
37631 }
37632 if (check_size == __Pyx_ImportType_CheckSize_Error_3_3_0 &&
37633 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
37634 PyErr_Format(PyExc_ValueError,
37635 "%.200s.%.200s size changed, may indicate binary incompatibility. "
37636 "Expected %zd from C header, got %zd-%zd from PyObject",
37637 module_name, class_name, size, basicsize, basicsize+itemsize);
37638 goto bad;
37639 }
37640 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_3_0 && (size_t)basicsize > size) {
37641 if (PyErr_WarnFormat(NULL, 0,
37642 "%.200s.%.200s size changed, may indicate binary incompatibility. "
37643 "Expected %zd from C header, got %zd from PyObject",
37644 module_name, class_name, size, basicsize) < 0) {
37645 goto bad;
37646 }
37647 }
37648 return (PyTypeObject *)result;
37649bad:
37650 Py_XDECREF(result);
37651 return NULL;
37652}
37653#endif
37654
37655/* CLineInTraceback (used by AddTraceback) */
37656#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
37657#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
37658#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
37659#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
37660#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
37661#else
37662PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
37663 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
37664 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
37665}
37666#endif
37667static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
37668 PyObject *use_cline = NULL;
37669 PyObject *ptype, *pvalue, *ptraceback;
37670 PyObject *cython_runtime_dict;
37671 CYTHON_MAYBE_UNUSED_VAR(tstate);
37672 if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
37673 return c_line;
37674 }
37675 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
37676 cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
37677 if (likely(cython_runtime_dict)) {
37678 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
37679 use_cline, cython_runtime_dict,
37680 __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
37681 }
37682 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
37683 c_line = 0;
37684 }
37685 Py_XDECREF(use_cline);
37686 Py_XDECREF(cython_runtime_dict);
37687 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
37688 return c_line;
37689}
37690#endif
37691
37692/* CodeObjectCache (used by AddTraceback) */
37693static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
37694 int start = 0, mid = 0, end = count - 1;
37695 if (end >= 0 && code_line > entries[end].code_line) {
37696 return count;
37697 }
37698 while (start < end) {
37699 mid = start + (end - start) / 2;
37700 if (code_line < entries[mid].code_line) {
37701 end = mid;
37702 } else if (code_line > entries[mid].code_line) {
37703 start = mid + 1;
37704 } else {
37705 return mid;
37706 }
37707 }
37708 if (code_line <= entries[mid].code_line) {
37709 return mid;
37710 } else {
37711 return mid + 1;
37712 }
37713}
37714static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
37715 __Pyx_CachedCodeObjectType* code_object;
37716 int pos;
37717 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
37718 return NULL;
37719 }
37720 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
37721 if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
37722 return NULL;
37723 }
37724 code_object = code_cache->entries[pos].code_object;
37725 Py_INCREF(code_object);
37726 return code_object;
37727}
37728static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
37729#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
37730 (void)__pyx__find_code_object;
37731 return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
37732#else
37733 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
37734#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
37735 __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
37736 if (old_count < 0) {
37737 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
37738 return NULL;
37739 }
37740#endif
37741 __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
37742#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
37743 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
37744#endif
37745 return result;
37746#endif
37747}
37748static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
37749{
37750 int pos, i;
37751 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
37752 if (unlikely(!code_line)) {
37753 return;
37754 }
37755 if (unlikely(!entries)) {
37756 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
37757 if (likely(entries)) {
37758 code_cache->entries = entries;
37759 code_cache->max_count = 64;
37760 code_cache->count = 1;
37761 entries[0].code_line = code_line;
37762 entries[0].code_object = code_object;
37763 Py_INCREF(code_object);
37764 }
37765 return;
37766 }
37767 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
37768 if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
37769 __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
37770 entries[pos].code_object = code_object;
37771 Py_INCREF(code_object);
37772 Py_DECREF(tmp);
37773 return;
37774 }
37775 if (code_cache->count == code_cache->max_count) {
37776 int new_max = code_cache->max_count + 64;
37777 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
37778 code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
37779 if (unlikely(!entries)) {
37780 return;
37781 }
37782 code_cache->entries = entries;
37783 code_cache->max_count = new_max;
37784 }
37785 for (i=code_cache->count; i>pos; i--) {
37786 entries[i] = entries[i-1];
37787 }
37788 entries[pos].code_line = code_line;
37789 entries[pos].code_object = code_object;
37790 code_cache->count++;
37791 Py_INCREF(code_object);
37792}
37793static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
37794#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
37795 (void)__pyx__insert_code_object;
37796 return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
37797#else
37798 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
37799#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
37800 __pyx_nonatomic_int_type expected = 0;
37801 if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
37802 return;
37803 }
37804#endif
37805 __pyx__insert_code_object(code_cache, code_line, code_object);
37806#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
37807 __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
37808#endif
37809#endif
37810}
37811
37812/* AddTraceback */
37813#include "compile.h"
37814#include "frameobject.h"
37815#include "traceback.h"
37816#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
37817 #ifndef Py_BUILD_CORE
37818 #define Py_BUILD_CORE 1
37819 #endif
37820 #include "internal/pycore_frame.h"
37821#endif
37822#if CYTHON_COMPILING_IN_LIMITED_API
37823static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
37824 PyObject *firstlineno, PyObject *name) {
37825 PyObject *replace = NULL;
37826 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
37827 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
37828 replace = PyObject_GetAttrString(code, "replace");
37829 if (likely(replace)) {
37830 PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
37831 Py_DECREF(replace);
37832 return result;
37833 }
37834 return NULL;
37835}
37836static void __Pyx_AddTraceback(const char *funcname, int c_line,
37837 int py_line, const char *filename) {
37838 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
37839 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
37840 PyObject *exc_type, *exc_value, *exc_traceback;
37841 int success = 0;
37842 if (c_line) {
37843 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
37844 }
37845 __Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
37846 code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
37847 if (!code_object) {
37848 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
37849 if (unlikely(!code_object)) goto bad;
37850 py_py_line = PyLong_FromLong(py_line);
37851 if (unlikely(!py_py_line)) goto bad;
37852 if (c_line) {
37853 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
37854 } else {
37855 py_funcname = PyUnicode_FromString(funcname);
37856 }
37857 if (unlikely(!py_funcname)) goto bad;
37858 dict = PyDict_New();
37859 if (unlikely(!dict)) goto bad;
37860 {
37861 PyObject *old_code_object = code_object;
37862 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
37863 Py_DECREF(old_code_object);
37864 }
37865 if (unlikely(!code_object)) goto bad;
37866 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
37867 } else {
37868 dict = PyDict_New();
37869 }
37870 getframe = PySys_GetObject("_getframe");
37871 if (unlikely(!getframe)) goto bad;
37872 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
37873 frame = PyEval_EvalCode(code_object, dict, dict);
37874 if (unlikely(!frame) || frame == Py_None) goto bad;
37875 success = 1;
37876 bad:
37877 __Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
37878 Py_XDECREF(code_object);
37879 Py_XDECREF(py_py_line);
37880 Py_XDECREF(py_funcname);
37881 Py_XDECREF(dict);
37882 Py_XDECREF(replace);
37883 if (success) {
37884 PyTraceBack_Here(
37885 (struct _frame*)frame);
37886 }
37887 Py_XDECREF(frame);
37888}
37889#else
37890static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
37891 const char *funcname, int c_line,
37892 int py_line, const char *filename) {
37893 PyCodeObject *py_code = NULL;
37894 PyObject *py_funcname = NULL;
37895 if (c_line) {
37896 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
37897 if (!py_funcname) goto bad;
37898 funcname = PyUnicode_AsUTF8(py_funcname);
37899 if (!funcname) goto bad;
37900 }
37901 py_code = PyCode_NewEmpty(filename, funcname, py_line);
37902 Py_XDECREF(py_funcname);
37903 return py_code;
37904bad:
37905 Py_XDECREF(py_funcname);
37906 return NULL;
37907}
37908static void __Pyx_AddTraceback(const char *funcname, int c_line,
37909 int py_line, const char *filename) {
37910 PyCodeObject *py_code = 0;
37911 PyFrameObject *py_frame = 0;
37912 PyThreadState *tstate = __Pyx_PyThreadState_Current;
37913 PyObject *ptype, *pvalue, *ptraceback;
37914 if (c_line) {
37915 c_line = __Pyx_CLineForTraceback(tstate, c_line);
37916 }
37917 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
37918 if (!py_code) {
37919 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
37920 py_code = __Pyx_CreateCodeObjectForTraceback(
37921 funcname, c_line, py_line, filename);
37922 if (!py_code) {
37923 /* If the code object creation fails, then we should clear the
37924 fetched exception references and propagate the new exception */
37925 Py_XDECREF(ptype);
37926 Py_XDECREF(pvalue);
37927 Py_XDECREF(ptraceback);
37928 goto bad;
37929 }
37930 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
37931 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
37932 }
37933 py_frame = PyFrame_New(
37934 tstate, /*PyThreadState *tstate,*/
37935 py_code, /*PyCodeObject *code,*/
37936 __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
37937 0 /*PyObject *locals*/
37938 );
37939 if (!py_frame) goto bad;
37940 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
37941 PyTraceBack_Here(py_frame);
37942bad:
37943 Py_XDECREF(py_code);
37944 Py_XDECREF(py_frame);
37945}
37946#endif
37947
37948/* MemviewRefcount */
37949#include <stdio.h>
37950#ifndef _Py_NO_RETURN
37951#define _Py_NO_RETURN
37952#endif
37953_Py_NO_RETURN
37954static void __pyx_fatalerror(const char *fmt, ...) {
37955 va_list vargs;
37956 char msg[200];
37957#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
37958 va_start(vargs, fmt);
37959#else
37960 va_start(vargs);
37961#endif
37962 vsnprintf(msg, 200, fmt, vargs);
37963 va_end(vargs);
37964 Py_FatalError(msg);
37965}
37966static CYTHON_INLINE int
37967__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
37968 PyThread_type_lock lock)
37969{
37970 int result;
37971 PyThread_acquire_lock(lock, 1);
37972 result = (*acquisition_count)++;
37973 PyThread_release_lock(lock);
37974 return result;
37975}
37976static CYTHON_INLINE int
37977__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
37978 PyThread_type_lock lock)
37979{
37980 int result;
37981 PyThread_acquire_lock(lock, 1);
37982 result = (*acquisition_count)--;
37983 PyThread_release_lock(lock);
37984 return result;
37985}
37986static CYTHON_INLINE void
37987__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
37988{
37989 __pyx_nonatomic_int_type old_acquisition_count;
37990 struct __pyx_memoryview_obj *memview = memslice->memview;
37991 if (unlikely(!memview || (PyObject *) memview == Py_None)) {
37992 return;
37993 }
37994 old_acquisition_count = __pyx_add_acquisition_count(memview);
37995 if (unlikely(old_acquisition_count <= 0)) {
37996 if (likely(old_acquisition_count == 0)) {
37997 if (have_gil) {
37998 Py_INCREF((PyObject *) memview);
37999 } else {
38000 PyGILState_STATE _gilstate = PyGILState_Ensure();
38001 Py_INCREF((PyObject *) memview);
38002 PyGILState_Release(_gilstate);
38003 }
38004 } else {
38005 __pyx_fatalerror("Acquisition count is %d (line %d)",
38006 old_acquisition_count+1, lineno);
38007 }
38008 }
38009}
38010static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
38011 int have_gil, int lineno) {
38012 __pyx_nonatomic_int_type old_acquisition_count;
38013 struct __pyx_memoryview_obj *memview = memslice->memview;
38014 if (unlikely(!memview || (PyObject *) memview == Py_None)) {
38015 memslice->memview = NULL;
38016 return;
38017 }
38018 old_acquisition_count = __pyx_sub_acquisition_count(memview);
38019 memslice->data = NULL;
38020 if (likely(old_acquisition_count > 1)) {
38021 memslice->memview = NULL;
38022 } else if (likely(old_acquisition_count == 1)) {
38023 if (have_gil) {
38024 Py_CLEAR(memslice->memview);
38025 } else {
38026 PyGILState_STATE _gilstate = PyGILState_Ensure();
38027 Py_CLEAR(memslice->memview);
38028 PyGILState_Release(_gilstate);
38029 }
38030 } else {
38031 __pyx_fatalerror("Acquisition count is %d (line %d)",
38032 old_acquisition_count-1, lineno);
38033 }
38034}
38035
38036/* MemviewSliceIsContig */
38037static int
38038__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
38039{
38040 int i, index, step, start;
38041 Py_ssize_t itemsize = mvs.memview->view.itemsize;
38042 if (order == 'F') {
38043 step = 1;
38044 start = 0;
38045 } else {
38046 step = -1;
38047 start = ndim - 1;
38048 }
38049 for (i = 0; i < ndim; i++) {
38050 index = start + step * i;
38051 if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
38052 return 0;
38053 itemsize *= mvs.shape[index];
38054 }
38055 return 1;
38056}
38057
38058/* OverlappingSlices */
38059static void
38060__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
38061 void **out_start, void **out_end,
38062 int ndim, size_t itemsize)
38063{
38064 char *start, *end;
38065 int i;
38066 start = end = slice->data;
38067 for (i = 0; i < ndim; i++) {
38068 Py_ssize_t stride = slice->strides[i];
38069 Py_ssize_t extent = slice->shape[i];
38070 if (extent == 0) {
38071 *out_start = *out_end = start;
38072 return;
38073 } else {
38074 if (stride > 0)
38075 end += stride * (extent - 1);
38076 else
38077 start += stride * (extent - 1);
38078 }
38079 }
38080 *out_start = start;
38081 *out_end = end + itemsize;
38082}
38083static int
38084__pyx_slices_overlap(__Pyx_memviewslice *slice1,
38085 __Pyx_memviewslice *slice2,
38086 int ndim, size_t itemsize)
38087{
38088 void *start1, *end1, *start2, *end2;
38089 __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
38090 __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
38091 return (start1 < end2) && (start2 < end1);
38092}
38093
38094/* MemviewSliceInit */
38095static int
38096__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
38097 int ndim,
38098 __Pyx_memviewslice *memviewslice,
38099 int memview_is_new_reference)
38100{
38101 __Pyx_RefNannyDeclarations
38102 int i, retval=-1;
38103 Py_buffer *buf = &memview->view;
38104 __Pyx_RefNannySetupContext("init_memviewslice", 0);
38105 if (unlikely(memviewslice->memview || memviewslice->data)) {
38106 PyErr_SetString(PyExc_ValueError,
38107 "memviewslice is already initialized!");
38108 goto fail;
38109 }
38110 if (buf->strides) {
38111 for (i = 0; i < ndim; i++) {
38112 memviewslice->strides[i] = buf->strides[i];
38113 }
38114 } else {
38115 Py_ssize_t stride = buf->itemsize;
38116 for (i = ndim - 1; i >= 0; i--) {
38117 memviewslice->strides[i] = stride;
38118 stride *= buf->shape[i];
38119 }
38120 }
38121 for (i = 0; i < ndim; i++) {
38122 memviewslice->shape[i] = buf->shape[i];
38123 if (buf->suboffsets) {
38124 memviewslice->suboffsets[i] = buf->suboffsets[i];
38125 } else {
38126 memviewslice->suboffsets[i] = -1;
38127 }
38128 }
38129 memviewslice->memview = memview;
38130 memviewslice->data = (char *)buf->buf;
38131 if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
38132 Py_INCREF((PyObject*)memview);
38133 }
38134 retval = 0;
38135 goto no_fail;
38136fail:
38137 memviewslice->memview = 0;
38138 memviewslice->data = 0;
38139 retval = -1;
38140no_fail:
38141 __Pyx_RefNannyFinishContext();
38142 return retval;
38143}
38144
38145/* SliceMemoryviewSlice */
38146static void __pyx_memoryview_slice_memviewslice_err_dim(PyObject *error, const char* msg, int dim) {
38147 PyGILState_STATE gilstate = PyGILState_Ensure();
38148 PyErr_Format(error, msg, dim);
38149 PyGILState_Release(gilstate);
38150}
38151static CYTHON_INLINE int __pyx_memoryview_slice_memviewslice(
38152 __Pyx_memviewslice *dst,
38153 Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
38154 int dim, int new_ndim, int *suboffset_dim,
38155 Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step,
38156 int have_start, int have_stop, int have_step,
38157 int is_slice) {
38158 if (!is_slice) {
38159 if (start < 0) {
38160 start += shape;
38161 }
38162 if (unlikely(!(0 <= start && start < shape))) {
38163 __pyx_memoryview_slice_memviewslice_err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim);
38164 return -1;
38165 }
38166 } else {
38167 int negative_step;
38168 if (have_step) {
38169 negative_step = step < 0;
38170 if (unlikely(step == 0)) {
38171 __pyx_memoryview_slice_memviewslice_err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim);
38172 return -1;
38173 }
38174 } else {
38175 negative_step = 0;
38176 step = 1;
38177 }
38178 if (have_start) {
38179 if (start < 0) {
38180 start += shape;
38181 if (start < 0) {
38182 start = 0;
38183 }
38184 } else if (start >= shape) {
38185 start = negative_step ? (shape - 1) : shape;
38186 }
38187 } else {
38188 start = negative_step ? (shape - 1) : 0;
38189 }
38190 if (have_stop) {
38191 if (stop < 0) {
38192 stop += shape;
38193 if (stop < 0) {
38194 stop = 0;
38195 }
38196 } else if (stop > shape) {
38197 stop = shape;
38198 }
38199 } else {
38200 stop = negative_step ? -1 : shape;
38201 }
38202 Py_ssize_t new_shape = (stop - start) / step;
38203 if ((stop - start) - step * new_shape) {
38204 ++new_shape;
38205 }
38206 if (new_shape < 0) {
38207 new_shape = 0;
38208 }
38209 dst->strides[new_ndim] = stride * step;
38210 dst->shape[new_ndim] = new_shape;
38211 dst->suboffsets[new_ndim] = suboffset;
38212 }
38213 if (suboffset_dim[0] < 0) {
38214 dst->data += start * stride;
38215 } else {
38216 dst->suboffsets[suboffset_dim[0]] += start * stride;
38217 }
38218 if (suboffset >= 0) {
38219 if (!is_slice) {
38220 if (likely(new_ndim == 0)) {
38221 dst->data = ((char **)(dst->data))[0] + suboffset;
38222 } else {
38223 __pyx_memoryview_slice_memviewslice_err_dim(
38224 PyExc_IndexError,
38225 "All dimensions preceding dimension %d must be indexed and not sliced",
38226 dim);
38227 return -1;
38228 }
38229 } else {
38230 suboffset_dim[0] = new_ndim;
38231 }
38232 }
38233 return 0;
38234}
38235
38236/* MemviewDtypeToObject */
38237static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
38238 return (PyObject *) PyFloat_FromDouble(*(double const *) itemp);
38239}
38240static CYTHON_INLINE int __pyx_memview_set_double(char *itemp, PyObject *obj) {
38241 double value = __Pyx_PyFloat_AsDouble(obj);
38242 if (unlikely((value == (double)-1) && PyErr_Occurred()))
38243 return 0;
38244 *(double *) itemp = value;
38245 return 1;
38246}
38247
38248/* IsLittleEndian (used by BufferFormatCheck) */
38249static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
38250{
38251 union {
38252 uint32_t u32;
38253 uint8_t u8[4];
38254 } S;
38255 S.u32 = 0x01020304;
38256 return S.u8[0] == 4;
38257}
38258
38259/* BufferFormatCheck (used by MemviewSliceValidateAndInit) */
38260static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
38261 __Pyx_BufFmt_StackElem* stack,
38262 const __Pyx_TypeInfo* type) {
38263 stack[0].field = &ctx->root;
38264 stack[0].parent_offset = 0;
38265 ctx->root.type = type;
38266 ctx->root.name = "buffer dtype";
38267 ctx->root.offset = 0;
38268 ctx->head = stack;
38269 ctx->head->field = &ctx->root;
38270 ctx->fmt_offset = 0;
38271 ctx->head->parent_offset = 0;
38272 ctx->new_packmode = '@';
38273 ctx->enc_packmode = '@';
38274 ctx->new_count = 1;
38275 ctx->enc_count = 0;
38276 ctx->enc_type = 0;
38277 ctx->is_complex = 0;
38278 ctx->is_valid_array = 0;
38279 ctx->struct_alignment = 0;
38280 while (type->typegroup == 'S') {
38281 ++ctx->head;
38282 ctx->head->field = type->fields;
38283 ctx->head->parent_offset = 0;
38284 type = type->fields->type;
38285 }
38286}
38287static int __Pyx_BufFmt_ParseNumber(const char** ts) {
38288 int count;
38289 const char* t = *ts;
38290 if (*t < '0' || *t > '9') {
38291 return -1;
38292 } else {
38293 count = *t++ - '0';
38294 while (*t >= '0' && *t <= '9') {
38295 count *= 10;
38296 count += *t++ - '0';
38297 }
38298 }
38299 *ts = t;
38300 return count;
38301}
38302static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
38303 int number = __Pyx_BufFmt_ParseNumber(ts);
38304 if (number == -1)
38305 PyErr_Format(PyExc_ValueError,\
38306 "Does not understand character buffer dtype format string ('%c')", **ts);
38307 return number;
38308}
38309static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
38310 PyErr_Format(PyExc_ValueError,
38311 "Unexpected format string character: '%c'", ch);
38312}
38313static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
38314 switch (ch) {
38315 case '?': return "'bool'";
38316 case 'c': return "'char'";
38317 case 'b': return "'signed char'";
38318 case 'B': return "'unsigned char'";
38319 case 'h': return "'short'";
38320 case 'H': return "'unsigned short'";
38321 case 'i': return "'int'";
38322 case 'I': return "'unsigned int'";
38323 case 'l': return "'long'";
38324 case 'L': return "'unsigned long'";
38325 case 'q': return "'long long'";
38326 case 'Q': return "'unsigned long long'";
38327 case 'f': return (is_complex ? "'complex float'" : "'float'");
38328 case 'd': return (is_complex ? "'complex double'" : "'double'");
38329 case 'g': return (is_complex ? "'complex long double'" : "'long double'");
38330 case 'T': return "a struct";
38331 case 'O': return "Python object";
38332 case 'P': return "a pointer";
38333 case 's': case 'p': return "a string";
38334 case 0: return "end";
38335 default: return "unparsable format string";
38336 }
38337}
38338static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
38339 switch (ch) {
38340 case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38341 case 'h': case 'H': return 2;
38342 case 'i': case 'I': case 'l': case 'L': return 4;
38343 case 'q': case 'Q': return 8;
38344 case 'f': return (is_complex ? 8 : 4);
38345 case 'd': return (is_complex ? 16 : 8);
38346 case 'g': {
38347 PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
38348 return 0;
38349 }
38350 case 'O': case 'P': return sizeof(void*);
38351 default:
38352 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38353 return 0;
38354 }
38355}
38356static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
38357 switch (ch) {
38358 case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38359 case 'h': case 'H': return sizeof(short);
38360 case 'i': case 'I': return sizeof(int);
38361 case 'l': case 'L': return sizeof(long);
38362 case 'q': case 'Q': return sizeof(PY_LONG_LONG);
38363 case 'f': return sizeof(float) * (is_complex ? 2 : 1);
38364 case 'd': return sizeof(double) * (is_complex ? 2 : 1);
38365 case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
38366 case 'O': case 'P': return sizeof(void*);
38367 default: {
38368 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38369 return 0;
38370 }
38371 }
38372}
38373typedef struct { char c; short x; } __Pyx_st_short;
38374typedef struct { char c; int x; } __Pyx_st_int;
38375typedef struct { char c; long x; } __Pyx_st_long;
38376typedef struct { char c; float x; } __Pyx_st_float;
38377typedef struct { char c; double x; } __Pyx_st_double;
38378typedef struct { char c; long double x; } __Pyx_st_longdouble;
38379typedef struct { char c; void *x; } __Pyx_st_void_p;
38380typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
38381static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
38382 CYTHON_UNUSED_VAR(is_complex);
38383 switch (ch) {
38384 case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38385 case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
38386 case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
38387 case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
38388 case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
38389 case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
38390 case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
38391 case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
38392 case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
38393 default:
38394 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38395 return 0;
38396 }
38397}
38398/* These are for computing the padding at the end of the struct to align
38399 on the first member of the struct. This will probably the same as above,
38400 but we don't have any guarantees.
38401 */
38402typedef struct { short x; char c; } __Pyx_pad_short;
38403typedef struct { int x; char c; } __Pyx_pad_int;
38404typedef struct { long x; char c; } __Pyx_pad_long;
38405typedef struct { float x; char c; } __Pyx_pad_float;
38406typedef struct { double x; char c; } __Pyx_pad_double;
38407typedef struct { long double x; char c; } __Pyx_pad_longdouble;
38408typedef struct { void *x; char c; } __Pyx_pad_void_p;
38409typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
38410static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
38411 CYTHON_UNUSED_VAR(is_complex);
38412 switch (ch) {
38413 case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38414 case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
38415 case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
38416 case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
38417 case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
38418 case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
38419 case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
38420 case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
38421 case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
38422 default:
38423 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38424 return 0;
38425 }
38426}
38427static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
38428 switch (ch) {
38429 case 'c':
38430 return 'H';
38431 case 'b': case 'h': case 'i':
38432 case 'l': case 'q': case 's': case 'p':
38433 return 'I';
38434 case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
38435 return 'U';
38436 case 'f': case 'd': case 'g':
38437 return (is_complex ? 'C' : 'R');
38438 case 'O':
38439 return 'O';
38440 case 'P':
38441 return 'P';
38442 default: {
38443 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38444 return 0;
38445 }
38446 }
38447}
38448static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
38449 if (ctx->head == NULL || ctx->head->field == &ctx->root) {
38450 const char* expected;
38451 const char* quote;
38452 if (ctx->head == NULL) {
38453 expected = "end";
38454 quote = "";
38455 } else {
38456 expected = ctx->head->field->type->name;
38457 quote = "'";
38458 }
38459 PyErr_Format(PyExc_ValueError,
38460 "Buffer dtype mismatch, expected %s%s%s but got %s",
38461 quote, expected, quote,
38462 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
38463 } else {
38464 const __Pyx_StructField* field = ctx->head->field;
38465 const __Pyx_StructField* parent = (ctx->head - 1)->field;
38466 PyErr_Format(PyExc_ValueError,
38467 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
38468 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
38469 parent->type->name, field->name);
38470 }
38471}
38472static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
38473 char group;
38474 size_t size, offset, arraysize = 1;
38475 if (ctx->enc_type == 0) return 0;
38476 if (ctx->head->field->type->arraysize[0]) {
38477 int i, ndim = 0;
38478 if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
38479 ctx->is_valid_array = ctx->head->field->type->ndim == 1;
38480 ndim = 1;
38481 if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
38482 PyErr_Format(PyExc_ValueError,
38483 "Expected a dimension of size %zu, got %zu",
38484 ctx->head->field->type->arraysize[0], ctx->enc_count);
38485 return -1;
38486 }
38487 }
38488 if (!ctx->is_valid_array) {
38489 PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
38490 ctx->head->field->type->ndim, ndim);
38491 return -1;
38492 }
38493 for (i = 0; i < ctx->head->field->type->ndim; i++) {
38494 arraysize *= ctx->head->field->type->arraysize[i];
38495 }
38496 ctx->is_valid_array = 0;
38497 ctx->enc_count = 1;
38498 }
38499 group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
38500 do {
38501 const __Pyx_StructField* field = ctx->head->field;
38502 const __Pyx_TypeInfo* type = field->type;
38503 if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
38504 size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
38505 } else {
38506 size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
38507 }
38508 if (ctx->enc_packmode == '@') {
38509 size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
38510 size_t align_mod_offset;
38511 if (align_at == 0) return -1;
38512 align_mod_offset = ctx->fmt_offset % align_at;
38513 if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
38514 if (ctx->struct_alignment == 0)
38515 ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
38516 ctx->is_complex);
38517 }
38518 if (type->size != size || type->typegroup != group) {
38519 if (type->typegroup == 'C' && type->fields != NULL) {
38520 size_t parent_offset = ctx->head->parent_offset + field->offset;
38521 ++ctx->head;
38522 ctx->head->field = type->fields;
38523 ctx->head->parent_offset = parent_offset;
38524 continue;
38525 }
38526 if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
38527 } else {
38528 __Pyx_BufFmt_RaiseExpected(ctx);
38529 return -1;
38530 }
38531 }
38532 offset = ctx->head->parent_offset + field->offset;
38533 if (ctx->fmt_offset != offset) {
38534 PyErr_Format(PyExc_ValueError,
38535 "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
38536 (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
38537 return -1;
38538 }
38539 ctx->fmt_offset += size;
38540 if (arraysize)
38541 ctx->fmt_offset += (arraysize - 1) * size;
38542 --ctx->enc_count;
38543 while (1) {
38544 if (field == &ctx->root) {
38545 ctx->head = NULL;
38546 if (ctx->enc_count != 0) {
38547 __Pyx_BufFmt_RaiseExpected(ctx);
38548 return -1;
38549 }
38550 break;
38551 }
38552 ctx->head->field = ++field;
38553 if (field->type == NULL) {
38554 --ctx->head;
38555 field = ctx->head->field;
38556 continue;
38557 } else if (field->type->typegroup == 'S') {
38558 size_t parent_offset = ctx->head->parent_offset + field->offset;
38559 if (field->type->fields->type == NULL) continue;
38560 field = field->type->fields;
38561 ++ctx->head;
38562 ctx->head->field = field;
38563 ctx->head->parent_offset = parent_offset;
38564 break;
38565 } else {
38566 break;
38567 }
38568 }
38569 } while (ctx->enc_count);
38570 ctx->enc_type = 0;
38571 ctx->is_complex = 0;
38572 return 0;
38573}
38574static int
38575__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
38576{
38577 const char *ts = *tsp;
38578 int i = 0, number, ndim;
38579 ++ts;
38580 if (ctx->new_count != 1) {
38581 PyErr_SetString(PyExc_ValueError,
38582 "Cannot handle repeated arrays in format string");
38583 return -1;
38584 }
38585 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
38586 ndim = ctx->head->field->type->ndim;
38587 while (*ts && *ts != ')') {
38588 switch (*ts) {
38589 case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
38590 default: break;
38591 }
38592 number = __Pyx_BufFmt_ExpectNumber(&ts);
38593 if (number == -1) return -1;
38594 if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
38595 PyErr_Format(PyExc_ValueError,
38596 "Expected a dimension of size %zu, got %d",
38597 ctx->head->field->type->arraysize[i], number);
38598 return -1;
38599 }
38600 if (*ts != ',' && *ts != ')') {
38601 PyErr_Format(PyExc_ValueError,
38602 "Expected a comma in format string, got '%c'", *ts);
38603 return -1;
38604 }
38605 if (*ts == ',') ts++;
38606 i++;
38607 }
38608 if (i != ndim) {
38609 PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
38610 ctx->head->field->type->ndim, i);
38611 return -1;
38612 }
38613 if (!*ts) {
38614 PyErr_SetString(PyExc_ValueError,
38615 "Unexpected end of format string, expected ')'");
38616 return -1;
38617 }
38618 ctx->is_valid_array = 1;
38619 ctx->new_count = 1;
38620 *tsp = ++ts;
38621 return 0;
38622}
38623static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
38624 int got_Z = 0;
38625 while (1) {
38626 switch(*ts) {
38627 case 0:
38628 if (ctx->enc_type != 0 && ctx->head == NULL) {
38629 __Pyx_BufFmt_RaiseExpected(ctx);
38630 return NULL;
38631 }
38632 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38633 if (ctx->head != NULL) {
38634 __Pyx_BufFmt_RaiseExpected(ctx);
38635 return NULL;
38636 }
38637 return ts;
38638 case ' ':
38639 case '\r':
38640 case '\n':
38641 ++ts;
38642 break;
38643 case '<':
38644 if (!__Pyx_Is_Little_Endian()) {
38645 PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
38646 return NULL;
38647 }
38648 ctx->new_packmode = '=';
38649 ++ts;
38650 break;
38651 case '>':
38652 case '!':
38653 if (__Pyx_Is_Little_Endian()) {
38654 PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
38655 return NULL;
38656 }
38657 ctx->new_packmode = '=';
38658 ++ts;
38659 break;
38660 case '=':
38661 case '@':
38662 case '^':
38663 ctx->new_packmode = *ts++;
38664 break;
38665 case 'T':
38666 {
38667 const char* ts_after_sub;
38668 size_t i, struct_count = ctx->new_count;
38669 size_t struct_alignment = ctx->struct_alignment;
38670 ctx->new_count = 1;
38671 ++ts;
38672 if (*ts != '\x7B') {
38673 PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '\x7B' after 'T'");
38674 return NULL;
38675 }
38676 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38677 ctx->enc_type = 0;
38678 ctx->enc_count = 0;
38679 ctx->struct_alignment = 0;
38680 ++ts;
38681 ts_after_sub = ts;
38682 for (i = 0; i != struct_count; ++i) {
38683 ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
38684 if (!ts_after_sub) return NULL;
38685 }
38686 ts = ts_after_sub;
38687 if (struct_alignment) ctx->struct_alignment = struct_alignment;
38688 }
38689 break;
38690 case '\x7D':
38691 {
38692 size_t alignment = ctx->struct_alignment;
38693 ++ts;
38694 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38695 ctx->enc_type = 0;
38696 if (alignment && ctx->fmt_offset % alignment) {
38697 ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
38698 }
38699 }
38700 return ts;
38701 case 'x':
38702 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38703 ctx->fmt_offset += ctx->new_count;
38704 ctx->new_count = 1;
38705 ctx->enc_count = 0;
38706 ctx->enc_type = 0;
38707 ctx->enc_packmode = ctx->new_packmode;
38708 ++ts;
38709 break;
38710 case 'Z':
38711 got_Z = 1;
38712 ++ts;
38713 if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
38714 __Pyx_BufFmt_RaiseUnexpectedChar('Z');
38715 return NULL;
38716 }
38717 CYTHON_FALLTHROUGH;
38718 case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
38719 case 'l': case 'L': case 'q': case 'Q':
38720 case 'f': case 'd': case 'g':
38721 case 'O': case 'p':
38722 if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
38723 (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
38724 ctx->enc_count += ctx->new_count;
38725 ctx->new_count = 1;
38726 got_Z = 0;
38727 ++ts;
38728 break;
38729 }
38730 CYTHON_FALLTHROUGH;
38731 case 's':
38732 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38733 ctx->enc_count = ctx->new_count;
38734 ctx->enc_packmode = ctx->new_packmode;
38735 ctx->enc_type = *ts;
38736 ctx->is_complex = got_Z;
38737 ++ts;
38738 ctx->new_count = 1;
38739 got_Z = 0;
38740 break;
38741 case ':':
38742 ++ts;
38743 while(*ts != ':') ++ts;
38744 ++ts;
38745 break;
38746 case '(':
38747 if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
38748 break;
38749 default:
38750 {
38751 int number = __Pyx_BufFmt_ExpectNumber(&ts);
38752 if (number == -1) return NULL;
38753 ctx->new_count = (size_t)number;
38754 }
38755 }
38756 }
38757}
38758
38759/* TypeInfoCompare (used by MemviewSliceValidateAndInit) */
38760static int
38761__pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b)
38762{
38763 int i;
38764 if (!a || !b)
38765 return 0;
38766 if (a == b)
38767 return 1;
38768 if (a->size != b->size || a->typegroup != b->typegroup ||
38769 a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
38770 if (a->typegroup == 'H' || b->typegroup == 'H') {
38771 return a->size == b->size;
38772 } else {
38773 return 0;
38774 }
38775 }
38776 if (a->ndim) {
38777 for (i = 0; i < a->ndim; i++)
38778 if (a->arraysize[i] != b->arraysize[i])
38779 return 0;
38780 }
38781 if (a->typegroup == 'S') {
38782 if (a->flags != b->flags)
38783 return 0;
38784 if (a->fields || b->fields) {
38785 if (!(a->fields && b->fields))
38786 return 0;
38787 for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
38788 const __Pyx_StructField *field_a = a->fields + i;
38789 const __Pyx_StructField *field_b = b->fields + i;
38790 if (field_a->offset != field_b->offset ||
38791 !__pyx_typeinfo_cmp(field_a->type, field_b->type))
38792 return 0;
38793 }
38794 return !a->fields[i].type && !b->fields[i].type;
38795 }
38796 }
38797 return 1;
38798}
38799
38800/* MemviewSliceValidateAndInit (used by ObjectToMemviewSlice) */
38801static int
38802__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
38803{
38804 if (buf->shape[dim] <= 1)
38805 return 1;
38806 if (buf->strides) {
38807 if (spec & __Pyx_MEMVIEW_CONTIG) {
38808 if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
38809 if (unlikely(buf->strides[dim] != sizeof(void *))) {
38810 PyErr_Format(PyExc_ValueError,
38811 "Buffer is not indirectly contiguous "
38812 "in dimension %d.", dim);
38813 goto fail;
38814 }
38815 } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
38816 PyErr_SetString(PyExc_ValueError,
38817 "Buffer and memoryview are not contiguous "
38818 "in the same dimension.");
38819 goto fail;
38820 }
38821 }
38822 if (spec & __Pyx_MEMVIEW_FOLLOW) {
38823 Py_ssize_t stride = buf->strides[dim];
38824 if (stride < 0)
38825 stride = -stride;
38826 if (unlikely(stride < buf->itemsize)) {
38827 PyErr_SetString(PyExc_ValueError,
38828 "Buffer and memoryview are not contiguous "
38829 "in the same dimension.");
38830 goto fail;
38831 }
38832 }
38833 } else {
38834 if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
38835 PyErr_Format(PyExc_ValueError,
38836 "C-contiguous buffer is not contiguous in "
38837 "dimension %d", dim);
38838 goto fail;
38839 } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
38840 PyErr_Format(PyExc_ValueError,
38841 "C-contiguous buffer is not indirect in "
38842 "dimension %d", dim);
38843 goto fail;
38844 } else if (unlikely(buf->suboffsets)) {
38845 PyErr_SetString(PyExc_ValueError,
38846 "Buffer exposes suboffsets but no strides");
38847 goto fail;
38848 }
38849 }
38850 return 1;
38851fail:
38852 return 0;
38853}
38854static int
38855__pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
38856{
38857 CYTHON_UNUSED_VAR(ndim);
38858 if (spec & __Pyx_MEMVIEW_DIRECT) {
38859 if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
38860 PyErr_Format(PyExc_ValueError,
38861 "Buffer not compatible with direct access "
38862 "in dimension %d.", dim);
38863 goto fail;
38864 }
38865 }
38866 if (spec & __Pyx_MEMVIEW_PTR) {
38867 if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
38868 PyErr_Format(PyExc_ValueError,
38869 "Buffer is not indirectly accessible "
38870 "in dimension %d.", dim);
38871 goto fail;
38872 }
38873 }
38874 return 1;
38875fail:
38876 return 0;
38877}
38878static int
38879__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
38880{
38881 int i;
38882 if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
38883 Py_ssize_t stride = 1;
38884 for (i = 0; i < ndim; i++) {
38885 if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
38886 PyErr_SetString(PyExc_ValueError,
38887 "Buffer not fortran contiguous.");
38888 goto fail;
38889 }
38890 stride = stride * buf->shape[i];
38891 }
38892 } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
38893 Py_ssize_t stride = 1;
38894 for (i = ndim - 1; i >- 1; i--) {
38895 if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
38896 PyErr_SetString(PyExc_ValueError,
38897 "Buffer not C contiguous.");
38898 goto fail;
38899 }
38900 stride = stride * buf->shape[i];
38901 }
38902 }
38903 return 1;
38904fail:
38905 return 0;
38906}
38907static int __Pyx_ValidateAndInit_memviewslice(
38908 int *axes_specs,
38909 int c_or_f_flag,
38910 int buf_flags,
38911 int ndim,
38912 const __Pyx_TypeInfo *dtype,
38913 __Pyx_BufFmt_StackElem stack[],
38914 __Pyx_memviewslice *memviewslice,
38915 PyObject *original_obj)
38916{
38917 struct __pyx_memoryview_obj *memview, *new_memview;
38918 __Pyx_RefNannyDeclarations
38919 Py_buffer *buf;
38920 int i, spec = 0, retval = -1;
38921 __Pyx_BufFmt_Context ctx;
38922 int from_memoryview = __pyx_memoryview_check(original_obj);
38923 __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
38924 if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
38925 original_obj)->typeinfo)) {
38926 memview = (struct __pyx_memoryview_obj *) original_obj;
38927 new_memview = NULL;
38928 } else {
38929 memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
38930 original_obj, buf_flags, 0, dtype);
38931 new_memview = memview;
38932 if (unlikely(!memview))
38933 goto fail;
38934 }
38935 buf = &memview->view;
38936 if (unlikely(buf->ndim != ndim)) {
38937 PyErr_Format(PyExc_ValueError,
38938 "Buffer has wrong number of dimensions (expected %d, got %d)",
38939 ndim, buf->ndim);
38940 goto fail;
38941 }
38942 if (new_memview) {
38943 __Pyx_BufFmt_Init(&ctx, stack, dtype);
38944 if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
38945 }
38946 if (unlikely((unsigned) buf->itemsize != dtype->size)) {
38947 PyErr_Format(PyExc_ValueError,
38948 "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
38949 "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
38950 buf->itemsize,
38951 (buf->itemsize > 1) ? "s" : "",
38952 dtype->name,
38953 dtype->size,
38954 (dtype->size > 1) ? "s" : "");
38955 goto fail;
38956 }
38957 if (buf->len > 0) {
38958 for (i = 0; i < ndim; i++) {
38959 spec = axes_specs[i];
38960 if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
38961 goto fail;
38962 if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
38963 goto fail;
38964 }
38965 if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
38966 goto fail;
38967 }
38968 if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
38969 new_memview != NULL) == -1)) {
38970 goto fail;
38971 }
38972 retval = 0;
38973 goto no_fail;
38974fail:
38975 Py_XDECREF((PyObject*)new_memview);
38976 retval = -1;
38977no_fail:
38978 __Pyx_RefNannyFinishContext();
38979 return retval;
38980}
38981
38982/* ObjectToMemviewSlice */
38983static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
38984 __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
38985 __Pyx_BufFmt_StackElem stack[1];
38986 int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
38987 int retcode;
38988 if (obj == Py_None) {
38989 result.memview = (struct __pyx_memoryview_obj *) Py_None;
38990 return result;
38991 }
38992 retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
38993 PyBUF_RECORDS_RO | writable_flag, 1,
38994 &__Pyx_TypeInfo_double, stack,
38995 &result, obj);
38996 if (unlikely(retcode == -1))
38997 goto __pyx_fail;
38998 return result;
38999__pyx_fail:
39000 result.memview = NULL;
39001 result.data = NULL;
39002 return result;
39003}
39004
39005/* CIntFromPyVerify */
39006#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
39007 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
39008#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
39009 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
39010#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
39011 {\
39012 func_type value = func_value;\
39013 if (sizeof(target_type) < sizeof(func_type)) {\
39014 if (unlikely(value != (func_type) (target_type) value)) {\
39015 func_type zero = 0;\
39016 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
39017 return (target_type) -1;\
39018 if (is_unsigned && unlikely(value < zero))\
39019 goto raise_neg_overflow;\
39020 else\
39021 goto raise_overflow;\
39022 }\
39023 }\
39024 return (target_type) value;\
39025 }
39026
39027/* PyObjectCallMethod1 */
39028static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
39029#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || !CYTHON_COMPILING_IN_LIMITED_API)
39030 PyObject *args[2] = {obj, arg};
39031 return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
39032#elif CYTHON_COMPILING_IN_LIMITED_API
39033 return PyObject_CallMethodObjArgs(obj, method_name, arg, NULL);
39034#else
39035 return PyObject_CallMethodOneArg(obj, method_name, arg);
39036#endif
39037}
39038
39039/* CheckUnpickleChecksumError */
39040static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
39041 PyObject *pickle_module = PyImport_ImportModule("pickle");
39042 if (unlikely(!pickle_module)) return;
39043 PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError");
39044 Py_DECREF(pickle_module);
39045 if (unlikely(!pickle_error)) return;
39046 if (checksum2 == checksum1) {
39047 PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))",
39048 checksum, checksum1, members);
39049 } else if (checksum3 == checksum2) {
39050 PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))",
39051 checksum, checksum1, checksum2, members);
39052 } else {
39053 PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))",
39054 checksum, checksum1, checksum2, checksum3, members);
39055 }
39056 Py_DECREF(pickle_error);
39057}
39058
39059/* Declarations */
39060#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39061 #ifdef __cplusplus
39062 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39063 return ::std::complex< float >(x, y);
39064 }
39065 #else
39066 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39067 return x + y*(__pyx_t_float_complex)_Complex_I;
39068 }
39069 #endif
39070#else
39071 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39072 __pyx_t_float_complex z;
39073 z.real = x;
39074 z.imag = y;
39075 return z;
39076 }
39077#endif
39078
39079/* Arithmetic */
39080#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39081#else
39082 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39083 return (a.real == b.real) && (a.imag == b.imag);
39084 }
39085 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39086 __pyx_t_float_complex z;
39087 z.real = a.real + b.real;
39088 z.imag = a.imag + b.imag;
39089 return z;
39090 }
39091 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39092 __pyx_t_float_complex z;
39093 z.real = a.real - b.real;
39094 z.imag = a.imag - b.imag;
39095 return z;
39096 }
39097 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39098 __pyx_t_float_complex z;
39099 z.real = a.real * b.real - a.imag * b.imag;
39100 z.imag = a.real * b.imag + a.imag * b.real;
39101 return z;
39102 }
39103 #if 1
39104 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39105 if (b.imag == 0) {
39106 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39107 } else if (fabsf(b.real) >= fabsf(b.imag)) {
39108 if (b.real == 0 && b.imag == 0) {
39109 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
39110 } else {
39111 float r = b.imag / b.real;
39112 float s = (float)(1.0) / (b.real + b.imag * r);
39113 return __pyx_t_float_complex_from_parts(
39114 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39115 }
39116 } else {
39117 float r = b.real / b.imag;
39118 float s = (float)(1.0) / (b.imag + b.real * r);
39119 return __pyx_t_float_complex_from_parts(
39120 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39121 }
39122 }
39123 #else
39124 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39125 if (b.imag == 0) {
39126 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39127 } else {
39128 float denom = b.real * b.real + b.imag * b.imag;
39129 return __pyx_t_float_complex_from_parts(
39130 (a.real * b.real + a.imag * b.imag) / denom,
39131 (a.imag * b.real - a.real * b.imag) / denom);
39132 }
39133 }
39134 #endif
39135 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
39136 __pyx_t_float_complex z;
39137 z.real = -a.real;
39138 z.imag = -a.imag;
39139 return z;
39140 }
39141 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
39142 return (a.real == 0) && (a.imag == 0);
39143 }
39144 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
39145 __pyx_t_float_complex z;
39146 z.real = a.real;
39147 z.imag = -a.imag;
39148 return z;
39149 }
39150 #if 1
39151 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
39152 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39153 return sqrtf(z.real*z.real + z.imag*z.imag);
39154 #else
39155 return hypotf(z.real, z.imag);
39156 #endif
39157 }
39158 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39159 __pyx_t_float_complex z;
39160 float r, lnr, theta, z_r, z_theta;
39161 if (b.imag == 0 && b.real == (int)b.real) {
39162 if (b.real < 0) {
39163 float denom = a.real * a.real + a.imag * a.imag;
39164 a.real = a.real / denom;
39165 a.imag = -a.imag / denom;
39166 b.real = -b.real;
39167 }
39168 switch ((int)b.real) {
39169 case 0:
39170 z.real = 1;
39171 z.imag = 0;
39172 return z;
39173 case 1:
39174 return a;
39175 case 2:
39176 return __Pyx_c_prod_float(a, a);
39177 case 3:
39178 z = __Pyx_c_prod_float(a, a);
39179 return __Pyx_c_prod_float(z, a);
39180 case 4:
39181 z = __Pyx_c_prod_float(a, a);
39182 return __Pyx_c_prod_float(z, z);
39183 }
39184 }
39185 if (a.imag == 0) {
39186 if (a.real == 0) {
39187 return a;
39188 } else if ((b.imag == 0) && (a.real >= 0)) {
39189 z.real = powf(a.real, b.real);
39190 z.imag = 0;
39191 return z;
39192 } else if (a.real > 0) {
39193 r = a.real;
39194 theta = 0;
39195 } else {
39196 r = -a.real;
39197 theta = atan2f(0.0, -1.0);
39198 }
39199 } else {
39200 r = __Pyx_c_abs_float(a);
39201 theta = atan2f(a.imag, a.real);
39202 }
39203 lnr = logf(r);
39204 z_r = expf(lnr * b.real - theta * b.imag);
39205 z_theta = theta * b.real + lnr * b.imag;
39206 z.real = z_r * cosf(z_theta);
39207 z.imag = z_r * sinf(z_theta);
39208 return z;
39209 }
39210 #endif
39211#endif
39212
39213/* Declarations */
39214#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39215 #ifdef __cplusplus
39216 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39217 return ::std::complex< double >(x, y);
39218 }
39219 #else
39220 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39221 return x + y*(__pyx_t_double_complex)_Complex_I;
39222 }
39223 #endif
39224#else
39225 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39226 __pyx_t_double_complex z;
39227 z.real = x;
39228 z.imag = y;
39229 return z;
39230 }
39231#endif
39232
39233/* Arithmetic */
39234#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39235#else
39236 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39237 return (a.real == b.real) && (a.imag == b.imag);
39238 }
39239 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39240 __pyx_t_double_complex z;
39241 z.real = a.real + b.real;
39242 z.imag = a.imag + b.imag;
39243 return z;
39244 }
39245 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39246 __pyx_t_double_complex z;
39247 z.real = a.real - b.real;
39248 z.imag = a.imag - b.imag;
39249 return z;
39250 }
39251 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39252 __pyx_t_double_complex z;
39253 z.real = a.real * b.real - a.imag * b.imag;
39254 z.imag = a.real * b.imag + a.imag * b.real;
39255 return z;
39256 }
39257 #if 1
39258 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39259 if (b.imag == 0) {
39260 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39261 } else if (fabs(b.real) >= fabs(b.imag)) {
39262 if (b.real == 0 && b.imag == 0) {
39263 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
39264 } else {
39265 double r = b.imag / b.real;
39266 double s = (double)(1.0) / (b.real + b.imag * r);
39267 return __pyx_t_double_complex_from_parts(
39268 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39269 }
39270 } else {
39271 double r = b.real / b.imag;
39272 double s = (double)(1.0) / (b.imag + b.real * r);
39273 return __pyx_t_double_complex_from_parts(
39274 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39275 }
39276 }
39277 #else
39278 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39279 if (b.imag == 0) {
39280 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39281 } else {
39282 double denom = b.real * b.real + b.imag * b.imag;
39283 return __pyx_t_double_complex_from_parts(
39284 (a.real * b.real + a.imag * b.imag) / denom,
39285 (a.imag * b.real - a.real * b.imag) / denom);
39286 }
39287 }
39288 #endif
39289 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
39290 __pyx_t_double_complex z;
39291 z.real = -a.real;
39292 z.imag = -a.imag;
39293 return z;
39294 }
39295 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
39296 return (a.real == 0) && (a.imag == 0);
39297 }
39298 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
39299 __pyx_t_double_complex z;
39300 z.real = a.real;
39301 z.imag = -a.imag;
39302 return z;
39303 }
39304 #if 1
39305 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
39306 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39307 return sqrt(z.real*z.real + z.imag*z.imag);
39308 #else
39309 return hypot(z.real, z.imag);
39310 #endif
39311 }
39312 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39313 __pyx_t_double_complex z;
39314 double r, lnr, theta, z_r, z_theta;
39315 if (b.imag == 0 && b.real == (int)b.real) {
39316 if (b.real < 0) {
39317 double denom = a.real * a.real + a.imag * a.imag;
39318 a.real = a.real / denom;
39319 a.imag = -a.imag / denom;
39320 b.real = -b.real;
39321 }
39322 switch ((int)b.real) {
39323 case 0:
39324 z.real = 1;
39325 z.imag = 0;
39326 return z;
39327 case 1:
39328 return a;
39329 case 2:
39330 return __Pyx_c_prod_double(a, a);
39331 case 3:
39332 z = __Pyx_c_prod_double(a, a);
39333 return __Pyx_c_prod_double(z, a);
39334 case 4:
39335 z = __Pyx_c_prod_double(a, a);
39336 return __Pyx_c_prod_double(z, z);
39337 }
39338 }
39339 if (a.imag == 0) {
39340 if (a.real == 0) {
39341 return a;
39342 } else if ((b.imag == 0) && (a.real >= 0)) {
39343 z.real = pow(a.real, b.real);
39344 z.imag = 0;
39345 return z;
39346 } else if (a.real > 0) {
39347 r = a.real;
39348 theta = 0;
39349 } else {
39350 r = -a.real;
39351 theta = atan2(0.0, -1.0);
39352 }
39353 } else {
39354 r = __Pyx_c_abs_double(a);
39355 theta = atan2(a.imag, a.real);
39356 }
39357 lnr = log(r);
39358 z_r = exp(lnr * b.real - theta * b.imag);
39359 z_theta = theta * b.real + lnr * b.imag;
39360 z.real = z_r * cos(z_theta);
39361 z.imag = z_r * sin(z_theta);
39362 return z;
39363 }
39364 #endif
39365#endif
39366
39367/* Declarations */
39368#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39369 #ifdef __cplusplus
39370 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
39371 return ::std::complex< long double >(x, y);
39372 }
39373 #else
39374 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
39375 return x + y*(__pyx_t_long_double_complex)_Complex_I;
39376 }
39377 #endif
39378#else
39379 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
39380 __pyx_t_long_double_complex z;
39381 z.real = x;
39382 z.imag = y;
39383 return z;
39384 }
39385#endif
39386
39387/* Arithmetic */
39388#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39389#else
39390 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39391 return (a.real == b.real) && (a.imag == b.imag);
39392 }
39393 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) {
39394 __pyx_t_long_double_complex z;
39395 z.real = a.real + b.real;
39396 z.imag = a.imag + b.imag;
39397 return z;
39398 }
39399 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) {
39400 __pyx_t_long_double_complex z;
39401 z.real = a.real - b.real;
39402 z.imag = a.imag - b.imag;
39403 return z;
39404 }
39405 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) {
39406 __pyx_t_long_double_complex z;
39407 z.real = a.real * b.real - a.imag * b.imag;
39408 z.imag = a.real * b.imag + a.imag * b.real;
39409 return z;
39410 }
39411 #if 1
39412 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) {
39413 if (b.imag == 0) {
39414 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39415 } else if (fabsl(b.real) >= fabsl(b.imag)) {
39416 if (b.real == 0 && b.imag == 0) {
39417 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
39418 } else {
39419 long double r = b.imag / b.real;
39420 long double s = (long double)(1.0) / (b.real + b.imag * r);
39421 return __pyx_t_long_double_complex_from_parts(
39422 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39423 }
39424 } else {
39425 long double r = b.real / b.imag;
39426 long double s = (long double)(1.0) / (b.imag + b.real * r);
39427 return __pyx_t_long_double_complex_from_parts(
39428 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39429 }
39430 }
39431 #else
39432 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) {
39433 if (b.imag == 0) {
39434 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39435 } else {
39436 long double denom = b.real * b.real + b.imag * b.imag;
39437 return __pyx_t_long_double_complex_from_parts(
39438 (a.real * b.real + a.imag * b.imag) / denom,
39439 (a.imag * b.real - a.real * b.imag) / denom);
39440 }
39441 }
39442 #endif
39443 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
39444 __pyx_t_long_double_complex z;
39445 z.real = -a.real;
39446 z.imag = -a.imag;
39447 return z;
39448 }
39449 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
39450 return (a.real == 0) && (a.imag == 0);
39451 }
39452 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
39453 __pyx_t_long_double_complex z;
39454 z.real = a.real;
39455 z.imag = -a.imag;
39456 return z;
39457 }
39458 #if 1
39459 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
39460 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39461 return sqrtl(z.real*z.real + z.imag*z.imag);
39462 #else
39463 return hypotl(z.real, z.imag);
39464 #endif
39465 }
39466 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) {
39467 __pyx_t_long_double_complex z;
39468 long double r, lnr, theta, z_r, z_theta;
39469 if (b.imag == 0 && b.real == (int)b.real) {
39470 if (b.real < 0) {
39471 long double denom = a.real * a.real + a.imag * a.imag;
39472 a.real = a.real / denom;
39473 a.imag = -a.imag / denom;
39474 b.real = -b.real;
39475 }
39476 switch ((int)b.real) {
39477 case 0:
39478 z.real = 1;
39479 z.imag = 0;
39480 return z;
39481 case 1:
39482 return a;
39483 case 2:
39484 return __Pyx_c_prod_long__double(a, a);
39485 case 3:
39486 z = __Pyx_c_prod_long__double(a, a);
39487 return __Pyx_c_prod_long__double(z, a);
39488 case 4:
39489 z = __Pyx_c_prod_long__double(a, a);
39490 return __Pyx_c_prod_long__double(z, z);
39491 }
39492 }
39493 if (a.imag == 0) {
39494 if (a.real == 0) {
39495 return a;
39496 } else if ((b.imag == 0) && (a.real >= 0)) {
39497 z.real = powl(a.real, b.real);
39498 z.imag = 0;
39499 return z;
39500 } else if (a.real > 0) {
39501 r = a.real;
39502 theta = 0;
39503 } else {
39504 r = -a.real;
39505 theta = atan2l(0.0, -1.0);
39506 }
39507 } else {
39508 r = __Pyx_c_abs_long__double(a);
39509 theta = atan2l(a.imag, a.real);
39510 }
39511 lnr = logl(r);
39512 z_r = expl(lnr * b.real - theta * b.imag);
39513 z_theta = theta * b.real + lnr * b.imag;
39514 z.real = z_r * cosl(z_theta);
39515 z.imag = z_r * sinl(z_theta);
39516 return z;
39517 }
39518 #endif
39519#endif
39520
39521/* MemviewSliceCopy */
39522static __Pyx_memviewslice
39523__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
39524 const char *mode, int ndim,
39525 Py_ssize_t sizeof_dtype, int contig_flag,
39526 int dtype_is_object)
39527{
39528 __Pyx_RefNannyDeclarations
39529 int i;
39530 __Pyx_memviewslice new_mvs = __Pyx_MEMSLICE_INIT;
39531 struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
39532 Py_buffer *buf = &from_memview->view;
39533 PyObject *shape_tuple = NULL;
39534 struct __pyx_array_obj *array_obj = NULL;
39535 struct __pyx_memoryview_obj *memview_obj = NULL;
39536 __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
39537 for (i = 0; i < ndim; i++) {
39538 if (unlikely(from_mvs->suboffsets[i] >= 0)) {
39539 PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
39540 "indirect dimensions (axis %d)", i);
39541 goto fail;
39542 }
39543 }
39544 shape_tuple = PyTuple_New(ndim);
39545 if (unlikely(!shape_tuple)) {
39546 goto fail;
39547 }
39548 __Pyx_GOTREF(shape_tuple);
39549 for(i = 0; i < ndim; i++) {
39550 PyObject *temp_int = PyLong_FromSsize_t(from_mvs->shape[i]);
39551 if(unlikely(!temp_int)) {
39552 goto fail;
39553 } else {
39554#if CYTHON_ASSUME_SAFE_MACROS
39555 PyTuple_SET_ITEM(shape_tuple, i, temp_int);
39556#else
39557 if (PyTuple_SetItem(shape_tuple, i, temp_int) < 0) {
39558 goto fail;
39559 }
39560#endif
39561 }
39562 }
39563 array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, mode, NULL);
39564 if (unlikely(!array_obj)) {
39565 goto fail;
39566 }
39567 __Pyx_GOTREF(array_obj);
39568 memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
39569 (PyObject *) array_obj, contig_flag,
39570 dtype_is_object,
39571 from_mvs->memview->typeinfo);
39572 if (unlikely(!memview_obj))
39573 goto fail;
39574 if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
39575 goto fail;
39576 if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
39577 dtype_is_object) < 0))
39578 goto fail;
39579 goto no_fail;
39580fail:
39581 __Pyx_XDECREF((PyObject *) new_mvs.memview);
39582 new_mvs.memview = NULL;
39583 new_mvs.data = NULL;
39584no_fail:
39585 __Pyx_XDECREF(shape_tuple);
39586 __Pyx_XDECREF((PyObject *) array_obj);
39587 __Pyx_RefNannyFinishContext();
39588 return new_mvs;
39589}
39590
39591/* PyObjectVectorcallKwds (used by PyObjectVectorcallMethodKwds) */
39592#if CYTHON_VECTORCALL
39593CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i) {
39594 PyObject *key = __Pyx_PyTuple_GET_ITEM(kwnames, i);
39595#if !CYTHON_ASSUME_SAFE_MACROS
39596 if (unlikely(!key)) return -1;
39597#endif
39598 if (unlikely(!PyUnicode_Check(key))) {
39599 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
39600 return -1;
39601 }
39602 return 0;
39603}
39604#else
39605CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n) {
39606 PyObject *out = PyDict_New();
39607 if (unlikely(!out)) return NULL;
39608 for (Py_ssize_t i=0; i<n; ++i) {
39609 if (unlikely(PyDict_SetItem(out, keys[i], values[i]) < 0)) {
39610 Py_DECREF(out);
39611 return NULL;
39612 }
39613 }
39614 return out;
39615}
39616CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i) {
39617 PyObject *key = kwnames[i];
39618 if (unlikely(!PyUnicode_Check(key))) {
39619 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
39620 return -1;
39621 }
39622 return 0;
39623}
39624#endif
39625
39626/* PyObjectVectorcallMethodKwds (used by CIntToPy) */
39627#if !CYTHON_VECTORCALL
39628static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
39629 PyObject *result;
39630 PyObject *obj = PyObject_GetAttr(args[0], name);
39631 if (unlikely(!obj))
39632 return NULL;
39633 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
39634 Py_DECREF(obj);
39635 return result;
39636}
39637#endif
39638
39639/* CIntToPy */
39640static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
39641#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39642#pragma GCC diagnostic push
39643#pragma GCC diagnostic ignored "-Wconversion"
39644#endif
39645 const int neg_one = (int) -1, const_zero = (int) 0;
39646#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39647#pragma GCC diagnostic pop
39648#endif
39649 const int is_unsigned = neg_one > const_zero;
39650 if (is_unsigned) {
39651 if (sizeof(int) < sizeof(long)) {
39652 return PyLong_FromLong((long) value);
39653 } else if (sizeof(int) <= sizeof(unsigned long)) {
39654 return PyLong_FromUnsignedLong((unsigned long) value);
39655#if !CYTHON_COMPILING_IN_PYPY
39656 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
39657 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
39658#endif
39659 }
39660 } else {
39661 if (sizeof(int) <= sizeof(long)) {
39662 return PyLong_FromLong((long) value);
39663 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
39664 return PyLong_FromLongLong((PY_LONG_LONG) value);
39665 }
39666 }
39667 {
39668 unsigned char *bytes = (unsigned char *)&value;
39669#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
39670 if (is_unsigned) {
39671 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
39672 } else {
39673 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
39674 }
39675#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
39676 int one = 1; int little = (int)*(unsigned char *)&one;
39677 return _PyLong_FromByteArray(bytes, sizeof(int),
39678 little, !is_unsigned);
39679#else
39680 int one = 1; int little = (int)*(unsigned char *)&one;
39681 PyObject *result = NULL, *kwds = NULL;
39682 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
39683 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
39684 if (!py_bytes) goto limited_bad;
39685 from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10);
39686 if (!from_bytes_str) goto limited_bad;
39687 order_str = PyUnicode_FromString(little ? "little" : "big");
39688 if (!order_str) goto limited_bad;
39689 {
39690 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
39691 if (!is_unsigned) {
39692 PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6);
39693 if (!signed_str) goto limited_bad;
39694#if CYTHON_VECTORCALL
39695 kwds = PyTuple_Pack(1, signed_str);
39696#else
39697 {
39698 PyObject *keys[] = {signed_str};
39699 PyObject *values[] = {Py_True};
39700 kwds = __Pyx_MakeKwargDict(keys, values, 1);
39701 }
39702#endif
39703 Py_DECREF(signed_str);
39704 if (unlikely(!kwds)) goto limited_bad;
39705 }
39706 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
39707 }
39708 limited_bad:
39709 Py_XDECREF(kwds);
39710 Py_XDECREF(order_str);
39711 Py_XDECREF(py_bytes);
39712 Py_XDECREF(from_bytes_str);
39713 return result;
39714#endif
39715 }
39716}
39717
39718/* CIntFromPy */
39719static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x);
39720static int __Pyx_raise_neg_overflow___Pyx_PyLong_As_int(void) {
39721 const char* type_name = "int";
39722 PyErr_Format(PyExc_OverflowError,
39723 "can't convert negative value to %.200s", type_name);
39724 return (int) -1;
39725}
39726static int __Pyx_raise_overflow___Pyx_PyLong_As_int(void) {
39727 const char* type_name = "int";
39728 PyErr_Format(PyExc_OverflowError,
39729 "value too large to convert to %.200s", type_name);
39730 return (int) -1;
39731}
39732static CYTHON_INLINE int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
39733 const int is_unsigned = 1;
39734#if CYTHON_USE_PYLONG_INTERNALS
39735 {
39736 const digit* digits = __Pyx_PyLong_Digits(x);
39737 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
39738 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
39739 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
39740 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39741 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
39742 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39743 }
39744 } else
39745 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
39746 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
39747 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39748 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
39749 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39750 }
39751 } else
39752 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
39753 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
39754 __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])))
39755 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
39756 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39757 }
39758 } else
39759 {}
39760 }
39761#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
39762 if (unlikely(Py_SIZE(x) < 0)) {
39763 goto raise_neg_overflow;
39764 }
39765#else
39766 {
39767 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39768 if (unlikely(result < 0))
39769 return (int) -1;
39770 if (unlikely(result == 1))
39771 goto raise_neg_overflow;
39772 }
39773#endif
39774 if ((sizeof(int) <= sizeof(unsigned long))) {
39775 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
39776 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
39777 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39778 }
39779 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
39780raise_neg_overflow:
39781 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
39782raise_overflow:
39783 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
39784}
39785static CYTHON_INLINE int __Pyx_PySLong___Pyx_PyLong_As_int(PyObject *x) {
39786 const int is_unsigned = 0;
39787#if CYTHON_USE_PYLONG_INTERNALS
39788 if (__Pyx_PyLong_IsNeg(x)) {
39789 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
39790 const digit* digits = __Pyx_PyLong_Digits(x);
39791 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
39792 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
39793 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39794 __PYX_VERIFY_RETURN_INT(int, long, ival)
39795 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
39796 return (int) (((int) -1) * (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39797 }
39798 } else
39799 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
39800 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
39801 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39802 __PYX_VERIFY_RETURN_INT(int, long, ival)
39803 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
39804 return (int) (((int) -1) * (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39805 }
39806 } else
39807 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
39808 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
39809 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]));
39810 __PYX_VERIFY_RETURN_INT(int, long, ival)
39811 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
39812 return (int) (((int) -1) * (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39813 }
39814 } else
39815 {}
39816 } else {
39817 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
39818 const digit* digits = __Pyx_PyLong_Digits(x);
39819 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
39820 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
39821 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39822 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
39823 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39824 }
39825 } else
39826 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
39827 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
39828 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39829 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
39830 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39831 }
39832 } else
39833 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
39834 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
39835 __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])))
39836 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
39837 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39838 }
39839 } else
39840 {}
39841 }
39842#endif
39843 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
39844 if ((sizeof(int) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
39845 __PYX_VERIFY_RETURN_INT_EXC(int, int, PyLong_AsInt(x))
39846 } else
39847 #endif
39848 if ((sizeof(int) <= sizeof(long))) {
39849 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
39850 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
39851 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
39852 }
39853 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
39854raise_neg_overflow:
39855 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
39856raise_overflow:
39857 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
39858}
39859static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x) {
39860#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39861#pragma GCC diagnostic push
39862#pragma GCC diagnostic ignored "-Wconversion"
39863#endif
39864 const int neg_one = (int) -1, const_zero = (int) 0;
39865#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39866#pragma GCC diagnostic pop
39867#endif
39868 const int is_unsigned = neg_one > const_zero;
39869 int val;
39870 int ret = -1;
39871#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
39872 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
39873 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
39874 if (unlikely(bytes_copied == -1)) {
39875 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
39876 goto raise_overflow;
39877 } else {
39878 ret = 0;
39879 }
39880#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
39881 int one = 1; int is_little = (int)*(unsigned char *)&one;
39882 unsigned char *bytes = (unsigned char *)&val;
39883 ret = _PyLong_AsByteArray((PyLongObject *)x,
39884 bytes, sizeof(val),
39885 is_little, !is_unsigned);
39886 if ((0)) goto raise_overflow;
39887#else
39888 PyObject *v;
39889 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
39890 int bits, remaining_bits, is_negative = 0;
39891 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
39892 if (likely(PyLong_CheckExact(x))) {
39893 v = __Pyx_NewRef(x);
39894 } else {
39895 v = PyNumber_Long(x);
39896 if (unlikely(!v)) return (int) -1;
39897 assert(PyLong_CheckExact(v));
39898 }
39899 {
39900 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
39901 if (unlikely(result < 0)) {
39902 Py_DECREF(v);
39903 return (int) -1;
39904 }
39905 is_negative = result == 1;
39906 }
39907 if (is_unsigned && unlikely(is_negative)) {
39908 Py_DECREF(v);
39909 PyErr_SetString(PyExc_OverflowError,
39910 "can't convert negative value to int");
39911 return (int) -1;
39912 } else if (is_negative) {
39913 stepval = PyNumber_Invert(v);
39914 Py_DECREF(v);
39915 if (unlikely(!stepval))
39916 return (int) -1;
39917 } else {
39918 stepval = v;
39919 }
39920 v = NULL;
39921 val = (int) 0;
39922 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
39923 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
39924 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
39925 PyObject *tmp, *digit;
39926 long idigit;
39927 digit = PyNumber_And(stepval, mask);
39928 if (unlikely(!digit)) goto done;
39929 idigit = PyLong_AsLong(digit);
39930 Py_DECREF(digit);
39931 if (unlikely(idigit < 0)) goto done;
39932 val |= ((int) idigit) << bits;
39933 tmp = PyNumber_Rshift(stepval, shift);
39934 if (unlikely(!tmp)) goto done;
39935 Py_DECREF(stepval); stepval = tmp;
39936 }
39937 Py_DECREF(shift); shift = NULL;
39938 Py_DECREF(mask); mask = NULL;
39939 {
39940 long idigit = PyLong_AsLong(stepval);
39941 if (unlikely(idigit < 0)) goto done;
39942 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
39943 if (unlikely(idigit >= (1L << remaining_bits)))
39944 goto raise_overflow;
39945 val |= ((int) idigit) << bits;
39946 }
39947 if (!is_unsigned) {
39948 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
39949 goto raise_overflow;
39950 if (is_negative)
39951 val = ~val;
39952 }
39953 ret = 0;
39954done:
39955 Py_XDECREF(shift);
39956 Py_XDECREF(mask);
39957 Py_XDECREF(stepval);
39958#endif
39959 if (unlikely(ret))
39960 return (int) -1;
39961 return val;
39962raise_overflow:
39963 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
39964}
39965static CYTHON_INLINE int __Pyx_PyLong___Pyx_PyLong_As_int(PyObject *x) {
39966#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39967#pragma GCC diagnostic push
39968#pragma GCC diagnostic ignored "-Wconversion"
39969#endif
39970 const int neg_one = (int) -1, const_zero = (int) 0;
39971#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39972#pragma GCC diagnostic pop
39973#endif
39974 const int is_unsigned = neg_one > const_zero;
39975 if (is_unsigned) {
39976 #if CYTHON_USE_PYLONG_INTERNALS
39977 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
39978 goto raise_neg_overflow;
39979 } else if (__Pyx_PyLong_IsCompact(x)) {
39980 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
39981 } else
39982 #endif
39983 {
39984 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
39985 }
39986 } else {
39987 #if CYTHON_USE_PYLONG_INTERNALS
39988 if (__Pyx_PyLong_IsCompact(x)) {
39989 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
39990 } else
39991 #endif
39992 {
39993 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
39994 }
39995 }
39996#if CYTHON_USE_PYLONG_INTERNALS
39997raise_neg_overflow:
39998 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
39999raise_overflow:
40000 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
40001#endif
40002}
40003static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
40004 int val;
40005 PyObject *tmp = __Pyx_PyNumber_Long(x);
40006 if (!tmp) return (int) -1;
40007 val = __Pyx_PyLong_As_int(tmp);
40008 Py_DECREF(tmp);
40009 return val;
40010}
40011static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
40012 if (likely(PyLong_Check(x))) {
40013 return __Pyx_PyLong___Pyx_PyLong_As_int(x);
40014 } else {
40015 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
40016 }
40017}
40018
40019/* CIntFromPy */
40020static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x);
40021static long __Pyx_raise_neg_overflow___Pyx_PyLong_As_long(void) {
40022 const char* type_name = "long";
40023 PyErr_Format(PyExc_OverflowError,
40024 "can't convert negative value to %.200s", type_name);
40025 return (long) -1;
40026}
40027static long __Pyx_raise_overflow___Pyx_PyLong_As_long(void) {
40028 const char* type_name = "long";
40029 PyErr_Format(PyExc_OverflowError,
40030 "value too large to convert to %.200s", type_name);
40031 return (long) -1;
40032}
40033static CYTHON_INLINE long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
40034 const int is_unsigned = 1;
40035#if CYTHON_USE_PYLONG_INTERNALS
40036 {
40037 const digit* digits = __Pyx_PyLong_Digits(x);
40038 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
40039 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
40040 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40041 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40042 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
40043 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40044 }
40045 } else
40046 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40047 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40048 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40049 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
40050 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40051 }
40052 } else
40053 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40054 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40055 __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])))
40056 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
40057 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40058 }
40059 } else
40060 {}
40061 }
40062#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40063 if (unlikely(Py_SIZE(x) < 0)) {
40064 goto raise_neg_overflow;
40065 }
40066#else
40067 {
40068 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40069 if (unlikely(result < 0))
40070 return (long) -1;
40071 if (unlikely(result == 1))
40072 goto raise_neg_overflow;
40073 }
40074#endif
40075 if ((sizeof(long) <= sizeof(unsigned long))) {
40076 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
40077 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
40078 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40079 }
40080 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
40081raise_neg_overflow:
40082 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
40083raise_overflow:
40084 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
40085}
40086static CYTHON_INLINE long __Pyx_PySLong___Pyx_PyLong_As_long(PyObject *x) {
40087 const int is_unsigned = 0;
40088#if CYTHON_USE_PYLONG_INTERNALS
40089 if (__Pyx_PyLong_IsNeg(x)) {
40090 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
40091 const digit* digits = __Pyx_PyLong_Digits(x);
40092 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
40093 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40094 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
40095 __PYX_VERIFY_RETURN_INT(long, long, ival)
40096 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
40097 return (long) (((long) -1) * (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40098 }
40099 } else
40100 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40101 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40102 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
40103 __PYX_VERIFY_RETURN_INT(long, long, ival)
40104 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
40105 return (long) (((long) -1) * (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40106 }
40107 } else
40108 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40109 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
40110 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]));
40111 __PYX_VERIFY_RETURN_INT(long, long, ival)
40112 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
40113 return (long) (((long) -1) * (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40114 }
40115 } else
40116 {}
40117 } else {
40118 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
40119 const digit* digits = __Pyx_PyLong_Digits(x);
40120 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
40121 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40122 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40123 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
40124 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40125 }
40126 } else
40127 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40128 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40129 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40130 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
40131 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40132 }
40133 } else
40134 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40135 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
40136 __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])))
40137 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
40138 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40139 }
40140 } else
40141 {}
40142 }
40143#endif
40144 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
40145 if ((sizeof(long) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
40146 __PYX_VERIFY_RETURN_INT_EXC(long, int, PyLong_AsInt(x))
40147 } else
40148 #endif
40149 if ((sizeof(long) <= sizeof(long))) {
40150 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
40151 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
40152 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
40153 }
40154 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
40155raise_neg_overflow:
40156 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
40157raise_overflow:
40158 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
40159}
40160static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x) {
40161#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40162#pragma GCC diagnostic push
40163#pragma GCC diagnostic ignored "-Wconversion"
40164#endif
40165 const long neg_one = (long) -1, const_zero = (long) 0;
40166#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40167#pragma GCC diagnostic pop
40168#endif
40169 const int is_unsigned = neg_one > const_zero;
40170 long val;
40171 int ret = -1;
40172#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
40173 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
40174 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
40175 if (unlikely(bytes_copied == -1)) {
40176 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
40177 goto raise_overflow;
40178 } else {
40179 ret = 0;
40180 }
40181#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
40182 int one = 1; int is_little = (int)*(unsigned char *)&one;
40183 unsigned char *bytes = (unsigned char *)&val;
40184 ret = _PyLong_AsByteArray((PyLongObject *)x,
40185 bytes, sizeof(val),
40186 is_little, !is_unsigned);
40187 if ((0)) goto raise_overflow;
40188#else
40189 PyObject *v;
40190 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
40191 int bits, remaining_bits, is_negative = 0;
40192 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
40193 if (likely(PyLong_CheckExact(x))) {
40194 v = __Pyx_NewRef(x);
40195 } else {
40196 v = PyNumber_Long(x);
40197 if (unlikely(!v)) return (long) -1;
40198 assert(PyLong_CheckExact(v));
40199 }
40200 {
40201 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
40202 if (unlikely(result < 0)) {
40203 Py_DECREF(v);
40204 return (long) -1;
40205 }
40206 is_negative = result == 1;
40207 }
40208 if (is_unsigned && unlikely(is_negative)) {
40209 Py_DECREF(v);
40210 PyErr_SetString(PyExc_OverflowError,
40211 "can't convert negative value to long");
40212 return (long) -1;
40213 } else if (is_negative) {
40214 stepval = PyNumber_Invert(v);
40215 Py_DECREF(v);
40216 if (unlikely(!stepval))
40217 return (long) -1;
40218 } else {
40219 stepval = v;
40220 }
40221 v = NULL;
40222 val = (long) 0;
40223 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
40224 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
40225 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
40226 PyObject *tmp, *digit;
40227 long idigit;
40228 digit = PyNumber_And(stepval, mask);
40229 if (unlikely(!digit)) goto done;
40230 idigit = PyLong_AsLong(digit);
40231 Py_DECREF(digit);
40232 if (unlikely(idigit < 0)) goto done;
40233 val |= ((long) idigit) << bits;
40234 tmp = PyNumber_Rshift(stepval, shift);
40235 if (unlikely(!tmp)) goto done;
40236 Py_DECREF(stepval); stepval = tmp;
40237 }
40238 Py_DECREF(shift); shift = NULL;
40239 Py_DECREF(mask); mask = NULL;
40240 {
40241 long idigit = PyLong_AsLong(stepval);
40242 if (unlikely(idigit < 0)) goto done;
40243 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
40244 if (unlikely(idigit >= (1L << remaining_bits)))
40245 goto raise_overflow;
40246 val |= ((long) idigit) << bits;
40247 }
40248 if (!is_unsigned) {
40249 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
40250 goto raise_overflow;
40251 if (is_negative)
40252 val = ~val;
40253 }
40254 ret = 0;
40255done:
40256 Py_XDECREF(shift);
40257 Py_XDECREF(mask);
40258 Py_XDECREF(stepval);
40259#endif
40260 if (unlikely(ret))
40261 return (long) -1;
40262 return val;
40263raise_overflow:
40264 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
40265}
40266static CYTHON_INLINE long __Pyx_PyLong___Pyx_PyLong_As_long(PyObject *x) {
40267#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40268#pragma GCC diagnostic push
40269#pragma GCC diagnostic ignored "-Wconversion"
40270#endif
40271 const long neg_one = (long) -1, const_zero = (long) 0;
40272#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40273#pragma GCC diagnostic pop
40274#endif
40275 const int is_unsigned = neg_one > const_zero;
40276 if (is_unsigned) {
40277 #if CYTHON_USE_PYLONG_INTERNALS
40278 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
40279 goto raise_neg_overflow;
40280 } else if (__Pyx_PyLong_IsCompact(x)) {
40281 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
40282 } else
40283 #endif
40284 {
40285 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
40286 }
40287 } else {
40288 #if CYTHON_USE_PYLONG_INTERNALS
40289 if (__Pyx_PyLong_IsCompact(x)) {
40290 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
40291 } else
40292 #endif
40293 {
40294 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
40295 }
40296 }
40297#if CYTHON_USE_PYLONG_INTERNALS
40298raise_neg_overflow:
40299 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
40300raise_overflow:
40301 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
40302#endif
40303}
40304static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
40305 long val;
40306 PyObject *tmp = __Pyx_PyNumber_Long(x);
40307 if (!tmp) return (long) -1;
40308 val = __Pyx_PyLong_As_long(tmp);
40309 Py_DECREF(tmp);
40310 return val;
40311}
40312static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
40313 if (likely(PyLong_Check(x))) {
40314 return __Pyx_PyLong___Pyx_PyLong_As_long(x);
40315 } else {
40316 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
40317 }
40318}
40319
40320/* CIntToPy */
40321static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
40322#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40323#pragma GCC diagnostic push
40324#pragma GCC diagnostic ignored "-Wconversion"
40325#endif
40326 const long neg_one = (long) -1, const_zero = (long) 0;
40327#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40328#pragma GCC diagnostic pop
40329#endif
40330 const int is_unsigned = neg_one > const_zero;
40331 if (is_unsigned) {
40332 if (sizeof(long) < sizeof(long)) {
40333 return PyLong_FromLong((long) value);
40334 } else if (sizeof(long) <= sizeof(unsigned long)) {
40335 return PyLong_FromUnsignedLong((unsigned long) value);
40336#if !CYTHON_COMPILING_IN_PYPY
40337 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40338 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40339#endif
40340 }
40341 } else {
40342 if (sizeof(long) <= sizeof(long)) {
40343 return PyLong_FromLong((long) value);
40344 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40345 return PyLong_FromLongLong((PY_LONG_LONG) value);
40346 }
40347 }
40348 {
40349 unsigned char *bytes = (unsigned char *)&value;
40350#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
40351 if (is_unsigned) {
40352 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
40353 } else {
40354 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
40355 }
40356#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
40357 int one = 1; int little = (int)*(unsigned char *)&one;
40358 return _PyLong_FromByteArray(bytes, sizeof(long),
40359 little, !is_unsigned);
40360#else
40361 int one = 1; int little = (int)*(unsigned char *)&one;
40362 PyObject *result = NULL, *kwds = NULL;
40363 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
40364 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
40365 if (!py_bytes) goto limited_bad;
40366 from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10);
40367 if (!from_bytes_str) goto limited_bad;
40368 order_str = PyUnicode_FromString(little ? "little" : "big");
40369 if (!order_str) goto limited_bad;
40370 {
40371 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
40372 if (!is_unsigned) {
40373 PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6);
40374 if (!signed_str) goto limited_bad;
40375#if CYTHON_VECTORCALL
40376 kwds = PyTuple_Pack(1, signed_str);
40377#else
40378 {
40379 PyObject *keys[] = {signed_str};
40380 PyObject *values[] = {Py_True};
40381 kwds = __Pyx_MakeKwargDict(keys, values, 1);
40382 }
40383#endif
40384 Py_DECREF(signed_str);
40385 if (unlikely(!kwds)) goto limited_bad;
40386 }
40387 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
40388 }
40389 limited_bad:
40390 Py_XDECREF(kwds);
40391 Py_XDECREF(order_str);
40392 Py_XDECREF(py_bytes);
40393 Py_XDECREF(from_bytes_str);
40394 return result;
40395#endif
40396 }
40397}
40398
40399/* UpdateUnpickledDict */
40400static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
40401 PyObject *state_dict = __Pyx_PySequence_ITEM(state, index);
40402 if (unlikely(!state_dict)) {
40403 return -1;
40404 }
40405 int non_empty = PyObject_IsTrue(state_dict);
40406 if (non_empty == 0) {
40407 Py_DECREF(state_dict);
40408 return 0;
40409 } else if (unlikely(non_empty == -1)) {
40410 return -1;
40411 }
40412 PyObject *dict;
40413 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
40414 dict = PyObject_GetAttrString(obj, "__dict__");
40415 #else
40416 dict = PyObject_GenericGetDict(obj, NULL);
40417 #endif
40418 if (unlikely(!dict)) {
40419 Py_DECREF(state_dict);
40420 return -1;
40421 }
40422 int result;
40423 if (likely(PyDict_CheckExact(dict))) {
40424 result = PyDict_Update(dict, state_dict);
40425 } else {
40426 PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict);
40427 if (likely(obj_result)) {
40428 Py_DECREF(obj_result);
40429 result = 0;
40430 } else {
40431 result = -1;
40432 }
40433 }
40434 Py_DECREF(state_dict);
40435 Py_DECREF(dict);
40436 return result;
40437}
40438static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
40439 Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state);
40440 #if !CYTHON_ASSUME_SAFE_SIZE
40441 if (unlikely(state_size == -1)) return -1;
40442 #endif
40443 if (state_size <= index) {
40444 return 0;
40445 }
40446 return __Pyx__UpdateUnpickledDict(obj, state, index);
40447}
40448
40449/* CheckUnpickleChecksum */
40450static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
40451 int found = 0;
40452 found |= checksum1 == checksum;
40453 found |= checksum2 == checksum;
40454 found |= checksum3 == checksum;
40455 if (likely(found))
40456 return 0;
40457 __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members);
40458 return -1;
40459}
40460
40461/* CIntFromPy */
40462static char __Pyx_LargePyLong___Pyx_PyLong_As_char(PyObject *x);
40463static char __Pyx_raise_neg_overflow___Pyx_PyLong_As_char(void) {
40464 const char* type_name = "char";
40465 PyErr_Format(PyExc_OverflowError,
40466 "can't convert negative value to %.200s", type_name);
40467 return (char) -1;
40468}
40469static char __Pyx_raise_overflow___Pyx_PyLong_As_char(void) {
40470 const char* type_name = "char";
40471 PyErr_Format(PyExc_OverflowError,
40472 "value too large to convert to %.200s", type_name);
40473 return (char) -1;
40474}
40475static CYTHON_INLINE char __Pyx_PyULong___Pyx_PyLong_As_char(PyObject *x) {
40476 const int is_unsigned = 1;
40477#if CYTHON_USE_PYLONG_INTERNALS
40478 {
40479 const digit* digits = __Pyx_PyLong_Digits(x);
40480 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
40481 if (size == 2 && (8 * sizeof(char) > 1 * PyLong_SHIFT)) {
40482 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40483 __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40484 } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
40485 return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40486 }
40487 } else
40488 if (size == 3 && (8 * sizeof(char) > 2 * PyLong_SHIFT)) {
40489 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40490 __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40491 } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
40492 return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40493 }
40494 } else
40495 if (size == 4 && (8 * sizeof(char) > 3 * PyLong_SHIFT)) {
40496 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40497 __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40498 } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
40499 return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40500 }
40501 } else
40502 {}
40503 }
40504#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40505 if (unlikely(Py_SIZE(x) < 0)) {
40506 goto raise_neg_overflow;
40507 }
40508#else
40509 {
40510 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40511 if (unlikely(result < 0))
40512 return (char) -1;
40513 if (unlikely(result == 1))
40514 goto raise_neg_overflow;
40515 }
40516#endif
40517 if ((sizeof(char) <= sizeof(unsigned long))) {
40518 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
40519 } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
40520 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40521 }
40522 return __Pyx_LargePyLong___Pyx_PyLong_As_char(x);
40523raise_neg_overflow:
40524 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_char();
40525raise_overflow:
40526 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
40527}
40528static CYTHON_INLINE char __Pyx_PySLong___Pyx_PyLong_As_char(PyObject *x) {
40529 const int is_unsigned = 0;
40530#if CYTHON_USE_PYLONG_INTERNALS
40531 if (__Pyx_PyLong_IsNeg(x)) {
40532 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
40533 const digit* digits = __Pyx_PyLong_Digits(x);
40534 if (size == 2 && (8 * sizeof(char) > 1 * PyLong_SHIFT)) {
40535 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40536 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
40537 __PYX_VERIFY_RETURN_INT(char, long, ival)
40538 } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
40539 return (char) (((char) -1) * (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40540 }
40541 } else
40542 if (size == 3 && (8 * sizeof(char) > 2 * PyLong_SHIFT)) {
40543 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40544 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
40545 __PYX_VERIFY_RETURN_INT(char, long, ival)
40546 } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
40547 return (char) (((char) -1) * (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40548 }
40549 } else
40550 if (size == 4 && (8 * sizeof(char) > 3 * PyLong_SHIFT)) {
40551 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
40552 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]));
40553 __PYX_VERIFY_RETURN_INT(char, long, ival)
40554 } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
40555 return (char) (((char) -1) * (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40556 }
40557 } else
40558 {}
40559 } else {
40560 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
40561 const digit* digits = __Pyx_PyLong_Digits(x);
40562 if (size == 2 && (8 * sizeof(char) > 1 * PyLong_SHIFT)) {
40563 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
40564 __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40565 } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
40566 return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40567 }
40568 } else
40569 if (size == 3 && (8 * sizeof(char) > 2 * PyLong_SHIFT)) {
40570 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
40571 __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40572 } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
40573 return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40574 }
40575 } else
40576 if (size == 4 && (8 * sizeof(char) > 3 * PyLong_SHIFT)) {
40577 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
40578 __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40579 } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
40580 return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40581 }
40582 } else
40583 {}
40584 }
40585#endif
40586 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
40587 if ((sizeof(char) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
40588 __PYX_VERIFY_RETURN_INT_EXC(char, int, PyLong_AsInt(x))
40589 } else
40590 #endif
40591 if ((sizeof(char) <= sizeof(long))) {
40592 __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
40593 } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
40594 __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
40595 }
40596 return __Pyx_LargePyLong___Pyx_PyLong_As_char(x);
40597raise_neg_overflow:
40598 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_char();
40599raise_overflow:
40600 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
40601}
40602static char __Pyx_LargePyLong___Pyx_PyLong_As_char(PyObject *x) {
40603#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40604#pragma GCC diagnostic push
40605#pragma GCC diagnostic ignored "-Wconversion"
40606#endif
40607 const char neg_one = (char) -1, const_zero = (char) 0;
40608#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40609#pragma GCC diagnostic pop
40610#endif
40611 const int is_unsigned = neg_one > const_zero;
40612 char val;
40613 int ret = -1;
40614#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
40615 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
40616 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
40617 if (unlikely(bytes_copied == -1)) {
40618 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
40619 goto raise_overflow;
40620 } else {
40621 ret = 0;
40622 }
40623#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
40624 int one = 1; int is_little = (int)*(unsigned char *)&one;
40625 unsigned char *bytes = (unsigned char *)&val;
40626 ret = _PyLong_AsByteArray((PyLongObject *)x,
40627 bytes, sizeof(val),
40628 is_little, !is_unsigned);
40629 if ((0)) goto raise_overflow;
40630#else
40631 PyObject *v;
40632 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
40633 int bits, remaining_bits, is_negative = 0;
40634 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
40635 if (likely(PyLong_CheckExact(x))) {
40636 v = __Pyx_NewRef(x);
40637 } else {
40638 v = PyNumber_Long(x);
40639 if (unlikely(!v)) return (char) -1;
40640 assert(PyLong_CheckExact(v));
40641 }
40642 {
40643 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
40644 if (unlikely(result < 0)) {
40645 Py_DECREF(v);
40646 return (char) -1;
40647 }
40648 is_negative = result == 1;
40649 }
40650 if (is_unsigned && unlikely(is_negative)) {
40651 Py_DECREF(v);
40652 PyErr_SetString(PyExc_OverflowError,
40653 "can't convert negative value to char");
40654 return (char) -1;
40655 } else if (is_negative) {
40656 stepval = PyNumber_Invert(v);
40657 Py_DECREF(v);
40658 if (unlikely(!stepval))
40659 return (char) -1;
40660 } else {
40661 stepval = v;
40662 }
40663 v = NULL;
40664 val = (char) 0;
40665 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
40666 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
40667 for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
40668 PyObject *tmp, *digit;
40669 long idigit;
40670 digit = PyNumber_And(stepval, mask);
40671 if (unlikely(!digit)) goto done;
40672 idigit = PyLong_AsLong(digit);
40673 Py_DECREF(digit);
40674 if (unlikely(idigit < 0)) goto done;
40675 val |= ((char) idigit) << bits;
40676 tmp = PyNumber_Rshift(stepval, shift);
40677 if (unlikely(!tmp)) goto done;
40678 Py_DECREF(stepval); stepval = tmp;
40679 }
40680 Py_DECREF(shift); shift = NULL;
40681 Py_DECREF(mask); mask = NULL;
40682 {
40683 long idigit = PyLong_AsLong(stepval);
40684 if (unlikely(idigit < 0)) goto done;
40685 remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
40686 if (unlikely(idigit >= (1L << remaining_bits)))
40687 goto raise_overflow;
40688 val |= ((char) idigit) << bits;
40689 }
40690 if (!is_unsigned) {
40691 if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
40692 goto raise_overflow;
40693 if (is_negative)
40694 val = ~val;
40695 }
40696 ret = 0;
40697done:
40698 Py_XDECREF(shift);
40699 Py_XDECREF(mask);
40700 Py_XDECREF(stepval);
40701#endif
40702 if (unlikely(ret))
40703 return (char) -1;
40704 return val;
40705raise_overflow:
40706 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
40707}
40708static CYTHON_INLINE char __Pyx_PyLong___Pyx_PyLong_As_char(PyObject *x) {
40709#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40710#pragma GCC diagnostic push
40711#pragma GCC diagnostic ignored "-Wconversion"
40712#endif
40713 const char neg_one = (char) -1, const_zero = (char) 0;
40714#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40715#pragma GCC diagnostic pop
40716#endif
40717 const int is_unsigned = neg_one > const_zero;
40718 if (is_unsigned) {
40719 #if CYTHON_USE_PYLONG_INTERNALS
40720 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
40721 goto raise_neg_overflow;
40722 } else if (__Pyx_PyLong_IsCompact(x)) {
40723 __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
40724 } else
40725 #endif
40726 {
40727 return __Pyx_PyULong___Pyx_PyLong_As_char(x);
40728 }
40729 } else {
40730 #if CYTHON_USE_PYLONG_INTERNALS
40731 if (__Pyx_PyLong_IsCompact(x)) {
40732 __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
40733 } else
40734 #endif
40735 {
40736 return __Pyx_PySLong___Pyx_PyLong_As_char(x);
40737 }
40738 }
40739#if CYTHON_USE_PYLONG_INTERNALS
40740raise_neg_overflow:
40741 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_char();
40742raise_overflow:
40743 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
40744#endif
40745}
40746static char __Pyx_NonPyLong___Pyx_PyLong_As_char(PyObject *x) {
40747 char val;
40748 PyObject *tmp = __Pyx_PyNumber_Long(x);
40749 if (!tmp) return (char) -1;
40750 val = __Pyx_PyLong_As_char(tmp);
40751 Py_DECREF(tmp);
40752 return val;
40753}
40754static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *x) {
40755 if (likely(PyLong_Check(x))) {
40756 return __Pyx_PyLong___Pyx_PyLong_As_char(x);
40757 } else {
40758 return __Pyx_NonPyLong___Pyx_PyLong_As_char(x);
40759 }
40760}
40761
40762/* GetRuntimeVersion */
40763#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
40764void __Pyx_init_runtime_version(void) {
40765 if (__Pyx_cached_runtime_version == 0) {
40766 const char* rt_version = Py_GetVersion();
40767 unsigned long version = 0;
40768 unsigned long factor = 0x01000000UL;
40769 unsigned int digit = 0;
40770 int i = 0;
40771 while (factor) {
40772 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
40773 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
40774 ++i;
40775 }
40776 version += factor * digit;
40777 if (rt_version[i] != '.')
40778 break;
40779 digit = 0;
40780 factor >>= 8;
40781 ++i;
40782 }
40783 __Pyx_cached_runtime_version = version;
40784 }
40785}
40786#endif
40787static unsigned long __Pyx_get_runtime_version(void) {
40788#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
40789 return Py_Version & ~0xFFUL;
40790#else
40791 return __Pyx_cached_runtime_version;
40792#endif
40793}
40794
40795/* CheckBinaryVersion */
40796static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
40797 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
40798 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
40799 return 0;
40800 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
40801 return 1;
40802 {
40803 char message[200];
40804 PyOS_snprintf(message, sizeof(message),
40805 "compile time Python version %d.%d "
40806 "of module '%.100s' "
40807 "%s "
40808 "runtime version %d.%d",
40809 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
40810 __Pyx_MODULE_NAME,
40811 (allow_newer) ? "was newer than" : "does not match",
40812 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
40813 );
40814 return PyErr_WarnEx(NULL, message, 1);
40815 }
40816}
40817
40818/* NewCodeObj */
40819#if CYTHON_COMPILING_IN_LIMITED_API
40820 static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
40821 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
40822 PyObject *fv, PyObject *cell, PyObject* fn,
40823 PyObject *name, int fline, PyObject *lnos) {
40824 PyObject *exception_table = NULL;
40825 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
40826 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
40827 PyObject *version_info;
40828 PyObject *py_minor_version = NULL;
40829 #endif
40830 long minor_version = 0;
40831 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
40832 minor_version = 11;
40833 #else
40834 if (!(version_info = PySys_GetObject("version_info"))) goto end;
40835 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
40836 minor_version = PyLong_AsLong(py_minor_version);
40837 Py_DECREF(py_minor_version);
40838 if (minor_version == -1 && PyErr_Occurred()) goto end;
40839 #endif
40840 if (!(types_module = PyImport_ImportModule("types"))) goto end;
40841 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
40842 if (minor_version <= 10) {
40843 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
40844 c, n, v, fn, name, fline, lnos, fv, cell);
40845 } else {
40846 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
40847 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
40848 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
40849 }
40850 end:
40851 Py_XDECREF(code_type);
40852 Py_XDECREF(exception_table);
40853 Py_XDECREF(types_module);
40854 if (!result) {
40855 PyObject *exc_type, *exc_value, *exc_tb;
40856 PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
40857 if (PyErr_WarnFormat(
40858 PyExc_RuntimeWarning, 1,
40859 "Code object creation failed in Cython module: %S\nTry recompiling with a more recent version of Cython.",
40860 exc_value ? exc_value : exc_type) == 0) {
40861 result = Py_None;
40862 Py_INCREF(result);
40863 }
40864 Py_DECREF(exc_type);
40865 Py_XDECREF(exc_value);
40866 Py_XDECREF(exc_tb);
40867 }
40868 return result;
40869 }
40870#elif PY_VERSION_HEX >= 0x030B0000
40871 static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
40872 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
40873 PyObject *fv, PyObject *cell, PyObject* fn,
40874 PyObject *name, int fline, PyObject *lnos) {
40875 PyCodeObject *result;
40876 result =
40877 #if PY_VERSION_HEX >= 0x030C0000
40878 PyUnstable_Code_NewWithPosOnlyArgs
40879 #else
40880 PyCode_NewWithPosOnlyArgs
40881 #endif
40882 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
40883 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
40884 if (likely(result))
40885 result->_co_firsttraceable = 0;
40886 #endif
40887 return result;
40888 }
40889#elif !CYTHON_COMPILING_IN_PYPY
40890 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
40891 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
40892#else
40893 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
40894 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
40895#endif
40896static PyObject* __Pyx_PyCode_New(
40897 const __Pyx_PyCode_New_function_description descr,
40898 PyObject * const *varnames,
40899 PyObject *filename,
40900 PyObject *funcname,
40901 PyObject *line_table,
40902 PyObject *tuple_dedup_map
40903) {
40904 PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
40905 Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
40906 PyObject *varnames_tuple = PyTuple_New(var_count);
40907 if (unlikely(!varnames_tuple)) return NULL;
40908 for (Py_ssize_t i=0; i < var_count; i++) {
40909 Py_INCREF(varnames[i]);
40910 if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
40911 }
40912 #if CYTHON_COMPILING_IN_LIMITED_API
40913 varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
40914 if (!varnames_tuple_dedup) {
40915 if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
40916 varnames_tuple_dedup = varnames_tuple;
40917 }
40918 #else
40919 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
40920 if (unlikely(!varnames_tuple_dedup)) goto done;
40921 #endif
40922 #if CYTHON_AVOID_BORROWED_REFS
40923 Py_INCREF(varnames_tuple_dedup);
40924 #endif
40925 if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
40926 Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
40927 #if !CYTHON_ASSUME_SAFE_SIZE
40928 if (unlikely(line_table_length == -1)) goto done;
40929 #endif
40930 Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
40931 code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
40932 if (unlikely(!code_bytes)) goto done;
40933 char* c_code_bytes = PyBytes_AsString(code_bytes);
40934 if (unlikely(!c_code_bytes)) goto done;
40935 memset(c_code_bytes, 0, (size_t) code_len);
40936 }
40937 code_obj = (PyObject*) __Pyx__PyCode_New(
40938 (int) descr.argcount,
40939 (int) descr.num_posonly_args,
40940 (int) descr.num_kwonly_args,
40941 (int) descr.nlocals,
40942 0,
40943 (int) descr.flags,
40944 code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
40945 __pyx_mstate_global->__pyx_empty_tuple,
40946 __pyx_mstate_global->__pyx_empty_tuple,
40947 varnames_tuple_dedup,
40948 __pyx_mstate_global->__pyx_empty_tuple,
40949 __pyx_mstate_global->__pyx_empty_tuple,
40950 filename,
40951 funcname,
40952 (int) descr.first_line,
40953 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
40954 );
40955done:
40956 Py_XDECREF(code_bytes);
40957 #if CYTHON_AVOID_BORROWED_REFS
40958 Py_XDECREF(varnames_tuple_dedup);
40959 #endif
40960 Py_DECREF(varnames_tuple);
40961 return code_obj;
40962}
40963
40964/* DecompressString */
40965CYTHON_UNUSED
40966static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
40967#ifdef __Pyx_DecompressString_UNUSED
40968 CYTHON_UNUSED_VAR(s);
40969 CYTHON_UNUSED_VAR(length);
40970 CYTHON_UNUSED_VAR(algo);
40971 return NULL;
40972#else
40973 PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
40974 const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
40975 PyObject *methodname = PyUnicode_FromString("decompress");
40976 if (unlikely(!methodname)) return NULL;
40977 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
40978 if (algo == 3) {
40979 PyObject *fromlist = Py_BuildValue("[O]", methodname);
40980 if (unlikely(!fromlist)) goto bad;
40981 module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
40982 Py_DECREF(fromlist);
40983 } else
40984 #endif
40985 module = PyImport_ImportModule(module_name);
40986 if (unlikely(!module)) goto import_failed;
40987 decompress = PyObject_GetAttr(module, methodname);
40988 if (unlikely(!decompress)) goto import_failed;
40989 {
40990 #ifdef __cplusplus
40991 char *memview_bytes = const_cast<char*>(s);
40992 #else
40993 #if defined(__clang__)
40994 #pragma clang diagnostic push
40995 #pragma clang diagnostic ignored "-Wcast-qual"
40996 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
40997 #pragma GCC diagnostic push
40998 #pragma GCC diagnostic ignored "-Wcast-qual"
40999 #endif
41000 char *memview_bytes = (char*) s;
41001 #if defined(__clang__)
41002 #pragma clang diagnostic pop
41003 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
41004 #pragma GCC diagnostic pop
41005 #endif
41006 #endif
41007 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
41008 int memview_flags = 0x100;
41009 #else
41010 int memview_flags = PyBUF_READ;
41011 #endif
41012 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
41013 }
41014 if (unlikely(!compressed_bytes)) {
41015 Py_DECREF(decompress);
41016 goto bad;
41017 }
41018 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
41019 Py_DECREF(compressed_bytes);
41020 Py_DECREF(decompress);
41021 Py_DECREF(module);
41022 Py_DECREF(methodname);
41023 return decompressed;
41024import_failed:
41025 PyErr_Format(PyExc_ImportError,
41026 "Failed to import '%.20s.decompress' - cannot initialise module strings. "
41027 "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
41028 module_name, algo);
41029bad:
41030 Py_XDECREF(module);
41031 Py_DECREF(methodname);
41032 return NULL;
41033#endif
41034}
41035
41036/* DecompressString_LZSS */
41037#ifndef __Pyx_DecompressString_LZSS_UNUSED
41038CYTHON_UNUSED
41039static CYTHON_SMALL_CODE size_t __pyx_lzss_decompress(const uint8_t* src, uint8_t* dst, size_t dst_len) {
41040 size_t pos = 0, out_pos = 0;
41041 while (1) {
41042 uint32_t flags = src[pos++] | 0xFF00;
41043 while (flags & 0x100) {
41044 if (flags & 1) {
41045 dst[out_pos++] = src[pos++];
41046 } else {
41047 uint32_t lo = src[pos++], hi = src[pos++];
41048 uint32_t end_offset_of_last_occurrence, match_length;
41049 if (!(lo & 0x80)) {
41050 end_offset_of_last_occurrence = lo;
41051 match_length = hi;
41052 } else if (!(hi & 0x80)) {
41053 end_offset_of_last_occurrence = 0x80 + (((hi << 2) & 0x180) | (lo & 0x7F));
41054 match_length = hi & 0x1F;
41055 } else {
41056 end_offset_of_last_occurrence = 0x80 + ((hi & 0x7F) << 7 | (lo & 0x7F));
41057 match_length = src[pos++];
41058 }
41059 match_length += 3;
41060 size_t ref_pos = out_pos - end_offset_of_last_occurrence - match_length;
41061 memcpy(dst + out_pos, dst + ref_pos, match_length);
41062 out_pos += match_length;
41063 }
41064 if (out_pos >= dst_len) return pos;
41065 flags >>= 1;
41066 }
41067 }
41068}
41069#endif
41070static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString_LZSS(const char *s, size_t compressed_length, size_t uncompressed_length) {
41071#ifdef __Pyx_DecompressString_LZSS_UNUSED
41072 CYTHON_UNUSED_VAR(s);
41073 CYTHON_UNUSED_VAR(compressed_length);
41074 CYTHON_UNUSED_VAR(uncompressed_length);
41075 return NULL;
41076#else
41077 PyObject *result;
41078 unsigned char *result_data;
41079 size_t src_length;
41080 result = PyBytes_FromStringAndSize(NULL, (Py_ssize_t) uncompressed_length);
41081 if (unlikely(!result)) return NULL;
41082 result_data = __Pyx_PyBytes_AsWritableUString(result);
41083 if (unlikely(!result_data)) goto bad;
41084 src_length = __pyx_lzss_decompress((const uint8_t*) s, result_data, uncompressed_length);
41085 if (unlikely(src_length != compressed_length)) goto decompression_failed;
41086 return result;
41087decompression_failed:
41088 PyErr_SetString(PyExc_RuntimeError, "LZSS string data decompression failed");
41089bad:
41090 Py_DECREF(result);
41091 return NULL;
41092#endif
41093}
41094
41095#include <string.h>
41096static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
41097 size_t len = strlen(s);
41098 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
41099 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
41100 return -1;
41101 }
41102 return (Py_ssize_t) len;
41103}
41104static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
41105 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
41106 if (unlikely(len < 0)) return NULL;
41107 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
41108}
41109static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
41110 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
41111 if (unlikely(len < 0)) return NULL;
41112 return PyByteArray_FromStringAndSize(c_str, len);
41113}
41114static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
41115 Py_ssize_t ignore;
41116 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
41117}
41118#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
41119static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41120 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
41121#if CYTHON_COMPILING_IN_LIMITED_API
41122 {
41123 const char* result;
41124 Py_ssize_t unicode_length;
41125 CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41126 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
41127 if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
41128 #else
41129 result = PyUnicode_AsUTF8AndSize(o, length);
41130 #endif
41131 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41132 unicode_length = PyUnicode_GetLength(o);
41133 if (unlikely(unicode_length < 0)) return NULL;
41134 if (unlikely(unicode_length != *length)) {
41135 PyUnicode_AsASCIIString(o);
41136 return NULL;
41137 }
41138 #endif
41139 return result;
41140 }
41141#else
41142#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41143 if (likely(PyUnicode_IS_ASCII(o))) {
41144 *length = PyUnicode_GET_LENGTH(o);
41145 return PyUnicode_AsUTF8(o);
41146 } else {
41147 PyUnicode_AsASCIIString(o);
41148 return NULL;
41149 }
41150#else
41151 return PyUnicode_AsUTF8AndSize(o, length);
41152#endif
41153#endif
41154}
41155#endif
41156static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41157#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
41158 if (PyUnicode_Check(o)) {
41159 return __Pyx_PyUnicode_AsStringAndSize(o, length);
41160 } else
41161#endif
41162 if (PyByteArray_Check(o)) {
41163#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
41164 *length = PyByteArray_GET_SIZE(o);
41165 return PyByteArray_AS_STRING(o);
41166#else
41167 *length = PyByteArray_Size(o);
41168 if (*length == -1) return NULL;
41169 return PyByteArray_AsString(o);
41170#endif
41171 } else
41172 {
41173 char* result;
41174 int r = PyBytes_AsStringAndSize(o, &result, length);
41175 if (unlikely(r < 0)) {
41176 return NULL;
41177 } else {
41178 return result;
41179 }
41180 }
41181}
41182static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
41183 int is_true = x == Py_True;
41184 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
41185 else return PyObject_IsTrue(x);
41186}
41187static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
41188 int retval;
41189 if (unlikely(!x)) return -1;
41190 retval = __Pyx_PyObject_IsTrue(x);
41191 Py_DECREF(x);
41192 return retval;
41193}
41194static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
41195 __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
41196 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
41197 if (unlikely(!result_type_name)) goto bad;
41198 #endif
41199 if (PyLong_Check(result)) {
41200 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
41201 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
41202 "The ability to return an instance of a strict subclass of int is deprecated, "
41203 "and may be removed in a future version of Python.",
41204 result_type_name)) {
41205 __Pyx_DECREF_TypeName(result_type_name);
41206 goto bad;
41207 }
41208 __Pyx_DECREF_TypeName(result_type_name);
41209 return result;
41210 }
41211 PyErr_Format(PyExc_TypeError,
41212 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
41213 result_type_name);
41214 __Pyx_DECREF_TypeName(result_type_name);
41215bad:
41216 Py_DECREF(result);
41217 return NULL;
41218}
41219static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
41220#if CYTHON_USE_TYPE_SLOTS
41221 PyNumberMethods *m;
41222#endif
41223 PyObject *res = NULL;
41224 if (likely(PyLong_Check(x)))
41225 return __Pyx_NewRef(x);
41226#if CYTHON_USE_TYPE_SLOTS
41227 m = Py_TYPE(x)->tp_as_number;
41228 if (likely(m && m->nb_int)) {
41229 res = m->nb_int(x);
41230 }
41231#else
41232 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
41233 res = PyNumber_Long(x);
41234 }
41235#endif
41236 if (likely(res)) {
41237 if (unlikely(!PyLong_CheckExact(res))) {
41238 return __Pyx_PyNumber_LongWrongResultType(res);
41239 }
41240 }
41241 else if (!PyErr_Occurred()) {
41242 PyErr_SetString(PyExc_TypeError,
41243 "an integer is required");
41244 }
41245 return res;
41246}
41247static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
41248 #if CYTHON_USE_PYLONG_INTERNALS
41249 Py_ssize_t ival;
41250 const Py_ssize_t size = __Pyx_PyLong_DigitCount(b);
41251 const int is_neg = __Pyx_PyLong_IsNeg(b);
41252 const digit* digits = __Pyx_PyLong_Digits(b);
41253 if (size == 0) return 0;
41254 #if SIZEOF_SIZE_T * 8 > 1 * PyLong_SHIFT
41255 if (size == 1) {
41256 ival = (Py_ssize_t) (((size_t)digits[0]));
41257 } else
41258 #endif
41259 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
41260 if (size == 2) {
41261 ival = (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41262 } else
41263 #endif
41264 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
41265 if (size == 3) {
41266 ival = (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41267 } else
41268 #endif
41269 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
41270 if (size == 4) {
41271 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]));
41272 } else
41273 #endif
41274 return PyLong_AsSsize_t(b);
41275 return is_neg ? -ival : ival;
41276 #else
41277 return PyLong_AsSsize_t(b);
41278 #endif
41279}
41280static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
41281 if (likely(PyLong_Check(b))) {
41282 return __Pyx_PyLong_AsSsize_t(b);
41283 } else {
41284 Py_ssize_t ival;
41285 PyObject *x = PyNumber_Index(b);
41286 if (unlikely(!x)) return -1;
41287 ival = __Pyx_PyLong_AsSsize_t(x);
41288 Py_DECREF(x);
41289 return ival;
41290 }
41291}
41292static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
41293 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
41294 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
41295 } else {
41296 Py_ssize_t ival;
41297 PyObject *x;
41298 x = PyNumber_Index(o);
41299 if (!x) return -1;
41300 ival = PyLong_AsLong(x);
41301 Py_DECREF(x);
41302 return ival;
41303 }
41304}
41305static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
41306 CYTHON_UNUSED_VAR(b);
41307 return __Pyx_NewRef(Py_None);
41308}
41309static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
41310 return __Pyx_NewRef(b ? Py_True: Py_False);
41311}
41312static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
41313 return PyLong_FromSize_t(ival);
41314}
41315
41316
41317/* MultiPhaseInitModuleState */
41318#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
41319#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41320#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
41321 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
41322#else
41323 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
41324#endif
41325#endif
41326#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
41327#error "Module state with PEP489 requires atomics. Currently that's one of\
41328 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
41329#endif
41330#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41331#define __Pyx_ModuleStateLookup_Lock()
41332#define __Pyx_ModuleStateLookup_Unlock()
41333#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
41334static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
41335#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
41336#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
41337#elif defined(__cplusplus) && __cplusplus >= 201103L
41338#include <mutex>
41339static std::mutex __Pyx_ModuleStateLookup_mutex;
41340#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
41341#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
41342#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
41343#include <threads.h>
41344static mtx_t __Pyx_ModuleStateLookup_mutex;
41345static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
41346static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
41347 mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
41348}
41349#define __Pyx_ModuleStateLookup_Lock()\
41350 call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
41351 mtx_lock(&__Pyx_ModuleStateLookup_mutex)
41352#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
41353#elif defined(HAVE_PTHREAD_H)
41354#include <pthread.h>
41355static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
41356#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
41357#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
41358#elif defined(_WIN32)
41359#include <Windows.h> // synchapi.h on its own doesn't work
41360static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
41361#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
41362#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
41363#else
41364#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
41365 Requires C standard >= C11, or C++ standard >= C++11,\
41366 or pthreads, or the Windows 32 API, or Python >= 3.13."
41367#endif
41368typedef struct {
41369 int64_t id;
41370 PyObject *module;
41371} __Pyx_InterpreterIdAndModule;
41372typedef struct {
41373 char interpreter_id_as_index;
41374 Py_ssize_t count;
41375 Py_ssize_t allocated;
41376 __Pyx_InterpreterIdAndModule table[1];
41377} __Pyx_ModuleStateLookupData;
41378#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
41379#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41380static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
41381#endif
41382#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41383static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
41384#else
41385static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
41386#endif
41387static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
41388 __Pyx_InterpreterIdAndModule* table,
41389 Py_ssize_t count,
41390 int64_t interpreterId) {
41391 __Pyx_InterpreterIdAndModule* begin = table;
41392 __Pyx_InterpreterIdAndModule* end = begin + count;
41393 if (begin->id == interpreterId) {
41394 return begin;
41395 }
41396 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
41397 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
41398 if (halfway->id == interpreterId) {
41399 return halfway;
41400 }
41401 if (halfway->id < interpreterId) {
41402 begin = halfway;
41403 } else {
41404 end = halfway;
41405 }
41406 }
41407 for (; begin < end; ++begin) {
41408 if (begin->id >= interpreterId) return begin;
41409 }
41410 return begin;
41411}
41412static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
41413 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
41414 if (interpreter_id == -1) return NULL;
41415#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41416 __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
41417 {
41418 __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
41419 if (likely(data)) {
41420 __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
41421 if (likely(data == new_data)) {
41422 goto read_finished;
41423 }
41424 }
41425 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
41426 __Pyx_ModuleStateLookup_Lock();
41427 __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
41428 data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
41429 __Pyx_ModuleStateLookup_Unlock();
41430 }
41431 read_finished:;
41432#else
41433 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
41434#endif
41435 __Pyx_InterpreterIdAndModule* found = NULL;
41436 if (unlikely(!data)) goto end;
41437 if (data->interpreter_id_as_index) {
41438 if (interpreter_id < data->count) {
41439 found = data->table+interpreter_id;
41440 }
41441 } else {
41442 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
41443 data->table, data->count, interpreter_id);
41444 }
41445 end:
41446 {
41447 PyObject *result=NULL;
41448 if (found && found->id == interpreter_id) {
41449 result = found->module;
41450 }
41451#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41452 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
41453#endif
41454 return result;
41455 }
41456}
41457#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41458static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
41459 while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
41460}
41461#else
41462#define __Pyx_ModuleStateLookup_wait_until_no_readers()
41463#endif
41464static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
41465 Py_ssize_t to_allocate = (*old_data)->allocated;
41466 while (to_allocate <= interpreter_id) {
41467 if (to_allocate == 0) to_allocate = 1;
41468 else to_allocate *= 2;
41469 }
41470 __Pyx_ModuleStateLookupData *new_data = *old_data;
41471 if (to_allocate != (*old_data)->allocated) {
41472 new_data = (__Pyx_ModuleStateLookupData *)realloc(
41473 *old_data,
41474 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
41475 if (!new_data) {
41476 PyErr_NoMemory();
41477 return -1;
41478 }
41479 for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
41480 new_data->table[i].id = i;
41481 new_data->table[i].module = NULL;
41482 }
41483 new_data->allocated = to_allocate;
41484 }
41485 new_data->table[interpreter_id].module = module;
41486 if (new_data->count < interpreter_id+1) {
41487 new_data->count = interpreter_id+1;
41488 }
41489 *old_data = new_data;
41490 return 0;
41491}
41492static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
41493 __Pyx_InterpreterIdAndModule *read = data->table;
41494 __Pyx_InterpreterIdAndModule *write = data->table;
41495 __Pyx_InterpreterIdAndModule *end = read + data->count;
41496 for (; read<end; ++read) {
41497 if (read->module) {
41498 write->id = read->id;
41499 write->module = read->module;
41500 ++write;
41501 }
41502 }
41503 data->count = write - data->table;
41504 for (; write<end; ++write) {
41505 write->id = 0;
41506 write->module = NULL;
41507 }
41508 data->interpreter_id_as_index = 0;
41509}
41510static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
41511 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
41512 if (interpreter_id == -1) return -1;
41513 int result = 0;
41514 __Pyx_ModuleStateLookup_Lock();
41515#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41516 __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
41517 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
41518#else
41519 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
41520#endif
41521 __Pyx_ModuleStateLookupData *new_data = old_data;
41522 if (!new_data) {
41523 new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
41524 if (!new_data) {
41525 result = -1;
41526 PyErr_NoMemory();
41527 goto end;
41528 }
41529 new_data->allocated = 1;
41530 new_data->interpreter_id_as_index = 1;
41531 }
41532 __Pyx_ModuleStateLookup_wait_until_no_readers();
41533 if (new_data->interpreter_id_as_index) {
41534 if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
41535 result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
41536 goto end;
41537 }
41538 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
41539 }
41540 {
41541 Py_ssize_t insert_at = 0;
41542 {
41543 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
41544 new_data->table, new_data->count, interpreter_id);
41545 assert(lower_bound);
41546 insert_at = lower_bound - new_data->table;
41547 if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
41548 lower_bound->module = module;
41549 goto end; // already in table, nothing more to do
41550 }
41551 }
41552 if (new_data->count+1 >= new_data->allocated) {
41553 Py_ssize_t to_allocate = (new_data->count+1)*2;
41554 new_data =
41555 (__Pyx_ModuleStateLookupData*)realloc(
41556 new_data,
41557 sizeof(__Pyx_ModuleStateLookupData) +
41558 (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
41559 if (!new_data) {
41560 result = -1;
41561 new_data = old_data;
41562 PyErr_NoMemory();
41563 goto end;
41564 }
41565 new_data->allocated = to_allocate;
41566 }
41567 ++new_data->count;
41568 int64_t last_id = interpreter_id;
41569 PyObject *last_module = module;
41570 for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
41571 int64_t current_id = new_data->table[i].id;
41572 new_data->table[i].id = last_id;
41573 last_id = current_id;
41574 PyObject *current_module = new_data->table[i].module;
41575 new_data->table[i].module = last_module;
41576 last_module = current_module;
41577 }
41578 }
41579 end:
41580#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41581 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
41582#else
41583 __Pyx_ModuleStateLookup_data = new_data;
41584#endif
41585 __Pyx_ModuleStateLookup_Unlock();
41586 return result;
41587}
41588static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
41589 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
41590 if (interpreter_id == -1) return -1;
41591 __Pyx_ModuleStateLookup_Lock();
41592#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41593 __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
41594 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
41595#else
41596 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
41597#endif
41598 if (data->interpreter_id_as_index) {
41599 if (interpreter_id < data->count) {
41600 data->table[interpreter_id].module = NULL;
41601 }
41602 goto done;
41603 }
41604 {
41605 __Pyx_ModuleStateLookup_wait_until_no_readers();
41606 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
41607 data->table, data->count, interpreter_id);
41608 if (!lower_bound) goto done;
41609 if (lower_bound->id != interpreter_id) goto done;
41610 __Pyx_InterpreterIdAndModule *end = data->table+data->count;
41611 for (;lower_bound<end-1; ++lower_bound) {
41612 lower_bound->id = (lower_bound+1)->id;
41613 lower_bound->module = (lower_bound+1)->module;
41614 }
41615 }
41616 --data->count;
41617 if (data->count == 0) {
41618 free(data);
41619 data = NULL;
41620 }
41621 done:
41622#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41623 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
41624#else
41625 __Pyx_ModuleStateLookup_data = data;
41626#endif
41627 __Pyx_ModuleStateLookup_Unlock();
41628 return 0;
41629}
41630#endif
41631
41632/* #### Code section: utility_code_pragmas_end ### */
41633#ifdef _MSC_VER
41634#pragma warning( pop )
41635#endif
41636
41637
41638
41639/* #### Code section: end ### */
41640#endif /* Py_PYTHON_H */
Int n
Definition Headers.h:28
Double q
Definition Headers.h:81
Double T
Definition Headers.h:87
Double L
Definition Headers.h:72
Double r
Definition Headers.h:83
Double U
Definition Headers.h:88
Int number
Definition Headers.h:33
Double f
Definition Headers.h:64
Double s
Definition Headers.h:84
Double * z
Definition Headers.h:49
Double v
Definition Headers.h:95
#define sign(x, y)
Definition jf.h:44
#define c(i)
Definition jf.h:21