31#ifndef PY_SSIZE_T_CLEAN
32#define PY_SSIZE_T_CLEAN
35#if defined(Py_LIMITED_API)
36 #if !defined(CYTHON_LIMITED_API)
37 #define CYTHON_LIMITED_API 1
39#elif defined(CYTHON_LIMITED_API)
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.")
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.
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.
55#define __PYX_ABI_VERSION "3_3_0"
56#define CYTHON_HEX_VERSION 0x030300F0
57#define CYTHON_FUTURE_DIVISION 1
61 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
63#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
75 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
77 #define __Pyx_has_cbuiltin(name) (0)
80 #define DL_IMPORT(t) t
83 #define DL_EXPORT(t) t
87 #define PY_LONG_LONG LONG_LONG
90 #define Py_HUGE_VAL HUGE_VAL
92#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
93#if defined(CYTHON_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."
101 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
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.")
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."
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
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
133 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
134 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
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)
151 #ifndef CYTHON_PEP487_INIT_SUBCLASS
152 #define CYTHON_PEP487_INIT_SUBCLASS 1
154 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
155 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
157 #ifndef CYTHON_USE_MODULE_STATE
158 #define CYTHON_USE_MODULE_STATE 0
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)
165 #ifndef CYTHON_USE_AM_SEND
166 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
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
175 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
176 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
178 #ifndef CYTHON_USE_FREELISTS
179 #define CYTHON_USE_FREELISTS 1
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)
189#elif defined(GRAALVM_PYTHON)
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
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
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
235 #ifndef CYTHON_PEP487_INIT_SUBCLASS
236 #define CYTHON_PEP487_INIT_SUBCLASS 1
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
255 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
256 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
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
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
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
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)
309 #ifndef CYTHON_PEP487_INIT_SUBCLASS
310 #define CYTHON_PEP487_INIT_SUBCLASS 1
312 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
313 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
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)
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)
331 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
332 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
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
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
348 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
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
356 #ifndef CYTHON_USE_TYPE_SPECS
357 #define CYTHON_USE_TYPE_SPECS 0
359 #ifndef CYTHON_USE_PYTYPE_LOOKUP
360 #define CYTHON_USE_PYTYPE_LOOKUP 1
362 #ifndef CYTHON_USE_PYLONG_INTERNALS
363 #define CYTHON_USE_PYLONG_INTERNALS 1
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
371 #ifndef CYTHON_USE_UNICODE_INTERNALS
372 #define CYTHON_USE_UNICODE_INTERNALS 1
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
380 #ifndef CYTHON_AVOID_BORROWED_REFS
381 #define CYTHON_AVOID_BORROWED_REFS 0
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
389 #ifndef CYTHON_ASSUME_SAFE_MACROS
390 #define CYTHON_ASSUME_SAFE_MACROS 1
392 #ifndef CYTHON_ASSUME_SAFE_SIZE
393 #define CYTHON_ASSUME_SAFE_SIZE 1
395 #ifndef CYTHON_UNPACK_METHODS
396 #define CYTHON_UNPACK_METHODS 1
398 #ifndef CYTHON_FAST_THREAD_STATE
399 #define CYTHON_FAST_THREAD_STATE 1
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)
407 #ifndef CYTHON_VECTORCALL
408 #define CYTHON_VECTORCALL 1
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
416 #ifndef CYTHON_PEP487_INIT_SUBCLASS
417 #define CYTHON_PEP487_INIT_SUBCLASS 1
419 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
420 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
422 #ifndef CYTHON_USE_MODULE_STATE
423 #define CYTHON_USE_MODULE_STATE 0
425 #ifndef CYTHON_USE_SYS_MONITORING
426 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
428 #ifndef CYTHON_USE_TP_FINALIZE
429 #define CYTHON_USE_TP_FINALIZE 1
431 #ifndef CYTHON_USE_AM_SEND
432 #define CYTHON_USE_AM_SEND 1
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)
440 #ifndef CYTHON_USE_EXC_INFO_STACK
441 #define CYTHON_USE_EXC_INFO_STACK 1
443 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
444 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
446 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
447 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
449 #ifndef CYTHON_USE_FREELISTS
450 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
452 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
453 #undef CYTHON_IMMORTAL_CONSTANTS
454 #define CYTHON_IMMORTAL_CONSTANTS 0
455 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
456 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
458 #ifndef CYTHON_OPAQUE_OBJECTS
459 #define CYTHON_OPAQUE_OBJECTS 0
462#if CYTHON_USE_PYLONG_INTERNALS
467 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
470#ifndef __has_attribute
471 #define __has_attribute(x) 0
473#ifndef __has_cpp_attribute
474 #define __has_cpp_attribute(x) 0
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
484 #define CYTHON_RESTRICT
488 #if defined(__cplusplus)
491 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
492 #if __has_cpp_attribute(maybe_unused)
493 #define CYTHON_UNUSED [[maybe_unused]]
496 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
497 #define CYTHON_UNUSED [[maybe_unused]]
501# if defined(__GNUC__)
502# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
503# define CYTHON_UNUSED __attribute__ ((__unused__))
505# define CYTHON_UNUSED
507# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
508# define CYTHON_UNUSED __attribute__ ((__unused__))
510# define CYTHON_UNUSED
513#ifndef CYTHON_UNUSED_VAR
514# if defined(__cplusplus)
515 template<
class T>
void CYTHON_UNUSED_VAR(
const T& ) { }
517# define CYTHON_UNUSED_VAR(x) (void)(x)
520#ifndef CYTHON_MAYBE_UNUSED_VAR
521 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
523#ifndef CYTHON_NCP_UNUSED
524# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
525# define CYTHON_NCP_UNUSED
527# define CYTHON_NCP_UNUSED CYTHON_UNUSED
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
535 #define CYTHON_USE_CPP_STD_MOVE 0
538#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
540typedef uintptr_t __pyx_uintptr_t;
541#ifndef CYTHON_FALLTHROUGH
542 #if defined(__cplusplus)
545 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
546 #if __has_cpp_attribute(fallthrough)
547 #define CYTHON_FALLTHROUGH [[fallthrough]]
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]]
558 #ifndef CYTHON_FALLTHROUGH
559 #if __has_attribute(fallthrough)
560 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
562 #define CYTHON_FALLTHROUGH
565 #if defined(__clang__) && defined(__apple_build_version__)
566 #if __apple_build_version__ < 7000000
567 #undef CYTHON_FALLTHROUGH
568 #define CYTHON_FALLTHROUGH
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)
581 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
583#ifndef Py_UNREACHABLE
584 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
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)
591 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
593#if CYTHON_COMPILING_IN_PYPY == 1
594 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
596 #define __PYX_NEED_TP_PRINT_SLOT 0
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)
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)
609 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
612 #if defined(__clang__)
613 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
615 #define CYTHON_INLINE inline
619void __Pyx_call_destructor(
T& x) {
623class __Pyx_FakeReference {
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; }
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
645 static int CO_OPTIMIZED;
648 static int CO_NEWLOCALS;
651 static int CO_VARARGS;
653 #ifndef CO_VARKEYWORDS
654 static int CO_VARKEYWORDS;
656 #ifndef CO_ASYNC_GENERATOR
657 static int CO_ASYNC_GENERATOR;
660 static int CO_GENERATOR;
663 static int CO_COROUTINE;
667 #define CO_COROUTINE 0x80
669 #ifndef CO_ASYNC_GENERATOR
670 #define CO_ASYNC_GENERATOR 0x200
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)
677 #define __Pyx_Py_Is(x, y) ((x) == (y))
679#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
680 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
682 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
684#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
685 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
687 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
689#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
690 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
692 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
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)
698 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
700#if CYTHON_COMPILING_IN_LIMITED_API
701static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
702static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
704#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
705#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
707static int __Pyx_init_tpflags_variables(
void);
708#ifndef Py_TPFLAGS_HAVE_FINALIZE
709 #define Py_TPFLAGS_HAVE_FINALIZE 0
711#ifndef Py_TPFLAGS_SEQUENCE
712 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
714#ifndef Py_TPFLAGS_MAPPING
715 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
717#ifndef Py_TPFLAGS_IMMUTABLETYPE
718 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
720#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
721 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
723#ifndef METH_STACKLESS
724 #define METH_STACKLESS 0
726#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
727 #ifndef METH_FASTCALL
728 #define METH_FASTCALL 0x80
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);
734 #if PY_VERSION_HEX >= 0x030d00A4
735 # define __Pyx_PyCFunctionFast PyCFunctionFast
736 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
738 # define __Pyx_PyCFunctionFast _PyCFunctionFast
739 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
743 #define __Pyx_METH_FASTCALL METH_FASTCALL
744 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
745 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
747 #define __Pyx_METH_FASTCALL METH_VARARGS
748 #define __Pyx_PyCFunction_FastCall PyCFunction
749 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
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))
756 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
757 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
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)
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;
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;
776 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
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))
783 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
785#if CYTHON_COMPILING_IN_PYPY
786 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *
const *, size_t, PyObject *);
788 #define __Pyx_PyCMethod PyCMethod
791 #define METH_METHOD 0x200
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)
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))
807 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
808 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
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()
817 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
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
824 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
825 #define __PYX_SHARED_RELATIVE_OFFSET 0
826 #define CYTHON_OPAQUE_SHARED_TYPES 0
828#if CYTHON_USE_MODULE_STATE
829static CYTHON_INLINE
void *__Pyx__PyModule_GetState(PyObject *op)
832 result = PyModule_GetState(op);
834 Py_FatalError(
"Couldn't find the module state");
837#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
839#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
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)
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)
859#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
860#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
862#define __Pyx_PyDict_NewPresized(n) PyDict_New()
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);
875#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
876#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
877#define __Pyx_PyDict_GetItemStr PyDict_GetItem
879static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
880#if CYTHON_COMPILING_IN_PYPY
881 return PyDict_GetItem(dict, name);
884 PyDictObject *mp = (PyDictObject*) dict;
885 long hash = ((PyStringObject *) name)->ob_shash;
887 ep = (mp->ma_lookup)(mp, name, hash);
894#define __Pyx_PyDict_GetItemStr PyDict_GetItem
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)
900 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
901 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
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);\
912#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
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))
924 #if PY_VERSION_HEX >= 0x030C0000
925 #define __Pyx_PyUnicode_READY(op) (0)
927 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
928 0 : _PyUnicode_Ready((PyObject *)(op)))
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))
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))
942 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
945 static CYTHON_INLINE
int __Pyx_PyUnicode_KIND_04(PyObject *o) {
946 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
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)
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))
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)
961 #if !defined(PyUnicode_Contains)
962 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
964 #if !defined(PyByteArray_Check)
965 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
967 #if !defined(PyObject_Format)
968 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
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))
979 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
981#ifndef PySet_CheckExact
982 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
984enum __Pyx_ReferenceSharing {
985 __Pyx_ReferenceSharing_DefinitelyUnique,
986 __Pyx_ReferenceSharing_OwnStrongReference,
987 __Pyx_ReferenceSharing_FunctionArgument,
988 __Pyx_ReferenceSharing_SharedReference,
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)
998#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
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))
1006 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
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))
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))
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))
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))
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)))
1031 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1032 __Pyx_XNewRef(PyList_GetItem(o, i)))
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)) {
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;
1058#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1059 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1061 #define __Pyx_VISIT_CONST(obj)
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)
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)
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)
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)
1095#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1096 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
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
1107 } __Pyx_PySendResult;
1109#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1110 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1112 #define __Pyx_pyiter_sendfunc sendfunc
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
1119#define __PYX_HAS_PY_AM_SEND 2
1121#if __PYX_HAS_PY_AM_SEND < 2
1122 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1128 __Pyx_pyiter_sendfunc am_send;
1129 } __Pyx_PyAsyncMethodsStruct;
1130 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1132#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1133 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1135 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1137#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1141PyAPI_FUNC(
void *) PyMem_Calloc(
size_t nelem,
size_t elsize);
1143#if CYTHON_COMPILING_IN_LIMITED_API
1144static int __Pyx_init_co_variable(PyObject *inspect,
const char* name,
int *write_to) {
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);
1151 return value != -1 || !PyErr_Occurred();
1153static int __Pyx_init_co_variables(
void) {
1156 inspect = PyImport_ImportModule(
"inspect");
1158#if !defined(CO_OPTIMIZED)
1159 __Pyx_init_co_variable(inspect,
"CO_OPTIMIZED", &CO_OPTIMIZED) &&
1161#if !defined(CO_NEWLOCALS)
1162 __Pyx_init_co_variable(inspect,
"CO_NEWLOCALS", &CO_NEWLOCALS) &&
1164#if !defined(CO_VARARGS)
1165 __Pyx_init_co_variable(inspect,
"CO_VARARGS", &CO_VARARGS) &&
1167#if !defined(CO_VARKEYWORDS)
1168 __Pyx_init_co_variable(inspect,
"CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1170#if !defined(CO_ASYNC_GENERATOR)
1171 __Pyx_init_co_variable(inspect,
"CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1173#if !defined(CO_GENERATOR)
1174 __Pyx_init_co_variable(inspect,
"CO_GENERATOR", &CO_GENERATOR) &&
1176#if !defined(CO_COROUTINE)
1177 __Pyx_init_co_variable(inspect,
"CO_COROUTINE", &CO_COROUTINE) &&
1181 return result ? 0 : -1;
1183static int __Pyx_init_tpflags_bitcount(
unsigned long flag) {
1186 count += (int) (flag & 1);
1191static int __Pyx_init_tpflags_variables(
void) {
1192 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1195 PyObject *collections_abc = PyImport_ImportModule(
"collections.abc");
1196 if (!collections_abc)
return -1;
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;
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;
1208 if (!PyType_Check(sequence) || !PyType_Check(mapping))
goto fail;
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;
1218 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1219 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1223 Py_XDECREF(mapping);
1224 Py_XDECREF(sequence);
1225 Py_DECREF(collections_abc);
1227#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1229 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1234 result = PyErr_Occurred() ? -1 : 0;
1238static int __Pyx_init_co_variables(
void) {
1241static int __Pyx_init_tpflags_variables(
void) {
1247#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1248 #ifndef _USE_MATH_DEFINES
1249 #define _USE_MATH_DEFINES
1253#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1254#define __Pyx_truncl trunc
1256#define __Pyx_truncl truncl
1259#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1260#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1262#ifndef CYTHON_CLINE_IN_TRACEBACK
1263#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
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; }
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; }
1270#define __PYX_ERR(f_index, lineno, Ln_error) \
1271 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1273#ifdef CYTHON_EXTERN_C
1274 #undef __PYX_EXTERN_C
1275 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1276#elif defined(__PYX_EXTERN_C)
1278 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1280 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1283 #define __PYX_EXTERN_C extern "C++"
1286#define __PYX_HAVE__BoundaryConditions
1287#define __PYX_HAVE_API__BoundaryConditions
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"
1301 typedef int (*__pyx_memoryview_to_dtype_func_type)(
char*, PyObject*);
1308#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1309#define CYTHON_WITHOUT_ASSERTIONS
1312#ifdef CYTHON_FREETHREADING_COMPATIBLE
1313#if CYTHON_FREETHREADING_COMPATIBLE
1314#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1316#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1319#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
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;
1341#if defined (__cplusplus) && __cplusplus >= 201103L
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)
1355 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
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)
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)
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);
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);
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)
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)
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
1436 #ifndef _PyLong_NON_SIZE_BITS
1437 #define _PyLong_NON_SIZE_BITS 3
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)
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])
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);
1468 typedef Py_ssize_t __Pyx_compact_pylong;
1469 typedef size_t __Pyx_compact_upylong;
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;
1486 #if PY_VERSION_HEX >= 0x030C00A5
1487 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1489 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1491 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1493 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
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)
1500 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
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)
1509 #define likely(x) (x)
1510 #define unlikely(x) (x)
1514#if __cplusplus > 201103L
1515#include <type_traits>
1517template <
typename T>
1518static void __Pyx_pretend_to_initialize(
T* ptr) {
1519#if __cplusplus > 201103L
1520 if ((std::is_trivially_default_constructible<T>::value))
1526static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
1530#if !CYTHON_USE_MODULE_STATE
1531static PyObject *__pyx_m = NULL;
1533static const char *
const __pyx_cfilenm = __FILE__;
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
1542 #define CYTHON_CCOMPLEX 0
1549 #include <complex.h>
1552#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1554 #define _Complex_I 1.0fj
1559static const char*
const __pyx_f[] = {
1560 "proteus/BoundaryConditions.py",
1562 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1563 "proteus/BoundaryConditions.pxd",
1568#include <pythread.h>
1569#ifndef CYTHON_ATOMICS
1570 #define CYTHON_ATOMICS 1
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)))
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"
1609#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1610 (__cplusplus >= 201103L) ||\
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"
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;
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;
1660 #ifdef __PYX_DEBUG_ATOMICS
1661 #warning "Using GNU atomics"
1663#elif CYTHON_ATOMICS && defined(_MSC_VER)
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;
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;
1693 #ifdef __PYX_DEBUG_ATOMICS
1694 #pragma message ("Using MSVC atomics")
1697 #undef CYTHON_ATOMICS
1698 #define CYTHON_ATOMICS 0
1699 #ifdef __PYX_DEBUG_ATOMICS
1700 #warning "Not using atomics"
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)
1711#define __Pyx_PyCriticalSection PyCriticalSection
1712#define __Pyx_PyCriticalSection2 PyCriticalSection2
1713#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1714#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
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)
1722#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1723#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1725#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1726#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1727#define __Pyx_END_CRITICAL_SECTION() }
1729#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1730#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1734#ifndef __PYX_FORCE_INIT_THREADS
1735 #define __PYX_FORCE_INIT_THREADS 0
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()
1746#ifndef CYTHON_PROFILE
1747#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
1748 #define CYTHON_PROFILE 0
1750 #define CYTHON_PROFILE 1
1753#ifndef CYTHON_TRACE_NOGIL
1754 #define CYTHON_TRACE_NOGIL 0
1756 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1757 #define CYTHON_TRACE 1
1761 #define CYTHON_TRACE 0
1763#if CYTHON_PROFILE || CYTHON_TRACE
1764#if CYTHON_USE_SYS_MONITORING
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,
1789 #define __Pyx_MonitoringEventTypes_CyFunc_count (sizeof(__Pyx_MonitoringEventTypes) - 3)
1790 #define __Pyx_MonitoringEventTypes_CyGen_count (sizeof(__Pyx_MonitoringEventTypes))
1795#include <structmember.h>
1798struct __Pyx_StructField_;
1799#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1802 const struct __Pyx_StructField_* fields;
1804 size_t arraysize[8];
1810typedef struct __Pyx_StructField_ {
1811 const __Pyx_TypeInfo* type;
1816 const __Pyx_StructField* field;
1817 size_t parent_offset;
1818} __Pyx_BufFmt_StackElem;
1820 __Pyx_StructField root;
1821 __Pyx_BufFmt_StackElem* head;
1823 size_t new_count, enc_count;
1824 size_t struct_alignment;
1829 char is_valid_array;
1830} __Pyx_BufFmt_Context;
1833struct __pyx_memoryview_obj;
1835 struct __pyx_memoryview_obj *memview;
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 } }
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))
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)
1872typedef npy_int8 __pyx_t_5numpy_int8_t;
1881typedef npy_int16 __pyx_t_5numpy_int16_t;
1890typedef npy_int32 __pyx_t_5numpy_int32_t;
1899typedef npy_int64 __pyx_t_5numpy_int64_t;
1908typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1917typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1926typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1935typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1944typedef npy_float32 __pyx_t_5numpy_float32_t;
1953typedef npy_float64 __pyx_t_5numpy_float64_t;
1962typedef npy_longlong __pyx_t_5numpy_longlong_t;
1971typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1980typedef npy_intp __pyx_t_5numpy_intp_t;
1989typedef npy_uintp __pyx_t_5numpy_uintp_t;
1998typedef npy_double __pyx_t_5numpy_float_t;
2007typedef npy_double __pyx_t_5numpy_double_t;
2016typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
2019#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2021 typedef ::std::complex< float > __pyx_t_float_complex;
2023 typedef float _Complex __pyx_t_float_complex;
2026 typedef struct {
float real, imag; } __pyx_t_float_complex;
2028static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
2031#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2033 typedef ::std::complex< double > __pyx_t_double_complex;
2035 typedef double _Complex __pyx_t_double_complex;
2038 typedef struct {
double real, imag; } __pyx_t_double_complex;
2040static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
2043#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2045 typedef ::std::complex< long double > __pyx_t_long_double_complex;
2047 typedef long double _Complex __pyx_t_long_double_complex;
2050 typedef struct {
long double real, imag; } __pyx_t_long_double_complex;
2052static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double,
long double);
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;
2075typedef double (*__pyx_t_18BoundaryConditions_cpp_uOfXT)(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *, __Pyx_memviewslice, double);
2084struct __pyx_obj_18BoundaryConditions_BC_Base {
2086 __Pyx_memviewslice _b_or;
2102struct __pyx_obj_18BoundaryConditions_BoundaryCondition {
2104 struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtab;
2105 __pyx_t_18BoundaryConditions_cpp_uOfXT uuOfXT;
2117struct __pyx_defaults {
2130struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC {
2132 PyObject *__pyx_v_value;
2143struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC {
2145 PyObject *__pyx_v_a;
2146 PyObject *__pyx_v_a0;
2157struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp {
2159 PyObject *__pyx_v_t1;
2160 PyObject *__pyx_v_value;
2171struct __pyx_array_obj {
2173 struct __pyx_vtabstruct_array *__pyx_vtab;
2179 Py_ssize_t *_strides;
2180 Py_ssize_t itemsize;
2183 void (*callback_free_data)(
void *);
2185 int dtype_is_object;
2196struct __pyx_MemviewEnum_obj {
2209struct __pyx_memoryview_obj {
2211 struct __pyx_vtabstruct_memoryview *__pyx_vtab;
2215 PyThread_type_lock lock;
2216 __pyx_atomic_int_type acquisition_count;
2219 int dtype_is_object;
2220 __Pyx_TypeInfo
const *typeinfo;
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;
2249struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition {
2250 void (*resetBC)(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *,
int __pyx_skip_dispatch);
2252static struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtabptr_18BoundaryConditions_BoundaryCondition;
2263struct __pyx_vtabstruct_array {
2264 PyObject *(*get_memview)(
struct __pyx_array_obj *);
2266static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
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 *);
2288static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
2299struct __pyx_vtabstruct__memoryviewslice {
2300 struct __pyx_vtabstruct_memoryview __pyx_base;
2302static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
2307#ifndef CYTHON_REFNANNY
2308 #define CYTHON_REFNANNY 0
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)\
2324 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2325 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2326 PyGILState_Release(__pyx_gilstate_save);\
2328 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2330 #define __Pyx_RefNannyFinishContextNogil() {\
2331 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2332 __Pyx_RefNannyFinishContext();\
2333 PyGILState_Release(__pyx_gilstate_save);\
2335 #define __Pyx_RefNannyFinishContextNogil() {\
2336 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2337 __Pyx_RefNannyFinishContext();\
2338 PyGILState_Release(__pyx_gilstate_save);\
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)
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)
2364#define __Pyx_Py_XDECREF_SET(r, v) do {\
2365 PyObject *tmp = (PyObject *) r;\
2366 r = v; Py_XDECREF(tmp);\
2368#define __Pyx_XDECREF_SET(r, v) do {\
2369 PyObject *tmp = (PyObject *) r;\
2370 r = v; __Pyx_XDECREF(tmp);\
2372#define __Pyx_DECREF_SET(r, v) do {\
2373 PyObject *tmp = (PyObject *) r;\
2374 r = v; __Pyx_DECREF(tmp);\
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)
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)
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)
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)
2400#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2401#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
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()
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))
2422#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
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)
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);
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);
2445#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
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);
2452#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2456#if CYTHON_USE_TYPE_SLOTS
2457static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2459#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2463static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2466static PyObject *__Pyx_GetBuiltinName(PyObject *name);
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);
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))
2477CYTHON_UNUSED
static PyObject *
2478__Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t
n);
2488static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2,
int pyop);
2491#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
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))
2499 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
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);
2513 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
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
2522#if CYTHON_VECTORCALL_TPNEW
2523 #if !CYTHON_VECTORCALL
2524 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
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
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
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)
2542#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
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);
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)
2562#if CYTHON_COMPILING_IN_CPYTHON
2563static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2565#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2569#if CYTHON_COMPILING_IN_CPYTHON
2570static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
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);
2578static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2583 PyObject **method_name;
2587#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2588 __pyx_atomic_int_type initialized;
2590} __Pyx_CachedCFunction;
2593static CYTHON_INLINE
int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2594#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2597static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2600#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2601static CYTHON_INLINE
int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2605 __pyx_nonatomic_int_type expected = 0;
2606 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2612static CYTHON_INLINE
void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2614 __pyx_atomic_store(&cfunc->initialized, 2);
2618#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2619#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
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);
2628#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
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);
2638#if CYTHON_AVOID_BORROWED_REFS
2639static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2642static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2646static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
2649static int __Pyx_ParseKeywordsTuple(
2651 PyObject *
const *kwvalues,
2652 PyObject **
const argnames[],
2655 Py_ssize_t num_pos_args,
2656 Py_ssize_t num_kwargs,
2657 const char* function_name,
2658 int ignore_unknown_kwargs
2660static int __Pyx_ParseKeywordDictToDict(
2662 PyObject **
const argnames[],
2665 Py_ssize_t num_pos_args,
2666 const char* function_name
2668static int __Pyx_ParseKeywordDict(
2670 PyObject **
const argnames[],
2672 Py_ssize_t num_pos_args,
2673 Py_ssize_t num_kwargs,
2674 const char* function_name,
2675 int ignore_unknown_kwargs
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);
2684#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
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
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);
2701static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
2704static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
const char *name,
int exact);
2707#if CYTHON_VECTORCALL
2708#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
2710static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *
const *args,
size_t nargsf);
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);
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)
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))
2735static void __Pyx_RaiseErrorWithType1(PyObject* exc_type,
const char* message,
const char *arg, PyTypeObject *type_obj);
2739static int __Pyx_RaiseUnexpectedTypeError(
const char *expected, PyObject *obj);
2742#define __Pyx_PyExc_MemoryError_Check(obj) __Pyx_TypeCheck(obj, PyExc_MemoryError)
2745static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2748#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError)
2751static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength,
const char* chars,
int clength,
2752 int prepend_sign,
char padding_char);
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);
2759#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2760#define __Pyx_HAS_GCC_DIAGNOSTIC
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)\
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);
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)\
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);
2785#define __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH\
2786 (!CYTHON_COMPILING_IN_GRAAL && !CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API)
2789static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
int kind);
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)\
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)\
2806static CYTHON_INLINE
int __Pyx__PyUnicode_EqualsUCS4(PyObject* s1, Py_UCS4 ch2,
int equals);
2810#define __Pyx_PyObject_Equals_obj_ch99(s1, s2, equals) __Pyx_PyObject_Equals_uchar(s1, s2, 99, equals, 0)
2813static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_object_str(PyObject *op1, PyObject *op2,
int pyop);
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))
2827 #define __Pyx_PyObject_FormatSimple(s, f) (\
2828 likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2829 PyObject_Format(s, f))
2833static CYTHON_INLINE PyObject* __Pyx_PyObject_CompareEq_object_bytes(PyObject *op1, PyObject *op2,
int pyop);
2835CYTHON_UNUSED
static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2837#define __Pyx_PyObject_Equals_str_ch99(s1, s2, equals) __Pyx_PyObject_Equals_uchar(s1, s2, 99, equals, 1)
2839static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *);
2841static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
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);
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);
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)
2869#define __Pyx_PyFrozenDict_TypePtr (&PyDict_Type)
2870static CYTHON_INLINE PyObject* __Pyx_PyFrozenDict_New(PyObject* it) {
2872 return PyDict_New();
2873 }
else if (PyDict_Check(it)) {
2874 return PyDict_Copy(it);
2876 PyObject *dict = PyDict_New();
2877 if (!dict)
return NULL;
2878 PyObject *result = PyNumber_InPlaceOr(dict, it);
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)
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);
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))
2915static void __Pyx_RaiseErrorWithType(PyObject* exc_type,
const char* message, PyTypeObject *type_obj);
2918#if CYTHON_USE_TYPE_SLOTS
2919static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
2921#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2925static void __Pyx_RejectKeywords(
const char* function_name, PyObject *kwds);
2928#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError)
2931static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t,
int b_is_constant);
2934#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
2935 (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2938static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
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);\
2953 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2954 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
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);
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);
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);\
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);\
2980static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
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);
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")))
2994 static int __Pyx_init_assertions_enabled(
void) {
2995 PyObject *builtins, *debug, *debug_str;
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);
3006 if (flag == -1)
goto bad;
3007 __pyx_assertions_enabled_flag = flag;
3010 __pyx_assertions_enabled_flag = 1;
3014 #define __Pyx_init_assertions_enabled() (0)
3015 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
3019#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError)
3022static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
3025static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
3028static CYTHON_INLINE
void __Pyx_RaiseNoneNotIterableError(
void);
3031#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
3032static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
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);
3042#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
3043#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
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)
3051static void __Pyx_RaiseErrorWithTypes1(PyObject* exc_type,
const char *message,
const char *arg, PyTypeObject *type_obj1, PyTypeObject *type_obj2);
3054static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
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);
3061static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
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);
3069static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
3073#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
3074#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
3076static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
3080CYTHON_UNUSED
static PyObject *
3081__Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t
n);
3087static PyObject *__Pyx__Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict,
int level);
3090static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname,
int level);
3092CYTHON_UNUSED
static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
3094static CYTHON_INLINE
int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x);
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
3101static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
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)
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);
3115static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject*
s, PyObject*
f);
3116static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject*
s, PyObject*
f);
3119#if CYTHON_USE_UNICODE_WRITER
3120static PyObject* __Pyx_PyObject_Format(PyObject*
s, PyObject*
f);
3122#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
3126#define __Pyx_PyObject_Unicode(obj)\
3127 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
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);
3139static void __Pyx_RaiseUnboundLocalError(
const char *varname);
3142static CYTHON_INLINE
long __Pyx_div_long(
long,
long,
int b_is_constant);
3145#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
3148#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
3152 #undef CYTHON_PROFILE_REUSE_FRAME
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
3159#ifndef CYTHON_PROFILE_REUSE_CODEOBJ
3160 #define CYTHON_PROFILE_REUSE_CODEOBJ 1
3162#ifndef CYTHON_PROFILE_REUSE_FRAME
3163 #define CYTHON_PROFILE_REUSE_FRAME 0
3165#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
3166 #define __PYX_MONITORING_ABI_SUFFIX "_mon"
3168 #define __PYX_MONITORING_ABI_SUFFIX
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)\
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);\
3205 PyMonitoring_ExitScope();\
3206 Py_XDECREF(__pyx_frame_code);\
3208 #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\
3211 memset(__pyx_pymonitoring_state, 0, sizeof(__pyx_pymonitoring_state));\
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;\
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;\
3231 if (unlikely(ret == -1)) goto_error;\
3233 #define __Pyx_TraceStartGen(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\
3235 int ret = __Pyx__TraceStartGen(__pyx_pymonitoring_state, &__pyx_pymonitoring_version, __pyx_frame_code, offset);\
3236 if (unlikely(ret == -1)) goto_error;\
3238 #define __Pyx_TraceResumeGen(funcname, srcfile, firstlineno, offset, goto_error)\
3240 int ret = __Pyx__TraceResumeGen(__pyx_pymonitoring_state, &__pyx_pymonitoring_version, __pyx_frame_code, offset);\
3241 if (unlikely(ret == -1)) goto_error;\
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;\
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);\
3254 __pyx_exception_already_reported = 1;\
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;\
3262 #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\
3263 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_RETURN)); else {\
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);\
3272 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, result);\
3274 if (unlikely(ret == -1)) goto_error;\
3276 #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\
3277 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_RETURN)); else {\
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;\
3286 pyvalue = Py_None; Py_INCREF(Py_None);\
3288 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, pyvalue);\
3289 Py_DECREF(pyvalue);\
3290 PyGILState_Release(state);\
3293 PyObject *pyvalue = convert_function(cresult);\
3294 if (unlikely(!pyvalue)) {\
3295 if (!PyErr_ExceptionMatches(PyExc_Exception)) goto_error;\
3297 pyvalue = Py_None; Py_INCREF(Py_None);\
3299 ret = PyMonitoring_FirePyReturnEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_RETURN], __pyx_frame_code, offset, pyvalue);\
3300 Py_DECREF(pyvalue);\
3302 if (unlikely(ret == -1)) goto_error;\
3304 #define __Pyx_TraceExceptionUnwind(offset, nogil)\
3305 if (!__Pyx_IsTracing(__Pyx_Monitoring_PY_UNWIND)); else {\
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);\
3313 (void) PyMonitoring_FirePyUnwindEvent(&__pyx_pymonitoring_state[__Pyx_Monitoring_PY_UNWIND], __pyx_frame_code, offset);\
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 {\
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);\
3328 ret = __Pyx__TraceLine(&__pyx_pymonitoring_state[__Pyx_Monitoring_LINE], __pyx_frame_code, line, offset);\
3330 if (unlikely(ret == -1)) goto_error;\
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
3341 #include "internal/pycore_frame.h"
3343 #if CYTHON_PROFILE_REUSE_FRAME
3344 #define CYTHON_FRAME_MODIFIER static
3345 #define CYTHON_FRAME_DEL(frame)
3347 #define CYTHON_FRAME_MODIFIER
3348 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
3350 #if CYTHON_PROFILE_REUSE_CODEOBJ
3351 #define CYTHON_CODEOBJ_MODIFIER static
3353 #define CYTHON_CODEOBJ_MODIFIER
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);\
3371 CYTHON_FRAME_DEL(__pyx_frame);\
3373 #define __Pyx_TraceException(offset, reraised, fresh) {}
3374 #define __Pyx_TraceExceptionHandled(offset) {}
3375 #define __Pyx_TraceExceptionDone() {}
3376 #define __Pyx_TurnOffSysMonitoringInParallel {}
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)))
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)))
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)\
3400 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
3401 || tstate->c_profilefunc != NULL);\
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)\
3413 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
3414 || tstate->c_profilefunc != NULL);\
3417 #define __Pyx_TraceStartFunc(funcname, srcfile, firstlineno, offset, nogil, skip_event, goto_error)\
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);\
3426 PyGILState_Release(state);\
3427 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
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;\
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);\
3443 if ((1)); else goto_error;\
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);
3458 #define __Pyx_TraceReturnValue(result, offset, nogil, goto_error)\
3459 if (likely(!__Pyx_use_tracing)); else {\
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);\
3468 PyGILState_Release(state);\
3471 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3472 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3473 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3476 if ((1)); else goto_error;\
3478 #define __Pyx_TraceReturnCValue(cresult, convert_function, offset, nogil, goto_error)\
3479 if (likely(!__Pyx_use_tracing)); else {\
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\
3490 pyvalue = Py_None; Py_INCREF(Py_None);\
3492 __Pyx_call_return_trace_func(tstate, __pyx_frame, pyvalue);\
3493 Py_DECREF(pyvalue);\
3495 PyGILState_Release(state);\
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\
3504 pyvalue = Py_None; Py_INCREF(Py_None);\
3506 __Pyx_call_return_trace_func(tstate, __pyx_frame, pyvalue);\
3507 Py_DECREF(pyvalue);\
3510 if ((1)); else goto_error;\
3512 #define __Pyx_TraceExceptionUnwind(offset, nogil)\
3513 if (likely(!__Pyx_use_tracing)); else {\
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);\
3522 PyGILState_Release(state);\
3525 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3526 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3527 __Pyx_call_return_trace_func(tstate, __pyx_frame, Py_None);\
3531 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate,
const char *funcname,
const char *srcfile,
int firstlineno,
int skip_event);
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 {\
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);\
3545 __Pyx_PyGILState_Release(state);\
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);\
3553 if (unlikely(ret)) goto_error;\
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 }
3577 #define __Pyx_TraceLine(line, offset, nogil, goto_error) if ((1)); else goto_error;
3581static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
3584static void __Pyx_RaiseClosureNameError(
const char *varname);
3587static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
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);
3594 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
3598static PyObject *__Pyx_FetchSharedCythonABIModule(
void);
3601static int __Pyx_VerifyCachedType(PyObject *cached_type,
3603 Py_ssize_t expected_basicsize);
3606static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
3609static int __pyx_CommonTypesMetaclass_init(PyObject *module);
3610#define __Pyx_CommonTypesMetaclass_USED
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))
3617#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
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)
3629 #define __Pyx__CyFunction_GetClassObj(f)\
3630 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
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)
3641#if CYTHON_COMPILING_IN_LIMITED_API
3642#if !CYTHON_OPAQUE_OBJECTS
3645 PyMethodDef *func_methoddef;
3646 PyObject *func_module;
3648 PyCMethodObject func;
3650#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
3651 __pyx_vectorcallfunc func_vectorcall;
3653#if CYTHON_COMPILING_IN_LIMITED_API
3654 PyObject *func_weakreflist;
3656#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
3657 PyObject *func_dict;
3659 PyObject *func_name;
3660 PyObject *func_qualname;
3662 PyObject *func_globals;
3663 PyObject *func_code;
3664 PyObject *func_closure;
3665#if CYTHON_COMPILING_IN_LIMITED_API
3666 PyObject *func_classobj;
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;
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,
3690static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
3692static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
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)
3699#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
3704#if !CYTHON_USE_TYPE_SPECS
3705#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
3707static int __Pyx_call_type_traverse(PyObject *o,
int always_call, visitproc visit,
void *arg);
3711static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
3714#if CYTHON_VECTORCALL
3715static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw);
3719static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
3720 int flags, PyObject* qualname,
3722 PyObject *module, PyObject *globals,
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);
3732static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
3733 int flags, PyObject* qualname,
3735 PyObject *module, PyObject *globals,
3737static PyTypeObject *__Pyx_Get_CyFunction_Type(
void);
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);
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)
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);
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)
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);
3766static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolLt_int_object(PyObject *op1, PyObject *op2,
int pyop);
3769static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t,
int is_final);
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);
3778#if CYTHON_VECTORCALL_TPNEW
3779static PyObject *__Pyx_CallNewInitFromVectorcall(PyTypeObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
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);
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
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)
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)))
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);\
3809#define __Pyx_DeallocKeepAliveEnd(o)\
3810 _Py_atomic_store_uint32_relaxed(&(o)->ob_ref_local, 0)
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)
3819void __Pyx_default_placement_construct(
T* x) {
3820 new (
static_cast<void*
>(x))
T();
3824static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
3827#if !CYTHON_USE_TYPE_SLOTS
3828CYTHON_UNUSED
static Py_ssize_t __Pyx_GetTypeDictOffset(PyObject *tp,
int require_cython_valid_result);
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);
3837CYTHON_UNUSED
static int __Pyx_PyType_Ready(PyTypeObject *t);
3840#if CYTHON_COMPILING_IN_LIMITED_API
3841static PyObject *__Pyx_GetTypeTypeDict(PyTypeObject *tp);
3845#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)
3848static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
3851#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
3854static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *
v);
3857static int __Pyx_setup_reduce(PyObject* type_obj);
3860static int __Pyx_GetVtable(PyTypeObject *type,
void** table);
3863static int __Pyx_MergeVtables(PyTypeObject *type);
3866static int __Pyx_SetVtable(PyTypeObject* typeptr ,
void* vtable);
3869#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
3870int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp,
int is_sequence);
3872#define __Pyx_ApplySequenceOrMappingFlag(tp, is_sequence) (0)
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>
3881#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
3882#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
3884#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
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
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);
3895#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
3896static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
3898#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
3902#if CYTHON_COMPILING_IN_LIMITED_API
3903typedef PyObject __Pyx_CachedCodeObjectType;
3905typedef PyCodeObject __Pyx_CachedCodeObjectType;
3908 __Pyx_CachedCodeObjectType* code_object;
3910} __Pyx_CodeObjectCacheEntry;
3911struct __Pyx_CodeObjectCache {
3914 __Pyx_CodeObjectCacheEntry* entries;
3915 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
3916 __pyx_atomic_int_type accessor_count;
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);
3924static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
3925 int py_line,
const char *filename);
3929 Py_ssize_t shape, strides, suboffsets;
3936 __Pyx_Buffer *rcbuffer;
3938 __Pyx_Buf_DimInfo diminfo[8];
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);
3953static int __pyx_memviewslice_is_contig(
const __Pyx_memviewslice mvs,
char order,
int ndim);
3956static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
3957 __Pyx_memviewslice *slice2,
3958 int ndim,
size_t itemsize);
3961static int __Pyx_init_memviewslice(
3962 struct __pyx_memoryview_obj *memview,
3964 __Pyx_memviewslice *memviewslice,
3965 int memview_is_new_reference);
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,
3977static CYTHON_INLINE PyObject *__pyx_memview_get_double(
const char *itemp);
3978static CYTHON_INLINE
int __pyx_memview_set_double(
char *itemp, PyObject *obj);
3981static CYTHON_INLINE
int __Pyx_Is_Little_Endian(
void);
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);
3990static int __pyx_typeinfo_cmp(
const __Pyx_TypeInfo *a,
const __Pyx_TypeInfo *b);
3993static int __Pyx_ValidateAndInit_memviewslice(
3998 const __Pyx_TypeInfo *dtype,
3999 __Pyx_BufFmt_StackElem stack[],
4000 __Pyx_memviewslice *memviewslice,
4001 PyObject *original_obj);
4004static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *,
int writable_flag);
4007static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
4010static void __Pyx_RaiseUnpickleChecksumError(
long checksum,
long checksum1,
long checksum2,
long checksum3,
const char *members);
4015 #define __Pyx_CREAL(z) ((z).real())
4016 #define __Pyx_CIMAG(z) ((z).imag())
4018 #define __Pyx_CREAL(z) (__real__(z))
4019 #define __Pyx_CIMAG(z) (__imag__(z))
4022 #define __Pyx_CREAL(z) ((z).real)
4023 #define __Pyx_CIMAG(z) ((z).imag)
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))
4030 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
4031 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
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))
4043 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
4044 #define __Pyx_c_conj_float(z) (::std::conj(z))
4046 #define __Pyx_c_abs_float(z) (::std::abs(z))
4047 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
4050 #define __Pyx_c_is_zero_float(z) ((z)==0)
4051 #define __Pyx_c_conj_float(z) (conjf(z))
4053 #define __Pyx_c_abs_float(z) (cabsf(z))
4054 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
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);
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);
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))
4081 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
4082 #define __Pyx_c_conj_double(z) (::std::conj(z))
4084 #define __Pyx_c_abs_double(z) (::std::abs(z))
4085 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
4088 #define __Pyx_c_is_zero_double(z) ((z)==0)
4089 #define __Pyx_c_conj_double(z) (conj(z))
4091 #define __Pyx_c_abs_double(z) (cabs(z))
4092 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
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);
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);
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))
4119 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
4120 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
4122 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
4123 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
4126 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
4127 #define __Pyx_c_conj_long__double(z) (conjl(z))
4129 #define __Pyx_c_abs_long__double(z) (cabsl(z))
4130 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
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);
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);
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);
4156#if CYTHON_VECTORCALL
4157#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
4158CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
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);
4166#if CYTHON_VECTORCALL
4167#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
4169static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
4173static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(
int value);
4176static CYTHON_INLINE
int __Pyx_PyLong_As_int(PyObject *);
4179static CYTHON_INLINE
long __Pyx_PyLong_As_long(PyObject *);
4182static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(
long value);
4185static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index);
4188static CYTHON_INLINE
int __Pyx_CheckUnpickleChecksum(
long checksum,
long checksum1,
long checksum2,
long checksum3,
const char *members);
4191static CYTHON_INLINE
char __Pyx_PyLong_As_char(PyObject *);
4194#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
4195static unsigned long __Pyx_cached_runtime_version = 0;
4196static void __Pyx_init_runtime_version(
void);
4198#define __Pyx_init_runtime_version()
4200static unsigned long __Pyx_get_runtime_version(
void);
4203static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer);
4206static PyObject *__Pyx_DecompressString(
const char *
s, Py_ssize_t length,
int algo);
4209static PyObject *__Pyx_DecompressString_LZSS(
const char *
s,
size_t compressed_length,
size_t uncompressed_length);
4212#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
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
4225#if CYTHON_COMPILING_IN_LIMITED_API
4226 #if CYTHON_VECTORCALL
4227 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
4229 #define __PYX_VECTORCALL_ABI_SUFFIX
4231 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
4233 #define __PYX_LIMITED_ABI_SUFFIX
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"
4240 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
4242#ifndef __PYX_MONITORING_ABI_SUFFIX
4243 #define __PYX_MONITORING_ABI_SUFFIX
4245#if CYTHON_USE_TP_FINALIZE
4246 #define __PYX_TP_FINALIZE_ABI_SUFFIX
4248 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
4250#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
4251 #define __PYX_FREELISTS_ABI_SUFFIX
4253 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
4255#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
4256 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
4258 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
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 "."
4264static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *__pyx_v_self);
4265static char *__pyx_memoryview_get_item_pointer(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
4266static PyObject *__pyx_memoryview_is_slice(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj);
4267static PyObject *__pyx_memoryview_setitem_slice_assignment(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src);
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);
4269static PyObject *__pyx_memoryview_setitem_indexed(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_indices, PyObject *__pyx_v_value);
4270static PyObject *__pyx_memoryview_setitem_indexed1(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
4271static PyObject *__pyx_memoryview_convert_item_to_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp);
4272static PyObject *__pyx_memoryview_assign_item_from_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
4273static PyObject *__pyx_memoryview__get_base(
struct __pyx_memoryview_obj *__pyx_v_self);
4274static PyObject *__pyx_memoryviewslice_convert_item_to_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp);
4275static PyObject *__pyx_memoryviewslice_assign_item_from_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
4276static PyObject *__pyx_memoryviewslice__get_base(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
4277static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self);
4278static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self);
4279static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self);
4280static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self);
4281static CYTHON_INLINE
int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self);
4282static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self);
4283static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self);
4284static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self);
4285static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self);
4286static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self);
4287static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self);
4288static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self);
4289static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self);
4290static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self);
4291static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self);
4292static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self);
4293static CYTHON_INLINE
void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self);
4294static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self);
4295static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self);
4296static CYTHON_INLINE
int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self);
4297static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self);
4298static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self);
4299static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self);
4300static CYTHON_INLINE
char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self);
4301static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self);
4302static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self);
4303static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self);
4304static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self);
4305static CYTHON_INLINE
void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self);
4306static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self);
4307static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self);
4308static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self);
4309static CYTHON_INLINE
void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self);
4310static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self);
4311static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self);
4312static void __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self,
int __pyx_skip_dispatch);
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 *);
4348static int __pyx_array_allocate_buffer(
struct __pyx_array_obj *);
4349static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t,
char *,
char const *,
char *);
4350static PyObject *__pyx_memoryview_new(PyObject *,
int,
int, __Pyx_TypeInfo
const *);
4351static CYTHON_INLINE
int __pyx_memoryview_check(PyObject *);
4352static int __pyx_memoryview_err_invalid_index(PyObject *);
4353static PyObject *_unellipsify_index_tuple(PyObject *,
int);
4354static PyObject *_unellipsify(PyObject *,
int);
4355static int assert_direct_dimensions(Py_ssize_t *,
int);
4356static struct __pyx_memoryview_obj *__pyx_memview_slice(
struct __pyx_memoryview_obj *, PyObject *);
4357static char *__pyx_pybuffer_index(Py_buffer *,
char *, Py_ssize_t, Py_ssize_t);
4358static int __pyx_memslice_transpose(__Pyx_memviewslice *);
4359static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice,
int, PyObject *(*)(
char *), __pyx_memoryview_to_dtype_func_type,
int);
4360static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
4361static void __pyx_memoryview_slice_copy(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
4362static PyObject *__pyx_memoryview_copy_object(
struct __pyx_memoryview_obj *);
4363static PyObject *__pyx_memoryview_copy_object_from_slice(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
4364static Py_ssize_t abs_py_ssize_t(Py_ssize_t);
4365static char __pyx_get_best_slice_order(__Pyx_memviewslice *,
int);
4366static void _copy_strided_to_strided(
char *, Py_ssize_t *,
char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *,
int,
size_t);
4367static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *,
int,
size_t);
4368static size_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *,
int);
4369static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t,
int,
char);
4370static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *,
char,
int);
4371static int __pyx_memoryview_err_extents(
int, Py_ssize_t, Py_ssize_t);
4372static int __pyx_memoryview_err_dim(PyObject *,
char const *,
int);
4373static int __pyx_memoryview_err(PyObject *,
char const *);
4374static int __pyx_memoryview_err_no_memory(
void);
4375static int __pyx_memoryview_err_ValueError(
char const *);
4376static int __pyx_memoryview_err_IndexError(
char const *, Py_ssize_t);
4377static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice,
int,
int,
int);
4378static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *,
int,
int);
4379static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *,
int,
int,
int);
4380static void __pyx_memoryview_refcount_objects_in_slice_with_gil(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
4381static void __pyx_memoryview_refcount_objects_in_slice(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
4382static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *,
int,
size_t,
void *,
int);
4383static void __pyx_memoryview__slice_assign_scalar(
char *, Py_ssize_t *, Py_ssize_t *,
int,
size_t,
void *);
4384static PyObject *__pyx_unpickle_Enum__set_state(
struct __pyx_MemviewEnum_obj *, PyObject *);
4386static const __Pyx_TypeInfo __Pyx_TypeInfo_double = {
"double", NULL,
sizeof(double), { 0 }, 0,
'R', 0, 0 };
4388#define __Pyx_MODULE_NAME "BoundaryConditions"
4389extern int __pyx_module_is_main_BoundaryConditions;
4390int __pyx_module_is_main_BoundaryConditions = 0;
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;
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)";
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);
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);
4419static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(
struct __pyx_array_obj *__pyx_v_self);
4420static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(
struct __pyx_array_obj *__pyx_v_self);
4421static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(
struct __pyx_array_obj *__pyx_v_self);
4422static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr);
4423static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item);
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);
4425static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self);
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);
4427static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name);
4428static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
4429static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
4430static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state);
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);
4432static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(
struct __pyx_memoryview_obj *__pyx_v_self);
4433static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
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);
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);
4436static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4437static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4438static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4439static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4440static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4441static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4442static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4443static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4444static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
4445static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(
struct __pyx_memoryview_obj *__pyx_v_self);
4446static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(
struct __pyx_memoryview_obj *__pyx_v_self);
4447static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(
struct __pyx_memoryview_obj *__pyx_v_self);
4448static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
4449static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
4450static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(
struct __pyx_memoryview_obj *__pyx_v_self);
4451static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(
struct __pyx_memoryview_obj *__pyx_v_self);
4452static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self);
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);
4454static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
4455static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self);
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);
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);
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);
4459static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2getContext(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_context);
4460static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4461static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
4462static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4463static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
4464static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4465static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4466static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
4467static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4468static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4469static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
4470static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4471static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4472static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
4473static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4474static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
4475static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v___pyx_state);
4476static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
4477static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
4478static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
4479static PyObject *__pyx_pf_18BoundaryConditions_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
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);
4481static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value);
4482static PyObject *__pyx_pf_18BoundaryConditions_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
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);
4484static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_a0, PyObject *__pyx_v_a);
4485static PyObject *__pyx_pf_18BoundaryConditions_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
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);
4487static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_t1, PyObject *__pyx_v_value);
4488static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
4489static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value);
4490static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
4491static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
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);
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);
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
4498 PyObject *a, PyObject *k
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
4505 PyObject *a, PyObject *k
4508#if CYTHON_VECTORCALL_TPNEW
4509static PyObject *__pyx_tp_new_18BoundaryConditions_BC_Base(PyTypeObject *t, PyObject *a, PyObject *k);
4511#if !CYTHON_VECTORCALL_TPNEW
4512#define __pyx_tp_new_18BoundaryConditions_BC_Base __pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base
4514#if CYTHON_VECTORCALL_TPNEW
4515static PyObject *__pyx_tp_vectorcall_18BoundaryConditions_BC_Base(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
4517#if CYTHON_VECTORCALL_TPNEW
4518static int __pyx_tp_init_18BoundaryConditions_BC_Base(PyObject *o, PyObject *args, PyObject *kwds);
4520#if !CYTHON_VECTORCALL_TPNEW
4521#define __pyx_tp_init_18BoundaryConditions_BC_Base __pyx_pw_18BoundaryConditions_7BC_Base_1__init__
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
4527 PyObject *a, PyObject *k
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
4534 PyObject *a, PyObject *k
4537#if CYTHON_VECTORCALL_TPNEW
4538static PyObject *__pyx_tp_new_18BoundaryConditions_BoundaryCondition(PyTypeObject *t, PyObject *a, PyObject *k);
4540#if !CYTHON_VECTORCALL_TPNEW
4541#define __pyx_tp_new_18BoundaryConditions_BoundaryCondition __pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition
4543#if CYTHON_VECTORCALL_TPNEW
4544static PyObject *__pyx_tp_vectorcall_18BoundaryConditions_BoundaryCondition(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
4546#if CYTHON_VECTORCALL_TPNEW
4547static int __pyx_tp_init_18BoundaryConditions_BoundaryCondition(PyObject *o, PyObject *args, PyObject *kwds);
4549#if !CYTHON_VECTORCALL_TPNEW
4550#define __pyx_tp_init_18BoundaryConditions_BoundaryCondition __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__
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
4556 PyObject *a, PyObject *k
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
4563 PyObject *a, PyObject *k
4566#if CYTHON_VECTORCALL_TPNEW
4567static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k);
4569#if !CYTHON_VECTORCALL_TPNEW
4570#define __pyx_tp_new_18BoundaryConditions___pyx_defaults __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults
4572#if CYTHON_VECTORCALL_TPNEW
4573static PyObject *__pyx_tp_vectorcall_18BoundaryConditions___pyx_defaults(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
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
4579 PyObject *a, PyObject *k
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
4586 PyObject *a, PyObject *k
4589#if CYTHON_VECTORCALL_TPNEW
4590static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t, PyObject *a, PyObject *k);
4592#if !CYTHON_VECTORCALL_TPNEW
4593#define __pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_scope_struct__setConstantBC
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);
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
4602 PyObject *a, PyObject *k
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
4609 PyObject *a, PyObject *k
4612#if CYTHON_VECTORCALL_TPNEW
4613static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t, PyObject *a, PyObject *k);
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
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);
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
4625 PyObject *a, PyObject *k
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
4632 PyObject *a, PyObject *k
4635#if CYTHON_VECTORCALL_TPNEW
4636static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t, PyObject *a, PyObject *k);
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
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);
4644static PyObject *__pyx_tp_new__initialisation_array(PyObject *o,
4645#
if CYTHON_VECTORCALL_TPNEW
4646 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4648 PyObject *a, PyObject *k
4651static PyObject *__pyx_tp_new_vectorcall_array(PyTypeObject *t,
4652#
if CYTHON_VECTORCALL_TPNEW
4653 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4655 PyObject *a, PyObject *k
4658#if CYTHON_VECTORCALL_TPNEW
4659static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k);
4661#if !CYTHON_VECTORCALL_TPNEW
4662#define __pyx_tp_new_array __pyx_tp_new_vectorcall_array
4664#if CYTHON_VECTORCALL_TPNEW
4665static PyObject *__pyx_tp_vectorcall_array(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
4667static PyObject *__pyx_tp_new__initialisation_Enum(PyObject *o,
4668#
if CYTHON_VECTORCALL_TPNEW
4669 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4671 PyObject *a, PyObject *k
4674static PyObject *__pyx_tp_new_vectorcall_Enum(PyTypeObject *t,
4675#
if CYTHON_VECTORCALL_TPNEW
4676 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4678 PyObject *a, PyObject *k
4681#if CYTHON_VECTORCALL_TPNEW
4682static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k);
4684#if !CYTHON_VECTORCALL_TPNEW
4685#define __pyx_tp_new_Enum __pyx_tp_new_vectorcall_Enum
4687#if CYTHON_VECTORCALL_TPNEW
4688static PyObject *__pyx_tp_vectorcall_Enum(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
4690#if CYTHON_VECTORCALL_TPNEW
4691static int __pyx_tp_init_Enum(PyObject *o, PyObject *args, PyObject *kwds);
4693#if !CYTHON_VECTORCALL_TPNEW
4694#define __pyx_tp_init_Enum __pyx_MemviewEnum___init__
4696static PyObject *__pyx_tp_new__initialisation_memoryview(PyObject *o,
4697#
if CYTHON_VECTORCALL_TPNEW
4698 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4700 PyObject *a, PyObject *k
4703static PyObject *__pyx_tp_new_vectorcall_memoryview(PyTypeObject *t,
4704#
if CYTHON_VECTORCALL_TPNEW
4705 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4707 PyObject *a, PyObject *k
4710#if CYTHON_VECTORCALL_TPNEW
4711static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k);
4713#if !CYTHON_VECTORCALL_TPNEW
4714#define __pyx_tp_new_memoryview __pyx_tp_new_vectorcall_memoryview
4716#if CYTHON_VECTORCALL_TPNEW
4717static PyObject *__pyx_tp_vectorcall_memoryview(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
4719static PyObject *__pyx_tp_new__initialisation__memoryviewslice(PyObject *o,
4720#
if CYTHON_VECTORCALL_TPNEW
4721 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4723 PyObject *a, PyObject *k
4726static PyObject *__pyx_tp_new_vectorcall__memoryviewslice(PyTypeObject *t,
4727#
if CYTHON_VECTORCALL_TPNEW
4728 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
4730 PyObject *a, PyObject *k
4733#if CYTHON_VECTORCALL_TPNEW
4734static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k);
4736#if !CYTHON_VECTORCALL_TPNEW
4737#define __pyx_tp_new__memoryviewslice __pyx_tp_new_vectorcall__memoryviewslice
4739#if CYTHON_VECTORCALL_TPNEW
4740static PyObject *__pyx_tp_vectorcall__memoryviewslice(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
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))
4751 #define CYTHON_SMALL_CODE
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];
4811#if CYTHON_COMPILING_IN_LIMITED_API
4812PyObject *__Pyx_PyFrozenDictType;
4816PyTypeObject *__pyx_CommonTypesMetaclassType;
4819#if CYTHON_COMPILING_IN_LIMITED_API
4820PyObject *__Pyx_CachedMethodType;
4824PyTypeObject *__pyx_CyFunctionType;
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;
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;
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;
4842struct __Pyx_CodeObjectCache __pyx_code_cache;
4850#if CYTHON_USE_MODULE_STATE
4853extern struct PyModuleDef __pyx_moduledef;
4856static struct PyModuleDef __pyx_moduledef;
4859#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
4861#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
4863static __pyx_mstatetype __pyx_mstate_global_static =
4869static __pyx_mstatetype *
const __pyx_mstate_global = &__pyx_mstate_global_static;
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]
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);
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]); }
5109Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
5112Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
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]); }
5175Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
5178Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
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
5199PyObject *__pyx_args, PyObject *__pyx_kwds
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
5206PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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;
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);
5229 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
5232 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
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) {
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)
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)
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)
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)
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)
5260 default:
goto __pyx_L5_argtuple_error;
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) }
5269 switch (__pyx_nargs) {
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)
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)
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)
5286 default:
goto __pyx_L5_argtuple_error;
5288 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
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];
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)
5305 __pyx_v_allocate_buffer = ((int)1);
5309 __pyx_L5_argtuple_error:;
5310 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 147, __pyx_L3_error)
5312 goto __pyx_L4_argument_unpacking_done;
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]);
5317 __Pyx_AddTraceback(
"View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5318 __Pyx_RefNannyFinishContext();
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)
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);
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]);
5342 goto __pyx_L7_cleaned_up;
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]);
5347 __pyx_L7_cleaned_up:;
5350 __Pyx_RefNannyFinishContext();
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) {
5356 Py_ssize_t __pyx_v_dim;
5359 __Pyx_RefNannyDeclarations
5360 Py_ssize_t __pyx_t_1;
5364 PyObject *__pyx_t_5 = NULL;
5365 PyObject *__pyx_t_6 = NULL;
5368 Py_ssize_t __pyx_t_9;
5369 PyObject *__pyx_t_10 = NULL;
5370 PyObject *__pyx_t_11[5];
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);
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)
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);
5401 __pyx_v_self->itemsize = __pyx_v_itemsize;
5410 __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
5412 if (unlikely(__pyx_t_2)) {
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)
5441 __pyx_t_2 = (__pyx_v_itemsize <= 0);
5443 if (unlikely(__pyx_t_2)) {
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)
5472 __pyx_t_2 = PyBytes_Check(__pyx_v_format);
5473 __pyx_t_4 = (!__pyx_t_2);
5486 __pyx_t_6 = __pyx_v_format;
5487 __Pyx_INCREF(__pyx_t_6);
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);
5496 __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_5);
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);
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)
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;
5545 __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((
sizeof(Py_ssize_t)) * 2) * ((
size_t)__pyx_v_self->ndim))));
5554 __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
5563 __pyx_t_4 = (!(__pyx_v_self->_shape != 0));
5565 if (unlikely(__pyx_t_4)) {
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)
5596 __pyx_t_5 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_5);
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)
5604 if (__pyx_t_1 >= __pyx_temp)
break;
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));
5609 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __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);
5627 __pyx_t_4 = (__pyx_v_dim <= 0);
5629 if (unlikely(__pyx_t_4)) {
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;
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]);
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)
5678 (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
5688 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
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)
5708 __pyx_v_order =
'C';
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;
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)) {
5751 __pyx_v_order =
'F';
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;
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)
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);
5811 __pyx_v_self->free_data = __pyx_v_allocate_buffer;
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;
5832 if (__pyx_v_allocate_buffer) {
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)
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);
5875 __Pyx_XDECREF(__pyx_v_format);
5877 __Pyx_RefNannyFinishContext();
5890CYTHON_UNUSED
static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
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;
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));
5902 __Pyx_RefNannyFinishContext();
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;
5909 __Pyx_RefNannyDeclarations
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");
5922 __Pyx_RefNannySetupContext(
"__getbuffer__", 0);
5923 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
5924 __Pyx_GIVEREF(__pyx_v_info->obj);
5933 __pyx_v_bufmode = -1;
5942 __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
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)
5965 __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
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)
5995 __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
6014 __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
6016 if (unlikely(__pyx_t_1)) {
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)
6054 __pyx_t_3 = __pyx_v_self->data;
6056 __pyx_v_info->buf = __pyx_t_3;
6065 __pyx_t_4 = __pyx_v_self->len;
6067 __pyx_v_info->len = __pyx_t_4;
6076 __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
6088 __pyx_t_2 = __pyx_v_self->ndim;
6090 __pyx_v_info->ndim = __pyx_t_2;
6099 __pyx_t_5 = __pyx_v_self->_shape;
6101 __pyx_v_info->shape = __pyx_t_5;
6110 __pyx_t_5 = __pyx_v_self->_strides;
6112 __pyx_v_info->strides = __pyx_t_5;
6132 __pyx_v_info->ndim = 1;
6141 __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
6145 __pyx_t_5 = (&__pyx_v_self->len);
6151 __pyx_v_info->shape = __pyx_t_5;
6160 __pyx_v_info->strides = NULL;
6171 __pyx_v_info->suboffsets = NULL;
6180 __pyx_t_4 = __pyx_v_self->itemsize;
6182 __pyx_v_info->itemsize = __pyx_t_4;
6191 __pyx_v_info->readonly = 0;
6200 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
6204 __pyx_t_3 = __pyx_v_self->format;
6210 __pyx_v_info->format = __pyx_t_3;
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);
6237 __Pyx_AddTraceback(
"View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
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;
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;
6252 __Pyx_RefNannyFinishContext();
6265static void __pyx_array___dealloc__(PyObject *__pyx_v_self);
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));
6274 __Pyx_RefNannyFinishContext();
6277static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(
struct __pyx_array_obj *__pyx_v_self) {
6288 __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
6300 __pyx_v_self->callback_free_data(__pyx_v_self->data);
6319 if (__pyx_v_self->free_data) {
6322 __pyx_t_1 = __pyx_v_self->free_data;
6323 goto __pyx_L4_bool_binop_done;
6325 __pyx_t_2 = (__pyx_v_self->data != NULL);
6328 __pyx_t_1 = __pyx_t_2;
6330 __pyx_L4_bool_binop_done:;
6341 if (__pyx_v_self->dtype_is_object) {
6350 __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
6368 free(__pyx_v_self->data);
6387 PyObject_Free(__pyx_v_self->_shape);
6410static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self);
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));
6420 __Pyx_RefNannyFinishContext();
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);
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);
6443 PyObject *__pyx_temp;
6445 __pyx_temp = __pyx_r;
6446 __pyx_r = __pyx_t_1;
6448 __Pyx_XDECREF(__pyx_temp);
6463 __Pyx_XDECREF(__pyx_t_1);
6464 __Pyx_AddTraceback(
"View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6467 __Pyx_XGIVEREF(__pyx_r);
6468 __Pyx_RefNannyFinishContext();
6480static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *__pyx_v_self) {
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;
6489 int __pyx_lineno = 0;
6490 const char *__pyx_filename = NULL;
6491 int __pyx_clineno = 0;
6492 __Pyx_RefNannySetupContext(
"get_memview", 0);
6501 __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
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);
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);
6526 PyObject *__pyx_temp;
6528 __pyx_temp = __pyx_r;
6529 __pyx_r = ((PyObject *)__pyx_t_1);
6531 __Pyx_XDECREF(__pyx_temp);
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);
6554 __Pyx_XGIVEREF(__pyx_r);
6555 __Pyx_RefNannyFinishContext();
6568static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self);
6569static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
6570 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
6578 __Pyx_RefNannyFinishContext();
6582static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(
struct __pyx_array_obj *__pyx_v_self) {
6594 __pyx_r = (__pyx_v_self->_shape[0]);
6621static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr);
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));
6631 __Pyx_RefNannyFinishContext();
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);
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;
6658 PyObject *__pyx_temp;
6660 __pyx_temp = __pyx_r;
6661 __pyx_r = __pyx_t_2;
6663 __Pyx_XDECREF(__pyx_temp);
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);
6683 __Pyx_XGIVEREF(__pyx_r);
6684 __Pyx_RefNannyFinishContext();
6697static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item);
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));
6707 __Pyx_RefNannyFinishContext();
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);
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;
6734 PyObject *__pyx_temp;
6736 __pyx_temp = __pyx_r;
6737 __pyx_r = __pyx_t_2;
6739 __Pyx_XDECREF(__pyx_temp);
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);
6759 __Pyx_XGIVEREF(__pyx_r);
6760 __Pyx_RefNannyFinishContext();
6773static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value);
6774static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6775 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
6783 __Pyx_RefNannyFinishContext();
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) {
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);
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;
6820 __Pyx_XDECREF(__pyx_t_1);
6821 __Pyx_AddTraceback(
"View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6825 __Pyx_RefNannyFinishContext();
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
6840PyObject *__pyx_args, PyObject *__pyx_kwds
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
6847PyObject *__pyx_args, PyObject *__pyx_kwds
6850 #if !CYTHON_VECTORCALL
6851 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
6861 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
6872 __Pyx_RefNannyFinishContext();
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);
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)
6901 __Pyx_AddTraceback(
"View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6903 __Pyx_XGIVEREF(__pyx_r);
6904 __Pyx_RefNannyFinishContext();
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
6920PyObject *__pyx_args, PyObject *__pyx_kwds
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
6927PyObject *__pyx_args, PyObject *__pyx_kwds
6930 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
6931 #if !CYTHON_VECTORCALL
6932 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
6946 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6949 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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)
6961 default:
goto __pyx_L5_argtuple_error;
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) }
6968 }
else if (unlikely(__pyx_nargs != 1)) {
6969 goto __pyx_L5_argtuple_error;
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)
6974 __pyx_v___pyx_state = values[0];
6977 __pyx_L5_argtuple_error:;
6978 __Pyx_RaiseArgtupleInvalid(
"__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
6980 goto __pyx_L4_argument_unpacking_done;
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]);
6985 __Pyx_AddTraceback(
"View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6986 __Pyx_RefNannyFinishContext();
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);
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]);
6995 __Pyx_RefNannyFinishContext();
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);
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)
7024 __Pyx_AddTraceback(
"View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7026 __Pyx_XGIVEREF(__pyx_r);
7027 __Pyx_RefNannyFinishContext();
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;
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;
7058 __pyx_v_self->free_data = 1;
7067 __pyx_v_self->data = ((
char *)malloc(((
size_t)__pyx_v_self->len)));
7076 __pyx_t_1 = (!(__pyx_v_self->data != 0));
7078 if (unlikely(__pyx_t_1)) {
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)
7107 if (__pyx_v_self->dtype_is_object) {
7116 __pyx_v_p = ((PyObject **)__pyx_v_self->data);
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)
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)
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;
7137 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
7138 __pyx_v_i = __pyx_t_4;
7147 (__pyx_v_p[__pyx_v_i]) = Py_None;
7192 __Pyx_AddTraceback(
"View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
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;
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);
7230 __pyx_t_2 = ((__pyx_v_c_mode[0]) ==
'f');
7233 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
7234 __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_fortran;
7236 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
7237 __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_c;
7240 __pyx_v_mode = ((PyObject*)__pyx_t_1);
7250 __pyx_t_2 = (__pyx_v_buf == NULL);
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);
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);
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);
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);
7339 __pyx_v_result->data = __pyx_v_buf;
7351 struct __pyx_array_obj *__pyx_temp;
7353 __pyx_temp = __pyx_r;
7354 __Pyx_INCREF((PyObject *)__pyx_v_result);
7355 __pyx_r = __pyx_v_result;
7357 __Pyx_XDECREF((PyObject *)__pyx_temp);
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);
7377 __Pyx_XDECREF((PyObject *)__pyx_v_result);
7378 __Pyx_XDECREF(__pyx_v_mode);
7379 __Pyx_XGIVEREF((PyObject *)__pyx_r);
7380 __Pyx_RefNannyFinishContext();
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
7397PyObject *__pyx_args, PyObject *__pyx_kwds
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
7404PyObject *__pyx_args, PyObject *__pyx_kwds
7407 PyObject *__pyx_v_name = 0;
7408 #if !CYTHON_VECTORCALL_TPNEW
7409 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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;
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);
7423 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
7426 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
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) {
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)
7438 default:
goto __pyx_L5_argtuple_error;
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) }
7445 }
else if (unlikely(__pyx_nargs != 1)) {
7446 goto __pyx_L5_argtuple_error;
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)
7451 __pyx_v_name = values[0];
7454 __pyx_L5_argtuple_error:;
7455 __Pyx_RaiseArgtupleInvalid(
"__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 321, __pyx_L3_error)
7457 goto __pyx_L4_argument_unpacking_done;
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]);
7462 __Pyx_AddTraceback(
"View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7463 __Pyx_RefNannyFinishContext();
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);
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]);
7472 __Pyx_RefNannyFinishContext();
7476static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
7478 __Pyx_RefNannyDeclarations
7479 __Pyx_RefNannySetupContext(
"__init__", 0);
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;
7505 __Pyx_RefNannyFinishContext();
7518static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self);
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));
7528 __Pyx_RefNannyFinishContext();
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);
7545 PyObject *__pyx_temp;
7547 __pyx_temp = __pyx_r;
7548 __Pyx_INCREF(__pyx_v_self->name);
7549 __pyx_r = __pyx_v_self->name;
7551 __Pyx_XDECREF(__pyx_temp);
7565 __Pyx_XGIVEREF(__pyx_r);
7566 __Pyx_RefNannyFinishContext();
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
7581PyObject *__pyx_args, PyObject *__pyx_kwds
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
7588PyObject *__pyx_args, PyObject *__pyx_kwds
7591 #if !CYTHON_VECTORCALL
7592 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
7602 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
7613 __Pyx_RefNannyFinishContext();
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;
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);
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);
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);
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;
7684 __Pyx_PyCriticalSection_End(&__pyx_cs);
7688 __Pyx_PyCriticalSection_End(&__pyx_cs);
7689 goto __pyx_L1_error;
7693 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7703 __pyx_t_4 = (__pyx_v__dict != Py_None);
7708 __pyx_t_3 = __pyx_t_4;
7710 goto __pyx_L7_bool_binop_done;
7712 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict);
if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 8, __pyx_L1_error)
7714 __pyx_t_3 = __pyx_t_4;
7716 __pyx_L7_bool_binop_done:;
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));
7745 __pyx_v_use_setstate = 1;
7765 __pyx_t_3 = (__pyx_v_self->name != Py_None);
7766 __pyx_v_use_setstate = __pyx_t_3;
7777 if (__pyx_v_use_setstate) {
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);
7811 PyObject *__pyx_temp;
7813 __pyx_temp = __pyx_r;
7814 __pyx_r = __pyx_t_5;
7816 __Pyx_XDECREF(__pyx_temp);
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);
7860 PyObject *__pyx_temp;
7862 __pyx_temp = __pyx_r;
7863 __pyx_r = __pyx_t_2;
7865 __Pyx_XDECREF(__pyx_temp);
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);
7885 __Pyx_XDECREF(__pyx_v_state);
7886 __Pyx_XDECREF(__pyx_v__dict);
7888 __Pyx_XGIVEREF(__pyx_r);
7889 __Pyx_RefNannyFinishContext();
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
7905PyObject *__pyx_args, PyObject *__pyx_kwds
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
7912PyObject *__pyx_args, PyObject *__pyx_kwds
7915 PyObject *__pyx_v___pyx_state = 0;
7916 #if !CYTHON_VECTORCALL
7917 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
7931 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
7934 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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)
7946 default:
goto __pyx_L5_argtuple_error;
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) }
7953 }
else if (unlikely(__pyx_nargs != 1)) {
7954 goto __pyx_L5_argtuple_error;
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)
7959 __pyx_v___pyx_state = values[0];
7962 __pyx_L5_argtuple_error:;
7963 __Pyx_RaiseArgtupleInvalid(
"__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 17, __pyx_L3_error)
7965 goto __pyx_L4_argument_unpacking_done;
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]);
7970 __Pyx_AddTraceback(
"View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7971 __Pyx_RefNannyFinishContext();
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);
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]);
7980 __Pyx_RefNannyFinishContext();
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);
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)
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;
8019 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
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);
8027 __Pyx_XGIVEREF(__pyx_r);
8028 __Pyx_RefNannyFinishContext();
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
8045PyObject *__pyx_args, PyObject *__pyx_kwds
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
8052PyObject *__pyx_args, PyObject *__pyx_kwds
8055 PyObject *__pyx_v_obj = 0;
8057 int __pyx_v_dtype_is_object;
8058 #if !CYTHON_VECTORCALL_TPNEW
8059 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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;
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);
8073 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
8076 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
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) {
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)
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)
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)
8096 default:
goto __pyx_L5_argtuple_error;
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) }
8104 switch (__pyx_nargs) {
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)
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)
8115 default:
goto __pyx_L5_argtuple_error;
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)
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)
8123 __pyx_v_dtype_is_object = ((int)0);
8127 __pyx_L5_argtuple_error:;
8128 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 367, __pyx_L3_error)
8130 goto __pyx_L4_argument_unpacking_done;
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]);
8135 __Pyx_AddTraceback(
"View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8136 __Pyx_RefNannyFinishContext();
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);
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]);
8147 __Pyx_RefNannyFinishContext();
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) {
8153 __Pyx_RefNannyDeclarations
8157 int __pyx_lineno = 0;
8158 const char *__pyx_filename = NULL;
8159 int __pyx_clineno = 0;
8160 __Pyx_RefNannySetupContext(
"__cinit__", 0);
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;
8182 __pyx_v_self->flags = __pyx_v_flags;
8191 __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_memoryview_type));
8196 __pyx_t_1 = __pyx_t_2;
8198 goto __pyx_L4_bool_binop_done;
8200 __pyx_t_2 = (__pyx_v_obj != Py_None);
8202 __pyx_t_1 = __pyx_t_2;
8204 __pyx_L4_bool_binop_done:;
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)
8225 __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
8237 ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
8273 __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
8285 __pyx_t_2 = (__pyx_memoryview_thread_locks_used < 8);
8291 __pyx_t_1 = __pyx_t_2;
8293 goto __pyx_L9_bool_binop_done;
8303 __pyx_t_2 = (!__PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING());
8306 __pyx_t_1 = __pyx_t_2;
8308 __pyx_L9_bool_binop_done:;
8327 __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8336 __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
8354 __pyx_t_1 = (__pyx_v_self->lock == NULL);
8366 __pyx_v_self->lock = PyThread_allocate_lock();
8375 __pyx_t_1 = (__pyx_v_self->lock == NULL);
8377 if (unlikely(__pyx_t_1)) {
8387 PyErr_NoMemory(); __PYX_ERR(1, 386, __pyx_L1_error)
8423 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
8435 __pyx_t_2 = ((__pyx_v_self->view.format[0]) ==
'O');
8441 __pyx_t_1 = __pyx_t_2;
8443 goto __pyx_L14_bool_binop_done;
8445 __pyx_t_2 = ((__pyx_v_self->view.format[1]) ==
'\x00');
8448 __pyx_t_1 = __pyx_t_2;
8450 __pyx_L14_bool_binop_done:;
8451 __pyx_v_self->dtype_is_object = __pyx_t_1;
8471 __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
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);
8486 if (unlikely(!__pyx_t_1)) {
8487 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
8488 __PYX_ERR(1, 394, __pyx_L1_error)
8493 if ((1));
else __PYX_ERR(1, 394, __pyx_L1_error)
8503 __pyx_v_self->typeinfo = NULL;
8517 __Pyx_AddTraceback(
"View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8521 __Pyx_RefNannyFinishContext();
8534static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self);
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));
8543 __Pyx_RefNannyFinishContext();
8546static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(
struct __pyx_memoryview_obj *__pyx_v_self) {
8549 Py_ssize_t __pyx_t_2;
8550 Py_ssize_t __pyx_t_3;
8552 PyThread_type_lock __pyx_t_5;
8553 PyThread_type_lock __pyx_t_6;
8562 __pyx_t_1 = (__pyx_v_self->obj != Py_None);
8573 PyBuffer_Release((&__pyx_v_self->view));
8592 __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
8604 ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
8632 __pyx_t_1 = (__pyx_v_self->lock != NULL);
8644 __pyx_t_1 = __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING();
8651 __pyx_t_2 = __pyx_memoryview_thread_locks_used;
8654 __pyx_t_3 = __pyx_t_2;
8656 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
8657 __pyx_v_i = __pyx_t_4;
8666 __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
8678 __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
8687 __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
8699 __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8701 __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
8711 (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
8713 (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
8732 goto __pyx_L6_break;
8752 PyThread_free_lock(__pyx_v_self->lock);
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;
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;
8800 int __pyx_lineno = 0;
8801 const char *__pyx_filename = NULL;
8802 int __pyx_clineno = 0;
8803 __Pyx_RefNannySetupContext(
"get_item_pointer", 0);
8812 __pyx_v_itemp = ((
char *)__pyx_v_self->view.buf);
8823 __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
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)
8831 if (__pyx_t_3 >= __pyx_temp)
break;
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));
8836 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __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);
8843 __pyx_v_dim = __pyx_t_1;
8844 __pyx_t_1 = (__pyx_t_1 + 1);
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;
8866 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8877 __pyx_r = __pyx_v_itemp;
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);
8898 __Pyx_XDECREF(__pyx_v_idx);
8900 __Pyx_RefNannyFinishContext();
8913static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index);
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));
8923 __Pyx_RefNannyFinishContext();
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
8936 Py_ssize_t __pyx_t_3;
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);
8953 __pyx_t_2 = (__pyx_v_self->view.ndim == 1);
8959 __pyx_t_1 = __pyx_t_2;
8961 goto __pyx_L4_bool_binop_done;
8963 __pyx_t_2 = PyLong_Check(__pyx_v_index);
8965 __pyx_t_1 = __pyx_t_2;
8967 __pyx_L4_bool_binop_done:;
8978 __pyx_v_buffer = ((
char *)__pyx_v_self->view.buf);
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)
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);
9002 PyObject *__pyx_temp;
9004 __pyx_temp = __pyx_r;
9005 __pyx_r = __pyx_t_5;
9007 __Pyx_XDECREF(__pyx_temp);
9028 __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
9040 PyObject *__pyx_temp;
9042 __pyx_temp = __pyx_r;
9043 __Pyx_INCREF((PyObject *)__pyx_v_self);
9044 __pyx_r = ((PyObject *)__pyx_v_self);
9046 __Pyx_XDECREF(__pyx_temp);
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)
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);
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);
9087 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9089 __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 439, __pyx_L1_error)
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);
9105 if (__pyx_v_have_slices) {
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);
9117 PyObject *__pyx_temp;
9119 __pyx_temp = __pyx_r;
9120 __pyx_r = __pyx_t_5;
9122 __Pyx_XDECREF(__pyx_temp);
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)
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;
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);
9161 PyObject *__pyx_temp;
9163 __pyx_temp = __pyx_r;
9164 __pyx_r = __pyx_t_5;
9166 __Pyx_XDECREF(__pyx_temp);
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);
9190 __Pyx_XDECREF(__pyx_v_indices);
9192 __Pyx_XGIVEREF(__pyx_r);
9193 __Pyx_RefNannyFinishContext();
9206static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
9207static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9208 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
9216 __Pyx_RefNannyFinishContext();
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;
9226 __Pyx_RefNannyDeclarations
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);
9244 if (unlikely(__pyx_v_self->view.readonly)) {
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)
9272 __pyx_t_2 = (__pyx_v_self->view.ndim == 1);
9278 __pyx_t_1 = __pyx_t_2;
9280 goto __pyx_L5_bool_binop_done;
9282 __pyx_t_2 = PyLong_Check(__pyx_v_index);
9284 __pyx_t_1 = __pyx_t_2;
9286 __pyx_L5_bool_binop_done:;
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;
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)
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);
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);
9350 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9352 __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 456, __pyx_L1_error)
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);
9368 if (__pyx_v_have_slices) {
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;
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);
9401 __pyx_t_1 = (__pyx_v_obj != Py_None);
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;
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;
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)
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;
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);
9487 __Pyx_XDECREF(__pyx_v_indices);
9488 __Pyx_XDECREF(__pyx_v_obj);
9489 __Pyx_XDECREF((PyObject *)__pyx_v_target_slice);
9491 __Pyx_RefNannyFinishContext();
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
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;
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);
9530 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_memoryview_type);
9531 __pyx_t_2 = (!__pyx_t_1);
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);
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);
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);
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);
9583 __Pyx_DECREF_SET(__pyx_v_obj, ((PyObject *)__pyx_t_6));
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;
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;
9611 __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
9613 __Pyx_ErrRestore(0,0,0);
9623 PyObject *__pyx_temp;
9625 __pyx_temp = __pyx_r;
9626 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9628 __Pyx_XDECREF(__pyx_temp);
9630 goto __pyx_L7_except_return;
9632 goto __pyx_L6_except_error;
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);
9673 PyObject *__pyx_temp;
9675 __pyx_temp = __pyx_r;
9676 __Pyx_INCREF(__pyx_v_obj);
9677 __pyx_r = __pyx_v_obj;
9679 __Pyx_XDECREF(__pyx_temp);
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);
9700 __Pyx_XDECREF(__pyx_v_obj);
9701 __Pyx_XGIVEREF(__pyx_r);
9702 __Pyx_RefNannyFinishContext();
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;
9726 int __pyx_lineno = 0;
9727 const char *__pyx_filename = NULL;
9728 int __pyx_clineno = 0;
9729 __Pyx_RefNannySetupContext(
"setitem_slice_assignment", 0);
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]);
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]);
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)
9784 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9787 __Pyx_XDECREF(__pyx_t_2);
9788 __Pyx_AddTraceback(
"View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
9795 __Pyx_XGIVEREF(__pyx_r);
9796 __Pyx_RefNannyFinishContext();
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];
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;
9818 PyObject *__pyx_t_3 = NULL;
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);
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;
9859 __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (
sizeof(__pyx_v_array)));
9871 __pyx_v_tmp = PyMem_Malloc(((
size_t)__pyx_v_self->view.itemsize));
9880 __pyx_t_2 = (__pyx_v_tmp == NULL);
9882 if (unlikely(__pyx_t_2)) {
9892 PyErr_NoMemory(); __PYX_ERR(1, 501, __pyx_L1_error)
9910 __pyx_v_item = __pyx_v_tmp;
9930 __pyx_v_item = ((
void *)__pyx_v_array);
9950 if (__pyx_v_self->dtype_is_object) {
9959 (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
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;
9992 __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
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)
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);
10035 PyMem_Free(__pyx_v_tmp);
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;
10054 PyMem_Free(__pyx_v_tmp);
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;
10080 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10083 __Pyx_XDECREF(__pyx_t_3);
10084 __Pyx_AddTraceback(
"View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10092 __Pyx_XGIVEREF(__pyx_r);
10093 __Pyx_RefNannyFinishContext();
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
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);
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;
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;
10146 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10149 __Pyx_XDECREF(__pyx_t_2);
10150 __Pyx_AddTraceback(
"View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
10154 __Pyx_XGIVEREF(__pyx_r);
10155 __Pyx_RefNannyFinishContext();
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;
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);
10187 __pyx_v_buffer = ((
char *)__pyx_v_self->view.buf);
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;
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;
10221 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10224 __Pyx_XDECREF(__pyx_t_3);
10225 __Pyx_AddTraceback(
"View.MemoryView.memoryview.setitem_indexed1", __pyx_clineno, __pyx_lineno, __pyx_filename);
10230 __Pyx_XGIVEREF(__pyx_r);
10231 __Pyx_RefNannyFinishContext();
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;
10256 Py_ssize_t __pyx_t_8;
10258 PyObject *__pyx_t_10 = NULL;
10260 int __pyx_lineno = 0;
10261 const char *__pyx_filename = NULL;
10262 int __pyx_clineno = 0;
10263 __Pyx_RefNannySetupContext(
"convert_item_to_object", 0);
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;
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);
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);
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);
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);
10326 __pyx_v_result = __pyx_t_1;
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);
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);
10363 PyObject *__pyx_temp;
10365 __pyx_temp = __pyx_r;
10366 __pyx_r = __pyx_t_1;
10368 __Pyx_XDECREF(__pyx_temp);
10371 goto __pyx_L6_except_return;
10390 PyObject *__pyx_temp;
10392 __pyx_temp = __pyx_r;
10393 __Pyx_INCREF(__pyx_v_result);
10394 __pyx_r = __pyx_v_result;
10396 __Pyx_XDECREF(__pyx_temp);
10398 goto __pyx_L6_except_return;
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;
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;
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);
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)
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;
10440 goto __pyx_L5_except_error;
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);
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);
10477 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
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);
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();
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;
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;
10513 PyObject *__pyx_t_4 = NULL;
10514 PyObject *__pyx_t_5 = NULL;
10515 PyObject *__pyx_t_6 = NULL;
10517 Py_ssize_t __pyx_t_8;
10518 PyObject *__pyx_t_9 = NULL;
10521 Py_ssize_t __pyx_t_12;
10524 int __pyx_lineno = 0;
10525 const char *__pyx_filename = NULL;
10526 int __pyx_clineno = 0;
10527 __Pyx_RefNannySetupContext(
"assign_item_from_object", 0);
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;
10549 __pyx_t_3 = PyTuple_Check(__pyx_v_value);
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);
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);
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);
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);
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);
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)
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);
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]);
10650 __pyx_v_i = __pyx_t_8;
10659 __pyx_t_8 = (__pyx_t_8 + 1);
10668 (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
10673 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10684 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
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);
10695 __Pyx_XDECREF(__pyx_v_struct);
10697 __Pyx_XDECREF(__pyx_v_bytesvalue);
10699 __Pyx_XGIVEREF(__pyx_r);
10700 __Pyx_RefNannyFinishContext();
10713CYTHON_UNUSED
static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
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;
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));
10725 __Pyx_RefNannyFinishContext();
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) {
10731 __Pyx_RefNannyDeclarations
10735 Py_ssize_t *__pyx_t_4;
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");
10746 __Pyx_RefNannySetupContext(
"__getbuffer__", 0);
10747 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
10748 __Pyx_GIVEREF(__pyx_v_info->obj);
10757 __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
10763 __pyx_t_1 = __pyx_t_2;
10765 goto __pyx_L4_bool_binop_done;
10768 __pyx_t_1 = __pyx_v_self->view.readonly;
10769 __pyx_L4_bool_binop_done:;
10770 if (unlikely(__pyx_t_1)) {
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)
10799 __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
10811 __pyx_t_4 = __pyx_v_self->view.shape;
10813 __pyx_v_info->shape = __pyx_t_4;
10833 __pyx_v_info->shape = NULL;
10844 __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
10856 __pyx_t_4 = __pyx_v_self->view.strides;
10858 __pyx_v_info->strides = __pyx_t_4;
10878 __pyx_v_info->strides = NULL;
10889 __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
10901 __pyx_t_4 = __pyx_v_self->view.suboffsets;
10903 __pyx_v_info->suboffsets = __pyx_t_4;
10923 __pyx_v_info->suboffsets = NULL;
10934 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
10946 __pyx_t_5 = __pyx_v_self->view.format;
10948 __pyx_v_info->format = __pyx_t_5;
10968 __pyx_v_info->format = NULL;
10979 __pyx_t_6 = __pyx_v_self->view.buf;
10981 __pyx_v_info->buf = __pyx_t_6;
10990 __pyx_t_3 = __pyx_v_self->view.ndim;
10992 __pyx_v_info->ndim = __pyx_t_3;
11001 __pyx_t_7 = __pyx_v_self->view.itemsize;
11003 __pyx_v_info->itemsize = __pyx_t_7;
11012 __pyx_t_7 = __pyx_v_self->view.len;
11014 __pyx_v_info->len = __pyx_t_7;
11023 __pyx_t_1 = __pyx_v_self->view.readonly;
11025 __pyx_v_info->readonly = __pyx_t_1;
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);
11052 __Pyx_AddTraceback(
"View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
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;
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;
11066 __Pyx_RefNannyFinishContext();
11079static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self);
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));
11089 __Pyx_RefNannyFinishContext();
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;
11099 int __pyx_lineno = 0;
11100 const char *__pyx_filename = NULL;
11101 int __pyx_clineno = 0;
11102 __Pyx_RefNannySetupContext(
"__get__", 0);
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);
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)
11135 PyObject *__pyx_temp;
11137 __pyx_temp = __pyx_r;
11138 __Pyx_INCREF((PyObject *)__pyx_v_result);
11139 __pyx_r = ((PyObject *)__pyx_v_result);
11141 __Pyx_XDECREF(__pyx_temp);
11155 __Pyx_XDECREF(__pyx_t_1);
11156 __Pyx_AddTraceback(
"View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11159 __Pyx_XDECREF((PyObject *)__pyx_v_result);
11160 __Pyx_XGIVEREF(__pyx_r);
11161 __Pyx_RefNannyFinishContext();
11174static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self);
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));
11184 __Pyx_RefNannyFinishContext();
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);
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);
11207 PyObject *__pyx_temp;
11209 __pyx_temp = __pyx_r;
11210 __pyx_r = __pyx_t_1;
11212 __Pyx_XDECREF(__pyx_temp);
11227 __Pyx_XDECREF(__pyx_t_1);
11228 __Pyx_AddTraceback(
"View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11231 __Pyx_XGIVEREF(__pyx_r);
11232 __Pyx_RefNannyFinishContext();
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);
11257 PyObject *__pyx_temp;
11259 __pyx_temp = __pyx_r;
11260 __Pyx_INCREF(__pyx_v_self->obj);
11261 __pyx_r = __pyx_v_self->obj;
11263 __Pyx_XDECREF(__pyx_temp);
11277 __Pyx_XGIVEREF(__pyx_r);
11278 __Pyx_RefNannyFinishContext();
11291static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self);
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));
11301 __Pyx_RefNannyFinishContext();
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);
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);
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)
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;
11346 PyObject *__pyx_temp;
11348 __pyx_temp = __pyx_r;
11349 __pyx_r = __pyx_t_5;
11351 __Pyx_XDECREF(__pyx_temp);
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);
11372 __Pyx_XGIVEREF(__pyx_r);
11373 __Pyx_RefNannyFinishContext();
11386static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self);
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));
11396 __Pyx_RefNannyFinishContext();
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
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);
11423 __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
11425 if (unlikely(__pyx_t_1)) {
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)
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);
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)
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;
11474 PyObject *__pyx_temp;
11476 __pyx_temp = __pyx_r;
11477 __pyx_r = __pyx_t_7;
11479 __Pyx_XDECREF(__pyx_temp);
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);
11500 __Pyx_XGIVEREF(__pyx_r);
11501 __Pyx_RefNannyFinishContext();
11514static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self);
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));
11524 __Pyx_RefNannyFinishContext();
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
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);
11550 __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
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);
11565 PyObject *__pyx_temp;
11567 __pyx_temp = __pyx_r;
11568 __pyx_r = __pyx_t_2;
11570 __Pyx_XDECREF(__pyx_temp);
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);
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)
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;
11611 PyObject *__pyx_temp;
11613 __pyx_temp = __pyx_r;
11614 __pyx_r = __pyx_t_6;
11616 __Pyx_XDECREF(__pyx_temp);
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);
11637 __Pyx_XGIVEREF(__pyx_r);
11638 __Pyx_RefNannyFinishContext();
11651static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self);
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));
11661 __Pyx_RefNannyFinishContext();
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);
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);
11684 PyObject *__pyx_temp;
11686 __pyx_temp = __pyx_r;
11687 __pyx_r = __pyx_t_1;
11689 __Pyx_XDECREF(__pyx_temp);
11704 __Pyx_XDECREF(__pyx_t_1);
11705 __Pyx_AddTraceback(
"View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11708 __Pyx_XGIVEREF(__pyx_r);
11709 __Pyx_RefNannyFinishContext();
11722static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self);
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));
11732 __Pyx_RefNannyFinishContext();
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);
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);
11755 PyObject *__pyx_temp;
11757 __pyx_temp = __pyx_r;
11758 __pyx_r = __pyx_t_1;
11760 __Pyx_XDECREF(__pyx_temp);
11775 __Pyx_XDECREF(__pyx_t_1);
11776 __Pyx_AddTraceback(
"View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11779 __Pyx_XGIVEREF(__pyx_r);
11780 __Pyx_RefNannyFinishContext();
11793static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self);
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));
11803 __Pyx_RefNannyFinishContext();
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);
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;
11834 PyObject *__pyx_temp;
11836 __pyx_temp = __pyx_r;
11837 __pyx_r = __pyx_t_3;
11839 __Pyx_XDECREF(__pyx_temp);
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);
11860 __Pyx_XGIVEREF(__pyx_r);
11861 __Pyx_RefNannyFinishContext();
11874static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self);
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));
11884 __Pyx_RefNannyFinishContext();
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
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);
11910 __pyx_t_1 = (__pyx_v_self->_size == Py_None);
11921 __pyx_v_result = 1;
11930 __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
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]);
11943 __pyx_v_result = (__pyx_v_result * ((size_t)__pyx_v_length));
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;
11979 PyObject *__pyx_temp;
11981 __pyx_temp = __pyx_r;
11982 __Pyx_INCREF(__pyx_v_self->_size);
11983 __pyx_r = __pyx_v_self->_size;
11985 __Pyx_XDECREF(__pyx_temp);
11999 __Pyx_XDECREF(__pyx_t_5);
12000 __Pyx_AddTraceback(
"View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12005 __Pyx_XGIVEREF(__pyx_r);
12006 __Pyx_RefNannyFinishContext();
12019static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self);
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));
12029 __Pyx_RefNannyFinishContext();
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;
12044 __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
12058 __pyx_r = (__pyx_v_self->view.shape[0]);
12107static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self);
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));
12117 __Pyx_RefNannyFinishContext();
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;
12130 int __pyx_lineno = 0;
12131 const char *__pyx_filename = NULL;
12132 int __pyx_clineno = 0;
12133 __Pyx_RefNannySetupContext(
"__repr__", 0);
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;
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;
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]);
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]);
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;
12193 PyObject *__pyx_temp;
12195 __pyx_temp = __pyx_r;
12196 __pyx_r = __pyx_t_1;
12198 __Pyx_XDECREF(__pyx_temp);
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);
12219 __Pyx_XGIVEREF(__pyx_r);
12220 __Pyx_RefNannyFinishContext();
12233static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self);
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));
12243 __Pyx_RefNannyFinishContext();
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;
12255 int __pyx_lineno = 0;
12256 const char *__pyx_filename = NULL;
12257 int __pyx_clineno = 0;
12258 __Pyx_RefNannySetupContext(
"__str__", 0);
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;
12282 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
12283 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3[1]);
12286 #if __Pyx_PyUnicode_Join_CAN_USE_KIND_AND_LENGTH
12287 __pyx_t_5 |= __Pyx_PyUnicode_KIND_04(__pyx_t_3[1]);
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;
12294 PyObject *__pyx_temp;
12296 __pyx_temp = __pyx_r;
12297 __pyx_r = __pyx_t_1;
12299 __Pyx_XDECREF(__pyx_temp);
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);
12319 __Pyx_XGIVEREF(__pyx_r);
12320 __Pyx_RefNannyFinishContext();
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
12337PyObject *__pyx_args, PyObject *__pyx_kwds
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
12344PyObject *__pyx_args, PyObject *__pyx_kwds
12347 #if !CYTHON_VECTORCALL
12348 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
12358 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
12369 __Pyx_RefNannyFinishContext();
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);
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;
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);
12405 PyObject *__pyx_temp;
12407 __pyx_temp = __pyx_r;
12408 __pyx_r = __pyx_t_2;
12410 __Pyx_XDECREF(__pyx_temp);
12425 __Pyx_XDECREF(__pyx_t_2);
12426 __Pyx_AddTraceback(
"View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
12431 __Pyx_XGIVEREF(__pyx_r);
12432 __Pyx_RefNannyFinishContext();
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
12449PyObject *__pyx_args, PyObject *__pyx_kwds
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
12456PyObject *__pyx_args, PyObject *__pyx_kwds
12459 #if !CYTHON_VECTORCALL
12460 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
12470 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
12481 __Pyx_RefNannyFinishContext();
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);
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;
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);
12517 PyObject *__pyx_temp;
12519 __pyx_temp = __pyx_r;
12520 __pyx_r = __pyx_t_2;
12522 __Pyx_XDECREF(__pyx_temp);
12537 __Pyx_XDECREF(__pyx_t_2);
12538 __Pyx_AddTraceback(
"View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
12543 __Pyx_XGIVEREF(__pyx_r);
12544 __Pyx_RefNannyFinishContext();
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
12561PyObject *__pyx_args, PyObject *__pyx_kwds
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
12568PyObject *__pyx_args, PyObject *__pyx_kwds
12571 #if !CYTHON_VECTORCALL
12572 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
12582 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
12593 __Pyx_RefNannyFinishContext();
12597static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(
struct __pyx_memoryview_obj *__pyx_v_self) {
12598 __Pyx_memviewslice __pyx_v_mslice;
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);
12616 __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
12625 __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
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;
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);
12647 PyObject *__pyx_temp;
12649 __pyx_temp = __pyx_r;
12650 __pyx_r = __pyx_t_2;
12652 __Pyx_XDECREF(__pyx_temp);
12667 __Pyx_XDECREF(__pyx_t_2);
12668 __Pyx_AddTraceback(
"View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
12673 __Pyx_XGIVEREF(__pyx_r);
12674 __Pyx_RefNannyFinishContext();
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
12691PyObject *__pyx_args, PyObject *__pyx_kwds
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
12698PyObject *__pyx_args, PyObject *__pyx_kwds
12701 #if !CYTHON_VECTORCALL
12702 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
12712 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
12723 __Pyx_RefNannyFinishContext();
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;
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);
12747 __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
12756 __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
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;
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);
12778 PyObject *__pyx_temp;
12780 __pyx_temp = __pyx_r;
12781 __pyx_r = __pyx_t_2;
12783 __Pyx_XDECREF(__pyx_temp);
12798 __Pyx_XDECREF(__pyx_t_2);
12799 __Pyx_AddTraceback(
"View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
12805 __Pyx_XGIVEREF(__pyx_r);
12806 __Pyx_RefNannyFinishContext();
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
12821PyObject *__pyx_args, PyObject *__pyx_kwds
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
12828PyObject *__pyx_args, PyObject *__pyx_kwds
12831 #if !CYTHON_VECTORCALL
12832 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
12842 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
12853 __Pyx_RefNannyFinishContext();
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);
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)
12882 __Pyx_AddTraceback(
"View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12884 __Pyx_XGIVEREF(__pyx_r);
12885 __Pyx_RefNannyFinishContext();
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
12901PyObject *__pyx_args, PyObject *__pyx_kwds
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
12908PyObject *__pyx_args, PyObject *__pyx_kwds
12911 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
12912 #if !CYTHON_VECTORCALL
12913 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
12927 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
12930 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
12942 default:
goto __pyx_L5_argtuple_error;
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) }
12949 }
else if (unlikely(__pyx_nargs != 1)) {
12950 goto __pyx_L5_argtuple_error;
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)
12955 __pyx_v___pyx_state = values[0];
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)
12961 goto __pyx_L4_argument_unpacking_done;
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]);
12966 __Pyx_AddTraceback(
"View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12967 __Pyx_RefNannyFinishContext();
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);
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]);
12976 __Pyx_RefNannyFinishContext();
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);
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)
13005 __Pyx_AddTraceback(
"View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13007 __Pyx_XGIVEREF(__pyx_r);
13008 __Pyx_RefNannyFinishContext();
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;
13029 int __pyx_lineno = 0;
13030 const char *__pyx_filename = NULL;
13031 int __pyx_clineno = 0;
13032 __Pyx_RefNannySetupContext(
"memoryview_cwrapper", 0);
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);
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);
13056 __pyx_v_result = ((
struct __pyx_memoryview_obj *)__pyx_t_1);
13066 __pyx_v_result->typeinfo = __pyx_v_typeinfo;
13076 PyObject *__pyx_temp;
13078 __pyx_temp = __pyx_r;
13079 __Pyx_INCREF((PyObject *)__pyx_v_result);
13080 __pyx_r = ((PyObject *)__pyx_v_result);
13082 __Pyx_XDECREF(__pyx_temp);
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);
13103 __Pyx_XDECREF((PyObject *)__pyx_v_result);
13104 __Pyx_XGIVEREF(__pyx_r);
13105 __Pyx_RefNannyFinishContext();
13117static CYTHON_INLINE
int __pyx_memoryview_check(PyObject *__pyx_v_o) {
13128 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_memoryview_type);
13130 __pyx_r = __pyx_t_1;
13156static int __pyx_memoryview_err_invalid_index(PyObject *__pyx_v_item) {
13157 PyObject *__pyx_v_type_name = NULL;
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);
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);
13185 (void)(PyErr_Format(PyExc_TypeError, __pyx_k_Cannot_index_with_type_200U, ((PyObject *)__pyx_v_type_name)));
13210 __Pyx_XDECREF(__pyx_t_1);
13211 __Pyx_AddTraceback(
"View.MemoryView._err_invalid_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
13214 __Pyx_XDECREF(__pyx_v_type_name);
13216 __Pyx_RefNannyFinishContext();
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;
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);
13259 __pyx_v_first_ellipsis_index = -1L;
13268 __pyx_v_have_slices = 0;
13286 __pyx_t_1 = __pyx_v_index_tuple; __Pyx_INCREF(__pyx_t_1);
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)
13294 if (__pyx_t_2 >= __pyx_temp)
break;
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));
13299 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __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);
13314 __pyx_t_4 = (__pyx_v_item == __pyx_builtin_Ellipsis);
13325 __pyx_v_have_slices = 1;
13334 __pyx_t_4 = (__pyx_v_first_ellipsis_index == -1L);
13346 __pyx_v_first_ellipsis_index = __pyx_v_idx;
13374 __pyx_t_4 = PySlice_Check(__pyx_v_item);
13385 __pyx_v_have_slices = 1;
13404 __pyx_t_4 = (!(PyIndex_Check(__pyx_v_item) != 0));
13406 if (unlikely(__pyx_t_4)) {
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)
13436 __pyx_v_idx = (__pyx_v_idx + 1);
13446 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13455 __pyx_t_4 = (__pyx_v_first_ellipsis_index >= 0);
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);
13476 __pyx_v_result = ((PyObject*)__pyx_t_1);
13487 __pyx_t_2 = __pyx_v_first_ellipsis_index;
13488 __pyx_t_6 = __pyx_t_2;
13490 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
13491 __pyx_v_idx = __pyx_t_7;
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;
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);
13525 __pyx_v_ellipsis_end = (__pyx_v_ndim - __pyx_v_indices_from_ellipsis);
13535 __pyx_t_2 = __pyx_v_indices_from_ellipsis;
13536 __pyx_t_6 = __pyx_t_2;
13538 for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
13539 __pyx_v_idx = __pyx_t_7;
13548 __pyx_t_8 = (__pyx_v_first_ellipsis_index + __pyx_v_idx);
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);
13553 __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
13563 __pyx_t_4 = (__pyx_v_item != __pyx_builtin_Ellipsis);
13574 __pyx_t_8 = (__pyx_v_ellipsis_end + __pyx_v_idx);
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)
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));
13619 __pyx_t_4 = (__pyx_v_ndim > __pyx_v_idx);
13631 __pyx_v_have_slices = 1;
13640 __pyx_t_2 = (__pyx_v_ndim - __pyx_v_idx);
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);
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));
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);
13679 PyObject *__pyx_temp;
13681 __pyx_temp = __pyx_r;
13682 __pyx_r = ((PyObject*)__pyx_t_1);
13684 __Pyx_XDECREF(__pyx_temp);
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);
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();
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
13731 PyObject *__pyx_t_2 = NULL;
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);
13748 __pyx_v_have_slices = 0;
13757 __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
13768 __pyx_v_have_slices = 1;
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);
13799 __pyx_t_1 = PyTuple_Check(__pyx_v_index);
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)
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);
13817 PyObject *__pyx_temp;
13819 __pyx_temp = __pyx_r;
13820 __pyx_r = ((PyObject*)__pyx_t_2);
13822 __Pyx_XDECREF(__pyx_temp);
13844 __pyx_t_1 = PySlice_Check(__pyx_v_index);
13855 __pyx_v_have_slices = 1;
13874 __pyx_t_1 = (!(PyIndex_Check(__pyx_v_index) != 0));
13876 if (unlikely(__pyx_t_1)) {
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)
13906 switch (__pyx_v_ndim) {
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);
13941 __pyx_v_have_slices = 1;
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);
13978 __pyx_v_have_slices = 1;
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);
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);
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);
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);
14026 PyObject *__pyx_temp;
14028 __pyx_temp = __pyx_r;
14029 __pyx_r = ((PyObject*)__pyx_t_5);
14031 __Pyx_XDECREF(__pyx_temp);
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);
14052 __Pyx_XDECREF(__pyx_v_result);
14054 __Pyx_XGIVEREF(__pyx_r);
14055 __Pyx_RefNannyFinishContext();
14067static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets,
int __pyx_v_ndim) {
14068 Py_ssize_t __pyx_v_suboffset;
14070 Py_ssize_t *__pyx_t_1;
14071 Py_ssize_t *__pyx_t_2;
14072 Py_ssize_t *__pyx_t_3;
14075 int __pyx_lineno = 0;
14076 const char *__pyx_filename = NULL;
14077 int __pyx_clineno = 0;
14086 __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
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]);
14099 __pyx_t_4 = (__pyx_v_suboffset >= 0);
14101 if (unlikely(__pyx_t_4)) {
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)
14148 __Pyx_AddTraceback(
"View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
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;
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
14185 PyObject *__pyx_t_2 = NULL;
14186 struct __pyx_memoryview_obj *__pyx_t_3;
14189 Py_ssize_t __pyx_t_6;
14190 PyObject *__pyx_t_7 = NULL;
14191 Py_ssize_t __pyx_t_8;
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);
14206 __pyx_v_new_ndim = 0;
14207 __pyx_v_suboffset_dim = -1;
14216 (void)(memset((&__pyx_v_dst), 0, (
sizeof(__pyx_v_dst))));
14225 #ifndef CYTHON_WITHOUT_ASSERTIONS
14226 if (unlikely(__pyx_assertions_enabled())) {
14227 __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
14229 if (unlikely(!__pyx_t_1)) {
14230 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
14231 __PYX_ERR(1, 824, __pyx_L1_error)
14236 if ((1));
else __PYX_ERR(1, 824, __pyx_L1_error)
14246 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
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);
14270 __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
14290 __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
14299 __pyx_v_p_src = (&__pyx_v_src);
14310 __pyx_t_3 = __pyx_v_p_src->memview;
14312 __pyx_v_dst.memview = __pyx_t_3;
14321 __pyx_t_4 = __pyx_v_p_src->data;
14323 __pyx_v_dst.data = __pyx_t_4;
14332 __pyx_v_p_dst = (&__pyx_v_dst);
14341 __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
14352 __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
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)
14360 if (__pyx_t_6 >= __pyx_temp)
break;
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));
14365 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __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);
14372 __pyx_v_dim = __pyx_t_5;
14373 __pyx_t_5 = (__pyx_t_5 + 1);
14382 __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
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;
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)
14424 __pyx_t_1 = (__pyx_v_index == Py_None);
14435 (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
14444 (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
14453 (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
14462 __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
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)
14486 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
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;
14495 __pyx_L7_bool_binop_done:;
14496 __pyx_v_start = __pyx_t_8;
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)
14509 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
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;
14518 __pyx_L9_bool_binop_done:;
14519 __pyx_v_stop = __pyx_t_8;
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)
14532 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
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;
14541 __pyx_L11_bool_binop_done:;
14542 __pyx_v_step = __pyx_t_8;
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;
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;
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;
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)
14600 __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14612 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14621 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
14632 if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError(
"memviewsliceobj"); __PYX_ERR(1, 881, __pyx_L1_error) }
14641 if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError(
"memviewsliceobj"); __PYX_ERR(1, 882, __pyx_L1_error) }
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)
14654 struct __pyx_memoryview_obj *__pyx_temp;
14656 __pyx_temp = __pyx_r;
14657 __pyx_r = ((
struct __pyx_memoryview_obj *)__pyx_t_2);
14659 __Pyx_XDECREF((PyObject *)__pyx_temp);
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);
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)
14701 struct __pyx_memoryview_obj *__pyx_temp;
14703 __pyx_temp = __pyx_r;
14704 __pyx_r = ((
struct __pyx_memoryview_obj *)__pyx_t_2);
14706 __Pyx_XDECREF((PyObject *)__pyx_temp);
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);
14733 __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
14743 __Pyx_XDECREF(__pyx_v_index);
14744 __Pyx_XGIVEREF((PyObject *)__pyx_r);
14745 __Pyx_RefNannyFinishContext();
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;
14764 Py_ssize_t __pyx_t_1;
14767 int __pyx_lineno = 0;
14768 const char *__pyx_filename = NULL;
14769 int __pyx_clineno = 0;
14779 __pyx_v_suboffset = -1L;
14788 __pyx_t_1 = __pyx_v_view->itemsize;
14790 __pyx_v_itemsize = __pyx_t_1;
14799 __pyx_t_2 = (__pyx_v_view->ndim == 0);
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)
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)
14819 __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize, 0);
14828 __pyx_v_stride = __pyx_v_itemsize;
14848 __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
14857 __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
14866 __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
14878 __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
14898 __pyx_t_2 = (__pyx_v_index < 0);
14910 __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
14919 __pyx_t_2 = (__pyx_v_index < 0);
14921 if (unlikely(__pyx_t_2)) {
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)
14959 __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
14961 if (unlikely(__pyx_t_2)) {
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)
14990 __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
14999 __pyx_t_2 = (__pyx_v_suboffset >= 0);
15011 __pyx_v_resultp = ((((
char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
15031 __pyx_r = __pyx_v_resultp;
15045 __Pyx_AddTraceback(
"View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
15066static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
15068 Py_ssize_t *__pyx_v_shape;
15069 Py_ssize_t *__pyx_v_strides;
15074 Py_ssize_t *__pyx_t_2;
15077 Py_ssize_t __pyx_t_5;
15078 Py_ssize_t __pyx_t_6;
15082 int __pyx_lineno = 0;
15083 const char *__pyx_filename = NULL;
15084 int __pyx_clineno = 0;
15085 PyGILState_STATE __pyx_gilstate_save;
15094 __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
15096 __pyx_v_ndim = __pyx_t_1;
15105 __pyx_t_2 = __pyx_v_memslice->shape;
15107 __pyx_v_shape = __pyx_t_2;
15116 __pyx_t_2 = __pyx_v_memslice->strides;
15118 __pyx_v_strides = __pyx_t_2;
15128 __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2, 1);
15129 __pyx_t_4 = __pyx_t_3;
15131 for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
15132 __pyx_v_i = __pyx_t_1;
15141 __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
15150 __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
15152 __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
15154 (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
15156 (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
15166 __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
15168 __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
15170 (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
15172 (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
15182 __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
15188 __pyx_t_7 = __pyx_t_8;
15190 goto __pyx_L6_bool_binop_done;
15192 __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
15195 __pyx_t_7 = __pyx_t_8;
15197 __pyx_L6_bool_binop_done:;
15198 if (unlikely(__pyx_t_7)) {
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)
15245 __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
15246 __Pyx_AddTraceback(
"View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15248 __Pyx_PyGILState_Release(__pyx_gilstate_save);
15267static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self);
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));
15276 __Pyx_RefNannyFinishContext();
15279static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(
struct __pyx_memoryviewslice_obj *__pyx_v_self) {
15288 __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
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
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);
15327 __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
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);
15342 PyObject *__pyx_temp;
15344 __pyx_temp = __pyx_r;
15345 __pyx_r = __pyx_t_2;
15347 __Pyx_XDECREF(__pyx_temp);
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);
15372 PyObject *__pyx_temp;
15374 __pyx_temp = __pyx_r;
15375 __pyx_r = __pyx_t_2;
15377 __Pyx_XDECREF(__pyx_temp);
15393 __Pyx_XDECREF(__pyx_t_2);
15394 __Pyx_AddTraceback(
"View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
15397 __Pyx_XGIVEREF(__pyx_r);
15398 __Pyx_RefNannyFinishContext();
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
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);
15428 __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
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)
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;
15476 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15479 __Pyx_XDECREF(__pyx_t_3);
15480 __Pyx_AddTraceback(
"View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
15483 __Pyx_XGIVEREF(__pyx_r);
15484 __Pyx_RefNannyFinishContext();
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);
15509 PyObject *__pyx_temp;
15511 __pyx_temp = __pyx_r;
15512 __Pyx_INCREF(__pyx_v_self->from_object);
15513 __pyx_r = __pyx_v_self->from_object;
15515 __Pyx_XDECREF(__pyx_temp);
15529 __Pyx_XGIVEREF(__pyx_r);
15530 __Pyx_RefNannyFinishContext();
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
15545PyObject *__pyx_args, PyObject *__pyx_kwds
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
15552PyObject *__pyx_args, PyObject *__pyx_kwds
15555 #if !CYTHON_VECTORCALL
15556 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
15566 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
15577 __Pyx_RefNannyFinishContext();
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);
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)
15606 __Pyx_AddTraceback(
"View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15608 __Pyx_XGIVEREF(__pyx_r);
15609 __Pyx_RefNannyFinishContext();
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
15625PyObject *__pyx_args, PyObject *__pyx_kwds
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
15632PyObject *__pyx_args, PyObject *__pyx_kwds
15635 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
15636 #if !CYTHON_VECTORCALL
15637 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
15651 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15654 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
15666 default:
goto __pyx_L5_argtuple_error;
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) }
15673 }
else if (unlikely(__pyx_nargs != 1)) {
15674 goto __pyx_L5_argtuple_error;
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)
15679 __pyx_v___pyx_state = values[0];
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)
15685 goto __pyx_L4_argument_unpacking_done;
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]);
15690 __Pyx_AddTraceback(
"View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15691 __Pyx_RefNannyFinishContext();
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);
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]);
15700 __Pyx_RefNannyFinishContext();
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);
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)
15729 __Pyx_AddTraceback(
"View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15731 __Pyx_XGIVEREF(__pyx_r);
15732 __Pyx_RefNannyFinishContext();
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
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);
15771 __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
15784 PyObject *__pyx_temp;
15786 __pyx_temp = __pyx_r;
15787 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15789 __Pyx_XDECREF(__pyx_temp);
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);
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);
15835 __pyx_v_result->from_slice = __pyx_v_memviewslice;
15844 __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
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;
15868 __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
15870 __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
15879 __pyx_t_5 = __pyx_v_memviewslice.memview->view;
15881 __pyx_v_result->__pyx_base.view = __pyx_t_5;
15890 __pyx_v_result->__pyx_base.view.buf = ((
void *)__pyx_v_memviewslice.data);
15899 __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
15908 ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
15917 Py_INCREF(Py_None);
15926 __pyx_t_1 = ((((
struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
15938 __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
15958 __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
15969 __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
15978 __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
15987 __pyx_v_result->__pyx_base.view.suboffsets = NULL;
15996 __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
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]);
16009 __pyx_t_1 = (__pyx_v_suboffset >= 0);
16021 __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
16030 goto __pyx_L6_break;
16051 __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
16053 __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
16062 __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
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]);
16075 __pyx_v_result->__pyx_base.view.len = (__pyx_v_result->__pyx_base.view.len * __pyx_v_length);
16086 __pyx_v_result->to_object_func = __pyx_v_to_object_func;
16095 __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
16105 PyObject *__pyx_temp;
16107 __pyx_temp = __pyx_r;
16108 __Pyx_INCREF((PyObject *)__pyx_v_result);
16109 __pyx_r = ((PyObject *)__pyx_v_result);
16111 __Pyx_XDECREF(__pyx_temp);
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);
16130 __Pyx_XDECREF((PyObject *)__pyx_v_result);
16133 __Pyx_XGIVEREF(__pyx_r);
16134 __Pyx_RefNannyFinishContext();
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
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);
16164 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
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);
16190 __pyx_r = (&__pyx_v_obj->from_slice);
16211 __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
16222 __pyx_r = __pyx_v_mslice;
16237 __Pyx_XDECREF(__pyx_t_2);
16238 __Pyx_AddTraceback(
"View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
16241 __Pyx_XDECREF((PyObject *)__pyx_v_obj);
16243 __Pyx_RefNannyFinishContext();
16255static void __pyx_memoryview_slice_copy(
struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
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;
16264 Py_ssize_t __pyx_t_5;
16274 __pyx_t_1 = __pyx_v_memview->view.shape;
16276 __pyx_v_shape = __pyx_t_1;
16285 __pyx_t_1 = __pyx_v_memview->view.strides;
16287 __pyx_v_strides = __pyx_t_1;
16296 __pyx_t_1 = __pyx_v_memview->view.suboffsets;
16298 __pyx_v_suboffsets = __pyx_t_1;
16307 __pyx_v_dst->memview = ((
struct __pyx_memoryview_obj *)__pyx_v_memview);
16316 __pyx_v_dst->data = ((
char *)__pyx_v_memview->view.buf);
16326 __pyx_t_2 = __pyx_v_memview->view.ndim;
16327 __pyx_t_3 = __pyx_t_2;
16329 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16330 __pyx_v_dim = __pyx_t_4;
16339 (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
16348 (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
16357 __pyx_t_6 = (__pyx_v_suboffsets != 0);
16361 __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
16367 (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
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);
16413 __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
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);
16425 PyObject *__pyx_temp;
16427 __pyx_temp = __pyx_r;
16428 __pyx_r = __pyx_t_1;
16430 __Pyx_XDECREF(__pyx_temp);
16445 __Pyx_XDECREF(__pyx_t_1);
16446 __Pyx_AddTraceback(
"View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
16450 __Pyx_XGIVEREF(__pyx_r);
16451 __Pyx_RefNannyFinishContext();
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
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);
16484 __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type);
16495 __pyx_t_2 = ((
struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
16497 __pyx_v_to_object_func = __pyx_t_2;
16506 __pyx_t_3 = ((
struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
16508 __pyx_v_to_dtype_func = __pyx_t_3;
16528 __pyx_v_to_object_func = NULL;
16537 __pyx_v_to_dtype_func = NULL;
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);
16551 PyObject *__pyx_temp;
16553 __pyx_temp = __pyx_r;
16554 __pyx_r = __pyx_t_4;
16556 __Pyx_XDECREF(__pyx_temp);
16571 __Pyx_XDECREF(__pyx_t_4);
16572 __Pyx_AddTraceback(
"View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16577 __Pyx_XGIVEREF(__pyx_r);
16578 __Pyx_RefNannyFinishContext();
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;
16602 __pyx_t_2 = (__pyx_v_arg < 0);
16606 __pyx_t_1 = (-__pyx_v_arg);
16609 __pyx_t_1 = __pyx_v_arg;
16613 __pyx_r = __pyx_t_1;
16638static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice,
int __pyx_v_ndim) {
16640 Py_ssize_t __pyx_v_c_stride;
16641 Py_ssize_t __pyx_v_f_stride;
16655 __pyx_v_c_stride = 0;
16664 __pyx_v_f_stride = 0;
16673 for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
16674 __pyx_v_i = __pyx_t_1;
16683 __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
16695 __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16704 goto __pyx_L4_break;
16725 __pyx_t_1 = __pyx_v_ndim;
16726 __pyx_t_3 = __pyx_t_1;
16728 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16729 __pyx_v_i = __pyx_t_4;
16738 __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
16750 __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16759 goto __pyx_L7_break;
16780 __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
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;
16854 Py_ssize_t __pyx_t_3;
16855 Py_ssize_t __pyx_t_4;
16856 Py_ssize_t __pyx_t_5;
16867 __pyx_v_src_extent = (__pyx_v_src_shape[0]);
16876 __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
16885 __pyx_v_src_stride = (__pyx_v_src_strides[0]);
16894 __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
16903 __pyx_t_1 = (__pyx_v_ndim == 1);
16915 __pyx_t_2 = (__pyx_v_src_stride > 0);
16921 __pyx_t_1 = __pyx_t_2;
16923 goto __pyx_L5_bool_binop_done;
16925 __pyx_t_2 = (__pyx_v_dst_stride > 0);
16931 __pyx_t_1 = __pyx_t_2;
16933 goto __pyx_L5_bool_binop_done;
16943 __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
16945 __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
16948 __pyx_t_1 = __pyx_t_2;
16950 __pyx_L5_bool_binop_done:;
16969 (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * ((
size_t)__pyx_v_dst_extent))));
16990 __pyx_t_3 = __pyx_v_dst_extent;
16991 __pyx_t_4 = __pyx_t_3;
16993 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
16994 __pyx_v_i = __pyx_t_5;
17003 (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
17012 __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17021 __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17046 __pyx_t_3 = __pyx_v_dst_extent;
17047 __pyx_t_4 = __pyx_t_3;
17049 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
17050 __pyx_v_i = __pyx_t_5;
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);
17068 __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17077 __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
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) {
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);
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;
17143 Py_ssize_t *__pyx_t_1;
17144 Py_ssize_t *__pyx_t_2;
17145 Py_ssize_t *__pyx_t_3;
17154 __pyx_v_size = ((size_t)__pyx_v_src->memview->view.itemsize);
17163 __pyx_t_2 = (__pyx_v_src->shape + __pyx_v_ndim);
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]);
17176 __pyx_v_size = (__pyx_v_size * ((size_t)__pyx_v_shape));
17189 __pyx_r = __pyx_v_size;
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) {
17218 Py_ssize_t __pyx_r;
17232 __pyx_t_1 = (__pyx_v_order ==
'F');
17245 __pyx_t_2 = __pyx_v_ndim;
17246 __pyx_t_3 = __pyx_t_2;
17248 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17249 __pyx_v_idx = __pyx_t_4;
17258 (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
17267 __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
17289 for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
17290 __pyx_v_idx = __pyx_t_2;
17299 (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
17308 __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
17322 __pyx_r = __pyx_v_stride;
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) {
17351 void *__pyx_v_result;
17352 size_t __pyx_v_itemsize;
17353 size_t __pyx_v_size;
17357 struct __pyx_memoryview_obj *__pyx_t_3;
17360 int __pyx_lineno = 0;
17361 const char *__pyx_filename = NULL;
17362 int __pyx_clineno = 0;
17363 PyGILState_STATE __pyx_gilstate_save;
17372 __pyx_v_itemsize = ((size_t)__pyx_v_src->memview->view.itemsize);
17381 __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
17390 __pyx_v_result = malloc(__pyx_v_size);
17399 __pyx_t_1 = (!(__pyx_v_result != 0));
17401 if (unlikely(__pyx_t_1)) {
17411 __pyx_t_2 = __pyx_memoryview_err_no_memory();
if (unlikely(__pyx_t_2 == ((
int)-1))) __PYX_ERR(1, 1220, __pyx_L1_error)
17430 __pyx_v_tmpslice->data = ((
char *)__pyx_v_result);
17439 __pyx_t_3 = __pyx_v_src->memview;
17441 __pyx_v_tmpslice->memview = __pyx_t_3;
17451 __pyx_t_2 = __pyx_v_ndim;
17452 __pyx_t_4 = __pyx_t_2;
17454 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
17455 __pyx_v_i = __pyx_t_5;
17464 (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
17473 (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
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));
17494 __pyx_t_2 = __pyx_v_ndim;
17495 __pyx_t_4 = __pyx_t_2;
17497 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
17498 __pyx_v_i = __pyx_t_5;
17507 __pyx_t_1 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
17519 (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
17539 __pyx_t_1 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
17551 (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
17571 copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
17584 __pyx_r = __pyx_v_result;
17598 __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17599 __Pyx_AddTraceback(
"View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
17601 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17618static int __pyx_memoryview_err_extents(
int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
17620 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17632 (void)(PyErr_Format(PyExc_ValueError, __pyx_k_got_differing_extents_in_dimensi, __pyx_v_i, __pyx_v_extent1, __pyx_v_extent2));
17661 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17673static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error,
char const *__pyx_v_msg,
int __pyx_v_dim) {
17675 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17687 (void)(PyErr_Format(__pyx_v_error, __pyx_v_msg, __pyx_v_dim));
17716 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17728static int __pyx_memoryview_err(PyObject *__pyx_v_error,
char const *__pyx_v_msg) {
17730 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17741 (void)(PyErr_SetString(__pyx_v_error, __pyx_v_msg));
17769 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17781static int __pyx_memoryview_err_no_memory(
void) {
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();
17795 PyErr_NoMemory(); __PYX_ERR(1, 1267, __pyx_L1_error)
17807 __Pyx_AddTraceback(
"View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
17810 __Pyx_PyGILState_Release(__pyx_gilstate_save);
17822static int __pyx_memoryview_err_ValueError(
char const *__pyx_v_msg) {
17832 (void)(PyErr_SetString(PyExc_ValueError, __pyx_v_msg));
17869static int __pyx_memoryview_err_IndexError(
char const *__pyx_v_msg, Py_ssize_t __pyx_v_index) {
17879 (void)(PyErr_Format(PyExc_IndexError, __pyx_v_msg, __pyx_v_index));
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;
17920 char __pyx_v_order;
17921 int __pyx_v_broadcasting;
17922 int __pyx_v_direct_copy;
17923 __Pyx_memviewslice __pyx_v_tmp;
17932 int __pyx_lineno = 0;
17933 const char *__pyx_filename = NULL;
17934 int __pyx_clineno = 0;
17935 PyGILState_STATE __pyx_gilstate_save;
17945 __pyx_v_tmpdata = NULL;
17954 __pyx_v_itemsize = ((size_t)__pyx_v_src.memview->view.itemsize);
17963 __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
17972 __pyx_v_broadcasting = 0;
17981 __pyx_v_direct_copy = 0;
17990 __pyx_t_1 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
18002 __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
18021 __pyx_t_1 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
18033 __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
18053 __pyx_t_2 = __pyx_v_dst_ndim;
18055 __pyx_t_3 = __pyx_v_src_ndim;
18056 __pyx_t_1 = (__pyx_t_2 > __pyx_t_3);
18060 __pyx_t_4 = __pyx_t_2;
18063 __pyx_t_4 = __pyx_t_3;
18066 __pyx_v_ndim = __pyx_t_4;
18077 __pyx_t_4 = __pyx_v_ndim;
18078 __pyx_t_2 = __pyx_t_4;
18080 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18081 __pyx_v_i = __pyx_t_3;
18090 __pyx_t_1 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
18102 __pyx_t_1 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
18104 if (likely(__pyx_t_1)) {
18114 __pyx_v_broadcasting = 1;
18123 (__pyx_v_src.strides[__pyx_v_i]) = 0;
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)
18164 __pyx_t_1 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
18166 if (unlikely(__pyx_t_1)) {
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)
18197 __pyx_t_1 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
18209 __pyx_t_1 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
18221 __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
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;
18249 __pyx_v_src = __pyx_v_tmp;
18267 __pyx_t_1 = (!__pyx_v_broadcasting);
18279 __pyx_t_1 = __pyx_memviewslice_is_contig(__pyx_v_src,
'C', __pyx_v_ndim);
18291 __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst,
'C', __pyx_v_ndim);
18310 __pyx_t_1 = __pyx_memviewslice_is_contig(__pyx_v_src,
'F', __pyx_v_ndim);
18322 __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst,
'F', __pyx_v_ndim);
18341 if (__pyx_v_direct_copy) {
18350 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18359 (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
18368 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18377 free(__pyx_v_tmpdata);
18417 __pyx_t_1 = (__pyx_v_order ==
'F');
18419 __pyx_t_1 = (
'F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
18431 __pyx_t_4 = __pyx_memslice_transpose((&__pyx_v_src));
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1344, __pyx_L1_error)
18441 __pyx_t_4 = __pyx_memslice_transpose((&__pyx_v_dst));
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1345, __pyx_L1_error)
18460 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18469 copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
18478 __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18487 free(__pyx_v_tmpdata);
18512 __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18513 __Pyx_AddTraceback(
"View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
18515 __Pyx_PyGILState_Release(__pyx_gilstate_save);
18537static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice,
int __pyx_v_ndim,
int __pyx_v_ndim_other) {
18539 int __pyx_v_offset;
18551 __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
18560 for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
18561 __pyx_v_i = __pyx_t_1;
18570 (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
18579 (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
18588 (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
18599 __pyx_t_1 = __pyx_v_offset;
18600 __pyx_t_2 = __pyx_t_1;
18602 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18603 __pyx_v_i = __pyx_t_3;
18612 (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
18621 (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
18630 (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
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) {
18664 if (__pyx_v_dtype_is_object) {
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);
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();
18718 __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
18735 __Pyx_PyGILState_Release(__pyx_gilstate_save);
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;
18762 __pyx_v_stride = (__pyx_v_strides[0]);
18772 __pyx_t_1 = (__pyx_v_shape[0]);
18773 __pyx_t_2 = __pyx_t_1;
18775 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18776 __pyx_v_i = __pyx_t_3;
18785 __pyx_t_4 = (__pyx_v_ndim == 1);
18806 Py_INCREF((((PyObject **)__pyx_v_data)[0]));
18826 Py_DECREF((((PyObject **)__pyx_v_data)[0]));
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);
18859 __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
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) {
18895 __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
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);
18913 __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
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;
18939 Py_ssize_t __pyx_t_2;
18940 Py_ssize_t __pyx_t_3;
18941 Py_ssize_t __pyx_t_4;
18951 __pyx_v_stride = (__pyx_v_strides[0]);
18960 __pyx_v_extent = (__pyx_v_shape[0]);
18969 __pyx_t_1 = (__pyx_v_ndim == 1);
18982 __pyx_t_2 = __pyx_v_extent;
18983 __pyx_t_3 = __pyx_t_2;
18985 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18986 __pyx_v_i = __pyx_t_4;
18995 (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
19004 __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
19027 __pyx_t_2 = __pyx_v_extent;
19028 __pyx_t_3 = __pyx_t_2;
19030 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
19031 __pyx_v_i = __pyx_t_4;
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);
19048 __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
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
19082PyObject *__pyx_args, PyObject *__pyx_kwds
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
19090PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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);
19111 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
19114 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
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;
19134 default:
goto __pyx_L5_argtuple_error;
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) }
19141 }
else if (unlikely(__pyx_nargs != 3)) {
19142 goto __pyx_L5_argtuple_error;
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)
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]);
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)
19159 goto __pyx_L4_argument_unpacking_done;
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]);
19164 __Pyx_AddTraceback(
"View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
19165 __Pyx_RefNannyFinishContext();
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);
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]);
19178 goto __pyx_L7_cleaned_up;
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]);
19183 __pyx_L7_cleaned_up:;
19185 __Pyx_RefNannyFinishContext();
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
19194 PyObject *__pyx_t_2 = NULL;
19195 PyObject *__pyx_t_3 = NULL;
19198 int __pyx_lineno = 0;
19199 const char *__pyx_filename = NULL;
19200 int __pyx_clineno = 0;
19201 __Pyx_RefNannySetupContext(
"__pyx_unpickle_Enum", 0);
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)
19220 __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_MemviewEnum_type);
19221 __Pyx_INCREF(__pyx_t_3);
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);
19230 __pyx_v___pyx_result = __pyx_t_2;
19240 __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
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)
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;
19276 PyObject *__pyx_temp;
19278 __pyx_temp = __pyx_r;
19279 __Pyx_INCREF(__pyx_v___pyx_result);
19280 __pyx_r = __pyx_v___pyx_result;
19282 __Pyx_XDECREF(__pyx_temp);
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);
19301 __Pyx_XDECREF(__pyx_v___pyx_result);
19302 __Pyx_XGIVEREF(__pyx_r);
19303 __Pyx_RefNannyFinishContext();
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;
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);
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;
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)
19356 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19359 __Pyx_XDECREF(__pyx_t_1);
19360 __Pyx_AddTraceback(
"View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
19363 __Pyx_XGIVEREF(__pyx_r);
19364 __Pyx_RefNannyFinishContext();
19376static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
19377 PyTypeObject *__pyx_r;
19388 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
19413static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
19425 __pyx_r = PyDataType_KIND(__pyx_v_self);
19450static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
19462 __pyx_r = PyDataType_TYPE(__pyx_v_self);
19487static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
19499 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
19524static CYTHON_INLINE
int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
19536 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
19561static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
19573 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
19598static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
19610 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
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);
19648 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
19651 PyObject *__pyx_temp;
19653 __pyx_temp = __pyx_r;
19654 __Pyx_INCREF(((PyObject *)__pyx_t_1));
19655 __pyx_r = ((PyObject *)__pyx_t_1);
19657 __Pyx_XDECREF(__pyx_temp);
19672 __Pyx_XGIVEREF(__pyx_r);
19673 __Pyx_RefNannyFinishContext();
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);
19698 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
19701 PyObject *__pyx_temp;
19703 __pyx_temp = __pyx_r;
19704 __Pyx_INCREF(((PyObject*)__pyx_t_1));
19705 __pyx_r = ((PyObject*)__pyx_t_1);
19707 __Pyx_XDECREF(__pyx_temp);
19722 __Pyx_XGIVEREF(__pyx_r);
19723 __Pyx_RefNannyFinishContext();
19735static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
19736 PyArray_ArrayDescr *__pyx_r;
19747 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
19772static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
19773 npy_uint64 __pyx_r;
19784 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
19809static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
19821 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
19846static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
19858 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
19883static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
19895 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
19920static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
19932 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
19957static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
19969 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
19994static CYTHON_INLINE
void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
20006 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
20031static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
20043 __pyx_r = PyArray_BASE(__pyx_v_self);
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);
20081 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
20084 PyArray_Descr *__pyx_temp;
20086 __pyx_temp = __pyx_r;
20087 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
20088 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
20090 __Pyx_XDECREF((PyObject *)__pyx_temp);
20105 __Pyx_XGIVEREF((PyObject *)__pyx_r);
20106 __Pyx_RefNannyFinishContext();
20118static CYTHON_INLINE
int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
20130 __pyx_r = PyArray_NDIM(__pyx_v_self);
20155static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
20167 __pyx_r = PyArray_DIMS(__pyx_v_self);
20192static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
20204 __pyx_r = PyArray_STRIDES(__pyx_v_self);
20229static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
20241 __pyx_r = PyArray_SIZE(__pyx_v_self);
20266static CYTHON_INLINE
char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
20278 __pyx_r = PyArray_BYTES(__pyx_v_self);
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);
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);
20322 PyObject *__pyx_temp;
20324 __pyx_temp = __pyx_r;
20325 __pyx_r = __pyx_t_1;
20327 __Pyx_XDECREF(__pyx_temp);
20342 __Pyx_XDECREF(__pyx_t_1);
20343 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
20346 __Pyx_XGIVEREF(__pyx_r);
20347 __Pyx_RefNannyFinishContext();
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);
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);
20378 PyObject *__pyx_temp;
20380 __pyx_temp = __pyx_r;
20381 __pyx_r = __pyx_t_1;
20383 __Pyx_XDECREF(__pyx_temp);
20398 __Pyx_XDECREF(__pyx_t_1);
20399 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
20402 __Pyx_XGIVEREF(__pyx_r);
20403 __Pyx_RefNannyFinishContext();
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);
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);
20434 PyObject *__pyx_temp;
20436 __pyx_temp = __pyx_r;
20437 __pyx_r = __pyx_t_1;
20439 __Pyx_XDECREF(__pyx_temp);
20454 __Pyx_XDECREF(__pyx_t_1);
20455 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
20458 __Pyx_XGIVEREF(__pyx_r);
20459 __Pyx_RefNannyFinishContext();
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);
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);
20490 PyObject *__pyx_temp;
20492 __pyx_temp = __pyx_r;
20493 __pyx_r = __pyx_t_1;
20495 __Pyx_XDECREF(__pyx_temp);
20510 __Pyx_XDECREF(__pyx_t_1);
20511 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
20514 __Pyx_XGIVEREF(__pyx_r);
20515 __Pyx_RefNannyFinishContext();
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);
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);
20546 PyObject *__pyx_temp;
20548 __pyx_temp = __pyx_r;
20549 __pyx_r = __pyx_t_1;
20551 __Pyx_XDECREF(__pyx_temp);
20566 __Pyx_XDECREF(__pyx_t_1);
20567 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
20570 __Pyx_XGIVEREF(__pyx_r);
20571 __Pyx_RefNannyFinishContext();
20583static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
20584 PyObject *__pyx_r = NULL;
20585 __Pyx_RefNannyDeclarations
20587 PyObject *__pyx_t_2;
20588 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
20597 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
20609 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
20612 PyObject *__pyx_temp;
20614 __pyx_temp = __pyx_r;
20615 __Pyx_INCREF(((PyObject*)__pyx_t_2));
20616 __pyx_r = ((PyObject*)__pyx_t_2);
20618 __Pyx_XDECREF(__pyx_temp);
20641 PyObject *__pyx_temp;
20643 __pyx_temp = __pyx_r;
20644 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
20645 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
20647 __Pyx_XDECREF(__pyx_temp);
20662 __Pyx_XGIVEREF(__pyx_r);
20663 __Pyx_RefNannyFinishContext();
20675static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
20687 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
20712static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
20724 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
20749static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
20761 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
20786static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
20787 PyUFuncGenericFunction *__pyx_r;
20798 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
20823static CYTHON_INLINE
void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
20835 __pyx_r = ((
void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
20860static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
20872 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
20897static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
20898 char const *__pyx_r;
20909 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
20934static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
20935 char const *__pyx_r;
20946 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
20971static CYTHON_INLINE
void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
20983 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
21008static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
21020 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
21045static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
21057 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
21082static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
21084 int __pyx_lineno = 0;
21085 const char *__pyx_filename = NULL;
21086 int __pyx_clineno = 0;
21095 Py_INCREF(__pyx_v_base);
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)
21118 __Pyx_AddTraceback(
"numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
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
21136 __Pyx_RefNannySetupContext(
"get_array_base", 0);
21145 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
21154 __pyx_t_1 = (__pyx_v_base == NULL);
21167 PyObject *__pyx_temp;
21169 __pyx_temp = __pyx_r;
21170 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21172 __Pyx_XDECREF(__pyx_temp);
21193 PyObject *__pyx_temp;
21195 __pyx_temp = __pyx_r;
21196 __Pyx_INCREF(((PyObject *)__pyx_v_base));
21197 __pyx_r = ((PyObject *)__pyx_v_base);
21199 __Pyx_XDECREF(__pyx_temp);
21214 __Pyx_XGIVEREF(__pyx_r);
21215 __Pyx_RefNannyFinishContext();
21227static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
21229 __Pyx_RefNannyDeclarations
21230 PyObject *__pyx_t_1 = NULL;
21231 PyObject *__pyx_t_2 = NULL;
21232 PyObject *__pyx_t_3 = NULL;
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;
21240 int __pyx_lineno = 0;
21241 const char *__pyx_filename = NULL;
21242 int __pyx_clineno = 0;
21243 __Pyx_RefNannySetupContext(
"import_array", 0);
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);
21268 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 1079, __pyx_L3_error)
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;
21292 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
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);
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);
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)
21320 goto __pyx_L5_except_error;
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;
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);
21359 __Pyx_RefNannyFinishContext();
21371static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
21373 __Pyx_RefNannyDeclarations
21374 PyObject *__pyx_t_1 = NULL;
21375 PyObject *__pyx_t_2 = NULL;
21376 PyObject *__pyx_t_3 = NULL;
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;
21384 int __pyx_lineno = 0;
21385 const char *__pyx_filename = NULL;
21386 int __pyx_clineno = 0;
21387 __Pyx_RefNannySetupContext(
"import_umath", 0);
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);
21412 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 1085, __pyx_L3_error)
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;
21436 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
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);
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);
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)
21464 goto __pyx_L5_except_error;
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;
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);
21503 __Pyx_RefNannyFinishContext();
21515static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
21517 __Pyx_RefNannyDeclarations
21518 PyObject *__pyx_t_1 = NULL;
21519 PyObject *__pyx_t_2 = NULL;
21520 PyObject *__pyx_t_3 = NULL;
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;
21528 int __pyx_lineno = 0;
21529 const char *__pyx_filename = NULL;
21530 int __pyx_clineno = 0;
21531 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
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);
21556 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 1091, __pyx_L3_error)
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;
21580 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
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);
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);
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)
21608 goto __pyx_L5_except_error;
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;
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);
21647 __Pyx_RefNannyFinishContext();
21659static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
21671 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
21697static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
21709 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
21735static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
21736 npy_datetime __pyx_r;
21747 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
21772static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
21773 npy_timedelta __pyx_r;
21784 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
21809static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
21810 NPY_DATETIMEUNIT __pyx_r;
21821 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
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
21851PyObject *__pyx_args, PyObject *__pyx_kwds
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
21858PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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;
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);
21881 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
21884 __pyx_kwvalues = __Pyx_KwValues_FASTCALL_TPNEW(__pyx_args, __pyx_nargs);
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) {
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;
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;
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;
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;
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;
21912 default:
goto __pyx_L5_argtuple_error;
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));
21922 switch (__pyx_nargs) {
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;
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;
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;
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;
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;
21944 default:
goto __pyx_L5_argtuple_error;
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));
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];
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)
21962 goto __pyx_L4_argument_unpacking_done;
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]);
21967 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21968 __Pyx_RefNannyFinishContext();
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);
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]);
21977 __Pyx_RefNannyFinishContext();
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) {
21983 __Pyx_TraceDeclarationsFunc
21984 __Pyx_RefNannyDeclarations
21985 PyObject *__pyx_t_1 = NULL;
21987 PyObject *__pyx_t_3 = NULL;
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));
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;
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);
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;
22046 __pyx_t_2 = (__pyx_v_shape != Py_None);
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;
22083 __pyx_t_2 = (__pyx_v_nd != Py_None);
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;
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)
22125 if ((1));
else __PYX_ERR(0, 33, __pyx_L1_error)
22137 __pyx_t_2 = (__pyx_v_b_or != Py_None);
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;
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;
22193 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 24, __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);
22203 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 24, __pyx_L1_error));
22205 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22209 __Pyx_PyMonitoring_ExitScope(0);
22210 __Pyx_RefNannyFinishContext();
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
22227PyObject *__pyx_args, PyObject *__pyx_kwds
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
22236PyObject *__pyx_args, PyObject *__pyx_kwds
22239 PyObject *__pyx_v_context = 0;
22240 #if !CYTHON_VECTORCALL
22241 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
22255 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
22258 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
22270 default:
goto __pyx_L5_argtuple_error;
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));
22276 switch (__pyx_nargs) {
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;
22282 default:
goto __pyx_L5_argtuple_error;
22284 if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
22286 __pyx_v_context = values[0];
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)
22292 goto __pyx_L4_argument_unpacking_done;
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]);
22297 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
22298 __Pyx_RefNannyFinishContext();
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);
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]);
22307 __Pyx_RefNannyFinishContext();
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
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;
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));
22336 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_context);
if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
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)
22351 __pyx_t_2 = __pyx_t_3;
22352 __Pyx_GOTREF(__pyx_t_2);
22354 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Context};
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) {
22360 __Pyx_INCREF(__pyx_t_5);
22361 __pyx_v_Context = __pyx_t_5;
22365 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22368 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22377 __pyx_t_5 = __pyx_v_Context;
22378 __Pyx_INCREF(__pyx_t_5);
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);
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;
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;
22428 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22429 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 52, __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);
22438 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 52, __pyx_L1_error));
22440 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
22443 __Pyx_XDECREF(__pyx_v_Context);
22444 __Pyx_XGIVEREF(__pyx_r);
22445 __Pyx_PyMonitoring_ExitScope(0);
22446 __Pyx_RefNannyFinishContext();
22459static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(PyObject *__pyx_v_self);
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));
22469 __Pyx_RefNannyFinishContext();
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));
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);
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);
22495 PyObject *__pyx_temp;
22497 __pyx_temp = __pyx_r;
22498 __pyx_r = __pyx_t_2;
22500 __Pyx_XDECREF(__pyx_temp);
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;
22509 __pyx_t_3 = __pyx_r;
22511 __Pyx_PyCriticalSection_End(&__pyx_cs);
22512 __pyx_r = __pyx_t_3;
22517 __Pyx_PyCriticalSection_End(&__pyx_cs);
22518 goto __pyx_L1_error;
22521 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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);
22532 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22534 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.nd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22537 __Pyx_XGIVEREF(__pyx_r);
22538 __Pyx_PyMonitoring_ExitScope(0);
22539 __Pyx_RefNannyFinishContext();
22544static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
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;
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));
22554 __Pyx_RefNannyFinishContext();
22558static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
22560 __Pyx_TraceDeclarationsFunc
22561 __Pyx_RefNannyDeclarations
22562 PyObject *__pyx_t_1 = NULL;
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));
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);
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;
22581 __Pyx_PyCriticalSection_End(&__pyx_cs);
22585 __Pyx_PyCriticalSection_End(&__pyx_cs);
22586 goto __pyx_L1_error;
22590 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22595 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 9, __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);
22603 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 9, __pyx_L1_error));
22605 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.nd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22609 __Pyx_PyMonitoring_ExitScope(0);
22610 __Pyx_RefNannyFinishContext();
22623static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(PyObject *__pyx_v_self);
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));
22633 __Pyx_RefNannyFinishContext();
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));
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);
22656 PyObject *__pyx_temp;
22658 __pyx_temp = __pyx_r;
22659 __Pyx_INCREF(__pyx_v_self->Shape);
22660 __pyx_r = __pyx_v_self->Shape;
22662 __Pyx_XDECREF(__pyx_temp);
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;
22670 __pyx_t_2 = __pyx_r;
22672 __Pyx_PyCriticalSection_End(&__pyx_cs);
22673 __pyx_r = __pyx_t_2;
22678 __Pyx_PyCriticalSection_End(&__pyx_cs);
22679 goto __pyx_L1_error;
22682 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22687 __Pyx_XDECREF(__pyx_t_1);
22688 __Pyx_TraceException(__pyx_lineno, 0, 0);
22689 #if CYTHON_USE_SYS_MONITORING
22690 __Pyx_TraceExceptionUnwind(0, 0);
22692 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22694 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.Shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22697 __Pyx_XGIVEREF(__pyx_r);
22698 __Pyx_PyMonitoring_ExitScope(0);
22699 __Pyx_RefNannyFinishContext();
22704static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
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;
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));
22714 __Pyx_RefNannyFinishContext();
22718static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
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));
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);
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;
22743 __Pyx_PyCriticalSection_End(&__pyx_cs);
22748 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22753 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 10, __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);
22761 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22763 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.Shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22767 __Pyx_PyMonitoring_ExitScope(0);
22768 __Pyx_RefNannyFinishContext();
22773static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self);
22774static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self) {
22775 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
22783 __Pyx_RefNannyFinishContext();
22787static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
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));
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);
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;
22812 __Pyx_PyCriticalSection_End(&__pyx_cs);
22817 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22822 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 10, __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);
22830 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 10, __pyx_L1_error));
22832 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.Shape.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22836 __Pyx_PyMonitoring_ExitScope(0);
22837 __Pyx_RefNannyFinishContext();
22850static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(PyObject *__pyx_v_self);
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));
22860 __Pyx_RefNannyFinishContext();
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));
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);
22883 PyObject *__pyx_temp;
22885 __pyx_temp = __pyx_r;
22886 __Pyx_INCREF(__pyx_v_self->name);
22887 __pyx_r = __pyx_v_self->name;
22889 __Pyx_XDECREF(__pyx_temp);
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;
22897 __pyx_t_2 = __pyx_r;
22899 __Pyx_PyCriticalSection_End(&__pyx_cs);
22900 __pyx_r = __pyx_t_2;
22905 __Pyx_PyCriticalSection_End(&__pyx_cs);
22906 goto __pyx_L1_error;
22909 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22914 __Pyx_XDECREF(__pyx_t_1);
22915 __Pyx_TraceException(__pyx_lineno, 0, 0);
22916 #if CYTHON_USE_SYS_MONITORING
22917 __Pyx_TraceExceptionUnwind(0, 0);
22919 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22921 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22924 __Pyx_XGIVEREF(__pyx_r);
22925 __Pyx_PyMonitoring_ExitScope(0);
22926 __Pyx_RefNannyFinishContext();
22931static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
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;
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));
22941 __Pyx_RefNannyFinishContext();
22945static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
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));
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);
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);
22974 __Pyx_PyCriticalSection_End(&__pyx_cs);
22978 __Pyx_PyCriticalSection_End(&__pyx_cs);
22979 goto __pyx_L1_error;
22983 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22988 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 11, __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);
22997 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
22999 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23003 __Pyx_PyMonitoring_ExitScope(0);
23004 __Pyx_RefNannyFinishContext();
23009static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self);
23010static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self) {
23011 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
23019 __Pyx_RefNannyFinishContext();
23023static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
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));
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);
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);
23048 __Pyx_PyCriticalSection_End(&__pyx_cs);
23053 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23058 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 11, __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);
23066 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 11, __pyx_L1_error));
23068 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.name.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23072 __Pyx_PyMonitoring_ExitScope(0);
23073 __Pyx_RefNannyFinishContext();
23086static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(PyObject *__pyx_v_self);
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));
23096 __Pyx_RefNannyFinishContext();
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));
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);
23119 PyObject *__pyx_temp;
23121 __pyx_temp = __pyx_r;
23122 __Pyx_INCREF(__pyx_v_self->BC_type);
23123 __pyx_r = __pyx_v_self->BC_type;
23125 __Pyx_XDECREF(__pyx_temp);
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;
23133 __pyx_t_2 = __pyx_r;
23135 __Pyx_PyCriticalSection_End(&__pyx_cs);
23136 __pyx_r = __pyx_t_2;
23141 __Pyx_PyCriticalSection_End(&__pyx_cs);
23142 goto __pyx_L1_error;
23145 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23150 __Pyx_XDECREF(__pyx_t_1);
23151 __Pyx_TraceException(__pyx_lineno, 0, 0);
23152 #if CYTHON_USE_SYS_MONITORING
23153 __Pyx_TraceExceptionUnwind(0, 0);
23155 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23157 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.BC_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23160 __Pyx_XGIVEREF(__pyx_r);
23161 __Pyx_PyMonitoring_ExitScope(0);
23162 __Pyx_RefNannyFinishContext();
23167static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
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;
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));
23177 __Pyx_RefNannyFinishContext();
23181static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
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));
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);
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);
23210 __Pyx_PyCriticalSection_End(&__pyx_cs);
23214 __Pyx_PyCriticalSection_End(&__pyx_cs);
23215 goto __pyx_L1_error;
23219 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23224 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 12, __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);
23233 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23235 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.BC_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23239 __Pyx_PyMonitoring_ExitScope(0);
23240 __Pyx_RefNannyFinishContext();
23245static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self);
23246static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self) {
23247 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
23255 __Pyx_RefNannyFinishContext();
23259static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
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));
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);
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);
23284 __Pyx_PyCriticalSection_End(&__pyx_cs);
23289 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23294 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 12, __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);
23302 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 12, __pyx_L1_error));
23304 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.BC_type.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23308 __Pyx_PyMonitoring_ExitScope(0);
23309 __Pyx_RefNannyFinishContext();
23322static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(PyObject *__pyx_v_self);
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));
23332 __Pyx_RefNannyFinishContext();
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));
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);
23355 PyObject *__pyx_temp;
23357 __pyx_temp = __pyx_r;
23358 __Pyx_INCREF(__pyx_v_self->ct);
23359 __pyx_r = __pyx_v_self->ct;
23361 __Pyx_XDECREF(__pyx_temp);
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;
23369 __pyx_t_2 = __pyx_r;
23371 __Pyx_PyCriticalSection_End(&__pyx_cs);
23372 __pyx_r = __pyx_t_2;
23377 __Pyx_PyCriticalSection_End(&__pyx_cs);
23378 goto __pyx_L1_error;
23381 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23386 __Pyx_XDECREF(__pyx_t_1);
23387 __Pyx_TraceException(__pyx_lineno, 0, 0);
23388 #if CYTHON_USE_SYS_MONITORING
23389 __Pyx_TraceExceptionUnwind(0, 0);
23391 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23393 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.ct.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23396 __Pyx_XGIVEREF(__pyx_r);
23397 __Pyx_PyMonitoring_ExitScope(0);
23398 __Pyx_RefNannyFinishContext();
23403static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
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;
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));
23413 __Pyx_RefNannyFinishContext();
23417static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
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));
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);
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;
23442 __Pyx_PyCriticalSection_End(&__pyx_cs);
23447 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23452 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 13, __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);
23460 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23462 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.ct.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23466 __Pyx_PyMonitoring_ExitScope(0);
23467 __Pyx_RefNannyFinishContext();
23472static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self);
23473static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self) {
23474 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
23482 __Pyx_RefNannyFinishContext();
23486static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
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));
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);
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;
23511 __Pyx_PyCriticalSection_End(&__pyx_cs);
23516 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23521 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 13, __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);
23529 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 13, __pyx_L1_error));
23531 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.ct.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23535 __Pyx_PyMonitoring_ExitScope(0);
23536 __Pyx_RefNannyFinishContext();
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
23551PyObject *__pyx_args, PyObject *__pyx_kwds
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
23560PyObject *__pyx_args, PyObject *__pyx_kwds
23563 #if !CYTHON_VECTORCALL
23564 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
23574 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
23585 __Pyx_RefNannyFinishContext();
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;
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));
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);
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);
23654 __pyx_v_state = ((PyObject*)__pyx_t_4);
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;
23679 __Pyx_PyCriticalSection_End(&__pyx_cs);
23683 __Pyx_PyCriticalSection_End(&__pyx_cs);
23684 goto __pyx_L1_error;
23688 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23698 __pyx_t_6 = (__pyx_v__dict != Py_None);
23703 __pyx_t_5 = __pyx_t_6;
23705 goto __pyx_L7_bool_binop_done;
23707 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v__dict);
if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 8, __pyx_L1_error)
23709 __pyx_t_5 = __pyx_t_6;
23711 __pyx_L7_bool_binop_done:;
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));
23740 __pyx_v_use_setstate = 1;
23760 __pyx_t_6 = (__pyx_v_self->BC_type != ((PyObject*)Py_None));
23765 __pyx_t_5 = __pyx_t_6;
23767 goto __pyx_L9_bool_binop_done;
23769 __pyx_t_6 = (__pyx_v_self->Shape != Py_None);
23774 __pyx_t_5 = __pyx_t_6;
23776 goto __pyx_L9_bool_binop_done;
23778 __pyx_t_6 = (__pyx_v_self->ct != Py_None);
23783 __pyx_t_5 = __pyx_t_6;
23785 goto __pyx_L9_bool_binop_done;
23787 __pyx_t_6 = (__pyx_v_self->name != ((PyObject*)Py_None));
23789 __pyx_t_5 = __pyx_t_6;
23791 __pyx_L9_bool_binop_done:;
23792 __pyx_v_use_setstate = __pyx_t_5;
23803 if (__pyx_v_use_setstate) {
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);
23837 PyObject *__pyx_temp;
23839 __pyx_temp = __pyx_r;
23840 __pyx_r = __pyx_t_3;
23842 __Pyx_XDECREF(__pyx_temp);
23845 __Pyx_TraceReturnValue(__pyx_r, 54, 0, __PYX_ERR(1, 14, __pyx_L1_error));
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);
23887 PyObject *__pyx_temp;
23889 __pyx_temp = __pyx_r;
23890 __pyx_r = __pyx_t_4;
23892 __Pyx_XDECREF(__pyx_temp);
23895 __Pyx_TraceReturnValue(__pyx_r, 62, 0, __PYX_ERR(1, 16, __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);
23915 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 1, __pyx_L1_error));
23917 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23920 __Pyx_XDECREF(__pyx_v_state);
23921 __Pyx_XDECREF(__pyx_v__dict);
23923 __Pyx_XGIVEREF(__pyx_r);
23924 __Pyx_PyMonitoring_ExitScope(0);
23925 __Pyx_RefNannyFinishContext();
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
23941PyObject *__pyx_args, PyObject *__pyx_kwds
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
23950PyObject *__pyx_args, PyObject *__pyx_kwds
23953 PyObject *__pyx_v___pyx_state = 0;
23954 #if !CYTHON_VECTORCALL
23955 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
23969 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
23972 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
23984 default:
goto __pyx_L5_argtuple_error;
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) }
23991 }
else if (unlikely(__pyx_nargs != 1)) {
23992 goto __pyx_L5_argtuple_error;
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)
23997 __pyx_v___pyx_state = values[0];
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)
24003 goto __pyx_L4_argument_unpacking_done;
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]);
24008 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24009 __Pyx_RefNannyFinishContext();
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);
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]);
24018 __Pyx_RefNannyFinishContext();
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));
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)
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;
24060 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24061 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(1, 17, __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);
24070 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 17, __pyx_L1_error));
24072 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24075 __Pyx_XGIVEREF(__pyx_r);
24076 __Pyx_PyMonitoring_ExitScope(0);
24077 __Pyx_RefNannyFinishContext();
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
24094PyObject *__pyx_args, PyObject *__pyx_kwds
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
24101PyObject *__pyx_args, PyObject *__pyx_kwds
24104 #if !CYTHON_VECTORCALL_TPNEW
24105 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24107 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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);
24115 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
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));
24126 __Pyx_RefNannyFinishContext();
24130static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
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));
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;
24164 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 78, __pyx_L1_error));
24167 __Pyx_TraceException(__pyx_lineno, 0, 0);
24168 #if CYTHON_USE_SYS_MONITORING
24169 __Pyx_TraceExceptionUnwind(0, 0);
24171 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 78, __pyx_L1_error));
24173 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24177 __Pyx_PyMonitoring_ExitScope(0);
24178 __Pyx_RefNannyFinishContext();
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
24195PyObject *__pyx_args, PyObject *__pyx_kwds
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
24204PyObject *__pyx_args, PyObject *__pyx_kwds
24207 #if !CYTHON_VECTORCALL
24208 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
24218 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
24229 __Pyx_RefNannyFinishContext();
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));
24252 PyObject *__pyx_temp;
24254 __pyx_temp = __pyx_r;
24255 __Pyx_INCREF(__pyx_v_self->uOfXT);
24256 __pyx_r = __pyx_v_self->uOfXT;
24258 __Pyx_XDECREF(__pyx_temp);
24260 __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 82, __pyx_L1_error));
24273 __Pyx_TraceException(__pyx_lineno, 0, 0);
24274 #if CYTHON_USE_SYS_MONITORING
24275 __Pyx_TraceExceptionUnwind(0, 0);
24277 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 81, __pyx_L1_error));
24279 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.init_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
24282 __Pyx_XGIVEREF(__pyx_r);
24283 __Pyx_PyMonitoring_ExitScope(0);
24284 __Pyx_RefNannyFinishContext();
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
24300PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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));
24318 if (unlikely(__pyx_skip_dispatch)) ;
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))
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)))
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));
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)) {
24337 __Pyx_INCREF(__pyx_t_1);
24338 __pyx_t_4 = __pyx_t_1;
24340 #if CYTHON_UNPACK_METHODS
24341 if (unlikely(PyMethod_Check(__pyx_t_4))) {
24342 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
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);
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);
24359 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24362 __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24363 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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;
24373 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24374 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
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;
24401 __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 84, __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);
24412 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24414 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24417 __Pyx_PyMonitoring_ExitScope(0);
24418 __Pyx_RefNannyFinishContext();
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
24426PyObject *__pyx_args, PyObject *__pyx_kwds
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
24435PyObject *__pyx_args, PyObject *__pyx_kwds
24438 #if !CYTHON_VECTORCALL
24439 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
24449 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
24460 __Pyx_RefNannyFinishContext();
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);
24479 PyObject *__pyx_temp;
24481 __pyx_temp = __pyx_r;
24482 __pyx_r = __pyx_t_1;
24484 __Pyx_XDECREF(__pyx_temp);
24491 __Pyx_XDECREF(__pyx_t_1);
24492 __Pyx_TraceException(__pyx_lineno, 0, 0);
24493 #if CYTHON_USE_SYS_MONITORING
24494 __Pyx_TraceExceptionUnwind(0, 0);
24496 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
24498 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24501 __Pyx_XGIVEREF(__pyx_r);
24502 __Pyx_PyMonitoring_ExitScope(0);
24503 __Pyx_RefNannyFinishContext();
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
24520PyObject *__pyx_args, PyObject *__pyx_kwds
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
24529PyObject *__pyx_args, PyObject *__pyx_kwds
24532 PyObject *__pyx_v_value = 0;
24533 #if !CYTHON_VECTORCALL
24534 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
24548 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
24551 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
24563 default:
goto __pyx_L5_argtuple_error;
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) }
24570 }
else if (unlikely(__pyx_nargs != 1)) {
24571 goto __pyx_L5_argtuple_error;
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)
24576 __pyx_v_value = values[0];
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)
24582 goto __pyx_L4_argument_unpacking_done;
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]);
24587 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24588 __Pyx_RefNannyFinishContext();
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);
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]);
24597 __Pyx_RefNannyFinishContext();
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);
24632 PyObject *__pyx_temp;
24634 __pyx_temp = __pyx_r;
24635 __pyx_r = __pyx_t_2;
24637 __Pyx_XDECREF(__pyx_temp);
24644 __Pyx_XDECREF(__pyx_t_1);
24645 __Pyx_XDECREF(__pyx_t_2);
24646 __Pyx_AddTraceback(
"BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24649 __Pyx_XGIVEREF(__pyx_r);
24650 __Pyx_RefNannyFinishContext();
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
24659PyObject *__pyx_args, PyObject *__pyx_kwds
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
24667PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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);
24688 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
24691 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
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;
24712 default:
goto __pyx_L5_argtuple_error;
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) }
24721 switch (__pyx_nargs) {
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;
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)
24732 default:
goto __pyx_L5_argtuple_error;
24734 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
24736 __pyx_v_x = values[0];
24737 __pyx_v_t = values[1];
24738 __pyx_v_n = values[2];
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)
24744 goto __pyx_L4_argument_unpacking_done;
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]);
24749 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
24750 __Pyx_RefNannyFinishContext();
24752 __pyx_L4_argument_unpacking_done:;
24753 __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
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]);
24759 __Pyx_RefNannyFinishContext();
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) }
24779 PyObject *__pyx_temp;
24781 __pyx_temp = __pyx_r;
24782 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
24783 __pyx_r = __pyx_cur_scope->__pyx_v_value;
24785 __Pyx_XDECREF(__pyx_temp);
24787 __Pyx_TraceReturnValue(__pyx_r, 5, 0, __PYX_ERR(0, 97, __pyx_L1_error));
24792 __Pyx_TraceException(__pyx_lineno, 0, 0);
24793 #if CYTHON_USE_SYS_MONITORING
24794 __Pyx_TraceExceptionUnwind(0, 0);
24796 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 97, __pyx_L1_error));
24798 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
24801 __Pyx_XGIVEREF(__pyx_r);
24802 __Pyx_PyMonitoring_ExitScope(0);
24803 __Pyx_RefNannyFinishContext();
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;
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)
24837 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
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);
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)
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;
24861 #if CYTHON_UNPACK_METHODS
24862 if (unlikely(PyMethod_Check(__pyx_t_5))) {
24863 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
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);
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);
24880 __Pyx_CyFunction_Defaults(
struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_t_2;
24881 __Pyx_GIVEREF(__pyx_t_2);
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;
24899 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24900 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 87, __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);
24912 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 87, __pyx_L1_error));
24914 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
24917 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
24918 __Pyx_XGIVEREF(__pyx_r);
24919 __Pyx_PyMonitoring_ExitScope(0);
24920 __Pyx_RefNannyFinishContext();
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
24937PyObject *__pyx_args, PyObject *__pyx_kwds
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
24946PyObject *__pyx_args, PyObject *__pyx_kwds
24949 PyObject *__pyx_v_a0 = 0;
24950 PyObject *__pyx_v_a = 0;
24951 #if !CYTHON_VECTORCALL
24952 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
24966 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
24969 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
24985 default:
goto __pyx_L5_argtuple_error;
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) }
24992 }
else if (unlikely(__pyx_nargs != 2)) {
24993 goto __pyx_L5_argtuple_error;
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)
25000 __pyx_v_a0 = values[0];
25001 __pyx_v_a = values[1];
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)
25007 goto __pyx_L4_argument_unpacking_done;
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]);
25012 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
25013 __Pyx_RefNannyFinishContext();
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);
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]);
25022 __Pyx_RefNannyFinishContext();
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);
25057 PyObject *__pyx_temp;
25059 __pyx_temp = __pyx_r;
25060 __pyx_r = __pyx_t_2;
25062 __Pyx_XDECREF(__pyx_temp);
25069 __Pyx_XDECREF(__pyx_t_1);
25070 __Pyx_XDECREF(__pyx_t_2);
25071 __Pyx_AddTraceback(
"BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25074 __Pyx_XGIVEREF(__pyx_r);
25075 __Pyx_RefNannyFinishContext();
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
25084PyObject *__pyx_args, PyObject *__pyx_kwds
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
25092PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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);
25113 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
25116 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
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;
25137 default:
goto __pyx_L5_argtuple_error;
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) }
25146 switch (__pyx_nargs) {
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;
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)
25157 default:
goto __pyx_L5_argtuple_error;
25159 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
25161 __pyx_v_x = values[0];
25162 __pyx_v_t = values[1];
25163 __pyx_v_n = values[2];
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)
25169 goto __pyx_L4_argument_unpacking_done;
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]);
25174 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
25175 __Pyx_RefNannyFinishContext();
25177 __pyx_L4_argument_unpacking_done:;
25178 __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
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]);
25184 __Pyx_RefNannyFinishContext();
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;
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) }
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;
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);
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;
25232 PyObject *__pyx_temp;
25234 __pyx_temp = __pyx_r;
25235 __pyx_r = __pyx_t_5;
25237 __Pyx_XDECREF(__pyx_temp);
25240 __Pyx_TraceReturnValue(__pyx_r, 6, 0, __PYX_ERR(0, 113, __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);
25254 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 113, __pyx_L1_error));
25256 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
25259 __Pyx_XGIVEREF(__pyx_r);
25260 __Pyx_PyMonitoring_ExitScope(0);
25261 __Pyx_RefNannyFinishContext();
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;
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)
25295 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
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);
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)
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;
25322 #if CYTHON_UNPACK_METHODS
25323 if (unlikely(PyMethod_Check(__pyx_t_5))) {
25324 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
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);
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);
25341 __Pyx_CyFunction_Defaults(
struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_t_2;
25342 __Pyx_GIVEREF(__pyx_t_2);
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;
25360 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25361 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 100, __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);
25373 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 100, __pyx_L1_error));
25375 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
25378 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
25379 __Pyx_XGIVEREF(__pyx_r);
25380 __Pyx_PyMonitoring_ExitScope(0);
25381 __Pyx_RefNannyFinishContext();
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
25398PyObject *__pyx_args, PyObject *__pyx_kwds
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
25407PyObject *__pyx_args, PyObject *__pyx_kwds
25410 PyObject *__pyx_v_t1 = 0;
25411 PyObject *__pyx_v_value = 0;
25412 #if !CYTHON_VECTORCALL
25413 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
25427 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
25430 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
25446 default:
goto __pyx_L5_argtuple_error;
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) }
25453 }
else if (unlikely(__pyx_nargs != 2)) {
25454 goto __pyx_L5_argtuple_error;
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)
25461 __pyx_v_t1 = values[0];
25462 __pyx_v_value = values[1];
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)
25468 goto __pyx_L4_argument_unpacking_done;
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]);
25473 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
25474 __Pyx_RefNannyFinishContext();
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);
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]);
25483 __Pyx_RefNannyFinishContext();
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);
25516 PyObject *__pyx_temp;
25518 __pyx_temp = __pyx_r;
25519 __pyx_r = __pyx_t_2;
25521 __Pyx_XDECREF(__pyx_temp);
25528 __Pyx_XDECREF(__pyx_t_1);
25529 __Pyx_XDECREF(__pyx_t_2);
25530 __Pyx_AddTraceback(
"BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25533 __Pyx_XGIVEREF(__pyx_r);
25534 __Pyx_RefNannyFinishContext();
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
25543PyObject *__pyx_args, PyObject *__pyx_kwds
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
25551PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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);
25572 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
25575 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
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;
25596 default:
goto __pyx_L5_argtuple_error;
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) }
25605 switch (__pyx_nargs) {
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;
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)
25616 default:
goto __pyx_L5_argtuple_error;
25618 if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
25620 __pyx_v_x = values[0];
25621 __pyx_v_t = values[1];
25622 __pyx_v_n = values[2];
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)
25628 goto __pyx_L4_argument_unpacking_done;
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]);
25633 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
25634 __Pyx_RefNannyFinishContext();
25636 __pyx_L4_argument_unpacking_done:;
25637 __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
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]);
25643 __Pyx_RefNannyFinishContext();
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
25654 PyObject *__pyx_t_2 = NULL;
25655 PyObject *__pyx_t_3 = NULL;
25656 PyObject *__pyx_t_4 = NULL;
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));
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;
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;
25681 __Pyx_INCREF(__pyx_t_2);
25682 __pyx_t_3 = __pyx_t_2;
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;
25691 PyObject *__pyx_temp;
25693 __pyx_temp = __pyx_r;
25694 __pyx_r = __pyx_t_2;
25696 __Pyx_XDECREF(__pyx_temp);
25699 __Pyx_TraceReturnValue(__pyx_r, 9, 0, __PYX_ERR(0, 126, __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);
25711 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 126, __pyx_L1_error));
25713 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
25716 __Pyx_XGIVEREF(__pyx_r);
25717 __Pyx_PyMonitoring_ExitScope(0);
25718 __Pyx_RefNannyFinishContext();
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;
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)
25752 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
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);
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)
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;
25777 #if CYTHON_UNPACK_METHODS
25778 if (unlikely(PyMethod_Check(__pyx_t_5))) {
25779 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
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);
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);
25796 __Pyx_CyFunction_Defaults(
struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_t_2;
25797 __Pyx_GIVEREF(__pyx_t_2);
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;
25815 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25816 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 115, __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);
25828 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 115, __pyx_L1_error));
25830 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
25833 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
25834 __Pyx_XGIVEREF(__pyx_r);
25835 __Pyx_PyMonitoring_ExitScope(0);
25836 __Pyx_RefNannyFinishContext();
25849static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(PyObject *__pyx_v_self);
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));
25859 __Pyx_RefNannyFinishContext();
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));
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);
25882 PyObject *__pyx_temp;
25884 __pyx_temp = __pyx_r;
25885 __Pyx_INCREF(__pyx_v_self->uOfXT);
25886 __pyx_r = __pyx_v_self->uOfXT;
25888 __Pyx_XDECREF(__pyx_temp);
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;
25896 __pyx_t_2 = __pyx_r;
25898 __Pyx_PyCriticalSection_End(&__pyx_cs);
25899 __pyx_r = __pyx_t_2;
25904 __Pyx_PyCriticalSection_End(&__pyx_cs);
25905 goto __pyx_L1_error;
25908 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25913 __Pyx_XDECREF(__pyx_t_1);
25914 __Pyx_TraceException(__pyx_lineno, 0, 0);
25915 #if CYTHON_USE_SYS_MONITORING
25916 __Pyx_TraceExceptionUnwind(0, 0);
25918 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25920 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.uOfXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25923 __Pyx_XGIVEREF(__pyx_r);
25924 __Pyx_PyMonitoring_ExitScope(0);
25925 __Pyx_RefNannyFinishContext();
25930static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
25931static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
25932 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
25940 __Pyx_RefNannyFinishContext();
25944static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value) {
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));
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);
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;
25969 __Pyx_PyCriticalSection_End(&__pyx_cs);
25974 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25979 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 21, __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);
25987 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
25989 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.uOfXT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25993 __Pyx_PyMonitoring_ExitScope(0);
25994 __Pyx_RefNannyFinishContext();
25999static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self);
26000static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self) {
26001 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
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));
26009 __Pyx_RefNannyFinishContext();
26013static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
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));
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);
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;
26038 __Pyx_PyCriticalSection_End(&__pyx_cs);
26043 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26048 __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(3, 21, __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);
26056 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(3, 21, __pyx_L1_error));
26058 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.uOfXT.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26062 __Pyx_PyMonitoring_ExitScope(0);
26063 __Pyx_RefNannyFinishContext();
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
26078PyObject *__pyx_args, PyObject *__pyx_kwds
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
26087PyObject *__pyx_args, PyObject *__pyx_kwds
26090 #if !CYTHON_VECTORCALL
26091 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
26101 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
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));
26112 __Pyx_RefNannyFinishContext();
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));
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)
26144 __Pyx_TraceException(__pyx_lineno, 0, 0);
26145 #if CYTHON_USE_SYS_MONITORING
26146 __Pyx_TraceExceptionUnwind(0, 0);
26148 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 1, __pyx_L1_error));
26150 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26152 __Pyx_XGIVEREF(__pyx_r);
26153 __Pyx_PyMonitoring_ExitScope(0);
26154 __Pyx_RefNannyFinishContext();
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
26170PyObject *__pyx_args, PyObject *__pyx_kwds
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
26179PyObject *__pyx_args, PyObject *__pyx_kwds
26182 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
26183 #if !CYTHON_VECTORCALL
26184 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
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);
26198 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
26201 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
26213 default:
goto __pyx_L5_argtuple_error;
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) }
26220 }
else if (unlikely(__pyx_nargs != 1)) {
26221 goto __pyx_L5_argtuple_error;
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)
26226 __pyx_v___pyx_state = values[0];
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)
26232 goto __pyx_L4_argument_unpacking_done;
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]);
26237 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26238 __Pyx_RefNannyFinishContext();
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);
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]);
26247 __Pyx_RefNannyFinishContext();
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));
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)
26279 __Pyx_TraceException(__pyx_lineno, 0, 0);
26280 #if CYTHON_USE_SYS_MONITORING
26281 __Pyx_TraceExceptionUnwind(0, 0);
26283 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 3, __pyx_L1_error));
26285 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26287 __Pyx_XGIVEREF(__pyx_r);
26288 __Pyx_PyMonitoring_ExitScope(0);
26289 __Pyx_RefNannyFinishContext();
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
26306PyObject *__pyx_args, PyObject *__pyx_kwds
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
26315PyObject *__pyx_args, PyObject *__pyx_kwds
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;
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);
26336 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
26339 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
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) {
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;
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;
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;
26359 default:
goto __pyx_L5_argtuple_error;
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) }
26366 }
else if (unlikely(__pyx_nargs != 3)) {
26367 goto __pyx_L5_argtuple_error;
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)
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]);
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)
26384 goto __pyx_L4_argument_unpacking_done;
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]);
26389 __Pyx_AddTraceback(
"BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
26390 __Pyx_RefNannyFinishContext();
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);
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]);
26403 goto __pyx_L7_cleaned_up;
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]);
26408 __pyx_L7_cleaned_up:;
26410 __Pyx_RefNannyFinishContext();
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
26420 PyObject *__pyx_t_2 = NULL;
26421 PyObject *__pyx_t_3 = NULL;
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));
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)
26448 __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_18BoundaryConditions_BC_Base);
26449 __Pyx_INCREF(__pyx_t_3);
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);
26458 __pyx_v___pyx_result = __pyx_t_2;
26468 __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
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)
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;
26504 PyObject *__pyx_temp;
26506 __pyx_temp = __pyx_r;
26507 __Pyx_INCREF(__pyx_v___pyx_result);
26508 __pyx_r = __pyx_v___pyx_result;
26510 __Pyx_XDECREF(__pyx_temp);
26512 __Pyx_TraceReturnValue(__pyx_r, 22, 0, __PYX_ERR(1, 10, __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);
26531 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 4, __pyx_L1_error));
26533 __Pyx_AddTraceback(
"BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
26536 __Pyx_XDECREF(__pyx_v___pyx_result);
26537 __Pyx_XGIVEREF(__pyx_r);
26538 __Pyx_PyMonitoring_ExitScope(0);
26539 __Pyx_RefNannyFinishContext();
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 } };
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));
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);
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;
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;
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);
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;
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)
26626 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26627 __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(1, 11, __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);
26636 __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(1, 11, __pyx_L1_error));
26638 __Pyx_AddTraceback(
"BoundaryConditions.__pyx_unpickle_BC_Base__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
26641 __Pyx_XGIVEREF(__pyx_r);
26642 __Pyx_PyMonitoring_ExitScope(0);
26643 __Pyx_RefNannyFinishContext();
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
26652 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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;
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
26669 PyObject *a, PyObject *k
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
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);
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);
26695 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
26696 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions_BC_Base((PyTypeObject*)t, args, nargs, kwnames);
26698 assert(Py_TYPE(o) == (PyTypeObject*)t);
26699 if (unlikely(__pyx_pw_18BoundaryConditions_7BC_Base_1__init__(o, args, nargs, kwnames) < 0)) {
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);
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;
26722 PyObject_GC_UnTrack(o);
26723 Py_CLEAR(p->Shape);
26725 Py_CLEAR(p->BC_type);
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
26733 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
26734 if (tp_free) tp_free(o);
26737 #if CYTHON_USE_TYPE_SPECS
26742static int __pyx_tp_traverse_18BoundaryConditions_BC_Base(PyObject *o, visitproc
v,
void *a) {
26744 struct __pyx_obj_18BoundaryConditions_BC_Base *p = (
struct __pyx_obj_18BoundaryConditions_BC_Base *)o;
26746 e = __Pyx_call_type_traverse(o, 1,
v, a);
26750 e = (*v)(p->Shape, a);
if (e)
return e;
26753 e = (*v)(p->ct, a);
if (e)
return e;
26758static int __pyx_tp_clear_18BoundaryConditions_BC_Base(PyObject *o) {
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);
26764 tmp = ((PyObject*)p->ct);
26765 p->ct = Py_None; Py_INCREF(Py_None);
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);
26774static int __pyx_setprop_18BoundaryConditions_7BC_Base_nd(PyObject *o, PyObject *
v, CYTHON_UNUSED
void *x) {
26776 return __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(o,
v);
26779 PyErr_SetString(PyExc_NotImplementedError,
"__del__");
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);
26788static int __pyx_setprop_18BoundaryConditions_7BC_Base_Shape(PyObject *o, PyObject *
v, CYTHON_UNUSED
void *x) {
26790 return __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(o,
v);
26793 return __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(o);
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);
26801static int __pyx_setprop_18BoundaryConditions_7BC_Base_name(PyObject *o, PyObject *
v, CYTHON_UNUSED
void *x) {
26803 return __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(o,
v);
26806 return __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(o);
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);
26814static int __pyx_setprop_18BoundaryConditions_7BC_Base_BC_type(PyObject *o, PyObject *
v, CYTHON_UNUSED
void *x) {
26816 return __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(o,
v);
26819 return __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(o);
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);
26827static int __pyx_setprop_18BoundaryConditions_7BC_Base_ct(PyObject *o, PyObject *
v, CYTHON_UNUSED
void *x) {
26829 return __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(o,
v);
26832 return __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(o);
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__},
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},
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},
26868static PyType_Spec __pyx_type_18BoundaryConditions_BC_Base_spec = {
26869 "BoundaryConditions.BC_Base",
26870 sizeof(
struct __pyx_obj_18BoundaryConditions_BC_Base),
26872 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
26873 __pyx_type_18BoundaryConditions_BC_Base_slots,
26877static PyTypeObject __pyx_type_18BoundaryConditions_BC_Base = {
26878 PyVarObject_HEAD_INIT(0, 0)
26879 "BoundaryConditions.""BC_Base",
26880 sizeof(
struct __pyx_obj_18BoundaryConditions_BC_Base),
26882 __pyx_tp_dealloc_18BoundaryConditions_BC_Base,
26897 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
26898 PyDoc_STR(
"BC_Base(shape=None, name=None, b_or=None, b_i=0, nd=None)\n\nGeneric class regrouping boundary conditions"),
26899 __pyx_tp_traverse_18BoundaryConditions_BC_Base,
26900 __pyx_tp_clear_18BoundaryConditions_BC_Base,
26905 __pyx_methods_18BoundaryConditions_BC_Base,
26907 __pyx_getsets_18BoundaryConditions_BC_Base,
26912 #if !CYTHON_USE_TYPE_SPECS
26915 __pyx_tp_init_18BoundaryConditions_BC_Base,
26917 __pyx_tp_new_18BoundaryConditions_BC_Base,
26927 #if CYTHON_USE_TP_FINALIZE
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,
26939 #if __PYX_NEED_TP_PRINT_SLOT == 1
26942 #if PY_VERSION_HEX >= 0x030C0000
26945 #if PY_VERSION_HEX >= 0x030d00A4
26948 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
26953static struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition __pyx_vtable_18BoundaryConditions_BoundaryCondition;
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
26959 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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);
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
26972 PyObject *a, PyObject *k
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
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);
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);
26998 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
26999 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions_BoundaryCondition((PyTypeObject*)t, args, nargs, kwnames);
27001 assert(Py_TYPE(o) == (PyTypeObject*)t);
27002 if (unlikely(__pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(o, args, nargs, kwnames) < 0)) {
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);
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;
27025 PyObject_GC_UnTrack(o);
27026 Py_CLEAR(p->uOfXT);
27027 PyTypeObject *tp = Py_TYPE(o);
27028 #if CYTHON_USE_TYPE_SLOTS
27032 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27033 if (tp_free) tp_free(o);
27036 #if CYTHON_USE_TYPE_SPECS
27041static int __pyx_tp_traverse_18BoundaryConditions_BoundaryCondition(PyObject *o, visitproc
v,
void *a) {
27043 struct __pyx_obj_18BoundaryConditions_BoundaryCondition *p = (
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)o;
27045 e = __Pyx_call_type_traverse(o, 1,
v, a);
27049 e = (*v)(p->uOfXT, a);
if (e)
return e;
27054static int __pyx_tp_clear_18BoundaryConditions_BoundaryCondition(PyObject *o) {
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);
27063static PyObject *__pyx_getprop_18BoundaryConditions_17BoundaryCondition_uOfXT(PyObject *o, CYTHON_UNUSED
void *x) {
27064 return __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(o);
27067static int __pyx_setprop_18BoundaryConditions_17BoundaryCondition_uOfXT(PyObject *o, PyObject *
v, CYTHON_UNUSED
void *x) {
27069 return __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(o,
v);
27072 return __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(o);
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__},
27086static struct PyGetSetDef __pyx_getsets_18BoundaryConditions_BoundaryCondition[] = {
27087 {
"uOfXT", __pyx_getprop_18BoundaryConditions_17BoundaryCondition_uOfXT, __pyx_setprop_18BoundaryConditions_17BoundaryCondition_uOfXT, PyDoc_STR(
"uOfXT: object"), 0},
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},
27107static PyType_Spec __pyx_type_18BoundaryConditions_BoundaryCondition_spec = {
27108 "BoundaryConditions.BoundaryCondition",
27109 sizeof(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition),
27111 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
27112 __pyx_type_18BoundaryConditions_BoundaryCondition_slots,
27116static PyTypeObject __pyx_type_18BoundaryConditions_BoundaryCondition = {
27117 PyVarObject_HEAD_INIT(0, 0)
27118 "BoundaryConditions.""BoundaryCondition",
27119 sizeof(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition),
27121 __pyx_tp_dealloc_18BoundaryConditions_BoundaryCondition,
27136 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
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"),
27138 __pyx_tp_traverse_18BoundaryConditions_BoundaryCondition,
27139 __pyx_tp_clear_18BoundaryConditions_BoundaryCondition,
27144 __pyx_methods_18BoundaryConditions_BoundaryCondition,
27146 __pyx_getsets_18BoundaryConditions_BoundaryCondition,
27151 #if !CYTHON_USE_TYPE_SPECS
27154 __pyx_tp_init_18BoundaryConditions_BoundaryCondition,
27156 __pyx_tp_new_18BoundaryConditions_BoundaryCondition,
27166 #if CYTHON_USE_TP_FINALIZE
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,
27178 #if __PYX_NEED_TP_PRINT_SLOT == 1
27181 #if PY_VERSION_HEX >= 0x030C0000
27184 #if PY_VERSION_HEX >= 0x030d00A4
27187 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
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
27197 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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
27207 PyObject *a, PyObject *k
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
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);
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);
27233 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
27234 PyObject *o = __pyx_tp_new_vectorcall_18BoundaryConditions___pyx_defaults((PyTypeObject*)t, args, nargs, kwnames);
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;
27248 PyObject_GC_UnTrack(o);
27250 PyTypeObject *tp = Py_TYPE(o);
27251 #if CYTHON_USE_TYPE_SLOTS
27255 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27256 if (tp_free) tp_free(o);
27259 #if CYTHON_USE_TYPE_SPECS
27264static int __pyx_tp_traverse_18BoundaryConditions___pyx_defaults(PyObject *o, visitproc
v,
void *a) {
27266 struct __pyx_defaults *p = (
struct __pyx_defaults *)o;
27268 e = __Pyx_call_type_traverse(o, 1,
v, a);
27272 e = (*v)(p->arg0, a);
if (e)
return e;
27277static int __pyx_tp_clear_18BoundaryConditions___pyx_defaults(PyObject *o) {
27279 struct __pyx_defaults *p = (
struct __pyx_defaults *)o;
27280 tmp = ((PyObject*)p->arg0);
27281 p->arg0 = Py_None; Py_INCREF(Py_None);
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},
27298static PyType_Spec __pyx_type_18BoundaryConditions___pyx_defaults_spec = {
27299 "BoundaryConditions.__pyx_defaults",
27300 sizeof(
struct __pyx_defaults),
27302 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27303 __pyx_type_18BoundaryConditions___pyx_defaults_slots,
27307static PyTypeObject __pyx_type_18BoundaryConditions___pyx_defaults = {
27308 PyVarObject_HEAD_INIT(0, 0)
27309 "BoundaryConditions.""__pyx_defaults",
27310 sizeof(
struct __pyx_defaults),
27312 __pyx_tp_dealloc_18BoundaryConditions___pyx_defaults,
27327 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27329 __pyx_tp_traverse_18BoundaryConditions___pyx_defaults,
27330 __pyx_tp_clear_18BoundaryConditions___pyx_defaults,
27342 #
if !CYTHON_USE_TYPE_SPECS
27347 __pyx_tp_new_18BoundaryConditions___pyx_defaults,
27357 #
if CYTHON_USE_TP_FINALIZE
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,
27369 #
if __PYX_NEED_TP_PRINT_SLOT == 1
27372 #
if PY_VERSION_HEX >= 0x030C0000
27375 #
if PY_VERSION_HEX >= 0x030d00A4
27378 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
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
27388 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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
27398 PyObject *a, PyObject *k
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))))
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));
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);
27413 (void) PyObject_INIT(o, t);
27415 PyObject_GC_Track(o);
27419 o = __Pyx_AllocateExtensionType(t, 1);
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
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);
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);
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);
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;
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))))
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);
27466 PyTypeObject *tp = Py_TYPE(o);
27467 #if CYTHON_USE_TYPE_SLOTS
27471 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27472 if (tp_free) tp_free(o);
27475 #if CYTHON_USE_TYPE_SPECS
27481static int __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o, visitproc
v,
void *a) {
27483 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *p = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)o;
27485 e = __Pyx_call_type_traverse(o, 1,
v, a);
27488 if (p->__pyx_v_value) {
27489 e = (*v)(p->__pyx_v_value, a);
if (e)
return e;
27494static int __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyObject *o) {
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);
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},
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),
27519 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27520 __pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC_slots,
27524static PyTypeObject __pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC = {
27525 PyVarObject_HEAD_INIT(0, 0)
27526 "BoundaryConditions.""__pyx_scope_struct__setConstantBC",
27527 sizeof(
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC),
27529 __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct__setConstantBC,
27544 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27546 __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct__setConstantBC,
27547 __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct__setConstantBC,
27559 #
if !CYTHON_USE_TYPE_SPECS
27564 __pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC,
27574 #
if CYTHON_USE_TP_FINALIZE
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,
27586 #
if __PYX_NEED_TP_PRINT_SLOT == 1
27589 #
if PY_VERSION_HEX >= 0x030C0000
27592 #
if PY_VERSION_HEX >= 0x030d00A4
27595 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
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
27605 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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
27615 PyObject *a, PyObject *k
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))))
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));
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);
27630 (void) PyObject_INIT(o, t);
27632 PyObject_GC_Track(o);
27636 o = __Pyx_AllocateExtensionType(t, 1);
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
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);
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);
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);
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;
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))))
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);
27684 PyTypeObject *tp = Py_TYPE(o);
27685 #if CYTHON_USE_TYPE_SLOTS
27689 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27690 if (tp_free) tp_free(o);
27693 #if CYTHON_USE_TYPE_SPECS
27699static int __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o, visitproc
v,
void *a) {
27701 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *p = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)o;
27703 e = __Pyx_call_type_traverse(o, 1,
v, a);
27706 if (p->__pyx_v_a) {
27707 e = (*v)(p->__pyx_v_a, a);
if (e)
return e;
27709 if (p->__pyx_v_a0) {
27710 e = (*v)(p->__pyx_v_a0, a);
if (e)
return e;
27715static int __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyObject *o) {
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);
27721 tmp = ((PyObject*)p->__pyx_v_a0);
27722 p->__pyx_v_a0 = Py_None; Py_INCREF(Py_None);
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},
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),
27743 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27744 __pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC_slots,
27748static PyTypeObject __pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC = {
27749 PyVarObject_HEAD_INIT(0, 0)
27750 "BoundaryConditions.""__pyx_scope_struct_1_setLinearBC",
27751 sizeof(
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC),
27753 __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_1_setLinearBC,
27768 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27770 __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_1_setLinearBC,
27771 __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_1_setLinearBC,
27783 #
if !CYTHON_USE_TYPE_SPECS
27788 __pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC,
27798 #
if CYTHON_USE_TP_FINALIZE
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,
27810 #
if __PYX_NEED_TP_PRINT_SLOT == 1
27813 #
if PY_VERSION_HEX >= 0x030C0000
27816 #
if PY_VERSION_HEX >= 0x030d00A4
27819 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
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
27829 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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
27839 PyObject *a, PyObject *k
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))))
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));
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);
27854 (void) PyObject_INIT(o, t);
27856 PyObject_GC_Track(o);
27860 o = __Pyx_AllocateExtensionType(t, 1);
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
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);
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);
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);
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;
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))))
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);
27908 PyTypeObject *tp = Py_TYPE(o);
27909 #if CYTHON_USE_TYPE_SLOTS
27913 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
27914 if (tp_free) tp_free(o);
27917 #if CYTHON_USE_TYPE_SPECS
27923static int __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o, visitproc
v,
void *a) {
27925 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *p = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)o;
27927 e = __Pyx_call_type_traverse(o, 1,
v, a);
27930 if (p->__pyx_v_t1) {
27931 e = (*v)(p->__pyx_v_t1, a);
if (e)
return e;
27933 if (p->__pyx_v_value) {
27934 e = (*v)(p->__pyx_v_value, a);
if (e)
return e;
27939static int __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyObject *o) {
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);
27945 tmp = ((PyObject*)p->__pyx_v_value);
27946 p->__pyx_v_value = Py_None; Py_INCREF(Py_None);
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},
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),
27967 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27968 __pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp_slots,
27972static PyTypeObject __pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp = {
27973 PyVarObject_HEAD_INIT(0, 0)
27974 "BoundaryConditions.""__pyx_scope_struct_2_setLinearRamp",
27975 sizeof(
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp),
27977 __pyx_tp_dealloc_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp,
27992 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
27994 __pyx_tp_traverse_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp,
27995 __pyx_tp_clear_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp,
28007 #
if !CYTHON_USE_TYPE_SPECS
28012 __pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp,
28022 #
if CYTHON_USE_TP_FINALIZE
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,
28034 #
if __PYX_NEED_TP_PRINT_SLOT == 1
28037 #
if PY_VERSION_HEX >= 0x030C0000
28040 #
if PY_VERSION_HEX >= 0x030d00A4
28043 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28048static struct __pyx_vtabstruct_array __pyx_vtable_array;
28050static PyObject *__pyx_tp_new__initialisation_array(PyObject *o,
28051#
if CYTHON_VECTORCALL_TPNEW
28052 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
28054 PyObject *a, PyObject *k
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);
28062 int cinit_result = __pyx_array___cinit__(o,
28063#
if CYTHON_VECTORCALL_TPNEW
28064 args, nargs, kwnames
28069 if (unlikely(cinit_result))
goto bad;
28073 Py_DECREF(o); o = 0;
28077static PyObject *__pyx_tp_new_vectorcall_array(PyTypeObject *t,
28078#
if CYTHON_VECTORCALL_TPNEW
28079 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
28081 PyObject *a, PyObject *k
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
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);
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);
28107 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28108 PyObject *o = __pyx_tp_new_vectorcall_array((PyTypeObject*)t, args, nargs, kwnames);
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;
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);
28131 Py_CLEAR(p->_format);
28132 PyTypeObject *tp = Py_TYPE(o);
28133 #if CYTHON_USE_TYPE_SLOTS
28137 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
28138 if (tp_free) tp_free(o);
28141 #if CYTHON_USE_TYPE_SPECS
28146static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
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;
28152 binaryfunc
f = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript));
28159static PyObject *__pyx_mp_subscript_array(PyObject *o, PyObject *i) {
28160 return __pyx_array___getitem__(o, i);
28163static int __pyx_sq_ass_item_array(PyObject *o, Py_ssize_t i, PyObject *
v) {
28165 PyObject *x = PyLong_FromSsize_t(i);
if (unlikely(!x))
return -1;
28166 int r = __pyx_array___setitem__(o, x,
v);
28170 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError,
"Subscript %.10s not supported by " __Pyx_FMT_TYPENAME,
"deletion", o);
28175static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *
v) {
28177 return __pyx_array___setitem__(o, i,
v);
28179 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError,
"Subscript %.10s not supported by " __Pyx_FMT_TYPENAME,
"deletion", o);
28184static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *
n) {
28185 PyObject *
v = PyObject_GenericGetAttr(o,
n);
28186 if (!
v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
28188 v = __pyx_array___getattr__(o,
n);
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);
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},
28204static struct PyGetSetDef __pyx_getsets_array[] = {
28205 {
"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0},
28208#if CYTHON_USE_TYPE_SPECS
28209#if !CYTHON_COMPILING_IN_LIMITED_API
28211static PyBufferProcs __pyx_tp_as_buffer_array = {
28212 __pyx_array_getbuffer,
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},
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},
28238static PyType_Spec __pyx_type___pyx_array_spec = {
28239 "BoundaryConditions.array",
28240 sizeof(
struct __pyx_array_obj),
28242 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
28243 __pyx_type___pyx_array_slots,
28247static PySequenceMethods __pyx_tp_as_sequence_array = {
28248 __pyx_array___len__,
28251 __pyx_sq_item_array,
28253 __pyx_sq_ass_item_array,
28260static PyMappingMethods __pyx_tp_as_mapping_array = {
28261 __pyx_array___len__,
28262 __pyx_mp_subscript_array,
28263 __pyx_mp_ass_subscript_array,
28266static PyBufferProcs __pyx_tp_as_buffer_array = {
28267 __pyx_array_getbuffer,
28271static PyTypeObject __pyx_type___pyx_array = {
28272 PyVarObject_HEAD_INIT(0, 0)
28273 "BoundaryConditions.""array",
28274 sizeof(
struct __pyx_array_obj),
28276 __pyx_tp_dealloc_array,
28283 &__pyx_tp_as_sequence_array,
28284 &__pyx_tp_as_mapping_array,
28288 __pyx_tp_getattro_array,
28290 &__pyx_tp_as_buffer_array,
28291 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
28299 __pyx_methods_array,
28301 __pyx_getsets_array,
28306 #
if !CYTHON_USE_TYPE_SPECS
28311 __pyx_tp_new_array,
28321 #
if CYTHON_USE_TP_FINALIZE
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,
28333 #
if __PYX_NEED_TP_PRINT_SLOT == 1
28336 #
if PY_VERSION_HEX >= 0x030C0000
28339 #
if PY_VERSION_HEX >= 0x030d00A4
28342 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
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
28352 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
28355 struct __pyx_MemviewEnum_obj *p = ((
struct __pyx_MemviewEnum_obj *)o);
28356 p->name = Py_None; Py_INCREF(Py_None);
28360static PyObject *__pyx_tp_new_vectorcall_Enum(PyTypeObject *t,
28361#
if CYTHON_VECTORCALL_TPNEW
28362 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
28364 PyObject *a, PyObject *k
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
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);
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);
28390 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28391 PyObject *o = __pyx_tp_new_vectorcall_Enum((PyTypeObject*)t, args, nargs, kwnames);
28393 assert(Py_TYPE(o) == (PyTypeObject*)t);
28394 if (unlikely(__pyx_MemviewEnum___init__(o, args, nargs, kwnames) < 0)) {
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);
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;
28417 PyObject_GC_UnTrack(o);
28419 PyTypeObject *tp = Py_TYPE(o);
28420 #if CYTHON_USE_TYPE_SLOTS
28424 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
28425 if (tp_free) tp_free(o);
28428 #if CYTHON_USE_TYPE_SPECS
28433static int __pyx_tp_traverse_Enum(PyObject *o, visitproc
v,
void *a) {
28435 struct __pyx_MemviewEnum_obj *p = (
struct __pyx_MemviewEnum_obj *)o;
28437 e = __Pyx_call_type_traverse(o, 1,
v, a);
28441 e = (*v)(p->name, a);
if (e)
return e;
28446static int __pyx_tp_clear_Enum(PyObject *o) {
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);
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},
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},
28476static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
28477 "BoundaryConditions.Enum",
28478 sizeof(
struct __pyx_MemviewEnum_obj),
28480 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
28481 __pyx_type___pyx_MemviewEnum_slots,
28485static PyTypeObject __pyx_type___pyx_MemviewEnum = {
28486 PyVarObject_HEAD_INIT(0, 0)
28487 "BoundaryConditions.""Enum",
28488 sizeof(
struct __pyx_MemviewEnum_obj),
28490 __pyx_tp_dealloc_Enum,
28495 __pyx_MemviewEnum___repr__,
28505 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
28507 __pyx_tp_traverse_Enum,
28508 __pyx_tp_clear_Enum,
28513 __pyx_methods_Enum,
28520 #
if !CYTHON_USE_TYPE_SPECS
28523 __pyx_tp_init_Enum,
28535 #
if CYTHON_USE_TP_FINALIZE
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,
28547 #
if __PYX_NEED_TP_PRINT_SLOT == 1
28550 #
if PY_VERSION_HEX >= 0x030C0000
28553 #
if PY_VERSION_HEX >= 0x030d00A4
28556 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28561static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
28563static PyObject *__pyx_tp_new__initialisation_memoryview(PyObject *o,
28564#
if CYTHON_VECTORCALL_TPNEW
28565 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
28567 PyObject *a, PyObject *k
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;
28576 int cinit_result = __pyx_memoryview___cinit__(o,
28577#
if CYTHON_VECTORCALL_TPNEW
28578 args, nargs, kwnames
28583 if (unlikely(cinit_result))
goto bad;
28587 Py_DECREF(o); o = 0;
28591static PyObject *__pyx_tp_new_vectorcall_memoryview(PyTypeObject *t,
28592#
if CYTHON_VECTORCALL_TPNEW
28593 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
28595 PyObject *a, PyObject *k
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
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);
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);
28621 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28622 PyObject *o = __pyx_tp_new_vectorcall_memoryview((PyTypeObject*)t, args, nargs, kwnames);
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;
28636 PyObject_GC_UnTrack(o);
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);
28646 Py_CLEAR(p->_size);
28647 PyTypeObject *tp = Py_TYPE(o);
28648 #if CYTHON_USE_TYPE_SLOTS
28652 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
28653 if (tp_free) tp_free(o);
28656 #if CYTHON_USE_TYPE_SPECS
28661static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc
v,
void *a) {
28663 struct __pyx_memoryview_obj *p = (
struct __pyx_memoryview_obj *)o;
28665 e = __Pyx_call_type_traverse(o, 1,
v, a);
28669 e = (*v)(p->obj, a);
if (e)
return e;
28672 e = (*v)(p->_size, a);
if (e)
return e;
28675 e = (*v)(p->view.obj, a);
if (e)
return e;
28680static int __pyx_tp_clear_memoryview(PyObject *o) {
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);
28686 tmp = ((PyObject*)p->_size);
28687 p->_size = Py_None; Py_INCREF(Py_None);
28689 Py_CLEAR(p->view.obj);
28693static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
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;
28699 binaryfunc
f = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript));
28706static PyObject *__pyx_mp_subscript_memoryview(PyObject *o, PyObject *i) {
28707 return __pyx_memoryview___getitem__(o, i);
28710static int __pyx_sq_ass_item_memoryview(PyObject *o, Py_ssize_t i, PyObject *
v) {
28712 PyObject *x = PyLong_FromSsize_t(i);
if (unlikely(!x))
return -1;
28713 int r = __pyx_memoryview___setitem__(o, x,
v);
28717 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError,
"Subscript %.10s not supported by " __Pyx_FMT_TYPENAME,
"deletion", o);
28722static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *
v) {
28724 return __pyx_memoryview___setitem__(o, i,
v);
28726 __Pyx_RaiseErrorWithObjectType1(PyExc_NotImplementedError,
"Subscript %.10s not supported by " __Pyx_FMT_TYPENAME,
"deletion", o);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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},
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},
28789#if CYTHON_USE_TYPE_SPECS
28790#if !CYTHON_COMPILING_IN_LIMITED_API
28792static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
28793 __pyx_memoryview_getbuffer,
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},
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},
28822static PyType_Spec __pyx_type___pyx_memoryview_spec = {
28823 "BoundaryConditions.memoryview",
28824 sizeof(
struct __pyx_memoryview_obj),
28826 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
28827 __pyx_type___pyx_memoryview_slots,
28831static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
28832 __pyx_memoryview___len__,
28835 __pyx_sq_item_memoryview,
28837 __pyx_sq_ass_item_memoryview,
28844static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
28845 __pyx_memoryview___len__,
28846 __pyx_mp_subscript_memoryview,
28847 __pyx_mp_ass_subscript_memoryview,
28850static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
28851 __pyx_memoryview_getbuffer,
28855static PyTypeObject __pyx_type___pyx_memoryview = {
28856 PyVarObject_HEAD_INIT(0, 0)
28857 "BoundaryConditions.""memoryview",
28858 sizeof(
struct __pyx_memoryview_obj),
28860 __pyx_tp_dealloc_memoryview,
28865 __pyx_memoryview___repr__,
28867 &__pyx_tp_as_sequence_memoryview,
28868 &__pyx_tp_as_mapping_memoryview,
28871 __pyx_memoryview___str__,
28874 &__pyx_tp_as_buffer_memoryview,
28875 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
28877 __pyx_tp_traverse_memoryview,
28878 __pyx_tp_clear_memoryview,
28883 __pyx_methods_memoryview,
28885 __pyx_getsets_memoryview,
28890 #
if !CYTHON_USE_TYPE_SPECS
28895 __pyx_tp_new_memoryview,
28905 #
if CYTHON_USE_TP_FINALIZE
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,
28917 #
if __PYX_NEED_TP_PRINT_SLOT == 1
28920 #
if PY_VERSION_HEX >= 0x030C0000
28923 #
if PY_VERSION_HEX >= 0x030d00A4
28926 #
if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
28931static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
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
28937 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
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;
28948static PyObject *__pyx_tp_new_vectorcall__memoryviewslice(PyTypeObject *t,
28949#
if CYTHON_VECTORCALL_TPNEW
28950 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
28952 PyObject *a, PyObject *k
28956 o = __pyx_tp_new_vectorcall_memoryview(t,
28957#
if CYTHON_VECTORCALL_TPNEW
28958 args, nargs, kwnames
28963 if (unlikely(!o))
return 0;
28964 return __pyx_tp_new__initialisation__memoryviewslice(o,
28965#
if CYTHON_VECTORCALL_TPNEW
28966 args, nargs, kwnames
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);
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);
28984 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28985 PyObject *o = __pyx_tp_new_vectorcall__memoryviewslice((PyTypeObject*)t, args, nargs, kwnames);
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;
28999 PyObject_GC_UnTrack(o);
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);
29008 __Pyx_call_destructor(p->from_slice);
29009 Py_CLEAR(p->from_object);
29010 PyObject_GC_Track(o);
29011 __pyx_tp_dealloc_memoryview(o);
29014static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc
v,
void *a) {
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;
29024static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
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);
29031 __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
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},
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},
29055static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
29056 "BoundaryConditions._memoryviewslice",
29057 sizeof(
struct __pyx_memoryviewslice_obj),
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,
29064static PyTypeObject __pyx_type___pyx_memoryviewslice = {
29065 PyVarObject_HEAD_INIT(0, 0)
29066 "BoundaryConditions.""_memoryviewslice",
29067 sizeof(
struct __pyx_memoryviewslice_obj),
29069 __pyx_tp_dealloc__memoryviewslice,
29074 #
if CYTHON_COMPILING_IN_PYPY || 0
29075 __pyx_memoryview___repr__,
29084 #
if CYTHON_COMPILING_IN_PYPY || 0
29085 __pyx_memoryview___str__,
29092 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
29093 PyDoc_STR(
"Internal class for passing memoryview slices to Python"),
29094 __pyx_tp_traverse__memoryviewslice,
29095 __pyx_tp_clear__memoryviewslice,
29100 __pyx_methods__memoryviewslice,
29107 #if !CYTHON_USE_TYPE_SPECS
29112 __pyx_tp_new__memoryviewslice,
29122 #if CYTHON_USE_TP_FINALIZE
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,
29134 #if __PYX_NEED_TP_PRINT_SLOT == 1
29137 #if PY_VERSION_HEX >= 0x030C0000
29140 #if PY_VERSION_HEX >= 0x030d00A4
29143 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
29149static PyMethodDef __pyx_methods[] = {
29153static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate);
29154static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate);
29155static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void);
29156static CYTHON_SMALL_CODE
int __Pyx_InitAfterSharedUtility(
void);
29157static CYTHON_SMALL_CODE
int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate);
29158static CYTHON_SMALL_CODE
int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate);
29159static CYTHON_SMALL_CODE
int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate);
29160static CYTHON_SMALL_CODE
int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate);
29161static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BC_Base(__pyx_mstatetype *__pyx_mstate);
29162static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions_BoundaryCondition(__pyx_mstatetype *__pyx_mstate);
29163static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_defaults(__pyx_mstatetype *__pyx_mstate);
29164static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC(__pyx_mstatetype *__pyx_mstate);
29165static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(__pyx_mstatetype *__pyx_mstate);
29166static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(__pyx_mstatetype *__pyx_mstate);
29167static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_array_obj(__pyx_mstatetype *__pyx_mstate);
29168static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_MemviewEnum_obj(__pyx_mstatetype *__pyx_mstate);
29169static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_memoryview_obj(__pyx_mstatetype *__pyx_mstate);
29170static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_memoryviewslice_obj(__pyx_mstatetype *__pyx_mstate);
29171static CYTHON_SMALL_CODE
int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate);
29172static CYTHON_SMALL_CODE
int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate);
29173static CYTHON_SMALL_CODE
int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate);
29174static CYTHON_SMALL_CODE
int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate);
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);
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();
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);
29197 __Pyx_RefNannyFinishContext();
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);
29206 __Pyx_RefNannyFinishContext();
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);
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)
29221 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base = &__pyx_type_18BoundaryConditions_BC_Base;
29223 #if !CYTHON_COMPILING_IN_LIMITED_API
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)
29228 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29229 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions_BC_Base);
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;
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();
29241 __Pyx_RefNannyFinishContext();
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);
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)
29258 __pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition = &__pyx_type_18BoundaryConditions_BoundaryCondition;
29260 #if !CYTHON_COMPILING_IN_LIMITED_API
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)
29265 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29266 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions_BoundaryCondition);
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;
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();
29279 __Pyx_RefNannyFinishContext();
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);
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)
29294 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults = &__pyx_type_18BoundaryConditions___pyx_defaults;
29296 #if !CYTHON_COMPILING_IN_LIMITED_API
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)
29301 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29302 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_defaults);
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;
29309 __Pyx_RefNannyFinishContext();
29312 __Pyx_RefNannyFinishContext();
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);
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)
29327 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC = &__pyx_type_18BoundaryConditions___pyx_scope_struct__setConstantBC;
29329 #if !CYTHON_COMPILING_IN_LIMITED_API
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)
29334 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29335 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC);
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;
29342 __Pyx_RefNannyFinishContext();
29345 __Pyx_RefNannyFinishContext();
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);
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)
29360 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC = &__pyx_type_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
29362 #if !CYTHON_COMPILING_IN_LIMITED_API
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)
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);
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;
29375 __Pyx_RefNannyFinishContext();
29378 __Pyx_RefNannyFinishContext();
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);
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)
29393 __pyx_mstate->__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp = &__pyx_type_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
29395 #if !CYTHON_COMPILING_IN_LIMITED_API
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)
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);
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;
29408 __Pyx_RefNannyFinishContext();
29411 __Pyx_RefNannyFinishContext();
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);
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;
29432 #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
29434 #elif defined(_MSC_VER)
29435 #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
29437 #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
29440 __pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array;
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
29445 #if !CYTHON_USE_TYPE_SPECS
29446 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 128, __pyx_L1_error)
29448 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29449 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_array_type);
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();
29456 __Pyx_RefNannyFinishContext();
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);
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)
29471 __pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
29473 #if !CYTHON_COMPILING_IN_LIMITED_API
29475 #if !CYTHON_USE_TYPE_SPECS
29476 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 318, __pyx_L1_error)
29478 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29479 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_MemviewEnum_type);
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;
29486 if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 318, __pyx_L1_error)
29487 __Pyx_RefNannyFinishContext();
29490 __Pyx_RefNannyFinishContext();
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);
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;
29519 #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
29521 #elif defined(_MSC_VER)
29522 #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
29524 #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
29527 __pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview;
29529 #if !CYTHON_COMPILING_IN_LIMITED_API
29531 #if !CYTHON_USE_TYPE_SPECS
29532 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 353, __pyx_L1_error)
29534 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29535 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryview_type);
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;
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();
29547 __Pyx_RefNannyFinishContext();
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);
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)
29572 __pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
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;
29578 #if !CYTHON_USE_TYPE_SPECS
29579 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 947, __pyx_L1_error)
29581 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
29582 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryviewslice_type);
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;
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();
29594 __Pyx_XDECREF(__pyx_t_1);
29595 __Pyx_RefNannyFinishContext();
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);
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
29616 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
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),
29628 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
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),
29637 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
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),
29646 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
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),
29655 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
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),
29664 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29673 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29682 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29691 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29700 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29709 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29718 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29727 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29736 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29745 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
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),
29754 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
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();
29761 __Pyx_XDECREF(__pyx_t_1);
29762 __Pyx_RefNannyFinishContext();
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);
29771 __Pyx_RefNannyFinishContext();
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);
29780 __Pyx_RefNannyFinishContext();
29784#if CYTHON_PEP489_MULTI_PHASE_INIT
29785static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
29786static int __pyx_pymod_exec_BoundaryConditions(PyObject* module);
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},
29793 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
29794 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
29802 struct PyModuleDef __pyx_moduledef =
29804 static struct PyModuleDef __pyx_moduledef =
29807 PyModuleDef_HEAD_INIT,
29808 "BoundaryConditions",
29810 #if CYTHON_USE_MODULE_STATE
29811 sizeof(__pyx_mstatetype),
29813 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1,
29816 #if CYTHON_PEP489_MULTI_PHASE_INIT
29817 __pyx_moduledef_slots,
29821 #if CYTHON_USE_MODULE_STATE
29836#ifndef CYTHON_NO_PYINIT_EXPORT
29837 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
29840 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
29842 #define __Pyx_PyMODINIT_FUNC PyObject *
29846__Pyx_PyMODINIT_FUNC PyInit_BoundaryConditions(
void) CYTHON_SMALL_CODE;
29847__Pyx_PyMODINIT_FUNC PyInit_BoundaryConditions(
void)
29848#if CYTHON_PEP489_MULTI_PHASE_INIT
29850 return PyModuleDef_Init(&__pyx_moduledef);
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) {
29857 PyObject *module = PyImport_ImportModule(
"_interpreters");
29859 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
29863 module = PyImport_ImportModule("_xxsubinterpreters");
29864 if (!module)
goto bad;
29866 PyObject *current = PyObject_CallMethod(module,
"get_current", NULL);
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;
29875 long long as_c_int = PyLong_AsLongLong(current);
29876 Py_DECREF(current);
29880 PySys_WriteStderr(
"__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
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());
29897 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
29899 if (unlikely(current_id == -1)) {
29902 if (main_interpreter_id == -1) {
29903 main_interpreter_id = current_id;
29905 }
else if (unlikely(main_interpreter_id != current_id)) {
29908 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
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)
29916 PyObject *value = PyObject_GetAttrString(spec, from_name);
29918 if (likely(value)) {
29919 if (allow_none || value != Py_None) {
29920 result = PyDict_SetItemString(moddict, to_name, value);
29923 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
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())
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;
29952 Py_XDECREF(module);
29957static CYTHON_SMALL_CODE
int __pyx_pymod_exec_BoundaryConditions(PyObject *__pyx_pyinit_module)
29960 int stringtab_initialized = 0;
29961 #if CYTHON_USE_MODULE_STATE
29962 int pystate_addmodule_run = 0;
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;
29972 static PyThread_type_lock __pyx_t_7[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
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.");
29985 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
29988 #if CYTHON_PEP489_MULTI_PHASE_INIT
29989 __pyx_t_1 = __pyx_pyinit_module;
29990 Py_INCREF(__pyx_t_1);
29992 __pyx_t_1 = PyModule_Create(&__pyx_moduledef);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
29994 #if CYTHON_USE_MODULE_STATE
29996 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
29998 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
29999 pystate_addmodule_run = 1;
30002 __pyx_m = __pyx_t_1;
30004 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
30005 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
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)
30015 #if CYTHON_REFNANNY
30016 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
30017 if (!__Pyx_RefNanny) {
30018 if (PyErr_ExceptionMatches(PyExc_Exception)) {
30020 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
30022 if (!__Pyx_RefNanny)
30023 Py_FatalError(
"failed to import 'refnanny' module");
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)
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)
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)
30048 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
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)
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);
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)
30072 __Pyx_TraceStartFunc(
"PyInit_BoundaryConditions", __pyx_f[0], 1, 1, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error));
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);
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);
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);
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;
30130 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30131 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30141 __Pyx_ErrRestore(0,0,0);
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;
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);
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);
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;
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;
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;
30217 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30218 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30228 __Pyx_ErrRestore(0,0,0);
30229 goto __pyx_L11_exception_handled;
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:;
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);
30255 __Pyx_XGOTREF(generic);
30256 __Pyx_DECREF_SET(generic, ((PyObject *)__pyx_t_4));
30257 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
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);
30276 __Pyx_XGOTREF(strided);
30277 __Pyx_DECREF_SET(strided, ((PyObject *)__pyx_t_4));
30278 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
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);
30297 __Pyx_XGOTREF(indirect);
30298 __Pyx_DECREF_SET(indirect, ((PyObject *)__pyx_t_4));
30299 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
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);
30318 __Pyx_XGOTREF(contiguous);
30319 __Pyx_DECREF_SET(contiguous, ((PyObject *)__pyx_t_4));
30320 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
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);
30339 __Pyx_XGOTREF(indirect_contiguous);
30340 __Pyx_DECREF_SET(indirect_contiguous, ((PyObject *)__pyx_t_4));
30341 __Pyx_GIVEREF((PyObject *)__pyx_t_4);
30351 __pyx_memoryview_thread_locks_used = 0;
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));
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);
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;
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;
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;
30423 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30424 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30434 __Pyx_ErrRestore(0,0,0);
30435 goto __pyx_L19_exception_handled;
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:;
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);
30468 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence);
if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 986, __pyx_L26_error)
30479 __pyx_t_5 = __pyx_collections_abc_Sequence;
30480 __Pyx_INCREF(__pyx_t_5);
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);
30489 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30498 __pyx_t_5 = __pyx_collections_abc_Sequence;
30499 __Pyx_INCREF(__pyx_t_5);
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);
30508 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
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;
30532 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
30533 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30543 __Pyx_ErrRestore(0,0,0);
30544 goto __pyx_L27_exception_handled;
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:;
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;
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
30770 __Pyx_XDECREF(__pyx_t_4);
30771 __Pyx_XDECREF(__pyx_t_5);
30772 __Pyx_TraceException(__pyx_lineno, 0, 0);
30773 __Pyx_TraceExceptionUnwind(1, 0);
30775 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
30776 __Pyx_AddTraceback(
"init BoundaryConditions", __pyx_clineno, __pyx_lineno, __pyx_filename);
30778 #if !CYTHON_USE_MODULE_STATE
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);
30789 }
else if (!PyErr_Occurred()) {
30790 PyErr_SetString(PyExc_ImportError,
"init BoundaryConditions");
30793 __Pyx_RefNannyFinishContext();
30794 #if CYTHON_PEP489_MULTI_PHASE_INIT
30795 return (__pyx_m != NULL) ? 0 : -1;
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)
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;
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);
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]);
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]);
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]);
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]);
30886 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
30887 #if CYTHON_IMMORTAL_CONSTANTS
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)
30898 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
30901 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
30904 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
30905 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
30910 #if CYTHON_IMMORTAL_CONSTANTS
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)
30921 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
30924 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
30927 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
30928 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
30933 __Pyx_RefNannyFinishContext();
30936 __Pyx_RefNannyFinishContext();
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);
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
30952 #if (CYTHON_COMPRESS_STRINGS) == 1
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) }
30961 #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90
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) }
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
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)) {
30984 __PYX_ERR(0, 1, __pyx_L1_error)
30986 stringtab[i] = string;
30987 pos += bytes_length;
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)) {
30996 __PYX_ERR(0, 1, __pyx_L1_error)
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)
31005 #if CYTHON_IMMORTAL_CONSTANTS
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)
31016 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
31019 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
31022 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
31023 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
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)
31038 #if CYTHON_IMMORTAL_CONSTANTS
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)
31049 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
31052 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
31055 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
31056 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
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;
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
31091static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
31092 PyObject* tuple_dedup_map = PyDict_New();
31093 if (unlikely(!tuple_dedup_map))
return -1;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
31264 Py_DECREF(tuple_dedup_map);
31267 Py_DECREF(tuple_dedup_map);
31272static int __Pyx_InitGlobals(
void) {
31273 int __pyx_lineno = 0;
31274 const char *__pyx_filename = NULL;
31275 int __pyx_clineno = 0;
31277 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0));
else
31279 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31282 #if CYTHON_COMPILING_IN_LIMITED_API
31284 PyObject *builtins = PyEval_GetBuiltins();
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)) {
31292 frozendict_type = (PyObject*) &PyDict_Type;
31293 Py_INCREF(frozendict_type);
31295 __pyx_mstate_global->__Pyx_PyFrozenDictType = frozendict_type;
31301 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31304 if (likely(__Pyx_init_assertions_enabled() == 0));
else
31306 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31309 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0));
else
31311 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31314 #if CYTHON_COMPILING_IN_LIMITED_API
31316 PyObject *typesModule=NULL;
31317 typesModule = PyImport_ImportModule(
"types");
31319 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule,
"MethodType");
31320 Py_DECREF(typesModule);
31325 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31333static int __Pyx_InitAfterSharedUtility(
void) {
31334 int __pyx_lineno = 0;
31335 const char *__pyx_filename = NULL;
31336 int __pyx_clineno = 0;
31338 if (likely(__pyx_CyFunction_init(__pyx_m) == 0));
else
31340 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31351#pragma warning( push )
31356#pragma warning( disable : 4127 )
31366static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
31367 PyObject *m = NULL, *p = NULL;
31369 m = PyImport_ImportModule(modname);
31371 p = PyObject_GetAttrString(m,
"RefNannyAPI");
31373 r = PyLong_AsVoidPtr(p);
31377 return (__Pyx_RefNannyAPIStruct *)
r;
31382#if CYTHON_COMPILING_IN_CPYTHON
31383static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
31385 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
31389 return b == &PyBaseObject_Type;
31391static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
31393 if (a == b)
return 1;
31397 n = PyTuple_GET_SIZE(mro);
31398 for (i = 0; i <
n; i++) {
31399 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
31404 return __Pyx_InBases(a, b);
31406static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
31408 if (cls == a || cls == b)
return 1;
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)
31420 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
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)));
31431 #if CYTHON_COMPILING_IN_CPYTHON
31432 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
31434 PyException_SetTraceback(value, tb);
31436 tmp_value = tstate->current_exception;
31437 tstate->current_exception = value;
31438 Py_XDECREF(tmp_value);
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);
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;
31463 *type = (PyObject*) Py_TYPE(exc_value);
31465 #if CYTHON_COMPILING_IN_CPYTHON
31466 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
31469 *tb = PyException_GetTraceback(exc_value);
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;
31484#if CYTHON_COMPILING_IN_CPYTHON
31485static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
31487 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
31489 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
31492static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
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;
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;
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);
31518 return PyErr_GivenExceptionMatches(err, exc_type);
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);
31527 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
31532#if CYTHON_FAST_THREAD_STATE
31533static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
31535 n = PyTuple_GET_SIZE(tuple);
31536 for (i=0; i<
n; i++) {
31537 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
31539 for (i=0; i<
n; i++) {
31540 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i)))
return 1;
31544static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
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;
31553 exc_type = tstate->curexc_type;
31554 if (exc_type == err)
return 1;
31555 if (unlikely(!exc_type))
return 0;
31557 #if CYTHON_AVOID_BORROWED_REFS
31558 Py_INCREF(exc_type);
31560 if (unlikely(PyTuple_Check(err))) {
31561 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
31563 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
31565 #if CYTHON_AVOID_BORROWED_REFS
31566 Py_DECREF(exc_type);
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);
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();
31591static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
31593#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
31594 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
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);
31603 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
31604 if (unlikely(!result)) {
31605 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
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);
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) {
31626 for (i = 0; i < length; i++) {
31627 v = dest[i] = src[i];
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) {
31638 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
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);
31646 for (i = 0; i <
n; i++) {
31648 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
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;
31667 if (result == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
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;
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;
31684 if (unlikely(op2 == Py_None)) {
31685 if (op1 == Py_None)
goto __pyx_return_true;
else goto __pyx_return_false;
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);
31693 goto __pyx_richcmp;
31696 if ((0))
goto __pyx_richcmp;
31697 if ((0))
goto __pyx_return_true;
31698 if ((0))
goto __pyx_return_false;
31700 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
31708#if CYTHON_VECTORCALL
31709static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *
s)
31711 Py_ssize_t i,
n = __Pyx_PyTuple_GET_SIZE(kwnames);
31712 #if !CYTHON_ASSUME_SAFE_SIZE
31713 if (unlikely(
n == -1))
return NULL;
31715 for (i = 0; i <
n; i++)
31717 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
31718 #if !CYTHON_ASSUME_SAFE_MACROS
31719 if (unlikely(!namei))
return NULL;
31721 if (
s == namei)
return kwvalues[i];
31723 for (i = 0; i <
n; i++)
31725 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
31726 #if !CYTHON_ASSUME_SAFE_MACROS
31727 if (unlikely(!namei))
return NULL;
31729 int eq = __Pyx_PyUnicode_Equals(
s, namei);
31730 if (unlikely(eq != 0)) {
31731 if (unlikely(eq < 0))
return NULL;
31732 return kwvalues[i];
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;
31741#if !CYTHON_ASSUME_SAFE_SIZE
31742 nkwargs = PyTuple_Size(kwnames);
31743 if (unlikely(nkwargs < 0))
return NULL;
31745 nkwargs = PyTuple_GET_SIZE(kwnames);
31747 dict = PyDict_New();
31748 if (unlikely(!dict))
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;
31755 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
31757 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
31769#if CYTHON_COMPILING_IN_CPYTHON
31770static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
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")))
31777 result = (*call)(func, arg, kw);
31778 Py_LeaveRecursiveCall();
31779 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31782 "NULL result without error in PyObject_Call");
31789#if CYTHON_COMPILING_IN_CPYTHON
31790static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
31791 PyObject *self, *result;
31793 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
31794 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
31795 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
31797 result = cfunc(self, arg);
31798 Py_LeaveRecursiveCall();
31799 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31802 "NULL result without error in PyObject_Call");
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;
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;
31820 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
31822 Py_DECREF(argstuple);
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);
31835 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
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));
31846 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
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);
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]);
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);
31866 vectorcallfunc
f = __Pyx_PyVectorcall_Function(func);
31868 return f(func, args, nargsf, NULL);
31874 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
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);
31881 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
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);
31892static CYTHON_INLINE
int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
31893 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
31901#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
31902static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
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);
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);
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,
31921 METH_FASTCALL | METH_KEYWORDS,
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))
31931#if CYTHON_COMPILING_IN_CPYTHON
31932 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
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);
31939#if CYTHON_COMPILING_IN_PYPY
31941 if (PyCFunction_Check(method))
31946#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
31947 self = PyObject_GetAttrString(method,
"__self__");
31948 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
31952 self = PyCFunction_GET_SELF(method);
31954 self_found = (self && self != Py_None);
31955#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
31959 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
31960 if (unlikely(!unbound_method))
return -1;
31962 result = unbound_method;
31965#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
31966 if (unlikely(target->method)) {
31970 target->method = result;
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);
31991#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
31992 else if (unlikely(was_initialized == 1)) {
31993 __Pyx_CachedCFunction tmp_cfunc = {
31998 tmp_cfunc.type = cfunc->type;
31999 tmp_cfunc.method_name = cfunc->method_name;
32000 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
32003 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
32004 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
32008static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
32010 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0))
return NULL;
32011 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
32016static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
32017 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
32021static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
32022 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
32026#if CYTHON_AVOID_BORROWED_REFS
32027static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
32028 PyObject *next = NULL;
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);
32036 *ppos = PyObject_GetIter(p);
32038 if (unlikely(!*ppos))
goto bad;
32040 next = PyIter_Next(*ppos);
32042 if (PyErr_Occurred())
goto bad;
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;
32060#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
32061 PyErr_FormatUnraisable(
"Exception ignored in __Pyx_PyDict_NextRef");
32063 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
32065 if (pkey) *pkey = NULL;
32066 if (pvalue) *pvalue = NULL;
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);
32081static void __Pyx_RaiseDoubleKeywordsError(
32082 const char* func_name,
32085 PyErr_Format(PyExc_TypeError,
32086 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
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);
32098 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
32099 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
32101#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
32102 else if (unlikely(was_initialized == 1)) {
32103 __Pyx_CachedCFunction tmp_cfunc = {
32108 tmp_cfunc.type = cfunc->type;
32109 tmp_cfunc.method_name = cfunc->method_name;
32110 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
32113 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
32114 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
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;
32126 PyTuple_SET_ITEM(args, 0, arg1);
32128 PyTuple_SET_ITEM(args, 1, arg2);
32129 if (cfunc->flag & METH_KEYWORDS)
32130 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
32132 result = __Pyx_CallCFunction(cfunc, self, args);
32138 PyObject *args[4] = {NULL, self, arg1, arg2};
32139 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
32144static int __Pyx_ValidateDuplicatePosArgs(
32146 PyObject **
const argnames[],
32147 PyObject **
const *first_kw_arg,
32148 const char* function_name)
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);
32164#if CYTHON_USE_UNICODE_INTERNALS
32165static CYTHON_INLINE
int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
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);
32176static int __Pyx_MatchKeywordArg_str(
32178 PyObject **
const argnames[],
32179 PyObject **
const *first_kw_arg,
32180 size_t *index_found,
32181 const char *function_name)
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))
32192 name = first_kw_arg;
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);
32201 #if CYTHON_ASSUME_SAFE_SIZE
32202 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
32205 int cmp = PyUnicode_Compare(name_str, key);
32206 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
32208 *index_found = (size_t) (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;
32224 #if CYTHON_ASSUME_SAFE_SIZE
32225 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
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;
32238 __Pyx_RaiseDoubleKeywordsError(function_name, key);
32243static int __Pyx_MatchKeywordArg_nostr(
32245 PyObject **
const argnames[],
32246 PyObject **
const *first_kw_arg,
32247 size_t *index_found,
32248 const char *function_name)
32250 PyObject **
const *name;
32251 if (unlikely(!PyUnicode_Check(key)))
goto invalid_keyword_type;
32252 name = first_kw_arg;
32254 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
32256 *index_found = (size_t) (name - argnames);
32259 if (unlikely(cmp == -1))
goto bad;
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;
32273 __Pyx_RaiseDoubleKeywordsError(function_name, key);
32275invalid_keyword_type:
32276 PyErr_Format(PyExc_TypeError,
32277 "%.200s() keywords must be strings", function_name);
32282static CYTHON_INLINE
int __Pyx_MatchKeywordArg(
32284 PyObject **
const argnames[],
32285 PyObject **
const *first_kw_arg,
32286 size_t *index_found,
32287 const char *function_name)
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);
32293static void __Pyx_RejectUnknownKeyword(
32295 PyObject **
const argnames[],
32296 PyObject **
const *first_kw_arg,
32297 const char *function_name)
32299 #if CYTHON_AVOID_BORROWED_REFS
32300 PyObject *pos = NULL;
32302 Py_ssize_t pos = 0;
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))
32309 (void) __Pyx_PyDict_NextRef;
32310 while (PyDict_Next(kwds, &pos, &key, NULL))
32313 PyObject**
const *name = first_kw_arg;
32314 while (*name && (**name != key)) name++;
32316 size_t index_found = 0;
32317 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
32320 PyErr_Format(PyExc_TypeError,
32321 "%s() got an unexpected keyword argument '%U'",
32322 function_name, key);
32324 #if CYTHON_AVOID_BORROWED_REFS
32330 #if CYTHON_AVOID_BORROWED_REFS
32334 __Pyx_END_CRITICAL_SECTION();
32335 #if CYTHON_AVOID_BORROWED_REFS
32338 assert(PyErr_Occurred());
32340static int __Pyx_ParseKeywordDict(
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)
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;
32355 name = first_kw_arg;
32356 while (*name && num_kwargs > extracted) {
32357 PyObject * key = **name;
32360 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
32361 found = PyDict_GetItemRef(kwds, key, &value);
32363 value = PyDict_GetItemWithError(kwds, key);
32368 if (unlikely(PyErr_Occurred()))
goto bad;
32372 if (unlikely(found < 0))
goto bad;
32373 values[name-argnames] = value;
32378 if (num_kwargs > extracted) {
32379 if (ignore_unknown_kwargs) {
32380 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
32383 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
32391static int __Pyx_ParseKeywordDictToDict(
32393 PyObject **
const argnames[],
32395 PyObject *values[],
32396 Py_ssize_t num_pos_args,
32397 const char* function_name)
32399 PyObject**
const *name;
32400 PyObject**
const *first_kw_arg = argnames + num_pos_args;
32402#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
32403 if (unlikely(!PyArg_ValidateKeywordArguments(kwds)))
return -1;
32405 if (PyDict_Update(kwds2, kwds) < 0)
goto bad;
32406 name = first_kw_arg;
32408 PyObject *key = **name;
32410#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
32411 int found = PyDict_Pop(kwds2, key, &value);
32413 if (unlikely(found < 0))
goto bad;
32414 values[name-argnames] = value;
32416#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
32417 int found = PyDict_GetItemRef(kwds2, key, &value);
32419 if (unlikely(found < 0))
goto bad;
32420 values[name-argnames] = value;
32421 if (unlikely(PyDict_DelItem(kwds2, key) < 0))
goto bad;
32424 #if CYTHON_COMPILING_IN_CPYTHON
32425 value = _PyDict_Pop(kwds2, key, kwds2);
32427 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
32429 if (value == kwds2) {
32432 if (unlikely(!value))
goto bad;
32433 values[name-argnames] = value;
32438 len = PyDict_Size(kwds2);
32440 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
32441 }
else if (unlikely(len == -1)) {
32448static int __Pyx_ParseKeywordsTuple(
32450 PyObject *
const *kwvalues,
32451 PyObject **
const argnames[],
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)
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);
32466 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
32468#if !CYTHON_ASSUME_SAFE_MACROS
32469 if (unlikely(!key))
goto bad;
32471 name = first_kw_arg;
32472 while (*name && (**name != key)) name++;
32474 PyObject *value = kwvalues[pos];
32475 values[name-argnames] = __Pyx_NewRef(value);
32477 size_t index_found = 0;
32478 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
32480 PyObject *value = kwvalues[pos];
32481 values[index_found] = __Pyx_NewRef(value);
32483 if (unlikely(cmp == -1))
goto bad;
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;
32492 #if CYTHON_AVOID_BORROWED_REFS
32499 PyErr_Format(PyExc_TypeError,
32500 "%s() got an unexpected keyword argument '%U'",
32501 function_name, key);
32504 #if CYTHON_AVOID_BORROWED_REFS
32511static int __Pyx_ParseKeywords(
32513 PyObject *
const *kwvalues,
32514 PyObject **
const argnames[],
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)
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);
32525 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
32527 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
32531static void __Pyx_RaiseArgtupleInvalid(
32532 const char* func_name,
32534 Py_ssize_t num_min,
32535 Py_ssize_t num_max,
32536 Py_ssize_t num_found)
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";
32544 num_expected = num_max;
32545 more_or_less =
"at most";
32548 more_or_less =
"exactly";
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);
32557static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type,
const char *name,
int exact)
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");
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;
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;
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;
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
32585 , name, type_name, obj_type_name
32586#
if __PYX_LIMITED_VERSION_HEX < 0x030C0000
32587 , (from_annotation_subclass ?
". " :
""), extra_info
32590#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
32591 if (exact == 2 && from_annotation_subclass) {
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);
32598 PyErr_SetRaisedException(vargs[0]);
32601 __Pyx_DECREF_TypeName(obj_type_name);
32602#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32603obj_type_name_failed:
32605 __Pyx_DECREF_TypeName(type_name);
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))))
32613 if (!exact && likely(type) && likely(__Pyx_TypeCheck(obj, type)))
32615 __Pyx_ArgTypeError(obj, type, name, exact);
32620#if !CYTHON_VECTORCALL
32621static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *
const *args,
size_t nargsf) {
32623 switch (__Pyx_PyVectorcall_NARGS(nargsf)) {
32625 return PyObject_CallMethodObjArgs(args[0], name, NULL);
32627 return PyObject_CallMethodObjArgs(args[0], name, args[1], NULL);
32629 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], NULL);
32631 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], NULL);
32633 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], args[4], NULL);
32635 PyObject *attr = PyObject_GetAttr(args[0], name);
32636 if (unlikely(!attr))
32638 result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
32645#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
32646static __Pyx_TypeName
32647__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
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);
32654 name = PyType_GetQualName(tp);
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) {
32665 result = PyUnicode_FromFormat(
"%U.%U", module, name);
32666 if (unlikely(result == NULL))
goto bad;
32669 Py_XDECREF(module);
32677 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
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;
32689 PyErr_Format(exc_type, message, arg, type_name);
32690 __Pyx_DECREF_TypeName(type_name);
32694static int __Pyx_RaiseUnexpectedTypeError(
const char *expected, PyObject *obj) {
32695 __Pyx_RaiseTypeErrorWithObjectType1(
32696 "Expected %.42s, got " __Pyx_FMT_TYPENAME,
32702static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
32703 PyObject* owned_instance = NULL;
32704 if (tb == Py_None) {
32706 }
else if (tb && !PyTraceBack_Check(tb)) {
32707 PyErr_SetString(PyExc_TypeError,
32708 "raise: arg 3 must be a traceback or None");
32711 if (value == Py_None)
32713 if (PyExceptionInstance_Check(type)) {
32715 PyErr_SetString(PyExc_TypeError,
32716 "instance exception may not have a separate value");
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)) {
32732 type = instance_class;
32736 if (!instance_class) {
32739 args = PyTuple_New(0);
32740 else if (PyTuple_Check(value)) {
32744 args = PyTuple_Pack(1, value);
32747 owned_instance = PyObject_Call(type, args, NULL);
32749 if (!owned_instance)
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));
32761 PyErr_SetString(PyExc_TypeError,
32762 "raise: exception class must be a subclass of BaseException");
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)
32773 }
else if (PyExceptionInstance_Check(cause)) {
32774 fixed_cause = cause;
32775 Py_INCREF(fixed_cause);
32777 PyErr_SetString(PyExc_TypeError,
32778 "exception causes must derive from "
32782 PyException_SetCause(value, fixed_cause);
32784 PyErr_SetObject(type, value);
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) {
32793 tstate->curexc_traceback = tb;
32794 Py_XDECREF(tmp_tb);
32797 PyObject *tmp_type, *tmp_value, *tmp_tb;
32798 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
32800 PyErr_Restore(tmp_type, tmp_value, tb);
32801 Py_XDECREF(tmp_tb);
32805 Py_XDECREF(owned_instance);
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"
32822static const char DIGIT_PAIRS_8[2*8*8+1] = {
32832static const char DIGITS_HEX[2*16+1] = {
32838static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength,
const char* chars,
int clength,
32839 int prepend_sign,
char padding_char) {
32841 Py_ssize_t uoffset = ulength - clength;
32842#if CYTHON_USE_UNICODE_INTERNALS
32845 uval = PyUnicode_New(ulength, 127);
32846 if (unlikely(!uval))
return NULL;
32847 udata = PyUnicode_DATA(uval);
32850 if (prepend_sign) {
32851 __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0,
'-');
32854 for (; i < uoffset; i++) {
32855 __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
32858 for (i=0; i < clength; i++) {
32859 __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
32863 PyObject *
sign = NULL, *padding = NULL;
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);
32874 if (unlikely(!padding))
goto done_or_error;
32876 if (prepend_sign) {
32877 sign = PyUnicode_FromOrdinal(
'-');
32878 if (unlikely(!
sign))
goto done_or_error;
32881 uval = PyUnicode_DecodeASCII(chars, clength, NULL);
32882 if (likely(uval) && padding) {
32883 PyObject *tmp = PyUnicode_Concat(padding, uval);
32887 if (likely(uval) &&
sign) {
32888 PyObject *tmp = PyUnicode_Concat(
sign, uval);
32893 Py_XDECREF(padding);
32901static CYTHON_INLINE
int __Pyx_CheckUnicodeValue(
int value) {
32902 return value <= 1114111;
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))) {
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);
32913 char *cpos = chars +
sizeof(chars);
32914 if (value < 0x800) {
32915 *--cpos = (char) (0x80 | (value & 0x3f));
32917 *--cpos = (char) (0xc0 | (value & 0x1f));
32918 }
else if (value < 0x10000) {
32919 *--cpos = (char) (0x80 | (value & 0x3f));
32921 *--cpos = (char) (0x80 | (value & 0x3f));
32923 *--cpos = (char) (0xe0 | (value & 0x0f));
32925 *--cpos = (char) (0x80 | (value & 0x3f));
32927 *--cpos = (char) (0x80 | (value & 0x3f));
32929 *--cpos = (char) (0x80 | (value & 0x3f));
32931 *--cpos = (char) (0xf0 | (value & 0x07));
32933 cpos -= padding_length;
32934 memset(cpos, padding_char, (
size_t) padding_length);
32935 return PyUnicode_DecodeUTF8(cpos, chars +
sizeof(chars) - cpos, NULL);
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);
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);
32953 result = PyUnicode_Concat(padding, uchar);
32954 Py_DECREF(padding);
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"
32966 const int neg_one = (int) -1, const_zero = (
int) 0;
32967#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32968#pragma GCC diagnostic pop
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)");
32977 return PyUnicode_FromOrdinal((
int) value);
32979 return __Pyx_PyUnicode_FromOrdinal_Padded((
int) value, width, padding_char);
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;
32988#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32989#pragma GCC diagnostic push
32990#pragma GCC diagnostic ignored "-Wconversion"
32992 const int neg_one = (int) -1, const_zero = (
int) 0;
32993#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
32994#pragma GCC diagnostic pop
32996 const int is_unsigned = neg_one > const_zero;
32997 if (format_char ==
'X') {
33006 switch (format_char) {
33008 digit_pos = abs((
int)(remaining % (8*8)));
33009 remaining = (int) (remaining / (8*8));
33011 memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
33012 last_one_off = (digit_pos < 8);
33015 digit_pos = abs((
int)(remaining % (10*10)));
33016 remaining = (int) (remaining / (10*10));
33018 memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
33019 last_one_off = (digit_pos < 10);
33022 *(--dpos) = hex_digits[abs((
int)(remaining % 16))];
33023 remaining = (int) (remaining / 16);
33029 }
while (unlikely(remaining != 0));
33030 assert(!last_one_off || *dpos ==
'0');
33031 dpos += last_one_off;
33032 length = end - dpos;
33035 if (!is_unsigned && value <= neg_one) {
33036 if (padding_char ==
' ' || width <= length + 1) {
33044 if (width > ulength) {
33047 if (ulength == 1) {
33048 return PyUnicode_FromOrdinal(*dpos);
33050 return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (
int) length, prepend_sign, padding_char);
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"
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
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)");
33070 return PyUnicode_FromOrdinal((
int) value);
33072 return __Pyx_PyUnicode_FromOrdinal_Padded((
int) value, width, padding_char);
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"
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
33089 const int is_unsigned = neg_one > const_zero;
33090 if (format_char ==
'X') {
33099 switch (format_char) {
33101 digit_pos = abs((
int)(remaining % (8*8)));
33102 remaining = (Py_ssize_t) (remaining / (8*8));
33104 memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
33105 last_one_off = (digit_pos < 8);
33108 digit_pos = abs((
int)(remaining % (10*10)));
33109 remaining = (Py_ssize_t) (remaining / (10*10));
33111 memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
33112 last_one_off = (digit_pos < 10);
33115 *(--dpos) = hex_digits[abs((
int)(remaining % 16))];
33116 remaining = (Py_ssize_t) (remaining / 16);
33122 }
while (unlikely(remaining != 0));
33123 assert(!last_one_off || *dpos ==
'0');
33124 dpos += last_one_off;
33125 length = end - dpos;
33128 if (!is_unsigned && value <= neg_one) {
33129 if (padding_char ==
' ' || width <= length + 1) {
33137 if (width > ulength) {
33140 if (ulength == 1) {
33141 return PyUnicode_FromOrdinal(*dpos);
33143 return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (
int) length, prepend_sign, padding_char);
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;
33159 result_ukind = 1 << kind_shift;
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))
33165 for (i=0; i < value_count; i++) {
33167 Py_ssize_t ulength;
33169 PyObject *uval = values[i];
33170 if (__Pyx_PyUnicode_READY(uval) == (-1))
33172 ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
33173 #if !CYTHON_ASSUME_SAFE_SIZE
33174 if (unlikely(ulength < 0))
goto bad;
33176 if (unlikely(!ulength))
33178 if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
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));
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);
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);
33197 char_pos += ulength;
33199 return result_uval;
33201 PyErr_SetString(PyExc_OverflowError,
"join() result is too long for a Python string");
33203 Py_DECREF(result_uval);
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;
33216 result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
33218 Py_DECREF(value_tuple);
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) {
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;
33234 if (length != 1)
goto return_ne;
33235 kind = PyUnicode_KIND(s1);
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];
33242 ch1 = PyUnicode_4BYTE_DATA(s1)[0];
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];
33253 if (kind == PyUnicode_4BYTE_KIND){
33254 ch1 = PyUnicode_4BYTE_DATA(s1)[0];
33265 return (equals == Py_EQ);
33267 return (equals == Py_NE);
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;
33282 if (result == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
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;
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;
33299 if (PyFloat_CheckExact(op1)) {
33300 goto __pyx_richcmp;
33302 if (PyLong_CheckExact(op1)) {
33303 if (op1 == op2)
goto __pyx_return_true;
33304 goto __pyx_richcmp;
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);
33312 goto __pyx_richcmp;
33315 if ((0))
goto __pyx_richcmp;
33316 if ((0))
goto __pyx_return_true;
33317 if ((0))
goto __pyx_return_false;
33319 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
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);
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;
33344 if (ps1[0] != ps2[0])
goto __pyx_return_false;
33345 if (length == 1)
goto __pyx_return_true;
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;
33353 cmp = memcmp(ps1, ps2, (
size_t)length);
33354 if (cmp == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
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);
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;
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;
33386 cmp = memcmp(ps1, ps2, (
size_t)length);
33387 if (cmp == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
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;
33401 if (PyFloat_CheckExact(op1)) {
33402 goto __pyx_richcmp;
33404 if (PyLong_CheckExact(op1)) {
33405 if (op1 == op2)
goto __pyx_return_true;
33406 goto __pyx_richcmp;
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);
33414 goto __pyx_richcmp;
33417 if ((0))
goto __pyx_richcmp;
33418 if ((0))
goto __pyx_return_true;
33419 if ((0))
goto __pyx_return_false;
33421 return PyObject_RichCompare(op1, op2, Py_EQ);
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);
33434 return PyObject_GetAttr(o,
n);
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);
33445#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
33446static int __Pyx_GetItemInt_wraparound(PyObject *o, PySequenceMethods *sm, Py_ssize_t *i) {
33448 if (likely(sm->sq_length)) {
33449 Py_ssize_t l = sm->sq_length(o);
33450 if (likely(l >= 0)) {
33453 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
33463static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
33465 if (unlikely(!j))
return NULL;
33466 r = PyObject_GetItem(o, j);
33470static PyObject *__Pyx_GetItemInt_Generic_size(PyObject *o, Py_ssize_t i) {
33471 return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
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;
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)) {
33493 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
33494 return __Pyx_PyList_GET_ITEM_REF(o, wrapped_i, unsafe_shared);
33496 return __Pyx_GetItemInt_Generic_size(o, i);
33500 return PySequence_GetItem(o, i);
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;
33516 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_LIMITED_API
33517 return PySequence_ITEM(o, wrapped_i);
33519 if (unlikely(wrapped_i < 0)) {
33520 PyErr_SetString(PyExc_IndexError,
"tuple index out of range");
33523 return PySequence_GetItem(o, wrapped_i);
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)) {
33531 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
33532 return __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(o, wrapped_i));
33534 return __Pyx_GetItemInt_Generic_size(o, i);
33538 return PySequence_GetItem(o, i);
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);
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);
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);
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);
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);
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);
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))
33587 return sm->sq_item(o, i);
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);
33596 if (!PyMapping_Check(o)) {
33597 return PySequence_GetItem(o, i);
33602 return __Pyx_GetItemInt_Generic_size(o, i);
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;
33611 PyErr_Format(exc_type, message, type_name);
33612 __Pyx_DECREF_TypeName(type_name);
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);
33624 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
33626 __Pyx_RaiseErrorWithObjectType(
33628 "cannot fit '" __Pyx_FMT_TYPENAME
"' into an index-sized integer",
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);
33638 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
33640 if (PyErr_Occurred()) {
33644 PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
33649 __Pyx_RaiseTypeErrorWithObjectType(
33650 "'" __Pyx_FMT_TYPENAME
"' object is not subscriptable", obj);
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);
33660 if (likely(sm && sm->sq_item)) {
33661 return __Pyx_PyObject_GetIndex(obj, key);
33663 return __Pyx_PyObject_GetItem_Slow(obj, key);
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);
33673#if CYTHON_AVOID_BORROWED_REFS
33674 PyObject *pos = NULL;
33676 Py_ssize_t pos = 0;
33678#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
33679 if (unlikely(!PyArg_ValidateKeywordArguments(kwds)))
return;
33681 __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
33682#if CYTHON_AVOID_BORROWED_REFS
33687 PyErr_Format(PyExc_TypeError,
33688 "%s() got an unexpected keyword argument '%U'",
33689 function_name, key);
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))
33702 return q - adapt_python;
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)))
33712 __Pyx_PyErr_Clear();
33717static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *
n, PyObject *d) {
33719#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
33720 int res = PyObject_GetOptionalAttr(o,
n, &
r);
33721 return (res != 0) ?
r : __Pyx_NewRef(d);
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);
33732 r = PyObject_GetAttr(o,
n);
33733 return (likely(
r)) ?
r : __Pyx_GetAttr3Default(d);
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;
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;
33747#if CYTHON_COMPILING_IN_CPYTHON
33748 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)obj + offset) : _PyObject_GetDictPtr(obj);
33750 dictptr = _PyObject_GetDictPtr(obj);
33753 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
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)))
33759 return obj_dict_version == __Pyx_get_object_dict_version(obj);
33764#if CYTHON_USE_DICT_VERSIONS
33765static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
33767static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
33771#if CYTHON_COMPILING_IN_LIMITED_API
33772 if (unlikely(!__pyx_m)) {
33773 if (!PyErr_Occurred())
33774 PyErr_SetNone(PyExc_NameError);
33777 result = PyObject_GetAttr(__pyx_m, name);
33778 if (likely(result)) {
33781 if (!__Pyx_IgnoreException(PyExc_Exception)) {
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)) {
33790 __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
33791 if (likely(result)) {
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);
33800 PyObject *exc = PyErr_Occurred();
33801 if (unlikely(exc) && !__Pyx_IgnoreGivenException(exc, PyExc_Exception)) {
33805 return __Pyx_GetBuiltinName(name);
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);
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");
33822static CYTHON_INLINE
void __Pyx_RaiseNoneNotIterableError(
void) {
33823 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not iterable");
33827#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
33828static _PyErr_StackItem *
33829__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
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)
33835 exc_info = exc_info->previous_item;
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) {
33852 *value = exc_value;
33854 *type = (PyObject*) Py_TYPE(exc_value);
33856 *tb = PyException_GetTraceback(exc_value);
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;
33864 Py_XINCREF(*value);
33867 *type = tstate->exc_type;
33868 *value = tstate->exc_value;
33869 *tb = tstate->exc_traceback;
33871 Py_XINCREF(*value);
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);
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;
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;
33901 Py_XDECREF(tmp_type);
33902 Py_XDECREF(tmp_value);
33903 Py_XDECREF(tmp_tb);
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;
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;
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
33923 __Pyx_DECREF_TypeName(type_name1);
33927static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
33928 if (unlikely(!type)) {
33929 PyErr_SetString(PyExc_SystemError,
"Missing type object");
33932 if (likely(__Pyx_TypeCheck(obj, type)))
33934 __Pyx_RaiseTypeErrorWithTypes(
33935 "Cannot convert " __Pyx_FMT_TYPENAME
" to " __Pyx_FMT_TYPENAME,
33936 Py_TYPE(obj), type);
33941#if CYTHON_FAST_THREAD_STATE
33942static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
33944static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
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;
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;
33961#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
33962 local_value = PyErr_GetRaisedException();
33964 PyErr_Fetch(&local_type, &local_value, &local_tb);
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);
33973 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
33974#if CYTHON_FAST_THREAD_STATE
33975 if (unlikely(tstate->curexc_type))
33977 if (unlikely(PyErr_Occurred()))
33981 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
33985 Py_XINCREF(local_tb);
33986 Py_XINCREF(local_type);
33987 Py_XINCREF(local_value);
33988 *type = local_type;
33989 *value = local_value;
33991#if CYTHON_FAST_THREAD_STATE
33992 #if CYTHON_USE_EXC_INFO_STACK
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;
34000 Py_XDECREF(local_type);
34001 Py_XDECREF(local_tb);
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;
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;
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);
34028 PyErr_SetExcInfo(local_type, local_value, local_tb);
34031#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
34036 Py_XDECREF(local_type);
34037 Py_XDECREF(local_value);
34038 Py_XDECREF(local_tb);
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);
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);
34063 tmp_tb = PyException_GetTraceback(tmp_value);
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;
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;
34083 *value = tmp_value;
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);
34092 *value = tmp_value;
34098#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
34099static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *o, PyObject *
n) {
34101 if (unlikely(!PyUnicode_Check(
n))) {
34102 PyErr_SetString(PyExc_TypeError,
34103 "hasattr(): attribute name must be string");
34106 r = __Pyx_PyObject_GetAttrStrNoError(o,
n);
34108 return (unlikely(PyErr_Occurred())) ? -1 : 0;
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);
34125 for (i = 0; i <
n; i++) {
34127 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
34137static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
34138 PyObject *imported_module = PyImport_GetModule(qualname);
34139 if (unlikely(!imported_module)) {
34141 if (PyErr_Occurred()) {
34146 *
module = imported_module;
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;
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)) {
34158 return module_found;
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);
34166 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
34167 if (unlikely(has_imported_attribute == -1))
goto error;
34169 if (!has_imported_attribute) {
34173 *
module = imported_module;
34176 dot_index = PyUnicode_FindChar(qualname,
'.', 0, PY_SSIZE_T_MAX, 1);
34177 if (dot_index == -1) {
34178 *
module = imported_module;
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);
34189 Py_DECREF(imported_module);
34193 Py_DECREF(imported_module);
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;
34205 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
34206 if (likely(module_found == 1)) {
34208 }
else if (unlikely(module_found == -1)) {
34211 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
34212 empty_dict = PyFrozenDict_New(NULL);
34214 empty_dict = PyDict_New();
34216 if (unlikely(!empty_dict))
34218 if (imported_names) {
34219 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
34220 if (unlikely(!from_list))
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)))
34237 module = PyImport_ImportModuleLevelObject(
34238 name, moddict, empty_dict, from_list, level);
34241 Py_XDECREF(from_list);
34242 Py_XDECREF(empty_dict);
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);
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);
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);
34268 int result = PyList_Append(list, x);
34273static CYTHON_INLINE
int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x) {
34274 int result = PyList_Append(list, x);
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))
34286 result = PyNumber_Multiply(seq, pymul);
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);
34295 return __Pyx_PySequence_Multiply_Generic(seq, mul);
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};
34308 opname[op[1] ? 2 : 1] =
'=';
34310 __Pyx_RaiseErrorWithObjectTypes1(
34312 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
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)) {
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;
34329 int_op2 = PyLong_AsDouble(op2);
34330 if (unlikely((int_op2 == -1.) && PyErr_Occurred()))
return NULL;
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;
34336 if (float_op1 == 0.)
return __Pyx_NewRef(op1);
34337 return PyFloat_FromDouble(float_op1 * int_op2);
34339 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
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)) {
34350 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
34354 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
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
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)) {
34372 ssizeargfunc repeat_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_sequence, sq_repeat, ssizeargfunc);
34373 if (likely(repeat_func)) {
34375 #if CYTHON_USE_PYLONG_INTERNALS
34376 if (__Pyx_PyLong_IsCompact(op1)) {
34377 count = __Pyx_PyLong_CompactValue(op1);
34381 count = PyLong_AsSsize_t(op1);
34382 if (unlikely((count == -1) && PyErr_Occurred()))
return NULL;
34384 return repeat_func(op2, count);
34386 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
34390 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
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);
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);
34410 else if (__Pyx_PyLong_IsZero(op2))
return __Pyx_NewRef(op2);
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);
34417 return __Pyx_PyNumber_Multiply_xint_int(op1, op2, inplace);
34419 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
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);
34429static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject*
s, PyObject*
f) {
34431 if (unlikely(!
s))
return NULL;
34432 result = PyObject_Format(
s,
f);
34438#if CYTHON_USE_UNICODE_WRITER
34439static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
34441 _PyUnicodeWriter writer;
34442 if (likely(PyFloat_CheckExact(obj))) {
34443 _PyUnicodeWriter_Init(&writer);
34444 ret = _PyFloat_FormatAdvancedWriter(
34447 format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
34448 }
else if (likely(PyLong_CheckExact(obj))) {
34449 _PyUnicodeWriter_Init(&writer);
34450 ret = _PyLong_FormatAdvancedWriter(
34453 format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
34455 return PyObject_Format(obj, format_spec);
34457 if (unlikely(ret == -1)) {
34458 _PyUnicodeWriter_Dealloc(&writer);
34461 return _PyUnicodeWriter_Finish(&writer);
34466static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *
v) {
34468 if (unlikely(!j))
return -1;
34469 r = PyObject_SetItem(o, j,
v);
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);
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))) {
34490 return PyList_SetItem(o,
n,
v);
34491 }
else if ((!boundscheck) || likely(__Pyx_is_valid_index(
n, PyList_GET_SIZE(o)))) {
34494 old = PyList_GET_ITEM(o,
n);
34495 PyList_SET_ITEM(o,
n,
v);
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);
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);
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))
34517 return sm->sq_ass_item(o, i,
v);
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);
34526 if (!PyMapping_Check(o)) {
34527 return PySequence_SetItem(o, i,
v);
34532 return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i),
v);
34536static void __Pyx_RaiseUnboundLocalError(
const char *varname) {
34537 PyErr_Format(PyExc_UnboundLocalError,
"local variable '%s' referenced before assignment", varname);
34541static CYTHON_INLINE
long __Pyx_div_long(
long a,
long b,
int b_is_constant) {
34544 long adapt_python = (b_is_constant ?
34545 ((
r != 0) & ((
r < 0) ^ (b < 0))) :
34546 ((
r != 0) & ((
r ^ b) < 0))
34548 return q - adapt_python;
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) {
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);
34567 Py_XDECREF(traceback);
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;
34579#if CYTHON_USE_SYS_MONITORING
34580CYTHON_UNUSED
static int __Pyx__TraceStartFunc(PyMonitoringState *state_array, PyObject *code_obj,
int offset,
int skip_event) {
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);
34587CYTHON_UNUSED
static int __Pyx__TraceStartGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj,
int offset) {
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);
34593CYTHON_UNUSED
static int __Pyx__TraceResumeGen(PyMonitoringState *state_array, __pyx_monitoring_version_type *version, PyObject *code_obj,
int offset) {
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);
34599CYTHON_UNUSED
static void __Pyx__TraceException(PyMonitoringState *monitoring_state, PyObject *code_obj,
int offset,
int reraised) {
34601 (void) PyMonitoring_FireReraiseEvent(monitoring_state, code_obj, offset);
34603 (void) PyMonitoring_FireRaiseEvent(monitoring_state, code_obj, offset);
34607CYTHON_UNUSED
static int __Pyx__TraceLine(PyMonitoringState *monitoring_state, PyObject *code_obj,
int line,
int offset) {
34609 PyObject *exc = PyErr_GetRaisedException();
34610 ret = PyMonitoring_FireLineEvent(monitoring_state, code_obj, offset, line);
34611 if (exc) PyErr_SetRaisedException(exc);
34616static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
34617 PyFrameObject** frame,
34618 PyThreadState* tstate,
34619 const char *funcname,
34620 const char *srcfile,
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;
34629 *frame = PyFrame_New(
34632 __pyx_mstate_global->__pyx_d,
34635 if (needs_new_code_obj && !CYTHON_PROFILE_REUSE_CODEOBJ)
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;
34644 PyObject *type, *value, *traceback;
34646 __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
34647 __Pyx_EnterTracing(tstate);
34648 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
34650 if (tstate->c_tracefunc)
34651 retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
34652 if (retval && tstate->c_profilefunc)
34654 retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
34655 __Pyx_LeaveTracing(tstate);
34656 if (unlikely(!retval)) {
34659 Py_XDECREF(traceback);
34662 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
34664 return __Pyx_IsTracing(tstate, 0, 0);
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;
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
34689 PyObject *modules = PyImport_GetModuleDict();
34690 if (unlikely(!modules))
34692 value = PyObject_GetItem(modules, full_name);
34695 value = PyImport_GetModule(full_name);
34698 Py_XDECREF(full_name);
34699 Py_XDECREF(module_dot);
34700 Py_XDECREF(module_name);
34702 if (unlikely(!value)) {
34703 PyErr_Format(PyExc_ImportError,
"cannot import name %S", name);
34709static void __Pyx_RaiseClosureNameError(
const char *varname) {
34710 PyErr_Format(PyExc_NameError,
"free variable '%s' referenced before assignment in enclosing scope", varname);
34714static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_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);
34724 value = PyDict_SetDefault(d, key, default_value);
34725 if (unlikely(!value))
return NULL;
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();
34736 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
34739 if (m != NULL && PyModule_Check(m)) {
34743 m = PyModule_NewObject(name);
34746 if (PyDict_CheckExact(module_dict)) {
34748 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
34752 if (PyObject_SetItem(module_dict, name, m) != 0) {
34759 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name) {
34760 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
34761 return PyImport_AddModuleRef(name);
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);
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);
34778static PyObject *__Pyx_FetchSharedCythonABIModule(
void) {
34779 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
34783static int __Pyx_VerifyCachedType(PyObject *cached_type,
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);
34792 if (expected_basicsize == 0) {
34795#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
34796 if (expected_basicsize < 0) {
34797 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
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;
34810 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
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",
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);
34833 PyType_Modified((PyTypeObject*)result);
34838#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
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(
34856 spec->basicsize) < 0) {
34860 }
else if (unlikely(get_item_ref_result == -1)) {
34863 cached_type = __Pyx_PyType_FromMetaclass(
34865 CYTHON_USE_MODULE_STATE ? module : abi_module,
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(
34876 spec->basicsize) < 0) {
34881 Py_DECREF(new_cached_type);
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;
34889 Py_XDECREF(cached_type);
34890 cached_type = NULL;
34895static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED
void* context) {
34896 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
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");
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");
34908static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
34909 {
"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
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},
34921static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
34922 __PYX_TYPE_MODULE_PREFIX
"_common_types_metatype",
34925 Py_TPFLAGS_IMMUTABLETYPE |
34926 Py_TPFLAGS_DISALLOW_INSTANTIATION |
34927 Py_TPFLAGS_DEFAULT,
34928 __pyx_CommonTypesMetaclass_slots
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)) {
34936 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
34938 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
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;
34954static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void)) {
34955 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
34957 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
34958 if (unlikely(!newFunc)) {
34962 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
34963 Py_DECREF(newFunc);
34966 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
34969static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void)) {
34970 if (PyMethod_Check(func)) {
34971 func = PyMethod_GET_FUNCTION(func);
34973 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
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));
34982 __Pyx_Py_XDECREF_SET(
34983 ((PyCMethodObject *) (
f))->mm_class,
34984 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
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);
34990 if (unlikely(!m->defaults))
34992 return m->defaults;
34994static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
34995 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
34996 m->defaults_tuple = tuple;
34999static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
35000 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
35001 m->defaults_kwdict = dict;
35004static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
35005 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
35006 m->func_annotations = dict;
35011#if !CYTHON_USE_TYPE_SPECS
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) {
35021 Py_VISIT((PyObject*)Py_TYPE(o));
35027#if CYTHON_COMPILING_IN_LIMITED_API
35028static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
35030 CYTHON_UNUSED_VAR(typ);
35032 return __Pyx_NewRef(func);
35033 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
35035 PyObject *args[] = {func, self};
35036 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
35039 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
35044static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
35045 CYTHON_UNUSED_VAR(typ);
35047 return __Pyx_NewRef(func);
35048 return PyMethod_New(func, self);
35053#if CYTHON_VECTORCALL
35054static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
35056 PyObject *res = NULL;
35058 PyObject **newargs;
35059 PyObject **kwvalues;
35061 #if CYTHON_AVOID_BORROWED_REFS
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;
35073 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
35075 newargs = (PyObject **)PyMem_Malloc((nargs + (
size_t)nkw) *
sizeof(args[0]));
35076 if (unlikely(newargs == NULL)) {
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);
35086 kwvalues = newargs + nargs;
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));
35095 Py_TYPE(key)->tp_flags;
35097 #if !CYTHON_ASSUME_SAFE_MACROS
35098 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0))
goto cleanup;
35100 PyTuple_SET_ITEM(kwnames, i, key);
35102 kwvalues[i] = value;
35105 if (unlikely(!keys_are_strings)) {
35106 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
35109 res = vc(func, newargs, nargs, kwnames);
35111 #if CYTHON_AVOID_BORROWED_REFS
35114 Py_DECREF(kwnames);
35115 for (i = 0; i < nkw; i++)
35116 Py_DECREF(kwvalues[i]);
35117 PyMem_Free(newargs);
35120static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
35122 Py_ssize_t kw_size =
35123 likely(kw == NULL) ?
35125#if !CYTHON_ASSUME_SAFE_SIZE
35128 PyDict_GET_SIZE(kw);
35130 if (kw_size == 0) {
35131 return vc(func, args, nargs, NULL);
35133#if !CYTHON_ASSUME_SAFE_SIZE
35134 else if (unlikely(kw_size == -1)) {
35138 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
35144__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
35146 if (unlikely(op->func_doc == NULL)) {
35147#if CYTHON_COMPILING_IN_LIMITED_API
35148 const char *doc = op->func_methoddef->ml_doc;
35150 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
35153 op->func_doc = PyUnicode_FromString(doc);
35154 if (unlikely(op->func_doc == NULL))
35157 Py_INCREF(Py_None);
35161 Py_INCREF(op->func_doc);
35162 return op->func_doc;
35165__Pyx_CyFunction_get_doc(PyObject *op_in,
void *closure) {
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();
35175__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value,
void *context)
35177 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35178 CYTHON_UNUSED_VAR(context);
35179 if (value == NULL) {
35183 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35184 __Pyx_Py_XDECREF_SET(op->func_doc, value);
35185 __Pyx_END_CRITICAL_SECTION();
35189__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
35191 if (unlikely(op->func_name == NULL)) {
35192#if CYTHON_COMPILING_IN_LIMITED_API
35193 const char *name = op->func_methoddef->ml_name;
35195 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
35197 op->func_name = PyUnicode_InternFromString(name);
35198 if (unlikely(op->func_name == NULL))
35201 Py_INCREF(op->func_name);
35202 return op->func_name;
35205__Pyx_CyFunction_get_name(PyObject *op,
void *context)
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();
35215__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value,
void *context)
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");
35223 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35225 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35226 __Pyx_Py_XDECREF_SET(op->func_name, value);
35227 __Pyx_END_CRITICAL_SECTION();
35231__Pyx_CyFunction_get_qualname(PyObject *op_in,
void *context)
35233 CYTHON_UNUSED_VAR(context);
35234 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35236 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35237 Py_INCREF(op->func_qualname);
35238 result = op->func_qualname;
35239 __Pyx_END_CRITICAL_SECTION();
35243__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value,
void *context)
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");
35251 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35253 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35254 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
35255 __Pyx_END_CRITICAL_SECTION();
35258#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
35260__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op,
void *context)
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))
35268 Py_INCREF(op->func_dict);
35269 return op->func_dict;
35273__Pyx_CyFunction_get_globals(PyObject *op_in,
void *context)
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;
35281__Pyx_CyFunction_get_closure(PyObject *op,
void *context)
35283 CYTHON_UNUSED_VAR(op);
35284 CYTHON_UNUSED_VAR(context);
35285 Py_INCREF(Py_None);
35289__Pyx_CyFunction_get_code(PyObject *op_in,
void *context)
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);
35298__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
35300 PyObject *res = op->defaults_getter(op_obj);
35301 if (unlikely(!res))
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);
35309 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
35310 if (unlikely(!op->defaults_tuple)) result = -1;
35312 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
35313 if (unlikely(!op->defaults_kwdict)) result = -1;
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);
35325 }
else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
35326 PyErr_SetString(PyExc_TypeError,
35327 "__defaults__ must be set to a tuple object");
35330 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__defaults__ will not "
35331 "currently affect the values used in function calls", 1);
35333 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35334 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
35335 __Pyx_END_CRITICAL_SECTION();
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;
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();
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);
35368 }
else if (unlikely(value != Py_None && !PyDict_Check(value))) {
35369 PyErr_SetString(PyExc_TypeError,
35370 "__kwdefaults__ must be set to a dict object");
35373 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__kwdefaults__ will not "
35374 "currently affect the values used in function calls", 1);
35376 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35377 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
35378 __Pyx_END_CRITICAL_SECTION();
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;
35397__Pyx_CyFunction_get_kwdefaults(PyObject *op,
void *context) {
35399 CYTHON_UNUSED_VAR(context);
35400 __Pyx_BEGIN_CRITICAL_SECTION(op);
35401 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
35402 __Pyx_END_CRITICAL_SECTION();
35405static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
35407__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value,
void *context) {
35408 CYTHON_UNUSED_VAR(context);
35409 if (!value || value == Py_None) {
35411 }
else if (unlikely(!PyDict_Check(value))) {
35412 PyErr_SetString(PyExc_TypeError,
35413 "__annotations__ must be set to a dict object");
35416 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
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;
35425__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
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;
35433 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
35434 *dict = likely(dictptr) ? *dictptr : NULL;
35436 return *dict ? 1 : 0;
35439__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
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);
35448__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
35451 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
35452 if (!dict_found)
return 0;
35454 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
35456#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
35457 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
35459 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
35461 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
35468__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
35471#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
35472 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
35474 dict = PyObject_GenericGetDict(op_in, NULL);
35476 if (unlikely(!dict))
return -1;
35477 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
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;
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();
35510 PyObject *format = PyLong_FromLong(1L);
35511 if (likely(format)) {
35512 if (!Py_EnterRecursiveCall(
" cyfunction __annotations__.__get__")) {
35513 result = __Pyx_PyObject_CallOneArg(annotate, format);
35514 Py_LeaveRecursiveCall();
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");
35525 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35526 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
35527 __Pyx_END_CRITICAL_SECTION();
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");
35537 if (Py_EnterRecursiveCall(
" in cyfunction annotate")) {
35540 result = __Pyx_CyFunction_get_annotations(self, NULL);
35541 Py_LeaveRecursiveCall();
35545__Pyx_CyFunction_get_annotate(PyObject *op_in,
void *context);
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");
35553 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
35554 PyErr_SetString(PyExc_TypeError,
"__annotate__ must be callable or None");
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;
35564 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
35565 PyObject *value_self = PyCFunction_GET_SELF(value);
35567 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
35568 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
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();
35577 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
35579#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
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;
35588#if CYTHON_ASSUME_SAFE_MACROS
35589 PyList_SET_ITEM(fromlist, 0, marker);
35591 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
35592 Py_DECREF(fromlist);
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;
35601 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
35603 if (likely(is_coroutine_value)) {
35604 return is_coroutine_value;
35607 if (!__Pyx_IgnoreException(PyExc_Exception)) {
35611 return __Pyx_PyBool_FromLong(is_coroutine);
35614__Pyx_CyFunction_get_is_coroutine(PyObject *op_in,
void *context) {
35615 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
35617 CYTHON_UNUSED_VAR(context);
35618 if (op->func_is_coroutine) {
35619 return __Pyx_NewRef(op->func_is_coroutine);
35621 result = __Pyx_CyFunction_get_is_coroutine_value(op);
35622 if (unlikely(!result))
35624 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
35625 if (op->func_is_coroutine) {
35627 result = __Pyx_NewRef(op->func_is_coroutine);
35629 op->func_is_coroutine = __Pyx_NewRef(result);
35631 __Pyx_END_CRITICAL_SECTION();
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);
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);
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,
35657 Py_DECREF(py_name);
35659 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
35660 PyErr_Format(PyExc_TypeError,
35665#if CYTHON_COMPILING_IN_LIMITED_API
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;
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) {
35681 PyObject *old = op->func_module;
35682 op->func_module = value;
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},
35697 {
"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
35698 {
"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
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},
35714#if CYTHON_COMPILING_IN_LIMITED_API
35715 {
"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
35719static PyMemberDef __pyx_CyFunction_members[] = {
35720#if !CYTHON_COMPILING_IN_LIMITED_API
35721 {
"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
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},
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},
35732 {
"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
35734#if CYTHON_COMPILING_IN_LIMITED_API
35735 {
"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
35736 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
35738 {
"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
35744__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
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();
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},
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],
35773#if CYTHON_COMPILING_IN_LIMITED_API
35774#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
35776#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
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;
35785 if (unlikely(op == NULL))
35787#if CYTHON_COMPILING_IN_LIMITED_API
35788 op->func_methoddef = ml;
35790 op->func_module =
module;
35793 __Pyx_CyFunction_weakreflist(op) = NULL;
35794#if !CYTHON_COMPILING_IN_LIMITED_API
35796 cf->m_self = (PyObject *) op;
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;
35804#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
35805 op->func_dict = NULL;
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;
35814 ((PyCMethodObject*)op)->mm_class = NULL;
35816 op->func_globals = globals;
35817 Py_INCREF(op->func_globals);
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;
35828#if CYTHON_VECTORCALL
35829 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
35831 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
35834 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
35836 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
35837 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
35839 case METH_FASTCALL | METH_KEYWORDS:
35840 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
35842 case METH_VARARGS | METH_KEYWORDS:
35843 __Pyx_CyFunction_func_vectorcall(op) = NULL;
35846 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
35853static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
35855 Py_CLEAR(m->func_closure);
35856#if CYTHON_COMPILING_IN_LIMITED_API
35857 Py_CLEAR(m->func_module);
35859 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
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);
35866 PyObject_ClearManagedDict((PyObject*)m);
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);
35877 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
35878 ((PyCMethodObject *) (m))->mm_class = NULL;
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);
35888 Py_CLEAR(m->defaults);
35892__Pyx_CyFunction_clear(PyObject *m)
35894 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
35896static void __Pyx__CyFunction_dealloc(PyObject *m)
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);
35904static void __Pyx_CyFunction_dealloc(PyObject *m)
35906 PyObject_GC_UnTrack(m);
35907 __Pyx__CyFunction_dealloc(m);
35909static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit,
void *arg)
35911 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
35913 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
35916 Py_VISIT(m->func_closure);
35917#if CYTHON_COMPILING_IN_LIMITED_API
35918 Py_VISIT(m->func_module);
35920 Py_VISIT(((PyCFunctionObject*)m)->m_module);
35922#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
35923 Py_VISIT(m->func_dict);
35927#if PY_VERSION_HEX < 0x030d0000
35928 _PyObject_VisitManagedDict
35930 PyObject_VisitManagedDict
35932 ((PyObject*)m, visit, arg);
35933 if (e != 0)
return e;
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);
35948 Py_VISIT(m->defaults);
35952__Pyx_CyFunction_repr(PyObject *op_in)
35954 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
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();
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;
35968 PyCFunctionObject*
f = (PyCFunctionObject*)func;
35969 PyCFunction meth =
f->m_ml->ml_meth;
35970 int flags =
f->m_ml->ml_flags;
35973 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
35975 if (likely(kw == NULL || PyDict_Size(kw) == 0))
35976 return (*meth)(self, arg);
35978 case METH_VARARGS | METH_KEYWORDS:
35979 return (*(PyCFunctionWithKeywords)(
void(*)(
void))meth)(self, arg, kw);
35981 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
35982#if CYTHON_ASSUME_SAFE_SIZE
35983 size = PyTuple_GET_SIZE(arg);
35985 size = PyTuple_Size(arg);
35986 if (unlikely(size < 0))
return NULL;
35988 if (likely(size == 0))
35989 return (*meth)(self, NULL);
35990 __Pyx_CyFunction_raise_argument_count_error(
35992 "takes no arguments", size);
35997 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
35998#if CYTHON_ASSUME_SAFE_SIZE
35999 size = PyTuple_GET_SIZE(arg);
36001 size = PyTuple_Size(arg);
36002 if (unlikely(size < 0))
return NULL;
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);
36009 arg0 = __Pyx_PySequence_ITEM(arg, 0);
if (unlikely(!arg0))
return NULL;
36011 result = (*meth)(self, arg0);
36012 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
36017 __Pyx_CyFunction_raise_argument_count_error(
36019 "takes exactly one argument", size);
36024 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
36027 __Pyx_CyFunction_raise_type_error(
36028 func,
"takes no keyword arguments");
36031static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
36033 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
36036static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
36038 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36039#if CYTHON_VECTORCALL
36040 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
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);
36045 (void) &__Pyx_PyVectorcall_FastCallDict;
36046 return PyVectorcall_Call(func, args, kw);
36050 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
36052 PyObject *new_args;
36054#if CYTHON_ASSUME_SAFE_SIZE
36055 argc = PyTuple_GET_SIZE(args);
36057 argc = PyTuple_Size(args);
36058 if (unlikely(argc < 0))
return NULL;
36060 new_args = PyTuple_GetSlice(args, 1, argc);
36061 if (unlikely(!new_args))
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);
36071 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
36072 Py_DECREF(new_args);
36074 result = __Pyx_CyFunction_Call(func, args, kw);
36078#if CYTHON_VECTORCALL
36079static CYTHON_INLINE
int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
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");
36090 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
36091 __Pyx_CyFunction_raise_type_error(
36092 func,
"takes no keyword arguments");
36097static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36099 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36100 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36102#if CYTHON_COMPILING_IN_LIMITED_API
36103 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36104 if (unlikely(!meth))
return NULL;
36106 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36108 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
36120 if (unlikely(nargs != 0)) {
36121 __Pyx_CyFunction_raise_argument_count_error(
36122 func,
"takes no arguments", nargs);
36125 return meth(self, NULL);
36127static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36129 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36130 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36132#if CYTHON_COMPILING_IN_LIMITED_API
36133 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36134 if (unlikely(!meth))
return NULL;
36136 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36138 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
36150 if (unlikely(nargs != 1)) {
36151 __Pyx_CyFunction_raise_argument_count_error(
36152 func,
"takes exactly one argument", nargs);
36155 return meth(self, args[0]);
36157static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36159 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36160 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36162#if CYTHON_COMPILING_IN_LIMITED_API
36163 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36164 if (unlikely(!meth))
return NULL;
36166 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36168 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
36180 return ((__Pyx_PyCFunctionFastWithKeywords)(
void(*)(
void))meth)(self, args, nargs, kwnames);
36182static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36184 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
36185 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
36186 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36188#if CYTHON_COMPILING_IN_LIMITED_API
36189 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
36190 if (unlikely(!meth))
return NULL;
36192 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
36194 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
36206 #if PY_VERSION_HEX < 0x030e00A6
36207 size_t nargs_value = (size_t) nargs;
36209 Py_ssize_t nargs_value = nargs;
36211 return ((__Pyx_PyCMethod)(
void(*)(
void))meth)(self, cls, args, nargs_value, kwnames);
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},
36226static PyType_Spec __pyx_CyFunctionType_spec = {
36227 __PYX_TYPE_MODULE_PREFIX
"cython_function_or_method",
36228 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
36230#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
36231 Py_TPFLAGS_METHOD_DESCRIPTOR |
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 |
36240#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
36241 Py_TPFLAGS_MANAGED_DICT |
36243 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
36244 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
36245 __pyx_CyFunctionType_slots
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)) {
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
36266 PyObject_GC_Track(op);
36270static PyTypeObject *__Pyx_Get_CyFunction_Type(
void) {
36271 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
36272 Py_INCREF((PyObject*)tp);
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))
36289 PyObject *py_slice, *py_start, *py_stop;
36291 py_slice = *_py_slice;
36293 PyObject* owned_start = NULL;
36294 PyObject* owned_stop = NULL;
36296 py_start = *_py_start;
36299 owned_start = py_start = PyLong_FromSsize_t(cstart);
36300 if (unlikely(!py_start))
goto bad;
36302 py_start = Py_None;
36305 py_stop = *_py_stop;
36308 owned_stop = py_stop = PyLong_FromSsize_t(cstop);
36309 if (unlikely(!py_stop)) {
36310 Py_XDECREF(owned_start);
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;
36321#if CYTHON_USE_TYPE_SLOTS
36322 result = mp->mp_subscript(obj, py_slice);
36324 result = PyObject_GetItem(obj, py_slice);
36327 Py_DECREF(py_slice);
36331 __Pyx_RaiseTypeErrorWithObjectType(
36332 "'" __Pyx_FMT_TYPENAME
"' object is unsliceable", obj);
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};
36346 opname[op[1] ? 2 : 1] =
'=';
36348 __Pyx_RaiseErrorWithObjectTypes1(
36350 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
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)) {
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;
36367 int_op2 = PyLong_AsDouble(op2);
36368 if (unlikely((int_op2 == -1.) && PyErr_Occurred()))
return NULL;
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;
36374 if (float_op1 == 0.)
return __Pyx_NewRef(op1);
36375 return PyFloat_FromDouble(float_op1 * int_op2);
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);
36383 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
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)) {
36394 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
36398 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
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)) {
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;
36414 int_op1 = PyLong_AsDouble(op1);
36415 if (unlikely((int_op1 == -1.) && PyErr_Occurred()))
return NULL;
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;
36421 return PyFloat_FromDouble(int_op1 * float_op2);
36423 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
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)) {
36434 ssizeargfunc repeat_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_sequence, sq_repeat, ssizeargfunc);
36435 if (likely(repeat_func)) {
36437 #if CYTHON_USE_PYLONG_INTERNALS
36438 if (__Pyx_PyLong_IsCompact(op1)) {
36439 count = __Pyx_PyLong_CompactValue(op1);
36443 count = PyLong_AsSsize_t(op1);
36444 if (unlikely((count == -1) && PyErr_Occurred()))
return NULL;
36446 return repeat_func(op2, count);
36448 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
36452 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
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;
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;
36467 return PyFloat_FromDouble(float_op1 * float_op2);
36469 return __Pyx_PyNumber_Multiply_xfloat_object(op1, op2, inplace);
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);
36483 else if (__Pyx_PyLong_IsZero(op2))
return __Pyx_NewRef(op2);
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);
36490 return __Pyx_PyNumber_Multiply_xint_object(op1, op2, inplace);
36492 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
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};
36504 opname[op[1] ? 2 : 1] =
'=';
36506 __Pyx_RaiseErrorWithObjectTypes1(
36508 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
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)) {
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;
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);
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;
36536 return PyFloat_FromDouble(float_op1 + int_op2);
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);
36544 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
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)) {
36555 __Pyx_BinopTypeError(op1, op2,
"+", inplace);
36559 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
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)) {
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;
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);
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;
36586 return PyFloat_FromDouble(int_op1 + float_op2);
36588 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
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)) {
36599 __Pyx_BinopTypeError(op1, op2,
"+", inplace);
36603 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
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;
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;
36618 return PyFloat_FromDouble(float_op1 + float_op2);
36620 return __Pyx_PyNumber_Add_xfloat_object(op1, op2, inplace);
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);
36634 else if (__Pyx_PyLong_IsZero(op2))
return __Pyx_NewRef(op1);
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);
36641 return __Pyx_PyNumber_Add_xint_object(op1, op2, inplace);
36643 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
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;
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;
36660 if (unlikely(!isfinite(float_op2))) {
36661 if (0.0 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
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;
36668 if (sign1 > 0)
goto __pyx_return_false;
36669 if (float_op2 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
36673 if (unlikely(!isfinite(float_op2))) {
36674 if (0.0 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
36677 long iop1 = PyLong_AsLongAndOverflow(op1, &overflow1);
36678 if (likely(!overflow1)) {
36679 if ((
long long) iop1 >= (1LL << 53)) {
36681 }
else if ((
long long) iop1 <= - (1LL << 53)) {
36684 if (((
double) iop1) < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
36687 if (overflow1 < 0) {
36688 if (float_op2 > ((
double) (1LL << 53)))
goto __pyx_return_true;
36690 if (float_op2 < - ((
double) (1LL << 53)))
goto __pyx_return_false;
36694 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
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);
36707 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
36709 const digit* digits1 = __Pyx_PyLong_Digits(op1);
36710 const digit* digits2 = __Pyx_PyLong_Digits(op2);
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]));
36716 for (Py_ssize_t i=size-1; i >= 0 && !cmp; --i) {
36717 cmp = (Py_ssize_t) digits1[i] - (Py_ssize_t) digits2[i];
36721 if (cmp == 0)
goto __pyx_return_false;
36722 if (__Pyx_PyLong_IsNeg(op1)) cmp = -cmp;
36724 if (cmp < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
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;
36734 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
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;
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);
36754 if (PyFloat_CheckExact(op2)) {
36755 return __Pyx_PyObject_CompareIntFloatBoolLt(op1, op2);
36757 goto __pyx_richcmp;
36759 if ((0))
goto __pyx_richcmp;
36760 if ((0))
goto __pyx_return_true;
36761 if ((0))
goto __pyx_return_false;
36763 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
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);
36776 newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
36777 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
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);
36788 return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
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)) {
36798 args[args_size+i] = value;
36800 if (unlikely(__Pyx_PyTuple_SET_ITEM(kwnames, i, key) == -1)) {
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;
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;
36819#if CYTHON_ASSUME_SAFE_MACROS
36821 return f(o, &PyTuple_GET_ITEM(a, 0), a_size, NULL);
36824 if (k_size == 0 && a_size == 0) {
36825 return f(o, NULL, 0, NULL);
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) {
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)) {
36843 PyObject * result = NULL;
36844 PyObject *kwnames = NULL;
36845 int unpack_dict_result;
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;
36853#if !CYTHON_ASSUME_SAFE_MACROS
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;
36864 result =
f(o, args, a_size, kwnames);
36866 Py_XDECREF(kwnames);
36867 for (i=a_size; i<total_size; ++i) {
36868 Py_XDECREF(args[i]);
36870 if (args != stack_args) {
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);
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)) {
36894 kwds_dict = __Pyx_PyDict_NewPresized(kw_size);
36895 if (unlikely(!kwds_dict)) {
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)) {
36906 if (unlikely(PyDict_SetItem(kwds_dict, k,
v) < 0)) {
36912 args_tuple = __Pyx_PyTuple_FromArray(args, nargs);
36913 if (unlikely(!args_tuple)) {
36917 args_tuple = __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
36919 result = tp_new(t, args_tuple, kwds_dict);
36920 if (unlikely(!result)) {
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)) {
36930 Py_XDECREF(args_tuple);
36931 Py_XDECREF(kwds_dict);
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;
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;
36947#if CYTHON_ASSUME_SAFE_MACROS
36949 return f(o, &PyTuple_GET_ITEM(a, 0), a_size, NULL);
36952 if (k_size == 0 && a_size == 0) {
36953 return f(o, NULL, 0, NULL);
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) {
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)) {
36972 PyObject *kwnames = NULL;
36973 int unpack_dict_result;
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;
36981#if !CYTHON_ASSUME_SAFE_MACROS
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;
36992 result =
f(o, args, a_size, kwnames);
36994 Py_XDECREF(kwnames);
36995 for (i=a_size; i<total_size; ++i) {
36996 Py_XDECREF(args[i]);
36998 if (args != stack_args) {
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);
37012 return PyObject_CallMethodNoArgs(obj, method_name);
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)) {
37028 "'type' doesn't have a dictoffset");
37030 }
else if (unlikely(require_cython_valid_result && tp_dictoffset < 0)) {
37033 "'type' has an unexpected negative dictoffset. "
37034 "Please report this as Cython bug");
37037 return tp_dictoffset;
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) {
37045#if CYTHON_ASSUME_SAFE_SIZE
37046 n = PyTuple_GET_SIZE(bases);
37048 n = PyTuple_Size(bases);
37049 if (unlikely(
n < 0))
return -1;
37051 if (!has_dictoffset) {
37053#if CYTHON_AVOID_BORROWED_REFS
37054 b = PySequence_GetItem(bases, 0);
37056#elif CYTHON_ASSUME_SAFE_MACROS
37057 b = PyTuple_GET_ITEM(bases, 0);
37059 b = PyTuple_GetItem(bases, 0);
37062#if CYTHON_USE_TYPE_SLOTS
37063 has_dictoffset = ((PyTypeObject*)b)->tp_dictoffset != 0;
37065 Py_ssize_t dictoffset = __Pyx_GetTypeDictOffset(b, 0);
37066 has_dictoffset = dictoffset != 0;
37068#if CYTHON_AVOID_BORROWED_REFS
37071#if !CYTHON_USE_TYPE_SLOTS
37072 if (dictoffset == -1 && PyErr_Occurred())
return -1;
37075 for (i = 1; i <
n; i++)
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);
37084 PyObject *b0 = PyTuple_GetItem(bases, i);
37085 if (!b0)
return -1;
37087 b = (PyTypeObject*) b0;
37088 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
37090 __Pyx_RaiseErrorWithType(
37091 PyExc_TypeError,
"base class '" __Pyx_FMT_TYPENAME
"' is not a heap type", b);
37092#if CYTHON_AVOID_BORROWED_REFS
37097 if (!has_dictoffset)
37099 Py_ssize_t b_dictoffset = 0;
37100#if CYTHON_USE_TYPE_SLOTS
37101 b_dictoffset = b->tp_dictoffset;
37103 b_dictoffset = __Pyx_GetTypeDictOffset((PyObject*)b, 0);
37104 if (b_dictoffset == -1 && PyErr_Occurred())
goto dictoffset_return;
37106 if (b_dictoffset) {
37107 __Pyx_RaiseErrorWithType1(
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",
37114#if !CYTHON_USE_TYPE_SLOTS
37117#if CYTHON_AVOID_BORROWED_REFS
37123#if CYTHON_AVOID_BORROWED_REFS
37132CYTHON_UNUSED
static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
37134 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
37138 t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
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;
37148 return PyType_Ready(t);
37151 if (!__Pyx_PyType_HasMultipleInheritance(t)) {
37152 return PyType_Ready(t);
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))
37158 int gc_was_enabled;
37159 #if PY_VERSION_HEX >= 0x030A00b1
37160 gc_was_enabled = PyGC_Disable();
37161 (void)__Pyx_PyObject_CallMethod0;
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);
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)) {
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)) {
37185 }
else if (unlikely(gc_was_enabled == -1)) {
37190 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
37191#if PY_VERSION_HEX >= 0x030A0000
37192 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
37194 r = PyType_Ready(t);
37195 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
37196 #if PY_VERSION_HEX >= 0x030A00b1
37197 if (gc_was_enabled)
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)) {
37206 PyErr_Restore(tp,
v, tb);
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())) {
37232 return *(PyObject**)((
char*)tp + tp_dictoffset);
37237static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
37240#if CYTHON_COMPILING_IN_LIMITED_API
37241 tp_dict = __Pyx_GetTypeTypeDict(tp);
37242 if (unlikely(!tp_dict))
return -1;
37244 tp_dict = tp->tp_dict;
37246 result = PyDict_DelItem(tp_dict, k);
37247 if (likely(!result)) PyType_Modified(tp);
37252static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *
v) {
37255#if CYTHON_COMPILING_IN_LIMITED_API
37256 tp_dict = __Pyx_GetTypeTypeDict(tp);
37257 if (unlikely(!tp_dict))
return -1;
37259 tp_dict = tp->tp_dict;
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);
37274static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
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);
37283 if (unlikely(ret < 0) && __Pyx_IgnoreException(PyExc_Exception)) {
37286 Py_XDECREF(name_attr);
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);
37294 if (allow_not_present) {
37295 return __Pyx_PyObject_GetAttrStrNoError(type_obj, name);
37297 return __Pyx_PyObject_GetAttrStr(type_obj, name);
37301static int __Pyx_setup_reduce(PyObject* type_obj) {
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()) {
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()) {
37321 if (object_getstate != getstate) {
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)) {
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()) {
37347 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
37348 int try_to_replace_setstate;
37350 PyObject *exc = PyErr_Occurred();
37351 if (exc && !__Pyx_IgnoreGivenException(exc, PyExc_Exception)) {
37354 try_to_replace_setstate = 1;
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)) {
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()) {
37370 PyType_Modified((PyTypeObject*)type_obj);
37375 if (!PyErr_Occurred()) {
37376 __Pyx_RaiseErrorWithType(
37377 PyExc_RuntimeError,
37378 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME,
37379 (PyTypeObject*)type_obj);
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);
37389 Py_XDECREF(reduce);
37390 Py_XDECREF(reduce_ex);
37391 Py_XDECREF(reduce_cython);
37392 Py_XDECREF(setstate);
37393 Py_XDECREF(setstate_cython);
37398static int __Pyx_GetVtable(PyTypeObject *type,
void** table) {
37401#if CYTHON_COMPILING_IN_LIMITED_API
37402 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
37404 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
37408 ptr = PyCapsule_GetPointer(ob, 0);
37409 if (!ptr && !PyErr_Occurred())
37410 PyErr_SetString(PyExc_RuntimeError,
"invalid vtable found for imported type");
37415 if (PyErr_ExceptionMatches(CYTHON_COMPILING_IN_LIMITED_API ? PyExc_AttributeError : PyExc_KeyError)) {
37423static int __Pyx_MergeVtables(PyTypeObject *type) {
37426 void** base_vtables;
37427 void* unknown = (
void*)-1;
37428 PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
37429 int base_depth = 0;
37431 PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
37434 base = __Pyx_PyType_TryGetSlot(base, tp_base, PyTypeObject*);
37437 base_vtables = (
void**) PyMem_Malloc(
sizeof(
void*) * (
size_t)(base_depth + 1));
37438 if (unlikely(!base_vtables)) {
37442 base_vtables[0] = unknown;
37443#if CYTHON_COMPILING_IN_LIMITED_API
37444 size = PyTuple_Size(bases);
37445 if (size < 0)
goto other_failure;
37447 size = PyTuple_GET_SIZE(bases);
37449 for (i = 1; i < size; i++) {
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;
37459 basei = PyTuple_GET_ITEM(bases, i);
37461 int get_vtable_result = __Pyx_GetVtable((PyTypeObject*)basei, &base_vtable);
37462#if CYTHON_AVOID_BORROWED_REFS
37465 if (get_vtable_result != 1) {
37466 if (get_vtable_result == -1) {
37467 goto other_failure;
37471 assert(base_vtable != NULL);
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;
37477 for (j = 0; j < base_depth; j++) {
37478 if (base_vtables[j] == unknown) {
37479 switch (__Pyx_GetVtable(base, &base_vtables[j])) {
37481 assert(base_vtables[j] == NULL);
37487 goto other_failure;
37489 base_vtables[j + 1] = unknown;
37491 if (base_vtables[j] == base_vtable) {
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;
37501 PyMem_Free(base_vtables);
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;
37514 basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
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
37523 PyMem_Free(base_vtables);
37528static int __Pyx_SetVtable(PyTypeObject *type,
void *vtable) {
37529 PyObject *ob = PyCapsule_New(vtable, 0, 0);
37532#if CYTHON_COMPILING_IN_LIMITED_API
37533 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
37535 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
37539 return __Pyx_MergeVtables(type);
37546#if CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_PYPY && CYTHON_USE_TYPE_SPECS)
37547int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp,
int is_sequence) {
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);
37556 if (unlikely(!register_result))
return -1;
37557 Py_DECREF(register_result);
37560#elif CYTHON_COMPILING_IN_PYPY
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",
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)
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;
37585 result = PyObject_GetAttrString(module, class_name);
37588 if (!PyType_Check(result)) {
37589 PyErr_Format(PyExc_TypeError,
37590 "%.200s.%.200s is not a type object",
37591 module_name, class_name);
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;
37599 return (PyTypeObject *)result;
37601 py_basicsize = PyObject_GetAttrString(result,
"__basicsize__");
37604 basicsize = PyLong_AsSsize_t(py_basicsize);
37605 Py_DECREF(py_basicsize);
37607 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
37609 py_itemsize = PyObject_GetAttrString(result,
"__itemsize__");
37612 itemsize = PyLong_AsSsize_t(py_itemsize);
37613 Py_DECREF(py_itemsize);
37615 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
37619 if (size % alignment) {
37620 alignment = size % alignment;
37622 if (itemsize < (Py_ssize_t)alignment)
37623 itemsize = (Py_ssize_t)alignment;
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);
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);
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) {
37648 return (PyTypeObject *)result;
37650 Py_XDECREF(result);
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);
37662PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
37663 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
37664 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
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)) {
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))
37682 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
37685 Py_XDECREF(use_cline);
37686 Py_XDECREF(cython_runtime_dict);
37687 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
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) {
37698 while (start < end) {
37699 mid = start + (end - start) / 2;
37700 if (code_line < entries[mid].code_line) {
37702 }
else if (code_line > entries[mid].code_line) {
37708 if (code_line <= entries[mid].code_line) {
37714static __Pyx_CachedCodeObjectType *__pyx__find_code_object(
struct __Pyx_CodeObjectCache *code_cache,
int code_line) {
37715 __Pyx_CachedCodeObjectType* code_object;
37717 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
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)) {
37724 code_object = code_cache->entries[pos].code_object;
37725 Py_INCREF(code_object);
37726 return code_object;
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;
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);
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);
37748static void __pyx__insert_code_object(
struct __Pyx_CodeObjectCache *code_cache,
int code_line, __Pyx_CachedCodeObjectType* code_object)
37751 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
37752 if (unlikely(!code_line)) {
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);
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);
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)) {
37782 code_cache->entries = entries;
37783 code_cache->max_count = new_max;
37785 for (i=code_cache->count; i>pos; i--) {
37786 entries[i] = entries[i-1];
37788 entries[pos].code_line = code_line;
37789 entries[pos].code_object = code_object;
37790 code_cache->count++;
37791 Py_INCREF(code_object);
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;
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)) {
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);
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
37820 #include "internal/pycore_frame.h"
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);
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;
37843 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
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;
37853 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
37855 py_funcname = PyUnicode_FromString(funcname);
37857 if (unlikely(!py_funcname))
goto bad;
37858 dict = PyDict_New();
37859 if (unlikely(!dict))
goto bad;
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);
37865 if (unlikely(!code_object))
goto bad;
37866 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
37868 dict = PyDict_New();
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;
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);
37882 Py_XDECREF(replace);
37885 (
struct _frame*)frame);
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;
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;
37901 py_code = PyCode_NewEmpty(filename, funcname, py_line);
37902 Py_XDECREF(py_funcname);
37905 Py_XDECREF(py_funcname);
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;
37915 c_line = __Pyx_CLineForTraceback(tstate, c_line);
37917 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
37919 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
37920 py_code = __Pyx_CreateCodeObjectForTraceback(
37921 funcname, c_line, py_line, filename);
37926 Py_XDECREF(pvalue);
37927 Py_XDECREF(ptraceback);
37930 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
37931 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
37933 py_frame = PyFrame_New(
37936 __pyx_mstate_global->__pyx_d,
37939 if (!py_frame)
goto bad;
37940 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
37941 PyTraceBack_Here(py_frame);
37943 Py_XDECREF(py_code);
37944 Py_XDECREF(py_frame);
37950#ifndef _Py_NO_RETURN
37951#define _Py_NO_RETURN
37954static void __pyx_fatalerror(
const char *fmt, ...) {
37957#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
37958 va_start(vargs, fmt);
37962 vsnprintf(msg, 200, fmt, vargs);
37964 Py_FatalError(msg);
37966static CYTHON_INLINE
int
37967__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
37968 PyThread_type_lock lock)
37971 PyThread_acquire_lock(lock, 1);
37972 result = (*acquisition_count)++;
37973 PyThread_release_lock(lock);
37976static CYTHON_INLINE
int
37977__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
37978 PyThread_type_lock lock)
37981 PyThread_acquire_lock(lock, 1);
37982 result = (*acquisition_count)--;
37983 PyThread_release_lock(lock);
37986static CYTHON_INLINE
void
37987__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice,
int have_gil,
int lineno)
37989 __pyx_nonatomic_int_type old_acquisition_count;
37990 struct __pyx_memoryview_obj *memview = memslice->memview;
37991 if (unlikely(!memview || (PyObject *) memview == Py_None)) {
37994 old_acquisition_count = __pyx_add_acquisition_count(memview);
37995 if (unlikely(old_acquisition_count <= 0)) {
37996 if (likely(old_acquisition_count == 0)) {
37998 Py_INCREF((PyObject *) memview);
38000 PyGILState_STATE _gilstate = PyGILState_Ensure();
38001 Py_INCREF((PyObject *) memview);
38002 PyGILState_Release(_gilstate);
38005 __pyx_fatalerror(
"Acquisition count is %d (line %d)",
38006 old_acquisition_count+1, lineno);
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;
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)) {
38024 Py_CLEAR(memslice->memview);
38026 PyGILState_STATE _gilstate = PyGILState_Ensure();
38027 Py_CLEAR(memslice->memview);
38028 PyGILState_Release(_gilstate);
38031 __pyx_fatalerror(
"Acquisition count is %d (line %d)",
38032 old_acquisition_count-1, lineno);
38038__pyx_memviewslice_is_contig(
const __Pyx_memviewslice mvs,
char order,
int ndim)
38040 int i, index, step, start;
38041 Py_ssize_t itemsize = mvs.memview->view.itemsize;
38042 if (order ==
'F') {
38049 for (i = 0; i < ndim; i++) {
38050 index = start + step * i;
38051 if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
38053 itemsize *= mvs.shape[index];
38060__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
38061 void **out_start,
void **out_end,
38062 int ndim,
size_t itemsize)
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];
38071 *out_start = *out_end = start;
38075 end += stride * (extent - 1);
38077 start += stride * (extent - 1);
38080 *out_start = start;
38081 *out_end = end + itemsize;
38084__pyx_slices_overlap(__Pyx_memviewslice *slice1,
38085 __Pyx_memviewslice *slice2,
38086 int ndim,
size_t itemsize)
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);
38096__Pyx_init_memviewslice(
struct __pyx_memoryview_obj *memview,
38098 __Pyx_memviewslice *memviewslice,
38099 int memview_is_new_reference)
38101 __Pyx_RefNannyDeclarations
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!");
38110 if (buf->strides) {
38111 for (i = 0; i < ndim; i++) {
38112 memviewslice->strides[i] = buf->strides[i];
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];
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];
38126 memviewslice->suboffsets[i] = -1;
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);
38137 memviewslice->memview = 0;
38138 memviewslice->data = 0;
38141 __Pyx_RefNannyFinishContext();
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);
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,
38162 if (unlikely(!(0 <= start && start < shape))) {
38163 __pyx_memoryview_slice_memviewslice_err_dim(PyExc_IndexError,
"Index out of bounds (axis %d)", dim);
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);
38184 }
else if (start >= shape) {
38185 start = negative_step ? (shape - 1) : shape;
38188 start = negative_step ? (shape - 1) : 0;
38196 }
else if (stop > shape) {
38200 stop = negative_step ? -1 : shape;
38202 Py_ssize_t new_shape = (stop - start) / step;
38203 if ((stop - start) - step * new_shape) {
38206 if (new_shape < 0) {
38209 dst->strides[new_ndim] = stride * step;
38210 dst->shape[new_ndim] = new_shape;
38211 dst->suboffsets[new_ndim] = suboffset;
38213 if (suboffset_dim[0] < 0) {
38214 dst->data += start * stride;
38216 dst->suboffsets[suboffset_dim[0]] += start * stride;
38218 if (suboffset >= 0) {
38220 if (likely(new_ndim == 0)) {
38221 dst->data = ((
char **)(dst->data))[0] + suboffset;
38223 __pyx_memoryview_slice_memviewslice_err_dim(
38225 "All dimensions preceding dimension %d must be indexed and not sliced",
38230 suboffset_dim[0] = new_ndim;
38237static CYTHON_INLINE PyObject *__pyx_memview_get_double(
const char *itemp) {
38238 return (PyObject *) PyFloat_FromDouble(*(
double const *) itemp);
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()))
38244 *(
double *) itemp = value;
38249static CYTHON_INLINE
int __Pyx_Is_Little_Endian(
void)
38255 S.u32 = 0x01020304;
38256 return S.u8[0] == 4;
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;
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;
38277 ctx->is_complex = 0;
38278 ctx->is_valid_array = 0;
38279 ctx->struct_alignment = 0;
38280 while (type->typegroup ==
'S') {
38282 ctx->head->field = type->fields;
38283 ctx->head->parent_offset = 0;
38284 type = type->fields->type;
38287static int __Pyx_BufFmt_ParseNumber(
const char** ts) {
38289 const char* t = *ts;
38290 if (*t <
'0' || *t >
'9') {
38293 count = *t++ -
'0';
38294 while (*t >=
'0' && *t <=
'9') {
38296 count += *t++ -
'0';
38302static int __Pyx_BufFmt_ExpectNumber(
const char **ts) {
38303 int number = __Pyx_BufFmt_ParseNumber(ts);
38305 PyErr_Format(PyExc_ValueError,\
38306 "Does not understand character buffer dtype format string ('%c')", **ts);
38309static void __Pyx_BufFmt_RaiseUnexpectedChar(
char ch) {
38310 PyErr_Format(PyExc_ValueError,
38311 "Unexpected format string character: '%c'", ch);
38313static const char* __Pyx_BufFmt_DescribeTypeChar(
char ch,
int is_complex) {
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";
38338static size_t __Pyx_BufFmt_TypeCharToStandardSize(
char ch,
int is_complex) {
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);
38347 PyErr_SetString(PyExc_ValueError,
"Python does not define a standard format string size for long double ('g')..");
38350 case 'O':
case 'P':
return sizeof(
void*);
38352 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38356static size_t __Pyx_BufFmt_TypeCharToNativeSize(
char ch,
int is_complex) {
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*);
38368 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
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);
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*);
38394 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
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);
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*);
38423 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38427static char __Pyx_BufFmt_TypeCharToGroup(
char ch,
int is_complex) {
38431 case 'b':
case 'h':
case 'i':
38432 case 'l':
case 'q':
case 's':
case 'p':
38434 case '?':
case 'B':
case 'H':
case 'I':
case 'L':
case 'Q':
38436 case 'f':
case 'd':
case 'g':
38437 return (is_complex ?
'C' :
'R');
38443 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38448static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
38449 if (ctx->head == NULL || ctx->head->field == &ctx->root) {
38450 const char* expected;
38452 if (ctx->head == NULL) {
38456 expected = ctx->head->field->type->name;
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));
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);
38472static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
38474 size_t size, offset, arraysize = 1;
38475 if (ctx->enc_type == 0)
return 0;
38476 if (ctx->head->field->type->arraysize[0]) {
38478 if (ctx->enc_type ==
's' || ctx->enc_type ==
'p') {
38479 ctx->is_valid_array = ctx->head->field->type->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);
38488 if (!ctx->is_valid_array) {
38489 PyErr_Format(PyExc_ValueError,
"Expected %d dimensions, got %d",
38490 ctx->head->field->type->ndim, ndim);
38493 for (i = 0; i < ctx->head->field->type->ndim; i++) {
38494 arraysize *= ctx->head->field->type->arraysize[i];
38496 ctx->is_valid_array = 0;
38497 ctx->enc_count = 1;
38499 group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
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);
38506 size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
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,
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;
38522 ctx->head->field = type->fields;
38523 ctx->head->parent_offset = parent_offset;
38526 if ((type->typegroup ==
'H' || group ==
'H') && type->size == size) {
38528 __Pyx_BufFmt_RaiseExpected(ctx);
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);
38539 ctx->fmt_offset += size;
38541 ctx->fmt_offset += (arraysize - 1) * size;
38544 if (field == &ctx->root) {
38546 if (ctx->enc_count != 0) {
38547 __Pyx_BufFmt_RaiseExpected(ctx);
38552 ctx->head->field = ++field;
38553 if (field->type == NULL) {
38555 field = ctx->head->field;
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;
38562 ctx->head->field = field;
38563 ctx->head->parent_offset = parent_offset;
38569 }
while (ctx->enc_count);
38571 ctx->is_complex = 0;
38575__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx,
const char** tsp)
38577 const char *ts = *tsp;
38578 int i = 0,
number, ndim;
38580 if (ctx->new_count != 1) {
38581 PyErr_SetString(PyExc_ValueError,
38582 "Cannot handle repeated arrays in format string");
38585 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return -1;
38586 ndim = ctx->head->field->type->ndim;
38587 while (*ts && *ts !=
')') {
38589 case ' ':
case '\f':
case '\r':
case '\n':
case '\t':
case '\v':
continue;
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);
38600 if (*ts !=
',' && *ts !=
')') {
38601 PyErr_Format(PyExc_ValueError,
38602 "Expected a comma in format string, got '%c'", *ts);
38605 if (*ts ==
',') ts++;
38609 PyErr_Format(PyExc_ValueError,
"Expected %d dimension(s), got %d",
38610 ctx->head->field->type->ndim, i);
38614 PyErr_SetString(PyExc_ValueError,
38615 "Unexpected end of format string, expected ')'");
38618 ctx->is_valid_array = 1;
38619 ctx->new_count = 1;
38623static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx,
const char* ts) {
38628 if (ctx->enc_type != 0 && ctx->head == NULL) {
38629 __Pyx_BufFmt_RaiseExpected(ctx);
38632 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
38633 if (ctx->head != NULL) {
38634 __Pyx_BufFmt_RaiseExpected(ctx);
38644 if (!__Pyx_Is_Little_Endian()) {
38645 PyErr_SetString(PyExc_ValueError,
"Little-endian buffer not supported on big-endian compiler");
38648 ctx->new_packmode =
'=';
38653 if (__Pyx_Is_Little_Endian()) {
38654 PyErr_SetString(PyExc_ValueError,
"Big-endian buffer not supported on little-endian compiler");
38657 ctx->new_packmode =
'=';
38663 ctx->new_packmode = *ts++;
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;
38672 if (*ts !=
'\x7B') {
38673 PyErr_SetString(PyExc_ValueError,
"Buffer acquisition: Expected '\x7B' after 'T'");
38676 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
38678 ctx->enc_count = 0;
38679 ctx->struct_alignment = 0;
38682 for (i = 0; i != struct_count; ++i) {
38683 ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
38684 if (!ts_after_sub)
return NULL;
38687 if (struct_alignment) ctx->struct_alignment = struct_alignment;
38692 size_t alignment = ctx->struct_alignment;
38694 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
38696 if (alignment && ctx->fmt_offset % alignment) {
38697 ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
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;
38707 ctx->enc_packmode = ctx->new_packmode;
38713 if (*ts !=
'f' && *ts !=
'd' && *ts !=
'g') {
38714 __Pyx_BufFmt_RaiseUnexpectedChar(
'Z');
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;
38730 CYTHON_FALLTHROUGH;
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;
38738 ctx->new_count = 1;
38743 while(*ts !=
':') ++ts;
38747 if (__pyx_buffmt_parse_array(ctx, &ts) < 0)
return NULL;
38751 int number = __Pyx_BufFmt_ExpectNumber(&ts);
38752 if (
number == -1)
return NULL;
38753 ctx->new_count = (size_t)
number;
38761__pyx_typeinfo_cmp(
const __Pyx_TypeInfo *a,
const __Pyx_TypeInfo *b)
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;
38777 for (i = 0; i < a->ndim; i++)
38778 if (a->arraysize[i] != b->arraysize[i])
38781 if (a->typegroup ==
'S') {
38782 if (a->flags != b->flags)
38784 if (a->fields || b->fields) {
38785 if (!(a->fields && b->fields))
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))
38794 return !a->fields[i].type && !b->fields[i].type;
38802__pyx_check_strides(Py_buffer *buf,
int dim,
int ndim,
int spec)
38804 if (buf->shape[dim] <= 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);
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.");
38822 if (spec & __Pyx_MEMVIEW_FOLLOW) {
38823 Py_ssize_t stride = buf->strides[dim];
38826 if (unlikely(stride < buf->itemsize)) {
38827 PyErr_SetString(PyExc_ValueError,
38828 "Buffer and memoryview are not contiguous "
38829 "in the same dimension.");
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);
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);
38844 }
else if (unlikely(buf->suboffsets)) {
38845 PyErr_SetString(PyExc_ValueError,
38846 "Buffer exposes suboffsets but no strides");
38855__pyx_check_suboffsets(Py_buffer *buf,
int dim,
int ndim,
int spec)
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);
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);
38879__pyx_verify_contig(Py_buffer *buf,
int ndim,
int c_or_f_flag)
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.");
38890 stride = stride * buf->shape[i];
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.");
38900 stride = stride * buf->shape[i];
38907static int __Pyx_ValidateAndInit_memviewslice(
38912 const __Pyx_TypeInfo *dtype,
38913 __Pyx_BufFmt_StackElem stack[],
38914 __Pyx_memviewslice *memviewslice,
38915 PyObject *original_obj)
38917 struct __pyx_memoryview_obj *memview, *new_memview;
38918 __Pyx_RefNannyDeclarations
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;
38929 memview = (
struct __pyx_memoryview_obj *) __pyx_memoryview_new(
38930 original_obj, buf_flags, 0, dtype);
38931 new_memview = memview;
38932 if (unlikely(!memview))
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)",
38943 __Pyx_BufFmt_Init(&ctx, stack, dtype);
38944 if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format)))
goto fail;
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)",
38951 (buf->itemsize > 1) ?
"s" :
"",
38954 (dtype->size > 1) ?
"s" :
"");
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)))
38962 if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
38965 if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
38968 if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
38969 new_memview != NULL) == -1)) {
38975 Py_XDECREF((PyObject*)new_memview);
38978 __Pyx_RefNannyFinishContext();
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) };
38988 if (obj == Py_None) {
38989 result.memview = (
struct __pyx_memoryview_obj *) Py_None;
38992 retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
38993 PyBUF_RECORDS_RO | writable_flag, 1,
38994 &__Pyx_TypeInfo_double, stack,
38996 if (unlikely(retcode == -1))
39000 result.memview = NULL;
39001 result.data = NULL;
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)\
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;\
39021 goto raise_overflow;\
39024 return (target_type) value;\
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);
39035 return PyObject_CallMethodOneArg(obj, method_name, arg);
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);
39053 PyErr_Format(pickle_error,
"Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))",
39054 checksum, checksum1, checksum2, checksum3, members);
39056 Py_DECREF(pickle_error);
39060#if CYTHON_CCOMPLEX && (1) && (!0 || __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);
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;
39071 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
39072 __pyx_t_float_complex
z;
39080#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
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);
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;
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;
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;
39104 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
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);
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);
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);
39124 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39126 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
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);
39135 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
39136 __pyx_t_float_complex
z;
39141 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
39142 return (a.real == 0) && (a.imag == 0);
39144 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
39145 __pyx_t_float_complex
z;
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);
39155 return hypotf(
z.real,
z.imag);
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) {
39163 float denom = a.real * a.real + a.imag * a.imag;
39164 a.real = a.real / denom;
39165 a.imag = -a.imag / denom;
39168 switch ((
int)b.real) {
39176 return __Pyx_c_prod_float(a, a);
39178 z = __Pyx_c_prod_float(a, a);
39179 return __Pyx_c_prod_float(
z, a);
39181 z = __Pyx_c_prod_float(a, a);
39182 return __Pyx_c_prod_float(
z,
z);
39188 }
else if ((b.imag == 0) && (a.real >= 0)) {
39189 z.real = powf(a.real, b.real);
39192 }
else if (a.real > 0) {
39197 theta = atan2f(0.0, -1.0);
39200 r = __Pyx_c_abs_float(a);
39201 theta = atan2f(a.imag, a.real);
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);
39214#if CYTHON_CCOMPLEX && (1) && (!0 || __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);
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;
39225 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
39226 __pyx_t_double_complex
z;
39234#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
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);
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;
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;
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;
39258 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
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);
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);
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);
39278 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39280 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
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);
39289 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
39290 __pyx_t_double_complex
z;
39295 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
39296 return (a.real == 0) && (a.imag == 0);
39298 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
39299 __pyx_t_double_complex
z;
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);
39309 return hypot(
z.real,
z.imag);
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) {
39317 double denom = a.real * a.real + a.imag * a.imag;
39318 a.real = a.real / denom;
39319 a.imag = -a.imag / denom;
39322 switch ((
int)b.real) {
39330 return __Pyx_c_prod_double(a, a);
39332 z = __Pyx_c_prod_double(a, a);
39333 return __Pyx_c_prod_double(
z, a);
39335 z = __Pyx_c_prod_double(a, a);
39336 return __Pyx_c_prod_double(
z,
z);
39342 }
else if ((b.imag == 0) && (a.real >= 0)) {
39343 z.real = pow(a.real, b.real);
39346 }
else if (a.real > 0) {
39351 theta = atan2(0.0, -1.0);
39354 r = __Pyx_c_abs_double(a);
39355 theta = atan2(a.imag, a.real);
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);
39368#if CYTHON_CCOMPLEX && (1) && (!0 || __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);
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;
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;
39388#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
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);
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;
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;
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;
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) {
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);
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);
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);
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) {
39434 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
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);
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;
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);
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;
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);
39463 return hypotl(
z.real,
z.imag);
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) {
39471 long double denom = a.real * a.real + a.imag * a.imag;
39472 a.real = a.real / denom;
39473 a.imag = -a.imag / denom;
39476 switch ((
int)b.real) {
39484 return __Pyx_c_prod_long__double(a, a);
39486 z = __Pyx_c_prod_long__double(a, a);
39487 return __Pyx_c_prod_long__double(
z, a);
39489 z = __Pyx_c_prod_long__double(a, a);
39490 return __Pyx_c_prod_long__double(
z,
z);
39496 }
else if ((b.imag == 0) && (a.real >= 0)) {
39497 z.real = powl(a.real, b.real);
39500 }
else if (a.real > 0) {
39505 theta = atan2l(0.0, -1.0);
39508 r = __Pyx_c_abs_long__double(a);
39509 theta = atan2l(a.imag, a.real);
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);
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)
39528 __Pyx_RefNannyDeclarations
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);
39544 shape_tuple = PyTuple_New(ndim);
39545 if (unlikely(!shape_tuple)) {
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)) {
39554#if CYTHON_ASSUME_SAFE_MACROS
39555 PyTuple_SET_ITEM(shape_tuple, i, temp_int);
39557 if (PyTuple_SetItem(shape_tuple, i, temp_int) < 0) {
39563 array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, mode, NULL);
39564 if (unlikely(!array_obj)) {
39567 __Pyx_GOTREF(array_obj);
39568 memview_obj = (
struct __pyx_memoryview_obj *) __pyx_memoryview_new(
39569 (PyObject *) array_obj, contig_flag,
39571 from_mvs->memview->typeinfo);
39572 if (unlikely(!memview_obj))
39574 if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
39576 if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
39577 dtype_is_object) < 0))
39581 __Pyx_XDECREF((PyObject *) new_mvs.memview);
39582 new_mvs.memview = NULL;
39583 new_mvs.data = NULL;
39585 __Pyx_XDECREF(shape_tuple);
39586 __Pyx_XDECREF((PyObject *) array_obj);
39587 __Pyx_RefNannyFinishContext();
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;
39598 if (unlikely(!PyUnicode_Check(key))) {
39599 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
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)) {
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");
39627#if !CYTHON_VECTORCALL
39628static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *
const *args,
size_t nargsf, PyObject *kwnames) {
39630 PyObject *obj = PyObject_GetAttr(args[0], name);
39631 if (unlikely(!obj))
39633 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
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"
39645 const int neg_one = (int) -1, const_zero = (
int) 0;
39646#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39647#pragma GCC diagnostic pop
39649 const int is_unsigned = neg_one > const_zero;
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);
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);
39668 unsigned char *bytes = (
unsigned char *)&value;
39669#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
39671 return PyLong_FromUnsignedNativeBytes(bytes,
sizeof(value), -1);
39673 return PyLong_FromNativeBytes(bytes,
sizeof(value), -1);
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);
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;
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);
39698 PyObject *keys[] = {signed_str};
39699 PyObject *values[] = {Py_True};
39700 kwds = __Pyx_MakeKwargDict(keys, values, 1);
39703 Py_DECREF(signed_str);
39704 if (unlikely(!kwds))
goto limited_bad;
39706 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
39710 Py_XDECREF(order_str);
39711 Py_XDECREF(py_bytes);
39712 Py_XDECREF(from_bytes_str);
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);
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);
39732static CYTHON_INLINE
int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
39733 const int is_unsigned = 1;
39734#if CYTHON_USE_PYLONG_INTERNALS
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]));
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]));
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]));
39761#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
39762 if (unlikely(Py_SIZE(x) < 0)) {
39763 goto raise_neg_overflow;
39767 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39768 if (unlikely(result < 0))
39770 if (unlikely(result == 1))
39771 goto raise_neg_overflow;
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))
39779 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
39781 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
39783 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
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])));
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])));
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])));
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]));
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]));
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]));
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))
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))
39853 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
39855 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
39857 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
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"
39864 const int neg_one = (int) -1, const_zero = (
int) 0;
39865#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39866#pragma GCC diagnostic pop
39868 const int is_unsigned = neg_one > const_zero;
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;
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;
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);
39895 v = PyNumber_Long(x);
39896 if (unlikely(!
v))
return (
int) -1;
39897 assert(PyLong_CheckExact(
v));
39900 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
39901 if (unlikely(result < 0)) {
39905 is_negative = result == 1;
39907 if (is_unsigned && unlikely(is_negative)) {
39909 PyErr_SetString(PyExc_OverflowError,
39910 "can't convert negative value to int");
39912 }
else if (is_negative) {
39913 stepval = PyNumber_Invert(
v);
39915 if (unlikely(!stepval))
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;
39927 digit = PyNumber_And(stepval, mask);
39928 if (unlikely(!digit))
goto done;
39929 idigit = PyLong_AsLong(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;
39937 Py_DECREF(shift); shift = NULL;
39938 Py_DECREF(mask); mask = NULL;
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;
39947 if (!is_unsigned) {
39948 if (unlikely(val & (((
int) 1) << (
sizeof(
int) * 8 - 1))))
39949 goto raise_overflow;
39957 Py_XDECREF(stepval);
39963 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
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"
39970 const int neg_one = (int) -1, const_zero = (
int) 0;
39971#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39972#pragma GCC diagnostic pop
39974 const int is_unsigned = neg_one > const_zero;
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))
39984 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
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))
39993 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
39996#if CYTHON_USE_PYLONG_INTERNALS
39998 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
40000 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
40003static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
40005 PyObject *tmp = __Pyx_PyNumber_Long(x);
40006 if (!tmp)
return (
int) -1;
40007 val = __Pyx_PyLong_As_int(tmp);
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);
40015 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
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);
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);
40033static CYTHON_INLINE
long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
40034 const int is_unsigned = 1;
40035#if CYTHON_USE_PYLONG_INTERNALS
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]));
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]));
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]));
40062#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40063 if (unlikely(Py_SIZE(x) < 0)) {
40064 goto raise_neg_overflow;
40068 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40069 if (unlikely(result < 0))
40071 if (unlikely(result == 1))
40072 goto raise_neg_overflow;
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))
40080 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
40082 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
40084 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
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])));
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])));
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])));
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]));
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]));
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]));
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))
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))
40154 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
40156 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
40158 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
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"
40165 const long neg_one = (long) -1, const_zero = (
long) 0;
40166#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40167#pragma GCC diagnostic pop
40169 const int is_unsigned = neg_one > const_zero;
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;
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;
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);
40196 v = PyNumber_Long(x);
40197 if (unlikely(!
v))
return (
long) -1;
40198 assert(PyLong_CheckExact(
v));
40201 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
40202 if (unlikely(result < 0)) {
40206 is_negative = result == 1;
40208 if (is_unsigned && unlikely(is_negative)) {
40210 PyErr_SetString(PyExc_OverflowError,
40211 "can't convert negative value to long");
40213 }
else if (is_negative) {
40214 stepval = PyNumber_Invert(
v);
40216 if (unlikely(!stepval))
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;
40228 digit = PyNumber_And(stepval, mask);
40229 if (unlikely(!digit))
goto done;
40230 idigit = PyLong_AsLong(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;
40238 Py_DECREF(shift); shift = NULL;
40239 Py_DECREF(mask); mask = NULL;
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;
40248 if (!is_unsigned) {
40249 if (unlikely(val & (((
long) 1) << (
sizeof(
long) * 8 - 1))))
40250 goto raise_overflow;
40258 Py_XDECREF(stepval);
40264 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
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"
40271 const long neg_one = (long) -1, const_zero = (
long) 0;
40272#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40273#pragma GCC diagnostic pop
40275 const int is_unsigned = neg_one > const_zero;
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))
40285 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
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))
40294 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
40297#if CYTHON_USE_PYLONG_INTERNALS
40299 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
40301 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
40304static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
40306 PyObject *tmp = __Pyx_PyNumber_Long(x);
40307 if (!tmp)
return (
long) -1;
40308 val = __Pyx_PyLong_As_long(tmp);
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);
40316 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
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"
40326 const long neg_one = (long) -1, const_zero = (
long) 0;
40327#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40328#pragma GCC diagnostic pop
40330 const int is_unsigned = neg_one > const_zero;
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);
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);
40349 unsigned char *bytes = (
unsigned char *)&value;
40350#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
40352 return PyLong_FromUnsignedNativeBytes(bytes,
sizeof(value), -1);
40354 return PyLong_FromNativeBytes(bytes,
sizeof(value), -1);
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);
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;
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);
40379 PyObject *keys[] = {signed_str};
40380 PyObject *values[] = {Py_True};
40381 kwds = __Pyx_MakeKwargDict(keys, values, 1);
40384 Py_DECREF(signed_str);
40385 if (unlikely(!kwds))
goto limited_bad;
40387 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
40391 Py_XDECREF(order_str);
40392 Py_XDECREF(py_bytes);
40393 Py_XDECREF(from_bytes_str);
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)) {
40405 int non_empty = PyObject_IsTrue(state_dict);
40406 if (non_empty == 0) {
40407 Py_DECREF(state_dict);
40409 }
else if (unlikely(non_empty == -1)) {
40413 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
40414 dict = PyObject_GetAttrString(obj,
"__dict__");
40416 dict = PyObject_GenericGetDict(obj, NULL);
40418 if (unlikely(!dict)) {
40419 Py_DECREF(state_dict);
40423 if (likely(PyDict_CheckExact(dict))) {
40424 result = PyDict_Update(dict, state_dict);
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);
40434 Py_DECREF(state_dict);
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;
40443 if (state_size <= index) {
40446 return __Pyx__UpdateUnpickledDict(obj, state, index);
40450static int __Pyx_CheckUnpickleChecksum(
long checksum,
long checksum1,
long checksum2,
long checksum3,
const char *members) {
40452 found |= checksum1 == checksum;
40453 found |= checksum2 == checksum;
40454 found |= checksum3 == checksum;
40457 __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members);
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);
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);
40475static CYTHON_INLINE
char __Pyx_PyULong___Pyx_PyLong_As_char(PyObject *x) {
40476 const int is_unsigned = 1;
40477#if CYTHON_USE_PYLONG_INTERNALS
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]));
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]));
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]));
40504#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40505 if (unlikely(Py_SIZE(x) < 0)) {
40506 goto raise_neg_overflow;
40510 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40511 if (unlikely(result < 0))
40513 if (unlikely(result == 1))
40514 goto raise_neg_overflow;
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))
40522 return __Pyx_LargePyLong___Pyx_PyLong_As_char(x);
40524 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_char();
40526 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
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])));
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])));
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])));
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]));
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]));
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]));
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))
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))
40596 return __Pyx_LargePyLong___Pyx_PyLong_As_char(x);
40598 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_char();
40600 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
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"
40607 const char neg_one = (char) -1, const_zero = (
char) 0;
40608#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40609#pragma GCC diagnostic pop
40611 const int is_unsigned = neg_one > const_zero;
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;
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;
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);
40638 v = PyNumber_Long(x);
40639 if (unlikely(!
v))
return (
char) -1;
40640 assert(PyLong_CheckExact(
v));
40643 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
40644 if (unlikely(result < 0)) {
40648 is_negative = result == 1;
40650 if (is_unsigned && unlikely(is_negative)) {
40652 PyErr_SetString(PyExc_OverflowError,
40653 "can't convert negative value to char");
40655 }
else if (is_negative) {
40656 stepval = PyNumber_Invert(
v);
40658 if (unlikely(!stepval))
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;
40670 digit = PyNumber_And(stepval, mask);
40671 if (unlikely(!digit))
goto done;
40672 idigit = PyLong_AsLong(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;
40680 Py_DECREF(shift); shift = NULL;
40681 Py_DECREF(mask); mask = NULL;
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;
40690 if (!is_unsigned) {
40691 if (unlikely(val & (((
char) 1) << (
sizeof(
char) * 8 - 1))))
40692 goto raise_overflow;
40700 Py_XDECREF(stepval);
40706 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
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"
40713 const char neg_one = (char) -1, const_zero = (
char) 0;
40714#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40715#pragma GCC diagnostic pop
40717 const int is_unsigned = neg_one > const_zero;
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))
40727 return __Pyx_PyULong___Pyx_PyLong_As_char(x);
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))
40736 return __Pyx_PySLong___Pyx_PyLong_As_char(x);
40739#if CYTHON_USE_PYLONG_INTERNALS
40741 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_char();
40743 return __Pyx_raise_overflow___Pyx_PyLong_As_char();
40746static char __Pyx_NonPyLong___Pyx_PyLong_As_char(PyObject *x) {
40748 PyObject *tmp = __Pyx_PyNumber_Long(x);
40749 if (!tmp)
return (
char) -1;
40750 val = __Pyx_PyLong_As_char(tmp);
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);
40758 return __Pyx_NonPyLong___Pyx_PyLong_As_char(x);
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;
40772 while (
'0' <= rt_version[i] && rt_version[i] <=
'9') {
40773 digit = digit * 10 + (
unsigned int) (rt_version[i] -
'0');
40776 version += factor * digit;
40777 if (rt_version[i] !=
'.')
40783 __Pyx_cached_runtime_version = version;
40787static unsigned long __Pyx_get_runtime_version(
void) {
40788#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
40789 return Py_Version & ~0xFFUL;
40791 return __Pyx_cached_runtime_version;
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))
40800 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
40804 PyOS_snprintf(message,
sizeof(message),
40805 "compile time Python version %d.%d "
40806 "of module '%.100s' "
40808 "runtime version %d.%d",
40809 (
int) (ct_version >> 24), (
int) ((ct_version >> 16) & 0xFF),
40811 (allow_newer) ?
"was newer than" :
"does not match",
40812 (
int) (rt_version >> 24), (
int) ((rt_version >> 16) & 0xFF)
40814 return PyErr_WarnEx(NULL, message, 1);
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;
40830 long minor_version = 0;
40831 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
40832 minor_version = 11;
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;
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);
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);
40851 Py_XDECREF(code_type);
40852 Py_XDECREF(exception_table);
40853 Py_XDECREF(types_module);
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) {
40864 Py_DECREF(exc_type);
40865 Py_XDECREF(exc_value);
40866 Py_XDECREF(exc_tb);
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;
40877 #if PY_VERSION_HEX >= 0x030C0000
40878 PyUnstable_Code_NewWithPosOnlyArgs
40880 PyCode_NewWithPosOnlyArgs
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;
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)
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)
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
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;
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;
40919 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
40920 if (unlikely(!varnames_tuple_dedup))
goto done;
40922 #if CYTHON_AVOID_BORROWED_REFS
40923 Py_INCREF(varnames_tuple_dedup);
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;
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);
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,
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,
40952 (
int) descr.first_line,
40953 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
40956 Py_XDECREF(code_bytes);
40957 #if CYTHON_AVOID_BORROWED_REFS
40958 Py_XDECREF(varnames_tuple_dedup);
40960 Py_DECREF(varnames_tuple);
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);
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
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);
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;
40991 char *memview_bytes =
const_cast<char*
>(
s);
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"
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
41007 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
41008 int memview_flags = 0x100;
41010 int memview_flags = PyBUF_READ;
41012 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
41014 if (unlikely(!compressed_bytes)) {
41015 Py_DECREF(decompress);
41018 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
41019 Py_DECREF(compressed_bytes);
41020 Py_DECREF(decompress);
41022 Py_DECREF(methodname);
41023 return decompressed;
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);
41030 Py_XDECREF(module);
41031 Py_DECREF(methodname);
41037#ifndef __Pyx_DecompressString_LZSS_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;
41042 uint32_t flags = src[pos++] | 0xFF00;
41043 while (flags & 0x100) {
41045 dst[out_pos++] = src[pos++];
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;
41052 }
else if (!(hi & 0x80)) {
41053 end_offset_of_last_occurrence = 0x80 + (((hi << 2) & 0x180) | (lo & 0x7F));
41054 match_length = hi & 0x1F;
41056 end_offset_of_last_occurrence = 0x80 + ((hi & 0x7F) << 7 | (lo & 0x7F));
41057 match_length = src[pos++];
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;
41064 if (out_pos >= dst_len)
return pos;
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);
41078 unsigned char *result_data;
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;
41087decompression_failed:
41088 PyErr_SetString(PyExc_RuntimeError,
"LZSS string data decompression failed");
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");
41102 return (Py_ssize_t) len;
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);
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);
41114static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
41116 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
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
41123 const char* result;
41124 Py_ssize_t unicode_length;
41125 CYTHON_MAYBE_UNUSED_VAR(unicode_length);
41126 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
41127 if (unlikely(PyArg_Parse(o,
"s#", &result, length) < 0))
return NULL;
41129 result = PyUnicode_AsUTF8AndSize(o, length);
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);
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);
41147 PyUnicode_AsASCIIString(o);
41151 return PyUnicode_AsUTF8AndSize(o, length);
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);
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);
41167 *length = PyByteArray_Size(o);
41168 if (*length == -1)
return NULL;
41169 return PyByteArray_AsString(o);
41174 int r = PyBytes_AsStringAndSize(o, &result, length);
41175 if (unlikely(
r < 0)) {
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);
41187static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
41189 if (unlikely(!x))
return -1;
41190 retval = __Pyx_PyObject_IsTrue(x);
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;
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);
41208 __Pyx_DECREF_TypeName(result_type_name);
41211 PyErr_Format(PyExc_TypeError,
41212 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME
")",
41214 __Pyx_DECREF_TypeName(result_type_name);
41219static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
41220#if CYTHON_USE_TYPE_SLOTS
41221 PyNumberMethods *m;
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);
41232 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
41233 res = PyNumber_Long(x);
41237 if (unlikely(!PyLong_CheckExact(res))) {
41238 return __Pyx_PyNumber_LongWrongResultType(res);
41241 else if (!PyErr_Occurred()) {
41242 PyErr_SetString(PyExc_TypeError,
41243 "an integer is required");
41247static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
41248 #if CYTHON_USE_PYLONG_INTERNALS
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
41256 ival = (Py_ssize_t) (((
size_t)digits[0]));
41259 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
41261 ival = (Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
41264 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
41266 ival = (Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
41269 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
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]));
41274 return PyLong_AsSsize_t(b);
41275 return is_neg ? -ival : ival;
41277 return PyLong_AsSsize_t(b);
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);
41285 PyObject *x = PyNumber_Index(b);
41286 if (unlikely(!x))
return -1;
41287 ival = __Pyx_PyLong_AsSsize_t(x);
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);
41298 x = PyNumber_Index(o);
41300 ival = PyLong_AsLong(x);
41305static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(
int b) {
41306 CYTHON_UNUSED_VAR(b);
41307 return __Pyx_NewRef(Py_None);
41309static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
41310 return __Pyx_NewRef(b ? Py_True: Py_False);
41312static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(
size_t ival) {
41313 return PyLong_FromSize_t(ival);
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
41323 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
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"
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
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);
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>
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)
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."
41371} __Pyx_InterpreterIdAndModule;
41373 char interpreter_id_as_index;
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;
41382#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41383static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
41385static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
41387static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
41388 __Pyx_InterpreterIdAndModule* table,
41390 int64_t interpreterId) {
41391 __Pyx_InterpreterIdAndModule* begin = table;
41392 __Pyx_InterpreterIdAndModule* end = begin + count;
41393 if (begin->id == interpreterId) {
41396 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
41397 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
41398 if (halfway->id == interpreterId) {
41401 if (halfway->id < interpreterId) {
41407 for (; begin < end; ++begin) {
41408 if (begin->id >= interpreterId)
return begin;
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);
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;
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();
41433 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
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;
41442 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
41443 data->table, data->count, interpreter_id);
41447 PyObject *result=NULL;
41448 if (found && found->id == interpreter_id) {
41449 result = found->module;
41451#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41452 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
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);
41462#define __Pyx_ModuleStateLookup_wait_until_no_readers()
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;
41470 __Pyx_ModuleStateLookupData *new_data = *old_data;
41471 if (to_allocate != (*old_data)->allocated) {
41472 new_data = (__Pyx_ModuleStateLookupData *)realloc(
41474 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*
sizeof(__Pyx_InterpreterIdAndModule));
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;
41483 new_data->allocated = to_allocate;
41485 new_data->table[interpreter_id].module =
module;
41486 if (new_data->count < interpreter_id+1) {
41487 new_data->count = interpreter_id+1;
41489 *old_data = new_data;
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;
41503 data->count = write - data->table;
41504 for (; write<end; ++write) {
41506 write->module = NULL;
41508 data->interpreter_id_as_index = 0;
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;
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);
41519 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
41521 __Pyx_ModuleStateLookupData *new_data = old_data;
41523 new_data = (__Pyx_ModuleStateLookupData *)calloc(1,
sizeof(__Pyx_ModuleStateLookupData));
41529 new_data->allocated = 1;
41530 new_data->interpreter_id_as_index = 1;
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);
41538 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
41541 Py_ssize_t insert_at = 0;
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;
41552 if (new_data->count+1 >= new_data->allocated) {
41553 Py_ssize_t to_allocate = (new_data->count+1)*2;
41555 (__Pyx_ModuleStateLookupData*)realloc(
41557 sizeof(__Pyx_ModuleStateLookupData) +
41558 (to_allocate-1)*
sizeof(__Pyx_InterpreterIdAndModule));
41561 new_data = old_data;
41565 new_data->allocated = to_allocate;
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;
41580#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41581 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
41583 __Pyx_ModuleStateLookup_data = new_data;
41585 __Pyx_ModuleStateLookup_Unlock();
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);
41596 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
41598 if (data->interpreter_id_as_index) {
41599 if (interpreter_id < data->count) {
41600 data->table[interpreter_id].module = NULL;
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;
41617 if (data->count == 0) {
41622#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
41623 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
41625 __Pyx_ModuleStateLookup_data = data;
41627 __Pyx_ModuleStateLookup_Unlock();
41634#pragma warning( pop )