19 #ifndef PY_SSIZE_T_CLEAN 20 #define PY_SSIZE_T_CLEAN 22 #if defined(CYTHON_LIMITED_API) && 0 23 #ifndef Py_LIMITED_API 24 #if CYTHON_LIMITED_API+0 > 0x03030000 25 #define Py_LIMITED_API CYTHON_LIMITED_API 27 #define Py_LIMITED_API 0x03030000 34 #error Python headers needed to compile C extensions, please install development version of Python. 35 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) 36 #error Cython requires Python 2.7+ or Python 3.3+. 38 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API 39 #define __PYX_EXTRA_ABI_MODULE_NAME "limited" 41 #define __PYX_EXTRA_ABI_MODULE_NAME "" 43 #define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME 44 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI 45 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." 46 #define CYTHON_HEX_VERSION 0x030008F0 47 #define CYTHON_FUTURE_DIVISION 1 50 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) 52 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) 64 #define DL_IMPORT(t) t 67 #define DL_EXPORT(t) t 70 #ifndef HAVE_LONG_LONG 71 #define HAVE_LONG_LONG 74 #define PY_LONG_LONG LONG_LONG 77 #define Py_HUGE_VAL HUGE_VAL 79 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX 80 #if defined(GRAALVM_PYTHON) 83 #define CYTHON_COMPILING_IN_PYPY 0 84 #define CYTHON_COMPILING_IN_CPYTHON 0 85 #define CYTHON_COMPILING_IN_LIMITED_API 0 86 #define CYTHON_COMPILING_IN_GRAAL 1 87 #define CYTHON_COMPILING_IN_NOGIL 0 88 #undef CYTHON_USE_TYPE_SLOTS 89 #define CYTHON_USE_TYPE_SLOTS 0 90 #undef CYTHON_USE_TYPE_SPECS 91 #define CYTHON_USE_TYPE_SPECS 0 92 #undef CYTHON_USE_PYTYPE_LOOKUP 93 #define CYTHON_USE_PYTYPE_LOOKUP 0 94 #if PY_VERSION_HEX < 0x03050000 95 #undef CYTHON_USE_ASYNC_SLOTS 96 #define CYTHON_USE_ASYNC_SLOTS 0 97 #elif !defined(CYTHON_USE_ASYNC_SLOTS) 98 #define CYTHON_USE_ASYNC_SLOTS 1 100 #undef CYTHON_USE_PYLIST_INTERNALS 101 #define CYTHON_USE_PYLIST_INTERNALS 0 102 #undef CYTHON_USE_UNICODE_INTERNALS 103 #define CYTHON_USE_UNICODE_INTERNALS 0 104 #undef CYTHON_USE_UNICODE_WRITER 105 #define CYTHON_USE_UNICODE_WRITER 0 106 #undef CYTHON_USE_PYLONG_INTERNALS 107 #define CYTHON_USE_PYLONG_INTERNALS 0 108 #undef CYTHON_AVOID_BORROWED_REFS 109 #define CYTHON_AVOID_BORROWED_REFS 1 110 #undef CYTHON_ASSUME_SAFE_MACROS 111 #define CYTHON_ASSUME_SAFE_MACROS 0 112 #undef CYTHON_UNPACK_METHODS 113 #define CYTHON_UNPACK_METHODS 0 114 #undef CYTHON_FAST_THREAD_STATE 115 #define CYTHON_FAST_THREAD_STATE 0 116 #undef CYTHON_FAST_GIL 117 #define CYTHON_FAST_GIL 0 118 #undef CYTHON_METH_FASTCALL 119 #define CYTHON_METH_FASTCALL 0 120 #undef CYTHON_FAST_PYCALL 121 #define CYTHON_FAST_PYCALL 0 122 #ifndef CYTHON_PEP487_INIT_SUBCLASS 123 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) 125 #undef CYTHON_PEP489_MULTI_PHASE_INIT 126 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 127 #undef CYTHON_USE_MODULE_STATE 128 #define CYTHON_USE_MODULE_STATE 0 129 #undef CYTHON_USE_TP_FINALIZE 130 #define CYTHON_USE_TP_FINALIZE 0 131 #undef CYTHON_USE_DICT_VERSIONS 132 #define CYTHON_USE_DICT_VERSIONS 0 133 #undef CYTHON_USE_EXC_INFO_STACK 134 #define CYTHON_USE_EXC_INFO_STACK 0 135 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC 136 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 138 #elif defined(PYPY_VERSION) 139 #define CYTHON_COMPILING_IN_PYPY 1 140 #define CYTHON_COMPILING_IN_CPYTHON 0 141 #define CYTHON_COMPILING_IN_LIMITED_API 0 142 #define CYTHON_COMPILING_IN_GRAAL 0 143 #define CYTHON_COMPILING_IN_NOGIL 0 144 #undef CYTHON_USE_TYPE_SLOTS 145 #define CYTHON_USE_TYPE_SLOTS 0 146 #ifndef CYTHON_USE_TYPE_SPECS 147 #define CYTHON_USE_TYPE_SPECS 0 149 #undef CYTHON_USE_PYTYPE_LOOKUP 150 #define CYTHON_USE_PYTYPE_LOOKUP 0 151 #if PY_VERSION_HEX < 0x03050000 152 #undef CYTHON_USE_ASYNC_SLOTS 153 #define CYTHON_USE_ASYNC_SLOTS 0 154 #elif !defined(CYTHON_USE_ASYNC_SLOTS) 155 #define CYTHON_USE_ASYNC_SLOTS 1 157 #undef CYTHON_USE_PYLIST_INTERNALS 158 #define CYTHON_USE_PYLIST_INTERNALS 0 159 #undef CYTHON_USE_UNICODE_INTERNALS 160 #define CYTHON_USE_UNICODE_INTERNALS 0 161 #undef CYTHON_USE_UNICODE_WRITER 162 #define CYTHON_USE_UNICODE_WRITER 0 163 #undef CYTHON_USE_PYLONG_INTERNALS 164 #define CYTHON_USE_PYLONG_INTERNALS 0 165 #undef CYTHON_AVOID_BORROWED_REFS 166 #define CYTHON_AVOID_BORROWED_REFS 1 167 #undef CYTHON_ASSUME_SAFE_MACROS 168 #define CYTHON_ASSUME_SAFE_MACROS 0 169 #undef CYTHON_UNPACK_METHODS 170 #define CYTHON_UNPACK_METHODS 0 171 #undef CYTHON_FAST_THREAD_STATE 172 #define CYTHON_FAST_THREAD_STATE 0 173 #undef CYTHON_FAST_GIL 174 #define CYTHON_FAST_GIL 0 175 #undef CYTHON_METH_FASTCALL 176 #define CYTHON_METH_FASTCALL 0 177 #undef CYTHON_FAST_PYCALL 178 #define CYTHON_FAST_PYCALL 0 179 #ifndef CYTHON_PEP487_INIT_SUBCLASS 180 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) 182 #if PY_VERSION_HEX < 0x03090000 183 #undef CYTHON_PEP489_MULTI_PHASE_INIT 184 #define CYTHON_PEP489_MULTI_PHASE_INIT 0 185 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) 186 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 188 #undef CYTHON_USE_MODULE_STATE 189 #define CYTHON_USE_MODULE_STATE 0 190 #undef CYTHON_USE_TP_FINALIZE 191 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) 192 #undef CYTHON_USE_DICT_VERSIONS 193 #define CYTHON_USE_DICT_VERSIONS 0 194 #undef CYTHON_USE_EXC_INFO_STACK 195 #define CYTHON_USE_EXC_INFO_STACK 0 196 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC 197 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 199 #elif defined(CYTHON_LIMITED_API) 200 #ifdef Py_LIMITED_API 201 #undef __PYX_LIMITED_VERSION_HEX 202 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API 204 #define CYTHON_COMPILING_IN_PYPY 0 205 #define CYTHON_COMPILING_IN_CPYTHON 0 206 #define CYTHON_COMPILING_IN_LIMITED_API 1 207 #define CYTHON_COMPILING_IN_GRAAL 0 208 #define CYTHON_COMPILING_IN_NOGIL 0 209 #undef CYTHON_CLINE_IN_TRACEBACK 210 #define CYTHON_CLINE_IN_TRACEBACK 0 211 #undef CYTHON_USE_TYPE_SLOTS 212 #define CYTHON_USE_TYPE_SLOTS 0 213 #undef CYTHON_USE_TYPE_SPECS 214 #define CYTHON_USE_TYPE_SPECS 1 215 #undef CYTHON_USE_PYTYPE_LOOKUP 216 #define CYTHON_USE_PYTYPE_LOOKUP 0 217 #undef CYTHON_USE_ASYNC_SLOTS 218 #define CYTHON_USE_ASYNC_SLOTS 0 219 #undef CYTHON_USE_PYLIST_INTERNALS 220 #define CYTHON_USE_PYLIST_INTERNALS 0 221 #undef CYTHON_USE_UNICODE_INTERNALS 222 #define CYTHON_USE_UNICODE_INTERNALS 0 223 #ifndef CYTHON_USE_UNICODE_WRITER 224 #define CYTHON_USE_UNICODE_WRITER 0 226 #undef CYTHON_USE_PYLONG_INTERNALS 227 #define CYTHON_USE_PYLONG_INTERNALS 0 228 #ifndef CYTHON_AVOID_BORROWED_REFS 229 #define CYTHON_AVOID_BORROWED_REFS 0 231 #undef CYTHON_ASSUME_SAFE_MACROS 232 #define CYTHON_ASSUME_SAFE_MACROS 0 233 #undef CYTHON_UNPACK_METHODS 234 #define CYTHON_UNPACK_METHODS 0 235 #undef CYTHON_FAST_THREAD_STATE 236 #define CYTHON_FAST_THREAD_STATE 0 237 #undef CYTHON_FAST_GIL 238 #define CYTHON_FAST_GIL 0 239 #undef CYTHON_METH_FASTCALL 240 #define CYTHON_METH_FASTCALL 0 241 #undef CYTHON_FAST_PYCALL 242 #define CYTHON_FAST_PYCALL 0 243 #ifndef CYTHON_PEP487_INIT_SUBCLASS 244 #define CYTHON_PEP487_INIT_SUBCLASS 1 246 #undef CYTHON_PEP489_MULTI_PHASE_INIT 247 #define CYTHON_PEP489_MULTI_PHASE_INIT 0 248 #undef CYTHON_USE_MODULE_STATE 249 #define CYTHON_USE_MODULE_STATE 1 250 #ifndef CYTHON_USE_TP_FINALIZE 251 #define CYTHON_USE_TP_FINALIZE 0 253 #undef CYTHON_USE_DICT_VERSIONS 254 #define CYTHON_USE_DICT_VERSIONS 0 255 #undef CYTHON_USE_EXC_INFO_STACK 256 #define CYTHON_USE_EXC_INFO_STACK 0 257 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC 258 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 260 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) 261 #define CYTHON_COMPILING_IN_PYPY 0 262 #define CYTHON_COMPILING_IN_CPYTHON 0 263 #define CYTHON_COMPILING_IN_LIMITED_API 0 264 #define CYTHON_COMPILING_IN_GRAAL 0 265 #define CYTHON_COMPILING_IN_NOGIL 1 266 #ifndef CYTHON_USE_TYPE_SLOTS 267 #define CYTHON_USE_TYPE_SLOTS 1 269 #undef CYTHON_USE_PYTYPE_LOOKUP 270 #define CYTHON_USE_PYTYPE_LOOKUP 0 271 #ifndef CYTHON_USE_ASYNC_SLOTS 272 #define CYTHON_USE_ASYNC_SLOTS 1 274 #undef CYTHON_USE_PYLIST_INTERNALS 275 #define CYTHON_USE_PYLIST_INTERNALS 0 276 #ifndef CYTHON_USE_UNICODE_INTERNALS 277 #define CYTHON_USE_UNICODE_INTERNALS 1 279 #undef CYTHON_USE_UNICODE_WRITER 280 #define CYTHON_USE_UNICODE_WRITER 0 281 #undef CYTHON_USE_PYLONG_INTERNALS 282 #define CYTHON_USE_PYLONG_INTERNALS 0 283 #ifndef CYTHON_AVOID_BORROWED_REFS 284 #define CYTHON_AVOID_BORROWED_REFS 0 286 #ifndef CYTHON_ASSUME_SAFE_MACROS 287 #define CYTHON_ASSUME_SAFE_MACROS 1 289 #ifndef CYTHON_UNPACK_METHODS 290 #define CYTHON_UNPACK_METHODS 1 292 #undef CYTHON_FAST_THREAD_STATE 293 #define CYTHON_FAST_THREAD_STATE 0 294 #undef CYTHON_FAST_PYCALL 295 #define CYTHON_FAST_PYCALL 0 296 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT 297 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 299 #ifndef CYTHON_USE_TP_FINALIZE 300 #define CYTHON_USE_TP_FINALIZE 1 302 #undef CYTHON_USE_DICT_VERSIONS 303 #define CYTHON_USE_DICT_VERSIONS 0 304 #undef CYTHON_USE_EXC_INFO_STACK 305 #define CYTHON_USE_EXC_INFO_STACK 0 307 #define CYTHON_COMPILING_IN_PYPY 0 308 #define CYTHON_COMPILING_IN_CPYTHON 1 309 #define CYTHON_COMPILING_IN_LIMITED_API 0 310 #define CYTHON_COMPILING_IN_GRAAL 0 311 #define CYTHON_COMPILING_IN_NOGIL 0 312 #ifndef CYTHON_USE_TYPE_SLOTS 313 #define CYTHON_USE_TYPE_SLOTS 1 315 #ifndef CYTHON_USE_TYPE_SPECS 316 #define CYTHON_USE_TYPE_SPECS 0 318 #ifndef CYTHON_USE_PYTYPE_LOOKUP 319 #define CYTHON_USE_PYTYPE_LOOKUP 1 321 #if PY_MAJOR_VERSION < 3 322 #undef CYTHON_USE_ASYNC_SLOTS 323 #define CYTHON_USE_ASYNC_SLOTS 0 324 #elif !defined(CYTHON_USE_ASYNC_SLOTS) 325 #define CYTHON_USE_ASYNC_SLOTS 1 327 #ifndef CYTHON_USE_PYLONG_INTERNALS 328 #define CYTHON_USE_PYLONG_INTERNALS 1 330 #ifndef CYTHON_USE_PYLIST_INTERNALS 331 #define CYTHON_USE_PYLIST_INTERNALS 1 333 #ifndef CYTHON_USE_UNICODE_INTERNALS 334 #define CYTHON_USE_UNICODE_INTERNALS 1 336 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 337 #undef CYTHON_USE_UNICODE_WRITER 338 #define CYTHON_USE_UNICODE_WRITER 0 339 #elif !defined(CYTHON_USE_UNICODE_WRITER) 340 #define CYTHON_USE_UNICODE_WRITER 1 342 #ifndef CYTHON_AVOID_BORROWED_REFS 343 #define CYTHON_AVOID_BORROWED_REFS 0 345 #ifndef CYTHON_ASSUME_SAFE_MACROS 346 #define CYTHON_ASSUME_SAFE_MACROS 1 348 #ifndef CYTHON_UNPACK_METHODS 349 #define CYTHON_UNPACK_METHODS 1 351 #ifndef CYTHON_FAST_THREAD_STATE 352 #define CYTHON_FAST_THREAD_STATE 1 354 #ifndef CYTHON_FAST_GIL 355 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) 357 #ifndef CYTHON_METH_FASTCALL 358 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) 360 #ifndef CYTHON_FAST_PYCALL 361 #define CYTHON_FAST_PYCALL 1 363 #ifndef CYTHON_PEP487_INIT_SUBCLASS 364 #define CYTHON_PEP487_INIT_SUBCLASS 1 366 #if PY_VERSION_HEX < 0x03050000 367 #undef CYTHON_PEP489_MULTI_PHASE_INIT 368 #define CYTHON_PEP489_MULTI_PHASE_INIT 0 369 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) 370 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 372 #ifndef CYTHON_USE_MODULE_STATE 373 #define CYTHON_USE_MODULE_STATE 0 375 #if PY_VERSION_HEX < 0x030400a1 376 #undef CYTHON_USE_TP_FINALIZE 377 #define CYTHON_USE_TP_FINALIZE 0 378 #elif !defined(CYTHON_USE_TP_FINALIZE) 379 #define CYTHON_USE_TP_FINALIZE 1 381 #if PY_VERSION_HEX < 0x030600B1 382 #undef CYTHON_USE_DICT_VERSIONS 383 #define CYTHON_USE_DICT_VERSIONS 0 384 #elif !defined(CYTHON_USE_DICT_VERSIONS) 385 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) 387 #if PY_VERSION_HEX < 0x030700A3 388 #undef CYTHON_USE_EXC_INFO_STACK 389 #define CYTHON_USE_EXC_INFO_STACK 0 390 #elif !defined(CYTHON_USE_EXC_INFO_STACK) 391 #define CYTHON_USE_EXC_INFO_STACK 1 393 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC 394 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 397 #if !defined(CYTHON_FAST_PYCCALL) 398 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) 400 #if !defined(CYTHON_VECTORCALL) 401 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) 403 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) 404 #if CYTHON_USE_PYLONG_INTERNALS 405 #if PY_MAJOR_VERSION < 3 406 #include "longintrepr.h" 412 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
415 #ifndef __has_attribute 416 #define __has_attribute(x) 0 418 #ifndef __has_cpp_attribute 419 #define __has_cpp_attribute(x) 0 421 #ifndef CYTHON_RESTRICT 422 #if defined(__GNUC__) 423 #define CYTHON_RESTRICT __restrict__ 424 #elif defined(_MSC_VER) && _MSC_VER >= 1400 425 #define CYTHON_RESTRICT __restrict 426 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 427 #define CYTHON_RESTRICT restrict 429 #define CYTHON_RESTRICT 432 #ifndef CYTHON_UNUSED 433 #if defined(__cplusplus) 436 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) 437 #if __has_cpp_attribute(maybe_unused) 438 #define CYTHON_UNUSED [[maybe_unused]] 443 #ifndef CYTHON_UNUSED 444 # if defined(__GNUC__) 445 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 446 # define CYTHON_UNUSED __attribute__ ((__unused__)) 448 # define CYTHON_UNUSED 450 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) 451 # define CYTHON_UNUSED __attribute__ ((__unused__)) 453 # define CYTHON_UNUSED 456 #ifndef CYTHON_UNUSED_VAR 457 # if defined(__cplusplus) 458 template<
class T>
void CYTHON_UNUSED_VAR(
const T& ) { }
460 # define CYTHON_UNUSED_VAR(x) (void)(x) 463 #ifndef CYTHON_MAYBE_UNUSED_VAR 464 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) 466 #ifndef CYTHON_NCP_UNUSED 467 # if CYTHON_COMPILING_IN_CPYTHON 468 # define CYTHON_NCP_UNUSED 470 # define CYTHON_NCP_UNUSED CYTHON_UNUSED 473 #ifndef CYTHON_USE_CPP_STD_MOVE 474 #if defined(__cplusplus) && (\ 475 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) 476 #define CYTHON_USE_CPP_STD_MOVE 1 478 #define CYTHON_USE_CPP_STD_MOVE 0 481 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) 483 #ifndef _MSC_STDINT_H_ 485 typedef unsigned char uint8_t;
486 typedef unsigned short uint16_t;
487 typedef unsigned int uint32_t;
489 typedef unsigned __int8 uint8_t;
490 typedef unsigned __int16 uint16_t;
491 typedef unsigned __int32 uint32_t;
496 typedef unsigned long long __pyx_uintptr_t;
498 typedef unsigned int __pyx_uintptr_t;
502 typedef unsigned __int64 __pyx_uintptr_t;
504 typedef unsigned __int32 __pyx_uintptr_t;
509 typedef uintptr_t __pyx_uintptr_t;
511 #ifndef CYTHON_FALLTHROUGH 512 #if defined(__cplusplus) 515 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) 516 #if __has_cpp_attribute(fallthrough) 517 #define CYTHON_FALLTHROUGH [[fallthrough]] 520 #ifndef CYTHON_FALLTHROUGH 521 #if __has_cpp_attribute(clang::fallthrough) 522 #define CYTHON_FALLTHROUGH [[clang::fallthrough]] 523 #elif __has_cpp_attribute(gnu::fallthrough) 524 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] 528 #ifndef CYTHON_FALLTHROUGH 529 #if __has_attribute(fallthrough) 530 #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) 532 #define CYTHON_FALLTHROUGH 535 #if defined(__clang__) && defined(__apple_build_version__) 536 #if __apple_build_version__ < 7000000 537 #undef CYTHON_FALLTHROUGH 538 #define CYTHON_FALLTHROUGH 543 template <
typename T>
544 struct __PYX_IS_UNSIGNED_IMPL {
static const bool value = T(0) < T(-1);};
545 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value) 547 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) 549 #if CYTHON_COMPILING_IN_PYPY == 1 550 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) 552 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) 554 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) 557 #error "Cython files generated with the C++ option must be compiled with a C++ compiler." 559 #ifndef CYTHON_INLINE 560 #if defined(__clang__) 561 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) 563 #define CYTHON_INLINE inline 567 void __Pyx_call_destructor(T& x) {
571 class __Pyx_FakeReference {
573 __Pyx_FakeReference() : ptr(NULL) { }
574 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<T*>(&ref)) { }
575 T *operator->() {
return ptr; }
577 operator T&() {
return *ptr; }
578 template<
typename U>
bool operator ==(
const U& other)
const {
return *ptr == other; }
579 template<
typename U>
bool operator !=(
const U& other)
const {
return *ptr != other; }
580 template<
typename U>
bool operator==(
const __Pyx_FakeReference<U>& other)
const {
return *ptr == *other.ptr; }
581 template<
typename U>
bool operator!=(
const __Pyx_FakeReference<U>& other)
const {
return *ptr != *other.ptr; }
586 #define __PYX_BUILD_PY_SSIZE_T "n" 587 #define CYTHON_FORMAT_SSIZE_T "z" 588 #if PY_MAJOR_VERSION < 3 589 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" 590 #define __Pyx_DefaultClassType PyClass_Type 591 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 592 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 594 #define __Pyx_BUILTIN_MODULE_NAME "builtins" 595 #define __Pyx_DefaultClassType PyType_Type 596 #if CYTHON_COMPILING_IN_LIMITED_API 597 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(
int a,
int p,
int k,
int l,
int s,
int f,
598 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
599 PyObject *fv, PyObject *cell, PyObject* fn,
600 PyObject *name,
int fline, PyObject *lnos) {
601 PyObject *exception_table = NULL;
602 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
603 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 604 PyObject *version_info;
605 PyObject *py_minor_version = NULL;
607 long minor_version = 0;
608 PyObject *type, *value, *traceback;
609 PyErr_Fetch(&type, &value, &traceback);
610 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 613 if (!(version_info = PySys_GetObject(
"version_info")))
goto end;
614 if (!(py_minor_version = PySequence_GetItem(version_info, 1)))
goto end;
615 minor_version = PyLong_AsLong(py_minor_version);
616 Py_DECREF(py_minor_version);
617 if (minor_version == -1 && PyErr_Occurred())
goto end;
619 if (!(types_module = PyImport_ImportModule(
"types")))
goto end;
620 if (!(code_type = PyObject_GetAttrString(types_module,
"CodeType")))
goto end;
621 if (minor_version <= 7) {
623 result = PyObject_CallFunction(code_type,
"iiiiiOOOOOOiOO", a, k, l, s, f, code,
624 c, n, v, fn, name, fline, lnos, fv, cell);
625 }
else if (minor_version <= 10) {
626 result = PyObject_CallFunction(code_type,
"iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
627 c, n, v, fn, name, fline, lnos, fv, cell);
629 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0)))
goto end;
630 result = PyObject_CallFunction(code_type,
"iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
631 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
634 Py_XDECREF(code_type);
635 Py_XDECREF(exception_table);
636 Py_XDECREF(types_module);
638 PyErr_Restore(type, value, traceback);
643 #define CO_OPTIMIZED 0x0001 646 #define CO_NEWLOCALS 0x0002 649 #define CO_VARARGS 0x0004 651 #ifndef CO_VARKEYWORDS 652 #define CO_VARKEYWORDS 0x0008 654 #ifndef CO_ASYNC_GENERATOR 655 #define CO_ASYNC_GENERATOR 0x0200 658 #define CO_GENERATOR 0x0020 661 #define CO_COROUTINE 0x0080 663 #elif PY_VERSION_HEX >= 0x030B0000 664 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(
int a,
int p,
int k,
int l,
int s,
int f,
665 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
666 PyObject *fv, PyObject *cell, PyObject* fn,
667 PyObject *name,
int fline, PyObject *lnos) {
668 PyCodeObject *result;
669 PyObject *empty_bytes = PyBytes_FromStringAndSize(
"", 0);
670 if (!empty_bytes)
return NULL;
672 #if PY_VERSION_HEX >= 0x030C0000 673 PyUnstable_Code_NewWithPosOnlyArgs
675 PyCode_NewWithPosOnlyArgs
677 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
678 Py_DECREF(empty_bytes);
681 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY 682 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 683 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 685 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 686 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 689 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) 690 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) 692 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) 694 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) 695 #define __Pyx_Py_Is(x, y) Py_Is(x, y) 697 #define __Pyx_Py_Is(x, y) ((x) == (y)) 699 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) 700 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) 702 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) 704 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) 705 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) 707 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) 709 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) 710 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) 712 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) 714 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) 715 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY 716 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) 718 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) 721 #define CO_COROUTINE 0x80 723 #ifndef CO_ASYNC_GENERATOR 724 #define CO_ASYNC_GENERATOR 0x200 726 #ifndef Py_TPFLAGS_CHECKTYPES 727 #define Py_TPFLAGS_CHECKTYPES 0 729 #ifndef Py_TPFLAGS_HAVE_INDEX 730 #define Py_TPFLAGS_HAVE_INDEX 0 732 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER 733 #define Py_TPFLAGS_HAVE_NEWBUFFER 0 735 #ifndef Py_TPFLAGS_HAVE_FINALIZE 736 #define Py_TPFLAGS_HAVE_FINALIZE 0 738 #ifndef Py_TPFLAGS_SEQUENCE 739 #define Py_TPFLAGS_SEQUENCE 0 741 #ifndef Py_TPFLAGS_MAPPING 742 #define Py_TPFLAGS_MAPPING 0 744 #ifndef METH_STACKLESS 745 #define METH_STACKLESS 0 747 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) 748 #ifndef METH_FASTCALL 749 #define METH_FASTCALL 0x80 751 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *
self, PyObject *
const *args, Py_ssize_t nargs);
752 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *
self, PyObject *
const *args,
753 Py_ssize_t nargs, PyObject *kwnames);
755 #define __Pyx_PyCFunctionFast _PyCFunctionFast 756 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords 758 #if CYTHON_METH_FASTCALL 759 #define __Pyx_METH_FASTCALL METH_FASTCALL 760 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast 761 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords 763 #define __Pyx_METH_FASTCALL METH_VARARGS 764 #define __Pyx_PyCFunction_FastCall PyCFunction 765 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords 767 #if CYTHON_VECTORCALL 768 #define __pyx_vectorcallfunc vectorcallfunc 769 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET 770 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) 771 #elif CYTHON_BACKPORT_VECTORCALL 772 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *
const *args,
773 size_t nargsf, PyObject *kwnames);
774 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) 775 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) 777 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 778 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) 780 #if PY_MAJOR_VERSION >= 0x030900B1 781 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) 783 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) 785 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) 786 #if CYTHON_COMPILING_IN_CPYTHON 787 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) 788 #elif !CYTHON_COMPILING_IN_LIMITED_API 789 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) 791 #if CYTHON_COMPILING_IN_CPYTHON 792 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) 793 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
794 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
797 static CYTHON_INLINE
int __Pyx__IsSameCFunction(PyObject *func,
void *cfunc) {
798 #if CYTHON_COMPILING_IN_LIMITED_API 799 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
801 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
804 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) 805 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 806 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) 807 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *
const *, size_t, PyObject *);
809 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) 810 #define __Pyx_PyCMethod PyCMethod 813 #define METH_METHOD 0x200 815 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) 816 #define PyObject_Malloc(s) PyMem_Malloc(s) 817 #define PyObject_Free(p) PyMem_Free(p) 818 #define PyObject_Realloc(p) PyMem_Realloc(p) 820 #if CYTHON_COMPILING_IN_LIMITED_API 821 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) 822 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) 824 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) 825 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) 827 #if CYTHON_COMPILING_IN_LIMITED_API 828 #define __Pyx_PyThreadState_Current PyThreadState_Get() 829 #elif !CYTHON_FAST_THREAD_STATE 830 #define __Pyx_PyThreadState_Current PyThreadState_GET() 831 #elif PY_VERSION_HEX >= 0x030d00A1 832 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() 833 #elif PY_VERSION_HEX >= 0x03060000 834 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() 835 #elif PY_VERSION_HEX >= 0x03000000 836 #define __Pyx_PyThreadState_Current PyThreadState_GET() 838 #define __Pyx_PyThreadState_Current _PyThreadState_Current 840 #if CYTHON_COMPILING_IN_LIMITED_API 841 static CYTHON_INLINE
void *__Pyx_PyModule_GetState(PyObject *op)
844 result = PyModule_GetState(op);
846 Py_FatalError(
"Couldn't find the module state");
850 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) 851 #if CYTHON_COMPILING_IN_LIMITED_API 852 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) 854 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) 856 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) 857 #include "pythread.h" 858 #define Py_tss_NEEDS_INIT 0 859 typedef int Py_tss_t;
860 static CYTHON_INLINE
int PyThread_tss_create(Py_tss_t *key) {
861 *key = PyThread_create_key();
864 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(
void) {
865 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(
sizeof(Py_tss_t));
866 *key = Py_tss_NEEDS_INIT;
869 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
872 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
873 return *key != Py_tss_NEEDS_INIT;
875 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
876 PyThread_delete_key(*key);
877 *key = Py_tss_NEEDS_INIT;
879 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
880 return PyThread_set_key_value(*key, value);
882 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
883 return PyThread_get_key_value(*key);
886 #if PY_MAJOR_VERSION < 3 887 #if CYTHON_COMPILING_IN_PYPY 888 #if PYPY_VERSION_NUM < 0x07030600 889 #if defined(__cplusplus) && __cplusplus >= 201402L 890 [[deprecated(
"`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
891 #elif defined(__GNUC__) || defined(__clang__) 892 __attribute__ ((__deprecated__(
"`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
893 #elif defined(_MSC_VER) 894 __declspec(deprecated(
"`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
896 static CYTHON_INLINE
int PyGILState_Check(
void) {
899 #else // PYPY_VERSION_NUM < 0x07030600 900 #endif // PYPY_VERSION_NUM < 0x07030600 902 static CYTHON_INLINE
int PyGILState_Check(
void) {
903 PyThreadState * tstate = _PyThreadState_Current;
904 return tstate && (tstate == PyGILState_GetThisThreadState());
908 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) 909 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) 911 #define __Pyx_PyDict_NewPresized(n) PyDict_New() 913 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION 914 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) 915 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) 917 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) 918 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) 920 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS 921 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) 922 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
923 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
924 if (res == NULL) PyErr_Clear();
927 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) 928 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError 929 #define __Pyx_PyDict_GetItemStr PyDict_GetItem 931 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
932 #if CYTHON_COMPILING_IN_PYPY 933 return PyDict_GetItem(dict, name);
936 PyDictObject *mp = (PyDictObject*) dict;
937 long hash = ((PyStringObject *) name)->ob_shash;
939 ep = (mp->ma_lookup)(mp, name, hash);
946 #define __Pyx_PyDict_GetItemStr PyDict_GetItem 948 #if CYTHON_USE_TYPE_SLOTS 949 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) 950 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) 951 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) 953 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) 954 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) 955 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next 957 #if CYTHON_COMPILING_IN_LIMITED_API 958 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) 960 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) 962 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 963 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ 964 PyTypeObject *type = Py_TYPE((PyObject*)obj);\ 965 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ 966 PyObject_GC_Del(obj);\ 970 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) 972 #if CYTHON_COMPILING_IN_LIMITED_API 973 #define CYTHON_PEP393_ENABLED 1 974 #define __Pyx_PyUnicode_READY(op) (0) 975 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) 976 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) 977 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) 978 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) 979 #define __Pyx_PyUnicode_DATA(u) ((void*)u) 980 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) 981 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) 982 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) 983 #define CYTHON_PEP393_ENABLED 1 984 #if PY_VERSION_HEX >= 0x030C0000 985 #define __Pyx_PyUnicode_READY(op) (0) 987 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 988 0 : _PyUnicode_Ready((PyObject *)(op))) 990 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) 991 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) 992 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) 993 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) 994 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) 995 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) 996 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) 997 #if PY_VERSION_HEX >= 0x030C0000 998 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) 1000 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 1001 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) 1003 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) 1007 #define CYTHON_PEP393_ENABLED 0 1008 #define PyUnicode_1BYTE_KIND 1 1009 #define PyUnicode_2BYTE_KIND 2 1010 #define PyUnicode_4BYTE_KIND 4 1011 #define __Pyx_PyUnicode_READY(op) (0) 1012 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) 1013 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) 1014 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) 1015 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) 1016 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) 1017 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) 1018 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) 1019 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) 1021 #if CYTHON_COMPILING_IN_PYPY 1022 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) 1023 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) 1025 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) 1026 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ 1027 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) 1029 #if CYTHON_COMPILING_IN_PYPY 1030 #if !defined(PyUnicode_DecodeUnicodeEscape) 1031 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) 1033 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) 1034 #undef PyUnicode_Contains 1035 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) 1037 #if !defined(PyByteArray_Check) 1038 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) 1040 #if !defined(PyObject_Format) 1041 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) 1044 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) 1045 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) 1046 #if PY_MAJOR_VERSION >= 3 1047 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) 1049 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) 1051 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) 1052 #define PyObject_ASCII(o) PyObject_Repr(o) 1054 #if PY_MAJOR_VERSION >= 3 1055 #define PyBaseString_Type PyUnicode_Type 1056 #define PyStringObject PyUnicodeObject 1057 #define PyString_Type PyUnicode_Type 1058 #define PyString_Check PyUnicode_Check 1059 #define PyString_CheckExact PyUnicode_CheckExact 1060 #ifndef PyObject_Unicode 1061 #define PyObject_Unicode PyObject_Str 1064 #if PY_MAJOR_VERSION >= 3 1065 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) 1066 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) 1068 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) 1069 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) 1071 #if CYTHON_COMPILING_IN_CPYTHON 1072 #define __Pyx_PySequence_ListKeepNew(obj)\ 1073 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) 1075 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) 1077 #ifndef PySet_CheckExact 1078 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) 1080 #if PY_VERSION_HEX >= 0x030900A4 1081 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) 1082 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) 1084 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) 1085 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) 1087 #if CYTHON_ASSUME_SAFE_MACROS 1088 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) 1089 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) 1090 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) 1091 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) 1092 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) 1093 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) 1094 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) 1095 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) 1096 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) 1098 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) 1099 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) 1100 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) 1101 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) 1102 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) 1103 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) 1104 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) 1105 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) 1106 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) 1108 #if PY_VERSION_HEX >= 0x030d00A1 1109 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) 1111 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(
const char *name) {
1112 PyObject *module = PyImport_AddModule(name);
1117 #if PY_MAJOR_VERSION >= 3 1118 #define PyIntObject PyLongObject 1119 #define PyInt_Type PyLong_Type 1120 #define PyInt_Check(op) PyLong_Check(op) 1121 #define PyInt_CheckExact(op) PyLong_CheckExact(op) 1122 #define __Pyx_Py3Int_Check(op) PyLong_Check(op) 1123 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) 1124 #define PyInt_FromString PyLong_FromString 1125 #define PyInt_FromUnicode PyLong_FromUnicode 1126 #define PyInt_FromLong PyLong_FromLong 1127 #define PyInt_FromSize_t PyLong_FromSize_t 1128 #define PyInt_FromSsize_t PyLong_FromSsize_t 1129 #define PyInt_AsLong PyLong_AsLong 1130 #define PyInt_AS_LONG PyLong_AS_LONG 1131 #define PyInt_AsSsize_t PyLong_AsSsize_t 1132 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask 1133 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask 1134 #define PyNumber_Int PyNumber_Long 1136 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) 1137 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) 1139 #if PY_MAJOR_VERSION >= 3 1140 #define PyBoolObject PyLongObject 1142 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY 1143 #ifndef PyUnicode_InternFromString 1144 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) 1147 #if PY_VERSION_HEX < 0x030200A4 1148 typedef long Py_hash_t;
1149 #define __Pyx_PyInt_FromHash_t PyInt_FromLong 1150 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t 1152 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t 1153 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t 1155 #if CYTHON_USE_ASYNC_SLOTS 1156 #if PY_VERSION_HEX >= 0x030500B1 1157 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods 1158 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) 1160 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) 1163 #define __Pyx_PyType_AsAsync(obj) NULL 1165 #ifndef __Pyx_PyAsyncMethodsStruct 1170 } __Pyx_PyAsyncMethodsStruct;
1173 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) 1174 #if !defined(_USE_MATH_DEFINES) 1175 #define _USE_MATH_DEFINES 1180 #define __PYX_NAN() ((float) NAN) 1182 static CYTHON_INLINE
float __PYX_NAN() {
1184 memset(&value, 0xFF,
sizeof(value));
1188 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) 1189 #define __Pyx_truncl trunc 1191 #define __Pyx_truncl truncl 1194 #define __PYX_MARK_ERR_POS(f_index, lineno) \ 1195 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } 1196 #define __PYX_ERR(f_index, lineno, Ln_error) \ 1197 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } 1199 #ifdef CYTHON_EXTERN_C 1200 #undef __PYX_EXTERN_C 1201 #define __PYX_EXTERN_C CYTHON_EXTERN_C 1202 #elif defined(__PYX_EXTERN_C) 1204 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") 1206 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. 1209 #define __PYX_EXTERN_C extern "C++" 1212 #define __PYX_HAVE__PyClical 1213 #define __PYX_HAVE_API__PyClical 1217 #include "stdexcept" 1227 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) 1228 #define CYTHON_WITHOUT_ASSERTIONS 1231 typedef struct {PyObject **p;
const char *s;
const Py_ssize_t n;
const char* encoding;
1232 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
1234 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 1235 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 1236 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) 1237 #define __PYX_DEFAULT_STRING_ENCODING "" 1238 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString 1239 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 1240 #define __Pyx_uchar_cast(c) ((unsigned char)c) 1241 #define __Pyx_long_cast(x) ((long)x) 1242 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ 1243 (sizeof(type) < sizeof(Py_ssize_t)) ||\ 1244 (sizeof(type) > sizeof(Py_ssize_t) &&\ 1245 likely(v < (type)PY_SSIZE_T_MAX ||\ 1246 v == (type)PY_SSIZE_T_MAX) &&\ 1247 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ 1248 v == (type)PY_SSIZE_T_MIN))) ||\ 1249 (sizeof(type) == sizeof(Py_ssize_t) &&\ 1250 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ 1251 v == (type)PY_SSIZE_T_MAX))) ) 1252 static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t
i, Py_ssize_t limit) {
1253 return (
size_t)
i < (size_t) limit;
1255 #if defined (__cplusplus) && __cplusplus >= 201103L 1257 #define __Pyx_sst_abs(value) std::abs(value) 1258 #elif SIZEOF_INT >= SIZEOF_SIZE_T 1259 #define __Pyx_sst_abs(value) abs(value) 1260 #elif SIZEOF_LONG >= SIZEOF_SIZE_T 1261 #define __Pyx_sst_abs(value) labs(value) 1262 #elif defined (_MSC_VER) 1263 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) 1264 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 1265 #define __Pyx_sst_abs(value) llabs(value) 1266 #elif defined (__GNUC__) 1267 #define __Pyx_sst_abs(value) __builtin_llabs(value) 1269 #define __Pyx_sst_abs(value) ((value<0) ? -value : value) 1271 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(
const char *s);
1272 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
1273 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1274 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(
const char*);
1275 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) 1276 #define __Pyx_PyBytes_FromString PyBytes_FromString 1277 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize 1278 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
1279 #if PY_MAJOR_VERSION < 3 1280 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString 1281 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 1283 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString 1284 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize 1286 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) 1287 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) 1288 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) 1289 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) 1290 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) 1291 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) 1292 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) 1293 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) 1294 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) 1295 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) 1296 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) 1297 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) 1298 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) 1299 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) 1300 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) 1301 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) 1302 #if CYTHON_COMPILING_IN_LIMITED_API 1303 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const wchar_t *u)
1305 const wchar_t *u_end = u;
1307 return (
size_t)(u_end - u - 1);
1310 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *u)
1312 const Py_UNICODE *u_end = u;
1314 return (
size_t)(u_end - u - 1);
1317 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) 1318 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) 1319 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode 1320 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode 1321 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) 1322 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) 1323 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
1324 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
1325 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1326 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
1327 #define __Pyx_PySequence_Tuple(obj)\ 1328 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) 1329 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1330 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
1331 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1332 #if CYTHON_ASSUME_SAFE_MACROS 1333 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) 1335 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) 1337 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) 1338 #if PY_MAJOR_VERSION >= 3 1339 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) 1341 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) 1343 #if CYTHON_USE_PYLONG_INTERNALS 1344 #if PY_VERSION_HEX >= 0x030C00A7 1345 #ifndef _PyLong_SIGN_MASK 1346 #define _PyLong_SIGN_MASK 3 1348 #ifndef _PyLong_NON_SIZE_BITS 1349 #define _PyLong_NON_SIZE_BITS 3 1351 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) 1352 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) 1353 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) 1354 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) 1355 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) 1356 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) 1357 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) 1358 #define __Pyx_PyLong_SignedDigitCount(x)\ 1359 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) 1360 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) 1361 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) 1362 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) 1364 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) 1365 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) 1367 typedef Py_ssize_t __Pyx_compact_pylong;
1368 typedef size_t __Pyx_compact_upylong;
1370 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) 1371 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) 1372 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) 1373 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) 1374 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) 1375 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) 1376 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) 1377 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) 1378 #define __Pyx_PyLong_CompactValue(x)\ 1379 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) 1380 typedef sdigit __Pyx_compact_pylong;
1381 typedef digit __Pyx_compact_upylong;
1383 #if PY_VERSION_HEX >= 0x030C00A5 1384 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) 1386 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) 1389 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 1391 static int __Pyx_sys_getdefaultencoding_not_ascii;
1392 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
1394 PyObject* default_encoding = NULL;
1395 PyObject* ascii_chars_u = NULL;
1396 PyObject* ascii_chars_b = NULL;
1397 const char* default_encoding_c;
1398 sys = PyImport_ImportModule(
"sys");
1400 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
1402 if (!default_encoding)
goto bad;
1403 default_encoding_c = PyBytes_AsString(default_encoding);
1404 if (!default_encoding_c)
goto bad;
1405 if (strcmp(default_encoding_c,
"ascii") == 0) {
1406 __Pyx_sys_getdefaultencoding_not_ascii = 0;
1408 char ascii_chars[128];
1410 for (c = 0; c < 128; c++) {
1411 ascii_chars[c] = (char) c;
1413 __Pyx_sys_getdefaultencoding_not_ascii = 1;
1414 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
1415 if (!ascii_chars_u)
goto bad;
1416 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
1417 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
1420 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
1421 default_encoding_c);
1424 Py_DECREF(ascii_chars_u);
1425 Py_DECREF(ascii_chars_b);
1427 Py_DECREF(default_encoding);
1430 Py_XDECREF(default_encoding);
1431 Py_XDECREF(ascii_chars_u);
1432 Py_XDECREF(ascii_chars_b);
1436 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 1437 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) 1439 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) 1440 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 1442 static char* __PYX_DEFAULT_STRING_ENCODING;
1443 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
1445 PyObject* default_encoding = NULL;
1446 char* default_encoding_c;
1447 sys = PyImport_ImportModule(
"sys");
1449 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
1451 if (!default_encoding)
goto bad;
1452 default_encoding_c = PyBytes_AsString(default_encoding);
1453 if (!default_encoding_c)
goto bad;
1454 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c) + 1);
1455 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
1456 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
1457 Py_DECREF(default_encoding);
1460 Py_XDECREF(default_encoding);
1468 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) 1469 #define likely(x) __builtin_expect(!!(x), 1) 1470 #define unlikely(x) __builtin_expect(!!(x), 0) 1472 #define likely(x) (x) 1473 #define unlikely(x) (x) 1475 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
1477 #if !CYTHON_USE_MODULE_STATE 1478 static PyObject *__pyx_m = NULL;
1480 static int __pyx_lineno;
1481 static int __pyx_clineno = 0;
1482 static const char * __pyx_cfilenm = __FILE__;
1483 static const char *__pyx_filename;
1487 static const char *__pyx_f[] = {
1493 #ifndef __PYX_FORCE_INIT_THREADS 1494 #define __PYX_FORCE_INIT_THREADS 0 1502 struct __pyx_obj_8PyClical_index_set;
1503 struct __pyx_obj_8PyClical_clifford;
1504 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
1505 struct __pyx_opt_args_8PyClical_approx_equal;
1506 struct __pyx_opt_args_8PyClical_sqrt;
1507 struct __pyx_opt_args_8PyClical_log;
1508 struct __pyx_opt_args_8PyClical_cos;
1509 struct __pyx_opt_args_8PyClical_acos;
1510 struct __pyx_opt_args_8PyClical_acosh;
1511 struct __pyx_opt_args_8PyClical_sin;
1512 struct __pyx_opt_args_8PyClical_asin;
1513 struct __pyx_opt_args_8PyClical_asinh;
1514 struct __pyx_opt_args_8PyClical_tan;
1515 struct __pyx_opt_args_8PyClical_atan;
1516 struct __pyx_opt_args_8PyClical_atanh;
1517 struct __pyx_opt_args_8PyClical_random_clifford;
1526 struct __pyx_opt_args_8PyClical_approx_equal {
1539 struct __pyx_opt_args_8PyClical_sqrt {
1551 struct __pyx_opt_args_8PyClical_log {
1563 struct __pyx_opt_args_8PyClical_cos {
1575 struct __pyx_opt_args_8PyClical_acos {
1587 struct __pyx_opt_args_8PyClical_acosh {
1599 struct __pyx_opt_args_8PyClical_sin {
1611 struct __pyx_opt_args_8PyClical_asin {
1623 struct __pyx_opt_args_8PyClical_asinh {
1635 struct __pyx_opt_args_8PyClical_tan {
1647 struct __pyx_opt_args_8PyClical_atan {
1659 struct __pyx_opt_args_8PyClical_atanh {
1671 struct __pyx_opt_args_8PyClical_random_clifford {
1683 struct __pyx_obj_8PyClical_index_set {
1685 struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1697 struct __pyx_obj_8PyClical_clifford {
1699 struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1711 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1713 PyObject *__pyx_v_idx;
1714 struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1715 PyObject *__pyx_t_0;
1716 Py_ssize_t __pyx_t_1;
1717 PyObject *(*__pyx_t_2)(PyObject *);
1730 struct __pyx_vtabstruct_8PyClical_index_set {
1731 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
1732 IndexSet (*unwrap)(
struct __pyx_obj_8PyClical_index_set *);
1733 PyObject *(*copy)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch);
1735 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1736 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
1737 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *);
1748 struct __pyx_vtabstruct_8PyClical_clifford {
1749 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
1750 Clifford (*unwrap)(
struct __pyx_obj_8PyClical_clifford *);
1751 PyObject *(*copy)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch);
1753 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1754 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
1755 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *);
1760 #ifndef CYTHON_REFNANNY 1761 #define CYTHON_REFNANNY 0 1765 void (*INCREF)(
void*, PyObject*, Py_ssize_t);
1766 void (*DECREF)(
void*, PyObject*, Py_ssize_t);
1767 void (*GOTREF)(
void*, PyObject*, Py_ssize_t);
1768 void (*GIVEREF)(
void*, PyObject*, Py_ssize_t);
1769 void* (*SetupContext)(
const char*, Py_ssize_t,
const char*);
1770 void (*FinishContext)(
void**);
1771 } __Pyx_RefNannyAPIStruct;
1772 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1773 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
1774 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; 1776 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ 1778 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ 1779 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ 1780 PyGILState_Release(__pyx_gilstate_save);\ 1782 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ 1784 #define __Pyx_RefNannyFinishContextNogil() {\ 1785 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ 1786 __Pyx_RefNannyFinishContext();\ 1787 PyGILState_Release(__pyx_gilstate_save);\ 1790 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ 1791 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) 1792 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() 1794 #define __Pyx_RefNannyFinishContextNogil() {\ 1795 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ 1796 __Pyx_RefNannyFinishContext();\ 1797 PyGILState_Release(__pyx_gilstate_save);\ 1799 #define __Pyx_RefNannyFinishContext()\ 1800 __Pyx_RefNanny->FinishContext(&__pyx_refnanny) 1801 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) 1802 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) 1803 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) 1804 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) 1805 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) 1806 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) 1807 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) 1808 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) 1810 #define __Pyx_RefNannyDeclarations 1811 #define __Pyx_RefNannySetupContext(name, acquire_gil) 1812 #define __Pyx_RefNannyFinishContextNogil() 1813 #define __Pyx_RefNannyFinishContext() 1814 #define __Pyx_INCREF(r) Py_INCREF(r) 1815 #define __Pyx_DECREF(r) Py_DECREF(r) 1816 #define __Pyx_GOTREF(r) 1817 #define __Pyx_GIVEREF(r) 1818 #define __Pyx_XINCREF(r) Py_XINCREF(r) 1819 #define __Pyx_XDECREF(r) Py_XDECREF(r) 1820 #define __Pyx_XGOTREF(r) 1821 #define __Pyx_XGIVEREF(r) 1823 #define __Pyx_Py_XDECREF_SET(r, v) do {\ 1824 PyObject *tmp = (PyObject *) r;\ 1825 r = v; Py_XDECREF(tmp);\ 1827 #define __Pyx_XDECREF_SET(r, v) do {\ 1828 PyObject *tmp = (PyObject *) r;\ 1829 r = v; __Pyx_XDECREF(tmp);\ 1831 #define __Pyx_DECREF_SET(r, v) do {\ 1832 PyObject *tmp = (PyObject *) r;\ 1833 r = v; __Pyx_DECREF(tmp);\ 1835 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) 1836 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) 1839 #if CYTHON_FAST_THREAD_STATE 1840 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) 1841 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1843 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) 1847 #if CYTHON_FAST_THREAD_STATE 1848 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; 1849 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; 1850 #if PY_VERSION_HEX >= 0x030C00A6 1851 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) 1852 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) 1854 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) 1855 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) 1858 #define __Pyx_PyThreadState_declare 1859 #define __Pyx_PyThreadState_assign 1860 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) 1861 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() 1865 #if CYTHON_FAST_THREAD_STATE 1866 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) 1867 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) 1868 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) 1869 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) 1870 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) 1871 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1872 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1873 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 1874 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) 1876 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) 1879 #define __Pyx_PyErr_Clear() PyErr_Clear() 1880 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) 1881 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) 1882 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) 1883 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) 1884 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) 1885 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) 1886 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) 1890 #if CYTHON_USE_TYPE_SLOTS 1891 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject*
obj, PyObject* attr_name);
1893 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) 1897 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject*
obj, PyObject* attr_name);
1900 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1903 #if CYTHON_FAST_PYCALL 1904 #if !CYTHON_VECTORCALL 1905 #define __Pyx_PyFunction_FastCall(func, args, nargs)\ 1906 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) 1907 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1909 #define __Pyx_BUILD_ASSERT_EXPR(cond)\ 1910 (sizeof(char [1 - 2*!(cond)]) - 1) 1911 #ifndef Py_MEMBER_SIZE 1912 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) 1914 #if !CYTHON_VECTORCALL 1915 #if PY_VERSION_HEX >= 0x03080000 1916 #include "frameobject.h" 1917 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API 1918 #ifndef Py_BUILD_CORE 1919 #define Py_BUILD_CORE 1 1921 #include "internal/pycore_frame.h" 1923 #define __Pxy_PyFrame_Initialize_Offsets() 1924 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) 1926 static size_t __pyx_pyframe_localsplus_offset = 0;
1927 #include "frameobject.h" 1928 #define __Pxy_PyFrame_Initialize_Offsets()\ 1929 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ 1930 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) 1931 #define __Pyx_PyFrame_GetLocalsplus(frame)\ 1932 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) 1938 #if CYTHON_COMPILING_IN_CPYTHON 1939 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1941 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) 1945 #if CYTHON_COMPILING_IN_CPYTHON 1946 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1950 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) 1951 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args,
size_t nargs, PyObject *kwargs);
1954 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1957 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS 1958 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) 1959 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) 1960 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ 1961 (version_var) = __PYX_GET_DICT_VERSION(dict);\ 1962 (cache_var) = (value); 1963 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ 1964 static PY_UINT64_T __pyx_dict_version = 0;\ 1965 static PyObject *__pyx_dict_cached_value = NULL;\ 1966 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ 1967 (VAR) = __pyx_dict_cached_value;\ 1969 (VAR) = __pyx_dict_cached_value = (LOOKUP);\ 1970 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ 1973 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *
obj);
1974 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *
obj);
1975 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject*
obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1977 #define __PYX_GET_DICT_VERSION(dict) (0) 1978 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) 1979 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); 1983 #if CYTHON_COMPILING_IN_CPYTHON 1984 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t n);
1985 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t n);
1992 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
1995 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
1998 #if CYTHON_AVOID_BORROWED_REFS 1999 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) 2000 #elif CYTHON_ASSUME_SAFE_MACROS 2001 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) 2003 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) 2005 #if CYTHON_AVOID_BORROWED_REFS 2006 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) 2007 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) 2009 #define __Pyx_Arg_NewRef_VARARGS(arg) arg 2010 #define __Pyx_Arg_XDECREF_VARARGS(arg) 2012 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) 2013 #define __Pyx_KwValues_VARARGS(args, nargs) NULL 2014 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) 2015 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) 2016 #if CYTHON_METH_FASTCALL 2017 #define __Pyx_Arg_FASTCALL(args, i) args[i] 2018 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) 2019 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) 2020 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *s);
2021 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 2022 CYTHON_UNUSED
static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues);
2024 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) 2026 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg 2028 #define __Pyx_Arg_XDECREF_FASTCALL(arg) 2030 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS 2031 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS 2032 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS 2033 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS 2034 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS 2035 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) 2036 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) 2038 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 2039 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) 2040 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) 2042 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) 2043 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) 2047 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
2048 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2051 static int __Pyx_CheckKeywordStrings(PyObject *kw,
const char* function_name,
int kw_allowed);
2054 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
2057 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *
const *kwvalues,
2058 PyObject **argnames[],
2059 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
2060 const char* function_name);
2063 #if CYTHON_USE_DICT_VERSIONS 2064 #define __Pyx_GetModuleGlobalName(var, name) do {\ 2065 static PY_UINT64_T __pyx_dict_version = 0;\ 2066 static PyObject *__pyx_dict_cached_value = NULL;\ 2067 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ 2068 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ 2069 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ 2071 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ 2072 PY_UINT64_T __pyx_dict_version;\ 2073 PyObject *__pyx_dict_cached_value;\ 2074 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ 2076 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2078 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) 2079 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) 2080 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2084 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE 2085 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2089 #if CYTHON_FAST_THREAD_STATE 2090 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) 2091 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2092 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) 2093 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2095 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) 2096 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) 2100 #if CYTHON_FAST_THREAD_STATE 2101 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) 2102 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2104 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2108 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2111 #if CYTHON_COMPILING_IN_CPYTHON 2112 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) 2113 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) 2114 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2115 static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2116 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2117 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2119 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) 2120 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) 2121 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) 2122 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) 2124 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) 2125 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) 2128 #define __Pyx_PyObject_Str(obj)\ 2129 (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) 2132 # if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 2134 #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny) 2136 #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right) 2138 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
2140 ,
void* __pyx_refnanny
2144 #define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat 2146 #define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ 2147 PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right)) 2150 #if !CYTHON_COMPILING_IN_PYPY 2151 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
2153 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ 2154 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) 2158 static CYTHON_INLINE
int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq,
int eq) {
2159 int result = PySequence_Contains(seq, item);
2160 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2164 static void __Pyx_Generator_Replace_StopIteration(
int in_async_gen);
2167 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2170 #if CYTHON_USE_CPP_STD_MOVE 2172 #define __PYX_STD_MOVE_IF_SUPPORTED(x) std::move(x) 2174 #define __PYX_STD_MOVE_IF_SUPPORTED(x) x 2181 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(
const char *s, Py_ssize_t size,
const char *errors) {
2183 return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2185 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(
const char *s, Py_ssize_t size,
const char *errors) {
2187 return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2189 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(
const char *s, Py_ssize_t size,
const char *errors) {
2191 return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2195 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
2196 const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
2197 const char* encoding,
const char* errors,
2198 PyObject* (*decode_func)(
const char *s, Py_ssize_t size,
const char *errors));
2201 static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
2202 std::string cppstring, Py_ssize_t start, Py_ssize_t stop,
2203 const char* encoding,
const char* errors,
2204 PyObject* (*decode_func)(
const char *s, Py_ssize_t size,
const char *errors)) {
2205 return __Pyx_decode_c_bytes(
2206 cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func);
2210 #if CYTHON_FAST_THREAD_STATE 2211 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) 2212 static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2214 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2218 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ 2219 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ 2220 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ 2221 (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ 2222 __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) 2223 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
2224 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t
i, PyObject *v,
2225 int is_list,
int wraparound,
int boundscheck);
2228 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ 2229 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ 2230 __Pyx__ArgTypeTest(obj, type, name, exact)) 2231 static int __Pyx__ArgTypeTest(PyObject *
obj, PyTypeObject *type,
const char *name,
int exact);
2234 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
2237 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
2238 #if PY_MAJOR_VERSION >= 3 2239 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
2243 #include <structmember.h> 2246 #if CYTHON_USE_TYPE_SPECS 2247 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
2251 static int __Pyx_PyObject_GetMethod(PyObject *
obj, PyObject *name, PyObject **method);
2254 static PyObject* __Pyx_PyObject_CallMethod0(PyObject*
obj, PyObject* method_name);
2257 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS 2258 static int __Pyx_validate_bases_tuple(
const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
2262 CYTHON_UNUSED
static int __Pyx_PyType_Ready(PyTypeObject *t);
2265 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 2266 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject*
obj, PyObject* attr_name);
2268 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr 2272 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 2273 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject*
obj, PyObject* attr_name);
2275 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr 2279 static int __Pyx_SetVtable(PyTypeObject* typeptr ,
void* vtable);
2282 static void* __Pyx_GetVtable(PyTypeObject *type);
2285 #if !CYTHON_COMPILING_IN_LIMITED_API 2286 static int __Pyx_MergeVtables(PyTypeObject *type);
2290 #if !CYTHON_COMPILING_IN_LIMITED_API 2291 static int __Pyx_setup_reduce(PyObject* type_obj);
2295 static PyObject *__Pyx_FetchSharedCythonABIModule(
void);
2298 #if !CYTHON_USE_TYPE_SPECS 2299 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2301 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
2305 #if CYTHON_COMPILING_IN_LIMITED_API 2306 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *
self, PyObject *typ) {
2307 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
2308 CYTHON_UNUSED_VAR(typ);
2310 return __Pyx_NewRef(func);
2311 typesModule = PyImport_ImportModule(
"types");
2312 if (!typesModule)
return NULL;
2313 methodType = PyObject_GetAttrString(typesModule,
"MethodType");
2314 Py_DECREF(typesModule);
2315 if (!methodType)
return NULL;
2316 result = PyObject_CallFunctionObjArgs(methodType, func,
self, NULL);
2317 Py_DECREF(methodType);
2320 #elif PY_MAJOR_VERSION >= 3 2321 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *
self, PyObject *typ) {
2322 CYTHON_UNUSED_VAR(typ);
2324 return __Pyx_NewRef(func);
2325 return PyMethod_New(func,
self);
2328 #define __Pyx_PyMethod_New PyMethod_New 2332 #if CYTHON_METH_FASTCALL 2333 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw);
2337 #define __Pyx_CyFunction_USED 2338 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 2339 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 2340 #define __Pyx_CYFUNCTION_CCLASS 0x04 2341 #define __Pyx_CYFUNCTION_COROUTINE 0x08 2342 #define __Pyx_CyFunction_GetClosure(f)\ 2343 (((__pyx_CyFunctionObject *) (f))->func_closure) 2344 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API 2345 #define __Pyx_CyFunction_GetClassObj(f)\ 2346 (((__pyx_CyFunctionObject *) (f))->func_classobj) 2348 #define __Pyx_CyFunction_GetClassObj(f)\ 2349 ((PyObject*) ((PyCMethodObject *) (f))->mm_class) 2351 #define __Pyx_CyFunction_SetClassObj(f, classobj)\ 2352 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) 2353 #define __Pyx_CyFunction_Defaults(type, f)\ 2354 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) 2355 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ 2356 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) 2358 #if CYTHON_COMPILING_IN_LIMITED_API 2361 #elif PY_VERSION_HEX < 0x030900B1 2362 PyCFunctionObject func;
2364 PyCMethodObject func;
2366 #if CYTHON_BACKPORT_VECTORCALL 2367 __pyx_vectorcallfunc func_vectorcall;
2369 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API 2370 PyObject *func_weakreflist;
2372 PyObject *func_dict;
2373 PyObject *func_name;
2374 PyObject *func_qualname;
2376 PyObject *func_globals;
2377 PyObject *func_code;
2378 PyObject *func_closure;
2379 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API 2380 PyObject *func_classobj;
2383 int defaults_pyobjects;
2384 size_t defaults_size;
2386 PyObject *defaults_tuple;
2387 PyObject *defaults_kwdict;
2388 PyObject *(*defaults_getter)(PyObject *);
2389 PyObject *func_annotations;
2390 PyObject *func_is_coroutine;
2391 } __pyx_CyFunctionObject;
2392 #undef __Pyx_CyOrPyCFunction_Check 2393 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) 2394 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) 2395 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) 2396 static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void *cfunc);
2397 #undef __Pyx_IsSameCFunction 2398 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) 2399 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2400 int flags, PyObject* qualname,
2402 PyObject *module, PyObject *globals,
2404 static CYTHON_INLINE
void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
2405 static CYTHON_INLINE
void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2408 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2410 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2412 static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2414 static int __pyx_CyFunction_init(PyObject *module);
2415 #if CYTHON_METH_FASTCALL 2416 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2417 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2418 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2419 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2420 #if CYTHON_BACKPORT_VECTORCALL 2421 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) 2423 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) 2428 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2429 int flags, PyObject* qualname,
2431 PyObject *module, PyObject *globals,
2435 #ifdef CYTHON_CLINE_IN_TRACEBACK 2436 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) 2438 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
2442 #if !CYTHON_COMPILING_IN_LIMITED_API 2444 PyCodeObject* code_object;
2446 } __Pyx_CodeObjectCacheEntry;
2447 struct __Pyx_CodeObjectCache {
2450 __Pyx_CodeObjectCacheEntry* entries;
2452 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2453 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
2454 static PyCodeObject *__pyx_find_code_object(
int code_line);
2455 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
2459 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
2460 int py_line,
const char *filename);
2463 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) 2464 #define __Pyx_HAS_GCC_DIAGNOSTIC 2468 #ifndef __Pyx_CppExn2PyErr 2471 #include <stdexcept> 2473 static void __Pyx_CppExn2PyErr() {
2475 if (PyErr_Occurred())
2479 }
catch (
const std::bad_alloc& exn) {
2480 PyErr_SetString(PyExc_MemoryError, exn.what());
2481 }
catch (
const std::bad_cast& exn) {
2482 PyErr_SetString(PyExc_TypeError, exn.what());
2483 }
catch (
const std::bad_typeid& exn) {
2484 PyErr_SetString(PyExc_TypeError, exn.what());
2485 }
catch (
const std::domain_error& exn) {
2486 PyErr_SetString(PyExc_ValueError, exn.what());
2487 }
catch (
const std::invalid_argument& exn) {
2488 PyErr_SetString(PyExc_ValueError, exn.what());
2489 }
catch (
const std::ios_base::failure& exn) {
2490 PyErr_SetString(PyExc_IOError, exn.what());
2491 }
catch (
const std::out_of_range& exn) {
2492 PyErr_SetString(PyExc_IndexError, exn.what());
2493 }
catch (
const std::overflow_error& exn) {
2494 PyErr_SetString(PyExc_OverflowError, exn.what());
2495 }
catch (
const std::range_error& exn) {
2496 PyErr_SetString(PyExc_ArithmeticError, exn.what());
2497 }
catch (
const std::underflow_error& exn) {
2498 PyErr_SetString(PyExc_ArithmeticError, exn.what());
2499 }
catch (
const std::exception& exn) {
2500 PyErr_SetString(PyExc_RuntimeError, exn.what());
2504 PyErr_SetString(PyExc_RuntimeError,
"Unknown exception");
2510 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
2513 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
2516 #if CYTHON_COMPILING_IN_LIMITED_API 2517 typedef PyObject *__Pyx_TypeName;
2518 #define __Pyx_FMT_TYPENAME "%U" 2519 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
2520 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) 2522 typedef const char *__Pyx_TypeName;
2523 #define __Pyx_FMT_TYPENAME "%.200s" 2524 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) 2525 #define __Pyx_DECREF_TypeName(obj) 2529 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
2532 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
2535 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject*
function, PyObject* arg1, PyObject* arg2);
2538 static PyObject* __Pyx_PyObject_CallMethod1(PyObject*
obj, PyObject* method_name, PyObject* arg);
2541 struct __pyx_CoroutineObject;
2542 typedef PyObject *(*__pyx_coroutine_body_t)(
struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
2543 #if CYTHON_USE_EXC_INFO_STACK 2544 #define __Pyx_ExcInfoStruct _PyErr_StackItem 2548 PyObject *exc_value;
2549 PyObject *exc_traceback;
2550 } __Pyx_ExcInfoStruct;
2552 typedef struct __pyx_CoroutineObject {
2554 __pyx_coroutine_body_t body;
2556 __Pyx_ExcInfoStruct gi_exc_state;
2557 PyObject *gi_weakreflist;
2559 PyObject *yieldfrom;
2561 PyObject *gi_qualname;
2562 PyObject *gi_modulename;
2567 } __pyx_CoroutineObject;
2568 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
2569 PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
2570 PyObject *name, PyObject *qualname, PyObject *module_name);
2571 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
2572 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
2573 PyObject *name, PyObject *qualname, PyObject *module_name);
2574 static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *
self);
2575 static int __Pyx_Coroutine_clear(PyObject *
self);
2576 static PyObject *__Pyx_Coroutine_Send(PyObject *
self, PyObject *value);
2577 static PyObject *__Pyx_Coroutine_Close(PyObject *
self);
2578 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
2579 #if CYTHON_USE_EXC_INFO_STACK 2580 #define __Pyx_Coroutine_SwapException(self) 2581 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) 2583 #define __Pyx_Coroutine_SwapException(self) {\ 2584 __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ 2585 __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ 2587 #define __Pyx_Coroutine_ResetAndClearException(self) {\ 2588 __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ 2589 (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ 2592 #if CYTHON_FAST_THREAD_STATE 2593 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ 2594 __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) 2596 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ 2597 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) 2599 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
2600 static CYTHON_INLINE
void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
2603 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code);
2606 static int __Pyx_patch_abc(
void);
2609 #define __Pyx_Generator_USED 2610 #define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType) 2611 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ 2612 __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) 2613 static PyObject *__Pyx_Generator_Next(PyObject *
self);
2614 static int __pyx_Generator_init(PyObject *module);
2617 static unsigned long __Pyx_get_runtime_version(
void);
2618 static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer);
2621 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2624 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other);
2625 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
2626 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch);
2627 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other);
2628 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
2629 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch);
2640 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *);
2641 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *,
int __pyx_skip_dispatch);
2642 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *,
int __pyx_skip_dispatch);
2643 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *,
int __pyx_skip_dispatch);
2644 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *);
2645 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *);
2646 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared_tol(PyObject *,
int __pyx_skip_dispatch);
2647 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared(PyObject *, PyObject *, PyObject *,
int __pyx_skip_dispatch);
2648 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_approx_equal(PyObject *, PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_approx_equal *__pyx_optional_args);
2649 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *,
int __pyx_skip_dispatch);
2650 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *,
int __pyx_skip_dispatch);
2651 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *,
int __pyx_skip_dispatch);
2652 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *,
int __pyx_skip_dispatch);
2653 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *,
int __pyx_skip_dispatch);
2654 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *,
int __pyx_skip_dispatch);
2655 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *,
int __pyx_skip_dispatch);
2656 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *,
int __pyx_skip_dispatch);
2657 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *,
int __pyx_skip_dispatch);
2658 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *,
int __pyx_skip_dispatch);
2659 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *,
int __pyx_skip_dispatch);
2660 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *,
int __pyx_skip_dispatch);
2661 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *,
int __pyx_skip_dispatch);
2662 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *,
int __pyx_skip_dispatch);
2663 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
2664 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
2665 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *,
int __pyx_skip_dispatch);
2666 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args);
2667 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *,
int __pyx_skip_dispatch);
2668 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_log *__pyx_optional_args);
2669 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args);
2670 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args);
2671 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *,
int __pyx_skip_dispatch);
2672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args);
2673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args);
2674 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args);
2675 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *,
int __pyx_skip_dispatch);
2676 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args);
2677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args);
2678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args);
2679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *,
int __pyx_skip_dispatch);
2680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args);
2681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_random_clifford(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_random_clifford *__pyx_optional_args);
2682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *,
int __pyx_skip_dispatch);
2683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *,
int __pyx_skip_dispatch);
2684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *,
int __pyx_skip_dispatch);
2685 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string
const &);
2686 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string
const &);
2687 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string
const &);
2688 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string
const &);
2689 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string
const &);
2692 #define __Pyx_MODULE_NAME "PyClical" 2693 extern int __pyx_module_is_main_PyClical;
2694 int __pyx_module_is_main_PyClical = 0;
2698 static PyObject *__pyx_builtin_IndexError;
2699 static PyObject *__pyx_builtin_RuntimeError;
2700 static PyObject *__pyx_builtin_TypeError;
2701 static PyObject *__pyx_builtin_ValueError;
2702 static PyObject *__pyx_builtin_NotImplemented;
2703 static PyObject *__pyx_builtin_range;
2704 static PyObject *__pyx_builtin_xrange;
2706 static const char __pyx_k_[] =
".";
2707 static const char __pyx_k_e[] =
"e";
2708 static const char __pyx_k_i[] =
"i";
2709 static const char __pyx_k_m[] =
"m";
2710 static const char __pyx_k_n[] =
"n";
2711 static const char __pyx_k_p[] =
"p";
2712 static const char __pyx_k_q[] =
"q";
2713 static const char __pyx_k__2[] =
" ";
2714 static const char __pyx_k__3[] =
":";
2715 static const char __pyx_k__4[] =
"\n\t";
2716 static const char __pyx_k__5[] =
" (";
2717 static const char __pyx_k__6[] =
", ";
2718 static const char __pyx_k__7[] =
").";
2719 static const char __pyx_k__9[] =
"*";
2720 static const char __pyx_k_cl[] =
"cl";
2721 static const char __pyx_k_gc[] =
"gc";
2722 static const char __pyx_k_pi[] =
"pi";
2723 static const char __pyx_k_abc[] =
"abc";
2724 static const char __pyx_k_abs[] =
"abs";
2725 static const char __pyx_k_cos[] =
"cos";
2726 static const char __pyx_k_err[] =
"err";
2727 static const char __pyx_k_exp[] =
"exp";
2728 static const char __pyx_k_frm[] =
"frm";
2729 static const char __pyx_k_inv[] =
"inv";
2730 static const char __pyx_k_ist[] =
"ist";
2731 static const char __pyx_k_ixt[] =
"ixt";
2732 static const char __pyx_k_lhs[] =
"lhs";
2733 static const char __pyx_k_log[] =
"log";
2734 static const char __pyx_k_lst[] =
"lst";
2735 static const char __pyx_k_max[] =
"max";
2736 static const char __pyx_k_min[] =
"min";
2737 static const char __pyx_k_obj[] =
"obj";
2738 static const char __pyx_k_odd[] =
"odd";
2739 static const char __pyx_k_pow[] =
"pow";
2740 static const char __pyx_k_rhs[] =
"rhs";
2741 static const char __pyx_k_sin[] =
"sin";
2742 static const char __pyx_k_tan[] =
"tan";
2743 static const char __pyx_k_tau[] =
"tau";
2744 static const char __pyx_k_tol[] =
"tol";
2745 static const char __pyx_k_vec[] =
"vec";
2746 static const char __pyx_k_Real[] =
"Real";
2747 static const char __pyx_k__113[] =
"?";
2748 static const char __pyx_k_acos[] =
"acos";
2749 static const char __pyx_k_agc3[] =
"agc3";
2750 static const char __pyx_k_args[] =
"args";
2751 static const char __pyx_k_asin[] =
"asin";
2752 static const char __pyx_k_atan[] =
"atan";
2753 static const char __pyx_k_cga3[] =
"cga3";
2754 static const char __pyx_k_conj[] =
"conj";
2755 static const char __pyx_k_copy[] =
"copy";
2756 static const char __pyx_k_cosh[] =
"cosh";
2757 static const char __pyx_k_even[] =
"even";
2758 static const char __pyx_k_fill[] =
"fill";
2759 static const char __pyx_k_from[] =
" from ";
2760 static const char __pyx_k_imag[] =
"imag";
2761 static const char __pyx_k_iter[] =
"__iter__";
2762 static const char __pyx_k_main[] =
"__main__";
2763 static const char __pyx_k_math[] =
"math";
2764 static const char __pyx_k_name[] =
"__name__";
2765 static const char __pyx_k_norm[] =
"norm";
2766 static const char __pyx_k_pure[] =
"pure";
2767 static const char __pyx_k_quad[] =
"quad";
2768 static const char __pyx_k_real[] =
"real";
2769 static const char __pyx_k_self[] =
"self";
2770 static const char __pyx_k_send[] =
"send";
2771 static const char __pyx_k_sinh[] =
"sinh";
2772 static const char __pyx_k_spec[] =
"__spec__";
2773 static const char __pyx_k_sqrt[] =
"sqrt";
2774 static const char __pyx_k_tanh[] =
"tanh";
2775 static const char __pyx_k_test[] =
"_test";
2776 static const char __pyx_k_UTF_8[] =
"UTF-8";
2777 static const char __pyx_k_acosh[] =
"acosh";
2778 static const char __pyx_k_asinh[] =
"asinh";
2779 static const char __pyx_k_atanh[] =
"atanh";
2780 static const char __pyx_k_close[] =
"close";
2781 static const char __pyx_k_count[] =
"count";
2782 static const char __pyx_k_frame[] =
"frame";
2783 static const char __pyx_k_grade[] =
"grade";
2784 static const char __pyx_k_isinf[] =
"isinf";
2785 static const char __pyx_k_isnan[] =
"isnan";
2786 static const char __pyx_k_istpq[] =
"istpq";
2787 static const char __pyx_k_limit[] =
"limit";
2788 static const char __pyx_k_nbar3[] =
"nbar3";
2789 static const char __pyx_k_ninf3[] =
"ninf3";
2790 static const char __pyx_k_other[] =
"other";
2791 static const char __pyx_k_range[] =
"range";
2792 static const char __pyx_k_throw[] =
"throw";
2793 static const char __pyx_k_using[] =
" using (";
2794 static const char __pyx_k_utf_8[] =
"utf-8";
2795 static const char __pyx_k_value[] =
" value ";
2796 static const char __pyx_k_enable[] =
"enable";
2797 static const char __pyx_k_encode[] =
"encode";
2798 static const char __pyx_k_import[] =
"__import__";
2799 static const char __pyx_k_reduce[] =
"__reduce__";
2800 static const char __pyx_k_result[] =
"result";
2801 static const char __pyx_k_scalar[] =
"scalar";
2802 static const char __pyx_k_test_2[] =
"__test__";
2803 static const char __pyx_k_xrange[] =
"xrange";
2804 static const char __pyx_k_cga3std[] =
"cga3std";
2805 static const char __pyx_k_compare[] =
"compare";
2806 static const char __pyx_k_disable[] =
"disable";
2807 static const char __pyx_k_doctest[] =
"doctest";
2808 static const char __pyx_k_hash_fn[] =
"hash_fn";
2809 static const char __pyx_k_invalid[] =
" invalid ";
2810 static const char __pyx_k_max_abs[] =
"max_abs";
2811 static const char __pyx_k_max_pos[] =
"max_pos";
2812 static const char __pyx_k_min_neg[] =
"min_neg";
2813 static const char __pyx_k_numbers[] =
"numbers";
2814 static const char __pyx_k_reframe[] =
"reframe";
2815 static const char __pyx_k_reverse[] =
"reverse";
2816 static const char __pyx_k_testmod[] =
"testmod";
2817 static const char __pyx_k_version[] =
"__version__";
2818 static const char __pyx_k_Integral[] =
"Integral";
2819 static const char __pyx_k_PyClical[] =
"PyClical";
2820 static const char __pyx_k_Sequence[] =
"Sequence";
2821 static const char __pyx_k_as_frame[] =
" as frame:\n\t";
2822 static const char __pyx_k_clifford[] =
"clifford";
2823 static const char __pyx_k_getstate[] =
"__getstate__";
2824 static const char __pyx_k_involute[] =
"involute";
2825 static const char __pyx_k_setstate[] =
"__setstate__";
2826 static const char __pyx_k_to_frame[] =
" to frame ";
2827 static const char __pyx_k_TypeError[] =
"TypeError";
2828 static const char __pyx_k_count_neg[] =
"count_neg";
2829 static const char __pyx_k_count_pos[] =
"count_pos";
2830 static const char __pyx_k_index_set[] =
"index_set";
2831 static const char __pyx_k_isenabled[] =
"isenabled";
2832 static const char __pyx_k_outer_pow[] =
"outer_pow";
2833 static const char __pyx_k_pyx_state[] =
"__pyx_state";
2834 static const char __pyx_k_reduce_ex[] =
"__reduce_ex__";
2835 static const char __pyx_k_threshold[] =
"threshold";
2836 static const char __pyx_k_truncated[] =
"truncated";
2837 static const char __pyx_k_IndexError[] =
"IndexError";
2838 static const char __pyx_k_ValueError[] =
"ValueError";
2839 static const char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
2840 static const char __pyx_k_collections[] =
"collections";
2841 static const char __pyx_k_e_line_1999[] =
"e (line 1999)";
2842 static const char __pyx_k_vector_part[] =
"vector_part";
2843 static const char __pyx_k_PyClical_pyx[] =
"PyClical.pyx";
2844 static const char __pyx_k_RuntimeError[] =
"RuntimeError";
2845 static const char __pyx_k_approx_equal[] =
"approx_equal";
2846 static const char __pyx_k_clifford_abs[] =
"clifford.abs";
2847 static const char __pyx_k_clifford_inv[] =
"clifford.inv";
2848 static const char __pyx_k_clifford_odd[] =
"clifford.odd";
2849 static const char __pyx_k_clifford_pow[] =
"clifford.pow";
2850 static const char __pyx_k_complexifier[] =
"complexifier";
2851 static const char __pyx_k_initializing[] =
"_initializing";
2852 static const char __pyx_k_is_coroutine[] =
"_is_coroutine";
2853 static const char __pyx_k_sign_of_mult[] =
"sign_of_mult";
2854 static const char __pyx_k_stringsource[] =
"<stringsource>";
2855 static const char __pyx_k_abs_line_1585[] =
"abs (line 1585)";
2856 static const char __pyx_k_clifford_conj[] =
"clifford.conj";
2857 static const char __pyx_k_clifford_copy[] =
"clifford.copy";
2858 static const char __pyx_k_clifford_even[] =
"clifford.even";
2859 static const char __pyx_k_clifford_norm[] =
"clifford.norm";
2860 static const char __pyx_k_clifford_pure[] =
"clifford.pure";
2861 static const char __pyx_k_clifford_quad[] =
"clifford.quad";
2862 static const char __pyx_k_cos_line_1714[] =
"cos (line 1714)";
2863 static const char __pyx_k_error_squared[] =
"error_squared";
2864 static const char __pyx_k_exp_line_1677[] =
"exp (line 1677)";
2865 static const char __pyx_k_index_set_max[] =
"index_set.max";
2866 static const char __pyx_k_index_set_min[] =
"index_set.min";
2867 static const char __pyx_k_inv_line_1441[] =
"inv (line 1441)";
2868 static const char __pyx_k_log_line_1691[] =
"log (line 1691)";
2869 static const char __pyx_k_odd_line_1509[] =
"odd (line 1509)";
2870 static const char __pyx_k_pow_line_1606[] =
"pow (line 1606)";
2871 static const char __pyx_k_reduce_cython[] =
"__reduce_cython__";
2872 static const char __pyx_k_sin_line_1791[] =
"sin (line 1791)";
2873 static const char __pyx_k_tan_line_1864[] =
"tan (line 1864)";
2874 static const char __pyx_k_using_invalid[] =
" using invalid ";
2875 static const char __pyx_k_Cannot_reframe[] =
"Cannot reframe";
2876 static const char __pyx_k_NotImplemented[] =
"NotImplemented";
2877 static const char __pyx_k_Not_applicable[] =
"Not applicable.";
2878 static const char __pyx_k_acos_line_1731[] =
"acos (line 1731)";
2879 static const char __pyx_k_agc3_line_1956[] =
"agc3 (line 1956)";
2880 static const char __pyx_k_asin_line_1810[] =
"asin (line 1810)";
2881 static const char __pyx_k_atan_line_1881[] =
"atan (line 1881)";
2882 static const char __pyx_k_cga3_line_1936[] =
"cga3 (line 1936)";
2883 static const char __pyx_k_clifford_frame[] =
"clifford.frame";
2884 static const char __pyx_k_clifford_isinf[] =
"clifford.isinf";
2885 static const char __pyx_k_clifford_isnan[] =
"clifford.isnan";
2886 static const char __pyx_k_conj_line_1548[] =
"conj (line 1548)";
2887 static const char __pyx_k_cosh_line_1752[] =
"cosh (line 1752)";
2888 static const char __pyx_k_even_line_1500[] =
"even (line 1500)";
2889 static const char __pyx_k_imag_line_1478[] =
"imag (line 1478)";
2890 static const char __pyx_k_index_set_copy[] =
"index_set.copy";
2891 static const char __pyx_k_invalid_string[] =
" invalid string ";
2892 static const char __pyx_k_norm_line_1574[] =
"norm (line 1574)";
2893 static const char __pyx_k_pure_line_1489[] =
"pure (line 1489)";
2894 static const char __pyx_k_quad_line_1563[] =
"quad (line 1563)";
2895 static const char __pyx_k_real_line_1467[] =
"real (line 1467)";
2896 static const char __pyx_k_scalar_epsilon[] =
"scalar_epsilon";
2897 static const char __pyx_k_sign_of_square[] =
"sign_of_square";
2898 static const char __pyx_k_sinh_line_1831[] =
"sinh (line 1831)";
2899 static const char __pyx_k_sqrt_line_1654[] =
"sqrt (line 1654)";
2900 static const char __pyx_k_tanh_line_1898[] =
"tanh (line 1898)";
2901 static const char __pyx_k_acosh_line_1768[] =
"acosh (line 1768)";
2902 static const char __pyx_k_asinh_line_1845[] =
"asinh (line 1845)";
2903 static const char __pyx_k_atanh_line_1910[] =
"atanh (line 1910)";
2904 static const char __pyx_k_clifford_scalar[] =
"clifford.scalar";
2905 static const char __pyx_k_index_set_count[] =
"index_set.count";
2906 static const char __pyx_k_istpq_line_2012[] =
"istpq (line 2012)";
2907 static const char __pyx_k_random_clifford[] =
"random_clifford";
2908 static const char __pyx_k_setstate_cython[] =
"__setstate_cython__";
2909 static const char __pyx_k_clifford_max_abs[] =
"clifford.max_abs";
2910 static const char __pyx_k_clifford_reframe[] =
"clifford.reframe";
2911 static const char __pyx_k_clifford_reverse[] =
"clifford.reverse";
2912 static const char __pyx_k_compare_line_492[] =
"compare (line 492)";
2913 static const char __pyx_k_error_msg_prefix[] =
"error_msg_prefix";
2914 static const char __pyx_k_index_set___iter[] =
"index_set.__iter__";
2915 static const char __pyx_k_max_pos_line_513[] =
"max_pos (line 513)";
2916 static const char __pyx_k_min_neg_line_504[] =
"min_neg (line 504)";
2917 static const char __pyx_k_scalar_line_1456[] =
"scalar (line 1456)";
2918 static const char __pyx_k_cga3std_line_1945[] =
"cga3std (line 1945)";
2919 static const char __pyx_k_clifford_involute[] =
"clifford.involute";
2920 static const char __pyx_k_error_squared_tol[] =
"error_squared_tol";
2921 static const char __pyx_k_index_set_hash_fn[] =
"index_set.hash_fn";
2922 static const char __pyx_k_max_abs_line_1594[] =
"max_abs (line 1594)";
2923 static const char __pyx_k_reverse_line_1533[] =
"reverse (line 1533)";
2924 static const char __pyx_k_asyncio_coroutines[] =
"asyncio.coroutines";
2925 static const char __pyx_k_clifford_outer_pow[] =
"clifford.outer_pow";
2926 static const char __pyx_k_clifford_truncated[] =
"clifford.truncated";
2927 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
2928 static const char __pyx_k_involute_line_1518[] =
"involute (line 1518)";
2929 static const char __pyx_k_index_set_count_neg[] =
"index_set.count_neg";
2930 static const char __pyx_k_index_set_count_pos[] =
"index_set.count_pos";
2931 static const char __pyx_k_outer_pow_line_1630[] =
"outer_pow (line 1630)";
2932 static const char __pyx_k_clifford_vector_part[] =
"clifford.vector_part";
2933 static const char __pyx_k_clifford_inv_line_989[] =
"clifford.inv (line 989)";
2934 static const char __pyx_k_approx_equal_line_1422[] =
"approx_equal (line 1422)";
2935 static const char __pyx_k_clifford_abs_line_1238[] =
"clifford.abs (line 1238)";
2936 static const char __pyx_k_clifford_copy_line_556[] =
"clifford.copy (line 556)";
2937 static const char __pyx_k_clifford_odd_line_1133[] =
"clifford.odd (line 1133)";
2938 static const char __pyx_k_clifford_pow_line_1043[] =
"clifford.pow (line 1043)";
2939 static const char __pyx_k_complexifier_line_1639[] =
"complexifier (line 1639)";
2940 static const char __pyx_k_index_set_copy_line_65[] =
"index_set.copy (line 65)";
2941 static const char __pyx_k_index_set_max_line_351[] =
"index_set.max (line 351)";
2942 static const char __pyx_k_index_set_min_line_342[] =
"index_set.min (line 342)";
2943 static const char __pyx_k_index_set_sign_of_mult[] =
"index_set.sign_of_mult";
2944 static const char __pyx_k_clifford_conj_line_1201[] =
"clifford.conj (line 1201)";
2945 static const char __pyx_k_clifford_even_line_1124[] =
"clifford.even (line 1124)";
2946 static const char __pyx_k_clifford_norm_line_1227[] =
"clifford.norm (line 1227)";
2947 static const char __pyx_k_clifford_pure_line_1113[] =
"clifford.pure (line 1113)";
2948 static const char __pyx_k_clifford_quad_line_1216[] =
"clifford.quad (line 1216)";
2949 static const char __pyx_k_error_squared_line_1409[] =
"error_squared (line 1409)";
2950 static const char __pyx_k_Unary_print_clifford_1_1[] =
"\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
2951 static const char __pyx_k_clifford___reduce_cython[] =
"clifford.__reduce_cython__";
2952 static const char __pyx_k_clifford_frame_line_1287[] =
"clifford.frame (line 1287)";
2953 static const char __pyx_k_clifford_hidden_doctests[] =
"clifford_hidden_doctests";
2954 static const char __pyx_k_clifford_isinf_line_1269[] =
"clifford.isinf (line 1269)";
2955 static const char __pyx_k_clifford_isnan_line_1278[] =
"clifford.isnan (line 1278)";
2956 static const char __pyx_k_index_set_count_line_315[] =
"index_set.count (line 315)";
2957 static const char __pyx_k_index_set_sign_of_square[] =
"index_set.sign_of_square";
2958 static const char __pyx_k_clifford___add___line_740[] =
"clifford.__add__ (line 740)";
2959 static const char __pyx_k_clifford___and___line_872[] =
"clifford.__and__ (line 872)";
2960 static const char __pyx_k_clifford___mod___line_833[] =
"clifford.__mod__ (line 833)";
2961 static const char __pyx_k_clifford___mul___line_798[] =
"clifford.__mul__ (line 798)";
2962 static const char __pyx_k_clifford___neg___line_722[] =
"clifford.__neg__ (line 722)";
2963 static const char __pyx_k_clifford___or___line_1002[] =
"clifford.__or__ (line 1002)";
2964 static const char __pyx_k_clifford___pos___line_731[] =
"clifford.__pos__ (line 731)";
2965 static const char __pyx_k_clifford___sub___line_769[] =
"clifford.__sub__ (line 769)";
2966 static const char __pyx_k_clifford___xor___line_911[] =
"clifford.__xor__ (line 911)";
2967 static const char __pyx_k_clifford_reframe_line_649[] =
"clifford.reframe (line 649)";
2968 static const char __pyx_k_clifford_scalar_line_1102[] =
"clifford.scalar (line 1102)";
2969 static const char __pyx_k_index_set___or___line_293[] =
"index_set.__or__ (line 293)";
2970 static const char __pyx_k_index_set___reduce_cython[] =
"index_set.__reduce_cython__";
2971 static const char __pyx_k_index_set_hidden_doctests[] =
"index_set_hidden_doctests";
2972 static const char __pyx_k_random_clifford_line_1927[] =
"random_clifford (line 1927)";
2973 static const char __pyx_k_Cannot_take_vector_part_of[] =
"Cannot take vector part of ";
2974 static const char __pyx_k_Unary_print_clifford_1_1_2[] =
"\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
2975 static const char __pyx_k_clifford___iadd___line_760[] =
"clifford.__iadd__ (line 760)";
2976 static const char __pyx_k_clifford___iand___line_896[] =
"clifford.__iand__ (line 896)";
2977 static const char __pyx_k_clifford___idiv___line_974[] =
"clifford.__idiv__ (line 974)";
2978 static const char __pyx_k_clifford___imod___line_857[] =
"clifford.__imod__ (line 857)";
2979 static const char __pyx_k_clifford___imul___line_820[] =
"clifford.__imul__ (line 820)";
2980 static const char __pyx_k_clifford___ior___line_1013[] =
"clifford.__ior__ (line 1013)";
2981 static const char __pyx_k_clifford___isub___line_789[] =
"clifford.__isub__ (line 789)";
2982 static const char __pyx_k_clifford___iter___line_638[] =
"clifford.__iter__ (line 638)";
2983 static const char __pyx_k_clifford___ixor___line_935[] =
"clifford.__ixor__ (line 935)";
2984 static const char __pyx_k_clifford___pow___line_1024[] =
"clifford.__pow__ (line 1024)";
2985 static const char __pyx_k_clifford___radd___line_751[] =
"clifford.__radd__ (line 751)";
2986 static const char __pyx_k_clifford___rand___line_887[] =
"clifford.__rand__ (line 887)";
2987 static const char __pyx_k_clifford___rmod___line_848[] =
"clifford.__rmod__ (line 848)";
2988 static const char __pyx_k_clifford___rmul___line_811[] =
"clifford.__rmul__ (line 811)";
2989 static const char __pyx_k_clifford___rsub___line_780[] =
"clifford.__rsub__ (line 780)";
2990 static const char __pyx_k_clifford___rxor___line_926[] =
"clifford.__rxor__ (line 926)";
2991 static const char __pyx_k_clifford___setstate_cython[] =
"clifford.__setstate_cython__";
2992 static const char __pyx_k_clifford___str___line_1307[] =
"clifford.__str__ (line 1307)";
2993 static const char __pyx_k_clifford_max_abs_line_1247[] =
"clifford.max_abs (line 1247)";
2994 static const char __pyx_k_clifford_reverse_line_1186[] =
"clifford.reverse (line 1186)";
2995 static const char __pyx_k_index_set___and___line_271[] =
"index_set.__and__ (line 271)";
2996 static const char __pyx_k_index_set___ior___line_304[] =
"index_set.__ior__ (line 304)";
2997 static const char __pyx_k_index_set___str___line_395[] =
"index_set.__str__ (line 395)";
2998 static const char __pyx_k_index_set___xor___line_249[] =
"index_set.__xor__ (line 249)";
2999 static const char __pyx_k_clifford___call___line_1083[] =
"clifford.__call__ (line 1083)";
3000 static const char __pyx_k_clifford___repr___line_1298[] =
"clifford.__repr__ (line 1298)";
3001 static const char __pyx_k_clifford_involute_line_1170[] =
"clifford.involute (line 1170)";
3002 static const char __pyx_k_error_squared_tol_line_1400[] =
"error_squared_tol (line 1400)";
3003 static const char __pyx_k_index_set___iand___line_282[] =
"index_set.__iand__ (line 282)";
3004 static const char __pyx_k_index_set___iter___line_229[] =
"index_set.__iter__ (line 229)";
3005 static const char __pyx_k_index_set___ixor___line_260[] =
"index_set.__ixor__ (line 260)";
3006 static const char __pyx_k_index_set___repr___line_384[] =
"index_set.__repr__ (line 384)";
3007 static const char __pyx_k_index_set___setstate_cython[] =
"index_set.__setstate_cython__";
3008 static const char __pyx_k_clifford_outer_pow_line_1067[] =
"clifford.outer_pow (line 1067)";
3009 static const char __pyx_k_clifford_truncated_line_1258[] =
"clifford.truncated (line 1258)";
3010 static const char __pyx_k_index_set_count_neg_line_324[] =
"index_set.count_neg (line 324)";
3011 static const char __pyx_k_index_set_count_pos_line_333[] =
"index_set.count_pos (line 333)";
3012 static const char __pyx_k_clifford___getitem___line_707[] =
"clifford.__getitem__ (line 707)";
3013 static const char __pyx_k_clifford___truediv___line_950[] =
"clifford.__truediv__ (line 950)";
3014 static const char __pyx_k_index_set___invert___line_240[] =
"index_set.__invert__ (line 240)";
3015 static const char __pyx_k_Abbreviation_for_index_set_q_p[] =
"\n Abbreviation for index_set({-q,...p}).\n\n >>> print(istpq(2,3))\n {-3,-2,-1,1,2}\n ";
3016 static const char __pyx_k_Conjugation_reverse_o_involute[] =
"\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print((clifford(\"{1}\")).conj())\n -{1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).conj())\n {1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).conj())\n -{1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").conj())\n 1-{1}-{1,2}\n ";
3017 static const char __pyx_k_Contraction_print_2_clifford_2[] =
"\n Contraction.\n\n >>> print(2 % clifford(\"{2}\"))\n 2{2}\n ";
3018 static const char __pyx_k_Geometric_product_x_clifford_2[] =
"\n Geometric product.\n\n >>> x = clifford(2); x *= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{1,2}\"); print(x)\n {2}\n ";
3019 static const char __pyx_k_Geometric_sum_print_1_clifford[] =
"\n Geometric sum.\n\n >>> print(1 + clifford(\"{2}\"))\n 1+{2}\n ";
3020 static const char __pyx_k_Geometric_sum_print_clifford_1[] =
"\n Geometric sum.\n\n >>> print(clifford(1) + clifford(\"{2}\"))\n 1+{2}\n >>> print(clifford(\"{1}\") + clifford(\"{2}\"))\n {1}+{2}\n ";
3021 static const char __pyx_k_Hyperbolic_sine_of_multivector[] =
"\n Hyperbolic sine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/2; print(sinh(x))\n {1,2}\n >>> x=clifford(\"{1,2}\") * pi/6; print(sinh(x))\n 0.5{1,2}\n ";
3022 static const char __pyx_k_Inner_product_print_2_clifford[] =
"\n Inner product.\n\n >>> print(2 & clifford(\"{2}\"))\n 0\n ";
3023 static const char __pyx_k_Inner_product_print_clifford_1[] =
"\n Inner product.\n\n >>> print(clifford(\"{1}\") & clifford(\"{2}\"))\n 0\n >>> print(clifford(2) & clifford(\"{2}\"))\n 0\n >>> print(clifford(\"{1}\") & clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") & clifford(\"{1,2}\"))\n {2}\n ";
3024 static const char __pyx_k_Inverse_tangent_of_multivector[] =
"\n Inverse tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1}\"); print(tan(atan(x,s),s))\n {1}\n >>> x=clifford(\"{1}\"); print(tan(atan(x)))\n {1}\n ";
3025 static const char __pyx_k_Iterate_over_the_indices_of_an[] =
"\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}):print(i, end=\",\")\n -3,4,7,\n ";
3026 static const char __pyx_k_Maximum_member_index_set_1_1_2[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
3027 static const char __pyx_k_Maximum_positive_index_or_0_if[] =
"\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ";
3028 static const char __pyx_k_Minimum_member_index_set_1_1_2[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
3029 static const char __pyx_k_Minimum_negative_index_or_0_if[] =
"\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ";
3030 static const char __pyx_k_Odd_part_of_multivector_sum_of[] =
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(clifford(\"1+{1}+{1,2}\").odd())\n {1}\n ";
3031 static const char __pyx_k_Outer_product_power_x_clifford[] =
"\n Outer product power.\n\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(0))\n 1\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(2))\n 4+4{1}\n >>> print(clifford(\"1+{1}+{1,2}\").outer_pow(3))\n 1+3{1}+3{1,2}\n\n ";
3032 static const char __pyx_k_Outer_product_print_2_clifford[] =
"\n Outer product.\n\n >>> print(2 ^ clifford(\"{2}\"))\n 2{2}\n ";
3033 static const char __pyx_k_Outer_product_print_clifford_1[] =
"\n Outer product.\n\n >>> print(clifford(\"{1}\") ^ clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) ^ clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") ^ clifford(\"{1}\"))\n 0\n >>> print(clifford(\"{1}\") ^ clifford(\"{1,2}\"))\n 0\n ";
3034 static const char __pyx_k_Power_self_to_the_m_x_clifford[] =
"\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print(x ** 2)\n 1\n >>> x=clifford(\"2\"); print(x ** 2)\n 4\n >>> x=clifford(\"2+{1}\"); print(x ** 0)\n 1\n >>> x=clifford(\"2+{1}\"); print(x ** 1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x ** 2)\n 5+4{1}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * (i ** i))\n 1\n ";
3035 static const char __pyx_k_Pure_part_print_clifford_1_1_1[] =
"\n Pure part.\n\n >>> print(clifford(\"1+{1}+{1,2}\").pure())\n {1}+{1,2}\n >>> print(clifford(\"{1,2}\").pure())\n {1,2}\n ";
3036 static const char __pyx_k_Quadratic_form_rev_x_x_0_print[] =
"\n Quadratic form == (rev(x)*x)(0).\n\n >>> print(clifford(\"1+{1}+{1,2}\").quad())\n 3.0\n >>> print(clifford(\"1+{-1}+{1,2}+{1,2,3}\").quad())\n 2.0\n ";
3037 static const char __pyx_k_Quadratic_norm_error_tolerance[] =
"\n Quadratic norm error tolerance relative to a specific multivector.\n\n >>> print(error_squared_tol(clifford(\"{1}\")) * 3.0 - error_squared_tol(clifford(\"1{1}-2{2}+3{3}\")))\n 0.0\n ";
3038 static const char __pyx_k_Set_complement_not_print_index[] =
"\n Set complement: not.\n\n >>> print(~index_set({-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}))\n {-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}\n ";
3039 static const char __pyx_k_Set_union_or_print_index_set_1[] =
"\n Set union: or.\n\n >>> print(index_set({1}) | index_set({2}))\n {1,2}\n >>> print(index_set({1,2}) | index_set({2}))\n {1,2}\n ";
3040 static const char __pyx_k_Transform_left_hand_side_using[] =
"\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print(y|x)\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print(y|exp(x))\n -{1}\n ";
3041 static const char __pyx_k_clifford___rtruediv___line_965[] =
"clifford.__rtruediv__ (line 965)";
3042 static const char __pyx_k_clifford_vector_part_line_1142[] =
"clifford.vector_part (line 1142)";
3043 static const char __pyx_k_index_set___getitem___line_191[] =
"index_set.__getitem__ (line 191)";
3044 static const char __pyx_k_index_set___setitem___line_179[] =
"index_set.__setitem__ (line 179)";
3045 static const char __pyx_k_lexicographic_compare_eg_3_4_5[] =
"\n \"lexicographic compare\" eg. {3,4,5} is less than {3,7,8};\n -1 if a<b, +1 if a>b, 0 if a==b.\n\n >>> compare(index_set({1,2}),index_set({-1,3}))\n -1\n >>> compare(index_set({-1,4}),index_set({-1,3}))\n 1\n ";
3046 static const char __pyx_k_Abbreviation_for_clifford_index[] =
"\n Abbreviation for clifford(index_set(obj)).\n\n >>> print(e(1))\n {1}\n >>> print(e(-1))\n {-1}\n >>> print(e(0))\n 1\n ";
3047 static const char __pyx_k_Absolute_value_of_multivector_m[] =
"\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
3048 static const char __pyx_k_Absolute_value_square_root_of_n[] =
"\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ";
3049 static const char __pyx_k_Cardinality_Number_of_indices_i[] =
"\n Cardinality: Number of indices included in set.\n\n >>> index_set({-1,1,2}).count()\n 3\n ";
3050 static const char __pyx_k_Check_if_a_multivector_contains[] =
"\n Check if a multivector contains any infinite values.\n\n >>> clifford().isinf()\n False\n ";
3051 static const char __pyx_k_Contraction_print_clifford_1_cl[] =
"\n Contraction.\n\n >>> print(clifford(\"{1}\") % clifford(\"{2}\"))\n 0\n >>> print(clifford(2) % clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") % clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") % clifford(\"{1,2}\"))\n {2}\n ";
3052 static const char __pyx_k_Contraction_x_clifford_1_x_clif[] =
"\n Contraction.\n\n >>> x = clifford(\"{1}\"); x %= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(2); x %= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1,2}\"); print(x)\n {2}\n ";
3053 static const char __pyx_k_Convert_CGA3_null_vector_to_Euc[] =
"\n Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(agc3(cga3(x)))\n 2{1}+9{2}+{3}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(agc3(cga3(x))-x)\n 0\n ";
3054 static const char __pyx_k_Convert_CGA3_null_vector_to_sta[] =
"\n Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3std(cga3(x)))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3std(cga3(x))-cga3(x))\n 0\n ";
3055 static const char __pyx_k_Convert_Euclidean_3D_multivecto[] =
"\n Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3(x))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n ";
3056 static const char __pyx_k_Copy_this_clifford_object_x_cli[] =
"\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print(y)\n {2}\n ";
3057 static const char __pyx_k_Copy_this_index_set_object_s_in[] =
"\n Copy this index_set object.\n\n >>> s=index_set(1); t=s.copy(); print(t)\n {1}\n ";
3058 static const char __pyx_k_Cosine_of_multivector_with_opti[] =
"\n Cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{1,2,3}\"))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x)))\n {1,2}\n ";
3059 static const char __pyx_k_Even_part_of_multivector_sum_of[] =
"\n Even part of multivector, sum of even grade terms.\n\n >>> print(clifford(\"1+{1}+{1,2}\").even())\n 1+{1,2}\n ";
3060 static const char __pyx_k_Exponential_of_multivector_x_cl[] =
"\n Exponential of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(exp(x))\n 0.7071+0.7071{1,2}\n >>> x=clifford(\"{1,2}\") * pi/2; print(exp(x))\n {1,2}\n ";
3061 static const char __pyx_k_Geometric_difference_print_1_cl[] =
"\n Geometric difference.\n\n >>> print(1 - clifford(\"{2}\"))\n 1-{2}\n ";
3062 static const char __pyx_k_Geometric_difference_print_clif[] =
"\n Geometric difference.\n\n >>> print(clifford(1) - clifford(\"{2}\"))\n 1-{2}\n >>> print(clifford(\"{1}\") - clifford(\"{2}\"))\n {1}-{2}\n ";
3063 static const char __pyx_k_Geometric_difference_x_clifford[] =
"\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print(x)\n 1-{2}\n ";
3064 static const char __pyx_k_Geometric_multiplicative_invers[] =
"\n Geometric multiplicative inverse.\n\n >>> x = clifford(\"{1}\"); print(x.inv())\n {1}\n >>> x = clifford(2); print(x.inv())\n 0.5\n >>> x = clifford(\"{1,2}\"); print(x.inv())\n -{1,2}\n ";
3065 static const char __pyx_k_Geometric_product_print_2_cliff[] =
"\n Geometric product.\n\n >>> print(2 * clifford(\"{2}\"))\n 2{2}\n ";
3066 static const char __pyx_k_Geometric_product_print_cliffor[] =
"\n Geometric product.\n\n >>> print(clifford(\"{1}\") * clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) * clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") * clifford(\"{1,2}\"))\n {2}\n ";
3067 static const char __pyx_k_Geometric_quotient_print_2_clif[] =
"\n Geometric quotient.\n\n >>> print(2 / clifford(\"{2}\"))\n 2{2}\n ";
3068 static const char __pyx_k_Geometric_quotient_print_cliffo[] =
"\n Geometric quotient.\n\n >>> print(clifford(\"{1}\") / clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) / clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") / clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") / clifford(\"{1,2}\"))\n -{2}\n ";
3069 static const char __pyx_k_Geometric_quotient_x_clifford_1[] =
"\n Geometric quotient.\n\n >>> x = clifford(\"{1}\"); x /= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(2); x /= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1,2}\"); print(x)\n -{2}\n ";
3070 static const char __pyx_k_Geometric_sum_x_clifford_1_x_cl[] =
"\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print(x)\n 1+{2}\n ";
3071 static const char __pyx_k_Get_the_value_of_an_index_set_o[] =
"\n Get the value of an index_set object at an index.\n\n >>> index_set({1})[1]\n True\n >>> index_set({1})[2]\n False\n >>> index_set({2})[-1]\n False\n >>> index_set({2})[1]\n False\n >>> index_set({2})[2]\n True\n >>> index_set({2})[33]\n False\n ";
3072 static const char __pyx_k_Hyperbolic_cosine_of_multivecto[] =
"\n Hyperbolic cosine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi; print(cosh(x))\n -1\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x)))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print(cosh(acosh(x)))\n {1,2}\n ";
3073 static const char __pyx_k_Hyperbolic_tangent_of_multivect[] =
"\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(tanh(x))\n {1,2}\n ";
3074 static const char __pyx_k_Imaginary_part_deprecated_alway[] =
"\n Imaginary part: deprecated (always 0).\n\n >>> imag(clifford(\"1+{1}+{1,2}\"))\n 0.0\n >>> imag(clifford(\"{1,2}\"))\n 0.0\n ";
3075 static const char __pyx_k_Inner_product_x_clifford_1_x_cl[] =
"\n Inner product.\n\n >>> x = clifford(\"{1}\"); x &= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(2); x &= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1,2}\"); print(x)\n {2}\n ";
3076 static const char __pyx_k_Integer_power_of_multivector_ob[] =
"\n Integer power of multivector: obj to the m.\n\n >>> x=clifford(\"{1}\"); print(pow(x,2))\n 1\n >>> x=clifford(\"2\"); print(pow(x,2))\n 4\n >>> x=clifford(\"2+{1}\"); print(pow(x,0))\n 1\n >>> x=clifford(\"2+{1}\"); print(pow(x,1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(pow(x,2))\n 5+4{1}\n >>> print(pow(clifford(\"1+{1}+{1,2}\"),3))\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * pow(i, i))\n 1\n ";
3077 static const char __pyx_k_Inverse_cosine_of_multivector_w[] =
"\n Inverse cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{1,2,3}\"))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{-1,1,2,3,4}\"))\n {1,2}\n >>> print(acos(0) / pi)\n 0.5\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x)))\n {1,2}\n ";
3078 static const char __pyx_k_Inverse_hyperbolic_cosine_of_mu[] =
"\n Inverse hyperbolic cosine of multivector with optional complexifier.\n\n >>> print(acosh(0,\"{-2,-1,1}\"))\n 1.571{-2,-1,1}\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x,\"{-1,1,2,3,4}\")))\n {1,2,3}\n >>> print(acosh(0))\n 1.571{-1}\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x)))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print(cosh(acosh(x)))\n {1,2}\n ";
3079 static const char __pyx_k_Inverse_hyperbolic_sine_of_mult[] =
"\n Inverse hyperbolic sine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(asinh(x,\"{1,2,3}\") * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(asinh(x) * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\") / 2; print(asinh(x) * 6/pi)\n {1,2}\n ";
3080 static const char __pyx_k_Inverse_hyperbolic_tangent_of_m[] =
"\n Inverse hyperbolic tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1,2}\"); print(tanh(atanh(x,s)))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(tanh(atanh(x)))\n {1,2}\n ";
3081 static const char __pyx_k_Inverse_sine_of_multivector_wit[] =
"\n Inverse sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),s))\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),\"{-2,-1,1}\"))\n {-1}\n >>> print(asin(1) / pi)\n 0.5\n >>> x=clifford(\"{1,2,3}\"); print(asin(sin(x)))\n {1,2,3}\n ";
3082 static const char __pyx_k_Main_involution_each_i_is_repla[] =
"\n Main involution, each {i} is replaced by -{i} in each term,\n eg. clifford(\"{1}\") -> -clifford(\"{1}\").\n\n >>> print(clifford(\"{1}\").involute())\n -{1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).involute())\n -{1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).involute())\n {1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").involute())\n 1-{1}+{1,2}\n ";
3083 static const char __pyx_k_Maximum_absolute_value_of_coord[] =
"\n Maximum absolute value of coordinates multivector: multivector infinity-norm.\n\n >>> max_abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 1.0\n >>> max_abs(clifford(\"3+2{1}+{1,2}\"))\n 3.0\n\n ";
3084 static const char __pyx_k_Maximum_of_absolute_values_of_c[] =
"\n Maximum of absolute values of components of multivector: multivector infinity norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").max_abs()\n 1.0\n >>> clifford(\"3+2{1}+{1,2}\").max_abs()\n 3.0\n ";
3085 static const char __pyx_k_Natural_logarithm_of_multivecto[] =
"\n Natural logarithm of multivector with optional complexifier.\n\n >>> x=clifford(\"{-1}\"); print((log(x,\"{-1}\") * 2/pi))\n {-1}\n >>> x=clifford(\"{1,2}\"); print((log(x,\"{1,2,3}\") * 2/pi))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print((log(x) * 2/pi))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print((log(x,\"{1,2}\") * 2/pi))\n Traceback (most recent call last):\n ...\n RuntimeError: check_complex(val, i): i is not a valid complexifier for val\n ";
3086 static const char __pyx_k_Norm_sum_of_squares_of_coordina[] =
"\n Norm == sum of squares of coordinates.\n\n >>> clifford(\"1+{1}+{1,2}\").norm()\n 3.0\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").norm()\n 4.0\n ";
3087 static const char __pyx_k_Not_applicable_for_a_in_cliffor[] =
"\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})):print(a, end=\",\")\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
3088 static const char __pyx_k_Number_of_negative_indices_incl[] =
"\n Number of negative indices included in set.\n\n >>> index_set({-1,1,2}).count_neg()\n 1\n ";
3089 static const char __pyx_k_Number_of_positive_indices_incl[] =
"\n Number of positive indices included in set.\n\n >>> index_set({-1,1,2}).count_pos()\n 2\n ";
3090 static const char __pyx_k_Outer_product_power_of_multivec[] =
"\n Outer product power of multivector.\n\n >>> print(outer_pow(clifford(\"1+{1}+{1,2}\"),3))\n 1+3{1}+3{1,2}\n ";
3091 static const char __pyx_k_Outer_product_x_clifford_1_x_cl[] =
"\n Outer product.\n\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(2); x ^= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1}\"); print(x)\n 0\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1,2}\"); print(x)\n 0\n ";
3092 static const char __pyx_k_Pure_grade_vector_part_print_cl[] =
"\n Pure grade-vector part.\n\n >>> print(clifford(\"{1}\")(1))\n {1}\n >>> print(clifford(\"{1}\")(0))\n 0\n >>> print(clifford(\"1+{1}+{1,2}\")(0))\n 1\n >>> print(clifford(\"1+{1}+{1,2}\")(1))\n {1}\n >>> print(clifford(\"1+{1}+{1,2}\")(2))\n {1,2}\n >>> print(clifford(\"1+{1}+{1,2}\")(3))\n 0\n ";
3093 static const char __pyx_k_Pure_part_print_pure_clifford_1[] =
"\n Pure part\n\n >>> print(pure(clifford(\"1+{1}+{1,2}\")))\n {1}+{1,2}\n >>> print(pure(clifford(\"{1,2}\")))\n {1,2}\n ";
3094 static const char __pyx_k_Put_self_into_a_larger_frame_co[] =
"\n Put self into a larger frame, containing the union of self.frame() and index set ixt.\n This can be used to make multiplication faster, by multiplying within a common frame.\n\n >>> clifford(\"2+3{1}\").reframe(index_set({1,2,3}))\n clifford(\"2+3{1}\")\n >>> s=index_set({1,2,3});t=index_set({-3,-2,-1});x=random_clifford(s); x.reframe(t).frame() == (s|t);\n True\n ";
3095 static const char __pyx_k_Random_multivector_within_a_fra[] =
"\n Random multivector within a frame.\n\n >>> print(random_clifford(index_set({-3,-1,2})).frame())\n {-3,-1,2}\n ";
3096 static const char __pyx_k_Real_part_synonym_for_scalar_pa[] =
"\n Real part: synonym for scalar part.\n\n >>> real(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> real(clifford(\"{1,2}\"))\n 0.0\n ";
3097 static const char __pyx_k_Relative_or_absolute_error_usin[] =
"\n Relative or absolute error using the quadratic norm.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(error_squared(clifford(\"{1}\"), clifford(\"1{1}\"), err2))\n 0.0\n >>> print(error_squared(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\"), err2))\n 25.0\n ";
3098 static const char __pyx_k_Remove_all_terms_of_self_with_r[] =
"\n Remove all terms of self with relative size smaller than limit.\n\n >>> clifford(\"1e8+{1}+1e-8{1,2}\").truncated(1.0e-6)\n clifford(\"100000000\")\n >>> clifford(\"1e4+{1}+1e-4{1,2}\").truncated(1.0e-6)\n clifford(\"10000+{1}\")\n ";
3099 static const char __pyx_k_Reversion_eg_1_2_2_1_print_reve[] =
"\n Reversion, eg. {1}*{2} -> {2}*{1}\n\n >>> print(reverse(clifford(\"{1}\")))\n {1}\n >>> print(reverse(clifford(\"{2}\") * clifford(\"{1}\")))\n {1,2}\n >>> print(reverse(clifford(\"{1}\") * clifford(\"{2}\")))\n -{1,2}\n >>> print(reverse(clifford(\"1+{1}+{1,2}\")))\n 1+{1}-{1,2}\n ";
3100 static const char __pyx_k_Reversion_eg_clifford_1_cliffor[] =
"\n Reversion, eg. clifford(\"{1}\")*clifford(\"{2}\") -> clifford(\"{2}\")*clifford(\"{1}\").\n\n >>> print(clifford(\"{1}\").reverse())\n {1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).reverse())\n {1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).reverse())\n -{1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").reverse())\n 1+{1}-{1,2}\n ";
3101 static const char __pyx_k_Scalar_part_clifford_1_1_1_2_sc[] =
"\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ";
3102 static const char __pyx_k_Scalar_part_scalar_clifford_1_1[] =
"\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
3103 static const char __pyx_k_Set_intersection_and_print_inde[] =
"\n Set intersection: and.\n\n >>> print(index_set({1}) & index_set({2}))\n {}\n >>> print(index_set({1,2}) & index_set({2}))\n {2}\n ";
3104 static const char __pyx_k_Set_intersection_and_x_index_se[] =
"\n Set intersection: and.\n\n >>> x = index_set({1}); x &= index_set({2}); print(x)\n {}\n >>> x = index_set({1,2}); x &= index_set({2}); print(x)\n {2}\n ";
3105 static const char __pyx_k_Set_the_value_of_an_index_set_o[] =
"\n Set the value of an index_set object at index idx to value val.\n\n >>> s=index_set({1}); s[2] = True; print(s)\n {1,2}\n >>> s=index_set({1,2}); s[1] = False; print(s)\n {2}\n ";
3106 static const char __pyx_k_Set_union_or_x_index_set_1_x_in[] =
"\n Set union: or.\n\n >>> x = index_set({1}); x |= index_set({2}); print(x)\n {1,2}\n >>> x = index_set({1,2}); x |= index_set({2}); print(x)\n {1,2}\n ";
3107 static const char __pyx_k_Sign_of_geometric_product_of_tw[] =
"\n Sign of geometric product of two Clifford basis elements.\n\n >>> s = index_set({1,2}); t=index_set({-1}); s.sign_of_mult(t)\n 1\n ";
3108 static const char __pyx_k_Sign_of_geometric_square_of_a_C[] =
"\n Sign of geometric square of a Clifford basis element.\n\n >>> s = index_set({1,2}); s.sign_of_square()\n -1\n ";
3109 static const char __pyx_k_Sine_of_multivector_with_option[] =
"\n Sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),s))\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),\"{-2,-1,1}\"))\n {-1}\n >>> x=clifford(\"{1,2,3}\"); print(asin(sin(x)))\n {1,2,3}\n ";
3110 static const char __pyx_k_Square_root_of_1_which_commutes[] =
"\n Square root of -1 which commutes with all members of the frame of the given multivector.\n\n >>> print(complexifier(clifford(index_set({1}))))\n {1,2,3}\n >>> print(complexifier(clifford(index_set({-1}))))\n {-1}\n >>> print(complexifier(index_set({1})))\n {1,2,3}\n >>> print(complexifier(index_set({-1})))\n {-1}\n ";
3111 static const char __pyx_k_Square_root_of_multivector_with[] =
"\n Square root of multivector with optional complexifier.\n\n >>> print(sqrt(-1))\n {-1}\n >>> print(sqrt(clifford(\"2{-1}\")))\n 1+{-1}\n >>> j=sqrt(-1,complexifier(index_set({1}))); print(j); print(j*j)\n {1,2,3}\n -1\n >>> j=sqrt(-1,\"{1,2,3}\"); print(j); print(j*j)\n {1,2,3}\n -1\n ";
3112 static const char __pyx_k_Subalgebra_generated_by_all_gen[] =
"\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print(clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame())\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <class 'PyClical.index_set'>\n ";
3113 static const char __pyx_k_Subscripting_map_from_index_set[] =
"\n Subscripting: map from index set to scalar coordinate.\n\n >>> clifford(\"{1}\")[index_set(1)]\n 1.0\n >>> clifford(\"{1}\")[index_set({1})]\n 1.0\n >>> clifford(\"{1}\")[index_set({1,2})]\n 0.0\n >>> clifford(\"2{1,2}\")[index_set({1,2})]\n 2.0\n ";
3114 static const char __pyx_k_Symmetric_set_difference_exclus[] =
"\n Symmetric set difference: exclusive or.\n\n >>> print(index_set({1}) ^ index_set({2}))\n {1,2}\n >>> print(index_set({1,2}) ^ index_set({2}))\n {1}\n ";
3115 static const char __pyx_k_Tangent_of_multivector_with_opt[] =
"\n Tangent of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(tan(x,\"{1,2,3}\"))\n 0.7616{1,2}\n >>> x=clifford(\"{1,2}\"); print(tan(x))\n 0.7616{1,2}\n ";
3116 static const char __pyx_k_Test_for_approximate_equality_o[] =
"\n Test for approximate equality of multivectors.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(approx_equal(clifford(\"{1}\"), clifford(\"1{1}\")))\n True\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\")))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+0.001\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+1.0e-30\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n True\n ";
3117 static const char __pyx_k_Tests_for_functions_that_Doctes[] =
"\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print(index_set(1))\n {1}\n >>> print(index_set({1,2}))\n {1,2}\n >>> print(index_set(index_set({1,2})))\n {1,2}\n >>> print(index_set({1,2}))\n {1,2}\n >>> print(index_set({1,2,1}))\n {1,2}\n >>> print(index_set({1,2,1}))\n {1,2}\n >>> print(index_set(\"\"))\n {}\n >>> print(index_set(\"{\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print(index_set(\"{1\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print(index_set(\"{1,2,100}\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print(index_set({1,2,100}))\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid {1, 2, 100}.\n >>> print(index_set([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <class 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> ""index_set({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
3118 static const char __pyx_k_The_informal_string_representat[] =
"\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__str__()\n '{1,2}'\n >>> str(index_set({1,2}))\n '{1,2}'\n ";
3119 static const char __pyx_k_The_official_string_representat[] =
"\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__repr__()\n 'index_set({1,2})'\n >>> repr(index_set({1,2}))\n 'index_set({1,2})'\n ";
3120 static const char __pyx_k_This_comparison_operator_is_not[] =
"This comparison operator is not implemented for ";
3121 static const char __pyx_k_Vector_part_of_multivector_as_a[] =
"\n Vector part of multivector, as a Python list, with respect to frm.\n\n >>> print(clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part())\n [2.0, 3.0]\n >>> print(clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part(index_set({-1,1,2})))\n [0.0, 2.0, 3.0]\n ";
3122 static const char __pyx_k_index_set_sign_of_mult_line_366[] =
"index_set.sign_of_mult (line 366)";
3123 static const char __pyx_k_norm_sum_of_squares_of_coordina[] =
"\n norm == sum of squares of coordinates.\n\n >>> norm(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> norm(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 4.0\n ";
3124 static const char __pyx_k_Cannot_initialize_clifford_objec[] =
"Cannot initialize clifford object from";
3125 static const char __pyx_k_Cannot_initialize_index_set_obje[] =
"Cannot initialize index_set object from";
3126 static const char __pyx_k_Conjugation_reverse_o_involute_2[] =
"\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print(conj(clifford(\"{1}\")))\n -{1}\n >>> print(conj(clifford(\"{2}\") * clifford(\"{1}\")))\n {1,2}\n >>> print(conj(clifford(\"{1}\") * clifford(\"{2}\")))\n -{1,2}\n >>> print(conj(clifford(\"1+{1}+{1,2}\")))\n 1-{1}-{1,2}\n ";
3127 static const char __pyx_k_Odd_part_of_multivector_sum_of_2[] =
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(odd(clifford(\"1+{1}+{1,2}\")))\n {1}\n ";
3128 static const char __pyx_k_Power_self_to_the_m_x_clifford_2[] =
"\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print(x.pow(2))\n 1\n >>> x=clifford(\"2\"); print(x.pow(2))\n 4\n >>> x=clifford(\"2+{1}\"); print(x.pow(0))\n 1\n >>> x=clifford(\"2+{1}\"); print(x.pow(1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x.pow(2))\n 5+4{1}\n >>> print(clifford(\"1+{1}+{1,2}\").pow(3))\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * i.pow(i))\n 1\n ";
3129 static const char __pyx_k_Quadratic_form_rev_x_x_0_print_2[] =
"\n Quadratic form == (rev(x)*x)(0).\n\n >>> print(quad(clifford(\"1+{1}+{1,2}\")))\n 3.0\n >>> print(quad(clifford(\"1+{-1}+{1,2}+{1,2,3}\")))\n 2.0\n ";
3130 static const char __pyx_k_Transform_left_hand_side_using_2[] =
"\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=x; print(y)\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=exp(x); print(y)\n -{1}\n ";
3131 static const char __pyx_k_clifford_hidden_doctests_line_13[] =
"clifford_hidden_doctests (line 1316)";
3132 static const char __pyx_k_index_set_hidden_doctests_line_4[] =
"index_set_hidden_doctests (line 406)";
3133 static const char __pyx_k_index_set_sign_of_square_line_37[] =
"index_set.sign_of_square (line 375)";
3134 static const char __pyx_k_no_default___reduce___due_to_non[] =
"no default __reduce__ due to non-trivial __cinit__";
3135 static const char __pyx_k_Check_if_a_multivector_contains_2[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
3136 static const char __pyx_k_Even_part_of_multivector_sum_of_2[] =
"\n Even part of multivector, sum of even grade terms.\n\n >>> print(even(clifford(\"1+{1}+{1,2}\")))\n 1+{1,2}\n ";
3137 static const char __pyx_k_Geometric_multiplicative_invers_2[] =
"\n Geometric multiplicative inverse.\n\n >>> print(inv(clifford(\"{1}\")))\n {1}\n >>> print(inv(clifford(\"{-1}\")))\n -{-1}\n >>> print(inv(clifford(\"{-2,-1}\")))\n -{-2,-1}\n >>> print(inv(clifford(\"{-1}+{1}\")))\n nan\n ";
3138 static const char __pyx_k_Main_involution_each_i_is_repla_2[] =
"\n Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})\n\n >>> print(involute(clifford(\"{1}\")))\n -{1}\n >>> print(involute(clifford(\"{2}\") * clifford(\"{1}\")))\n -{1,2}\n >>> print(involute(clifford(\"{1}\") * clifford(\"{2}\")))\n {1,2}\n >>> print(involute(clifford(\"1+{1}+{1,2}\")))\n 1-{1}+{1,2}\n ";
3139 static const char __pyx_k_Symmetric_set_difference_exclus_2[] =
"\n Symmetric set difference: exclusive or.\n\n >>> x = index_set({1}); x ^= index_set({2}); print(x)\n {1,2}\n >>> x = index_set({1,2}); x ^= index_set({2}); print(x)\n {1}\n ";
3140 static const char __pyx_k_Tests_for_functions_that_Doctes_2[] =
"\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print(clifford(2))\n 2\n >>> print(clifford(2.0))\n 2\n >>> print(clifford(1.0e-1))\n 0.1\n >>> print(clifford(\"2\"))\n 2\n >>> print(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print(clifford(clifford(\"2{1,2,3}\")))\n 2{1,2,3}\n >>> print(clifford(\"-{1}\"))\n -{1}\n >>> print(clifford(2,index_set({1,2})))\n 2{1,2}\n >>> print(clifford([2,3],index_set({1,2})))\n 2{1}+3{2}\n >>> print(clifford([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'list'>.\n >>> print(clifford(None))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'NoneType'>.\n >>> print(clifford(None,[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'NoneType'>, <class 'list'>).\n >>> print(clifford([1,2],[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'list'>, <class 'list'>).\n >>> print(clifford(\"\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print(clifford(\"{\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print(clifford(\"{1\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print(clifford(\"+\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print(clifford(\"-\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object fro""m invalid string '-'.\n >>> print(clifford(\"{1}+\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
3141 static const char __pyx_k_The_informal_string_representat_2[] =
"\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__str__()\n '1+3{-1}+2{1,2}+4{-2,7}'\n ";
3142 static const char __pyx_k_The_official_string_representat_2[] =
"\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__repr__()\n 'clifford(\"1+3{-1}+2{1,2}+4{-2,7}\")'\n ";
3144 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3145 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other);
3146 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3147 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
3148 static int __pyx_pf_8PyClical_9index_set_8__setitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val);
3149 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
3150 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
3151 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3152 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3153 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3154 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
3155 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3156 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
3157 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3158 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
3159 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3160 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3161 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3162 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3163 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3164 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3165 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
3166 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3167 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3168 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3169 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
3170 static PyObject *__pyx_pf_8PyClical_9index_set_53__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
3171 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
3172 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3173 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3174 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3175 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3176 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt);
3177 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3178 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x);
3179 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3180 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
3181 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
3182 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
3183 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3184 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3185 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3186 static PyObject *__pyx_pf_8PyClical_8clifford_22__radd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3187 static PyObject *__pyx_pf_8PyClical_8clifford_24__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3188 static PyObject *__pyx_pf_8PyClical_8clifford_26__sub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3189 static PyObject *__pyx_pf_8PyClical_8clifford_28__rsub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3190 static PyObject *__pyx_pf_8PyClical_8clifford_30__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3191 static PyObject *__pyx_pf_8PyClical_8clifford_32__mul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3192 static PyObject *__pyx_pf_8PyClical_8clifford_34__rmul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3193 static PyObject *__pyx_pf_8PyClical_8clifford_36__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3194 static PyObject *__pyx_pf_8PyClical_8clifford_38__mod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3195 static PyObject *__pyx_pf_8PyClical_8clifford_40__rmod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3196 static PyObject *__pyx_pf_8PyClical_8clifford_42__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3197 static PyObject *__pyx_pf_8PyClical_8clifford_44__and__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3198 static PyObject *__pyx_pf_8PyClical_8clifford_46__rand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3199 static PyObject *__pyx_pf_8PyClical_8clifford_48__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3200 static PyObject *__pyx_pf_8PyClical_8clifford_50__xor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3201 static PyObject *__pyx_pf_8PyClical_8clifford_52__rxor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3202 static PyObject *__pyx_pf_8PyClical_8clifford_54__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3203 static PyObject *__pyx_pf_8PyClical_8clifford_56__truediv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3204 static PyObject *__pyx_pf_8PyClical_8clifford_58__rtruediv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs);
3205 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 3206 static PyObject *__pyx_pf_8PyClical_8clifford_60__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3208 static PyObject *__pyx_pf_8PyClical_8clifford_62inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3209 static PyObject *__pyx_pf_8PyClical_8clifford_64__or__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3210 static PyObject *__pyx_pf_8PyClical_8clifford_66__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
3211 static PyObject *__pyx_pf_8PyClical_8clifford_68__pow__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy);
3212 static PyObject *__pyx_pf_8PyClical_8clifford_70pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
3213 static PyObject *__pyx_pf_8PyClical_8clifford_72outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
3214 static PyObject *__pyx_pf_8PyClical_8clifford_74__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade);
3215 static PyObject *__pyx_pf_8PyClical_8clifford_76scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3216 static PyObject *__pyx_pf_8PyClical_8clifford_78pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3217 static PyObject *__pyx_pf_8PyClical_8clifford_80even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3218 static PyObject *__pyx_pf_8PyClical_8clifford_82odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3219 static PyObject *__pyx_pf_8PyClical_8clifford_84vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm);
3220 static PyObject *__pyx_pf_8PyClical_8clifford_86involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3221 static PyObject *__pyx_pf_8PyClical_8clifford_88reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3222 static PyObject *__pyx_pf_8PyClical_8clifford_90conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3223 static PyObject *__pyx_pf_8PyClical_8clifford_92quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3224 static PyObject *__pyx_pf_8PyClical_8clifford_94norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3225 static PyObject *__pyx_pf_8PyClical_8clifford_96abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3226 static PyObject *__pyx_pf_8PyClical_8clifford_98max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3227 static PyObject *__pyx_pf_8PyClical_8clifford_100truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit);
3228 static PyObject *__pyx_pf_8PyClical_8clifford_102isinf(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3229 static PyObject *__pyx_pf_8PyClical_8clifford_104isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3230 static PyObject *__pyx_pf_8PyClical_8clifford_106frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3231 static PyObject *__pyx_pf_8PyClical_8clifford_108__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3232 static PyObject *__pyx_pf_8PyClical_8clifford_110__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3233 static PyObject *__pyx_pf_8PyClical_8clifford_112__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
3234 static PyObject *__pyx_pf_8PyClical_8clifford_114__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
3235 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
3236 static PyObject *__pyx_pf_8PyClical_10error_squared_tol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3237 static PyObject *__pyx_pf_8PyClical_12error_squared(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold);
3238 static PyObject *__pyx_pf_8PyClical_14approx_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold, PyObject *__pyx_v_tol);
3239 static PyObject *__pyx_pf_8PyClical_16inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3240 static PyObject *__pyx_pf_8PyClical_18scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3241 static PyObject *__pyx_pf_8PyClical_20real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3242 static PyObject *__pyx_pf_8PyClical_22imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3243 static PyObject *__pyx_pf_8PyClical_24pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3244 static PyObject *__pyx_pf_8PyClical_26even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3245 static PyObject *__pyx_pf_8PyClical_28odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3246 static PyObject *__pyx_pf_8PyClical_30involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3247 static PyObject *__pyx_pf_8PyClical_32reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3248 static PyObject *__pyx_pf_8PyClical_34conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3249 static PyObject *__pyx_pf_8PyClical_36quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3250 static PyObject *__pyx_pf_8PyClical_38norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3251 static PyObject *__pyx_pf_8PyClical_40abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3252 static PyObject *__pyx_pf_8PyClical_42max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3253 static PyObject *__pyx_pf_8PyClical_44pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
3254 static PyObject *__pyx_pf_8PyClical_46outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
3255 static PyObject *__pyx_pf_8PyClical_48complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3256 static PyObject *__pyx_pf_8PyClical_50sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3257 static PyObject *__pyx_pf_8PyClical_52exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3258 static PyObject *__pyx_pf_8PyClical_54log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3259 static PyObject *__pyx_pf_8PyClical_56cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3260 static PyObject *__pyx_pf_8PyClical_58acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3261 static PyObject *__pyx_pf_8PyClical_60cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3262 static PyObject *__pyx_pf_8PyClical_62acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3263 static PyObject *__pyx_pf_8PyClical_64sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3264 static PyObject *__pyx_pf_8PyClical_66asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3265 static PyObject *__pyx_pf_8PyClical_68sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3266 static PyObject *__pyx_pf_8PyClical_70asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3267 static PyObject *__pyx_pf_8PyClical_72tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3268 static PyObject *__pyx_pf_8PyClical_74atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3269 static PyObject *__pyx_pf_8PyClical_76tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3270 static PyObject *__pyx_pf_8PyClical_78atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
3271 static PyObject *__pyx_pf_8PyClical_80random_clifford(CYTHON_UNUSED PyObject *__pyx_self,
struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill);
3272 static PyObject *__pyx_pf_8PyClical_82cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3273 static PyObject *__pyx_pf_8PyClical_84cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3274 static PyObject *__pyx_pf_8PyClical_86agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3275 static PyObject *__pyx_pf_8PyClical_88e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
3276 static PyObject *__pyx_pf_8PyClical_90istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q);
3277 static PyObject *__pyx_pf_8PyClical_92_test(CYTHON_UNUSED PyObject *__pyx_self);
3278 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k);
3279 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k);
3280 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k);
3286 PyObject *__pyx_cython_runtime;
3287 PyObject *__pyx_empty_tuple;
3288 PyObject *__pyx_empty_bytes;
3289 PyObject *__pyx_empty_unicode;
3290 #ifdef __Pyx_CyFunction_USED 3291 PyTypeObject *__pyx_CyFunctionType;
3293 #ifdef __Pyx_FusedFunction_USED 3294 PyTypeObject *__pyx_FusedFunctionType;
3296 #ifdef __Pyx_Generator_USED 3297 PyTypeObject *__pyx_GeneratorType;
3299 #ifdef __Pyx_IterableCoroutine_USED 3300 PyTypeObject *__pyx_IterableCoroutineType;
3302 #ifdef __Pyx_Coroutine_USED 3303 PyTypeObject *__pyx_CoroutineAwaitType;
3305 #ifdef __Pyx_Coroutine_USED 3306 PyTypeObject *__pyx_CoroutineType;
3308 #if CYTHON_USE_MODULE_STATE 3310 #if CYTHON_USE_MODULE_STATE 3312 #if CYTHON_USE_MODULE_STATE 3314 #if CYTHON_USE_MODULE_STATE 3316 #if CYTHON_USE_MODULE_STATE 3317 PyObject *__pyx_type_8PyClical_index_set;
3318 PyObject *__pyx_type_8PyClical_clifford;
3319 PyObject *__pyx_type_8PyClical___pyx_scope_struct____iter__;
3321 PyTypeObject *__pyx_ptype_8PyClical_index_set;
3322 PyTypeObject *__pyx_ptype_8PyClical_clifford;
3323 PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__;
3324 PyObject *__pyx_kp_u_;
3325 PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
3326 PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
3327 PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
3328 PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
3329 PyObject *__pyx_kp_u_Cannot_initialize_clifford_objec;
3330 PyObject *__pyx_kp_u_Cannot_initialize_index_set_obje;
3331 PyObject *__pyx_kp_u_Cannot_reframe;
3332 PyObject *__pyx_kp_u_Cannot_take_vector_part_of;
3333 PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
3334 PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
3335 PyObject *__pyx_kp_u_Check_if_a_multivector_contains_2;
3336 PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
3337 PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
3338 PyObject *__pyx_kp_u_Contraction_print_2_clifford_2;
3339 PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
3340 PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
3341 PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
3342 PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
3343 PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
3344 PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
3345 PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
3346 PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
3347 PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
3348 PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
3349 PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
3350 PyObject *__pyx_kp_u_Geometric_difference_print_1_cl;
3351 PyObject *__pyx_kp_u_Geometric_difference_print_clif;
3352 PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
3353 PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
3354 PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
3355 PyObject *__pyx_kp_u_Geometric_product_print_2_cliff;
3356 PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
3357 PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
3358 PyObject *__pyx_kp_u_Geometric_quotient_print_2_clif;
3359 PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
3360 PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
3361 PyObject *__pyx_kp_u_Geometric_sum_print_1_clifford;
3362 PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
3363 PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
3364 PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
3365 PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
3366 PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
3367 PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
3368 PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
3369 PyObject *__pyx_n_s_IndexError;
3370 PyObject *__pyx_kp_u_Inner_product_print_2_clifford;
3371 PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
3372 PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
3373 PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
3374 PyObject *__pyx_n_s_Integral;
3375 PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
3376 PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
3377 PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
3378 PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
3379 PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
3380 PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
3381 PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
3382 PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
3383 PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
3384 PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
3385 PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
3386 PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
3387 PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
3388 PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
3389 PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
3390 PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
3391 PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
3392 PyObject *__pyx_n_s_NotImplemented;
3393 PyObject *__pyx_kp_u_Not_applicable;
3394 PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
3395 PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
3396 PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
3397 PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
3398 PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
3399 PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
3400 PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
3401 PyObject *__pyx_kp_u_Outer_product_print_2_clifford;
3402 PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
3403 PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
3404 PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
3405 PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
3406 PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
3407 PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
3408 PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
3409 PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
3410 PyObject *__pyx_n_s_PyClical;
3411 PyObject *__pyx_kp_s_PyClical_pyx;
3412 PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
3413 PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
3414 PyObject *__pyx_kp_u_Quadratic_norm_error_tolerance;
3415 PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
3416 PyObject *__pyx_n_s_Real;
3417 PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
3418 PyObject *__pyx_kp_u_Relative_or_absolute_error_usin;
3419 PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
3420 PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
3421 PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
3422 PyObject *__pyx_n_s_RuntimeError;
3423 PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
3424 PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
3425 PyObject *__pyx_n_s_Sequence;
3426 PyObject *__pyx_kp_u_Set_complement_not_print_index;
3427 PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
3428 PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
3429 PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
3430 PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
3431 PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
3432 PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
3433 PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
3434 PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
3435 PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
3436 PyObject *__pyx_kp_u_Square_root_of_multivector_with;
3437 PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
3438 PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
3439 PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
3440 PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
3441 PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
3442 PyObject *__pyx_kp_u_Test_for_approximate_equality_o;
3443 PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
3444 PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
3445 PyObject *__pyx_kp_u_The_informal_string_representat;
3446 PyObject *__pyx_kp_u_The_informal_string_representat_2;
3447 PyObject *__pyx_kp_u_The_official_string_representat;
3448 PyObject *__pyx_kp_u_The_official_string_representat_2;
3449 PyObject *__pyx_kp_u_This_comparison_operator_is_not;
3450 PyObject *__pyx_kp_u_Transform_left_hand_side_using;
3451 PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
3452 PyObject *__pyx_n_s_TypeError;
3453 PyObject *__pyx_kp_u_UTF_8;
3454 PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
3455 PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
3456 PyObject *__pyx_n_s_ValueError;
3457 PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
3458 PyObject *__pyx_n_s__113;
3459 PyObject *__pyx_kp_u__2;
3460 PyObject *__pyx_kp_u__3;
3461 PyObject *__pyx_kp_u__4;
3462 PyObject *__pyx_kp_u__5;
3463 PyObject *__pyx_kp_u__6;
3464 PyObject *__pyx_kp_u__7;
3465 PyObject *__pyx_n_s__9;
3466 PyObject *__pyx_n_s_abc;
3467 PyObject *__pyx_n_s_abs;
3468 PyObject *__pyx_kp_u_abs_line_1585;
3469 PyObject *__pyx_n_s_acos;
3470 PyObject *__pyx_kp_u_acos_line_1731;
3471 PyObject *__pyx_n_s_acosh;
3472 PyObject *__pyx_kp_u_acosh_line_1768;
3473 PyObject *__pyx_n_s_agc3;
3474 PyObject *__pyx_kp_u_agc3_line_1956;
3475 PyObject *__pyx_n_s_approx_equal;
3476 PyObject *__pyx_kp_u_approx_equal_line_1422;
3477 PyObject *__pyx_n_s_args;
3478 PyObject *__pyx_kp_u_as_frame;
3479 PyObject *__pyx_n_s_asin;
3480 PyObject *__pyx_kp_u_asin_line_1810;
3481 PyObject *__pyx_n_s_asinh;
3482 PyObject *__pyx_kp_u_asinh_line_1845;
3483 PyObject *__pyx_n_s_asyncio_coroutines;
3484 PyObject *__pyx_n_s_atan;
3485 PyObject *__pyx_kp_u_atan_line_1881;
3486 PyObject *__pyx_n_s_atanh;
3487 PyObject *__pyx_kp_u_atanh_line_1910;
3488 PyObject *__pyx_n_s_cga3;
3489 PyObject *__pyx_kp_u_cga3_line_1936;
3490 PyObject *__pyx_n_s_cga3std;
3491 PyObject *__pyx_kp_u_cga3std_line_1945;
3492 PyObject *__pyx_n_s_cl;
3493 PyObject *__pyx_n_s_clifford;
3494 PyObject *__pyx_kp_u_clifford___add___line_740;
3495 PyObject *__pyx_kp_u_clifford___and___line_872;
3496 PyObject *__pyx_kp_u_clifford___call___line_1083;
3497 PyObject *__pyx_kp_u_clifford___getitem___line_707;
3498 PyObject *__pyx_kp_u_clifford___iadd___line_760;
3499 PyObject *__pyx_kp_u_clifford___iand___line_896;
3500 PyObject *__pyx_kp_u_clifford___idiv___line_974;
3501 PyObject *__pyx_kp_u_clifford___imod___line_857;
3502 PyObject *__pyx_kp_u_clifford___imul___line_820;
3503 PyObject *__pyx_kp_u_clifford___ior___line_1013;
3504 PyObject *__pyx_kp_u_clifford___isub___line_789;
3505 PyObject *__pyx_kp_u_clifford___iter___line_638;
3506 PyObject *__pyx_kp_u_clifford___ixor___line_935;
3507 PyObject *__pyx_kp_u_clifford___mod___line_833;
3508 PyObject *__pyx_kp_u_clifford___mul___line_798;
3509 PyObject *__pyx_kp_u_clifford___neg___line_722;
3510 PyObject *__pyx_kp_u_clifford___or___line_1002;
3511 PyObject *__pyx_kp_u_clifford___pos___line_731;
3512 PyObject *__pyx_kp_u_clifford___pow___line_1024;
3513 PyObject *__pyx_kp_u_clifford___radd___line_751;
3514 PyObject *__pyx_kp_u_clifford___rand___line_887;
3515 PyObject *__pyx_n_s_clifford___reduce_cython;
3516 PyObject *__pyx_kp_u_clifford___repr___line_1298;
3517 PyObject *__pyx_kp_u_clifford___rmod___line_848;
3518 PyObject *__pyx_kp_u_clifford___rmul___line_811;
3519 PyObject *__pyx_kp_u_clifford___rsub___line_780;
3520 PyObject *__pyx_kp_u_clifford___rtruediv___line_965;
3521 PyObject *__pyx_kp_u_clifford___rxor___line_926;
3522 PyObject *__pyx_n_s_clifford___setstate_cython;
3523 PyObject *__pyx_kp_u_clifford___str___line_1307;
3524 PyObject *__pyx_kp_u_clifford___sub___line_769;
3525 PyObject *__pyx_kp_u_clifford___truediv___line_950;
3526 PyObject *__pyx_kp_u_clifford___xor___line_911;
3527 PyObject *__pyx_n_s_clifford_abs;
3528 PyObject *__pyx_kp_u_clifford_abs_line_1238;
3529 PyObject *__pyx_n_s_clifford_conj;
3530 PyObject *__pyx_kp_u_clifford_conj_line_1201;
3531 PyObject *__pyx_n_s_clifford_copy;
3532 PyObject *__pyx_kp_u_clifford_copy_line_556;
3533 PyObject *__pyx_n_s_clifford_even;
3534 PyObject *__pyx_kp_u_clifford_even_line_1124;
3535 PyObject *__pyx_n_s_clifford_frame;
3536 PyObject *__pyx_kp_u_clifford_frame_line_1287;
3537 PyObject *__pyx_n_s_clifford_hidden_doctests;
3538 PyObject *__pyx_kp_u_clifford_hidden_doctests_line_13;
3539 PyObject *__pyx_n_s_clifford_inv;
3540 PyObject *__pyx_kp_u_clifford_inv_line_989;
3541 PyObject *__pyx_n_s_clifford_involute;
3542 PyObject *__pyx_kp_u_clifford_involute_line_1170;
3543 PyObject *__pyx_n_s_clifford_isinf;
3544 PyObject *__pyx_kp_u_clifford_isinf_line_1269;
3545 PyObject *__pyx_n_s_clifford_isnan;
3546 PyObject *__pyx_kp_u_clifford_isnan_line_1278;
3547 PyObject *__pyx_n_s_clifford_max_abs;
3548 PyObject *__pyx_kp_u_clifford_max_abs_line_1247;
3549 PyObject *__pyx_n_s_clifford_norm;
3550 PyObject *__pyx_kp_u_clifford_norm_line_1227;
3551 PyObject *__pyx_n_s_clifford_odd;
3552 PyObject *__pyx_kp_u_clifford_odd_line_1133;
3553 PyObject *__pyx_n_s_clifford_outer_pow;
3554 PyObject *__pyx_kp_u_clifford_outer_pow_line_1067;
3555 PyObject *__pyx_n_s_clifford_pow;
3556 PyObject *__pyx_kp_u_clifford_pow_line_1043;
3557 PyObject *__pyx_n_s_clifford_pure;
3558 PyObject *__pyx_kp_u_clifford_pure_line_1113;
3559 PyObject *__pyx_n_s_clifford_quad;
3560 PyObject *__pyx_kp_u_clifford_quad_line_1216;
3561 PyObject *__pyx_n_s_clifford_reframe;
3562 PyObject *__pyx_kp_u_clifford_reframe_line_649;
3563 PyObject *__pyx_n_s_clifford_reverse;
3564 PyObject *__pyx_kp_u_clifford_reverse_line_1186;
3565 PyObject *__pyx_n_s_clifford_scalar;
3566 PyObject *__pyx_kp_u_clifford_scalar_line_1102;
3567 PyObject *__pyx_n_s_clifford_truncated;
3568 PyObject *__pyx_kp_u_clifford_truncated_line_1258;
3569 PyObject *__pyx_n_s_clifford_vector_part;
3570 PyObject *__pyx_kp_u_clifford_vector_part_line_1142;
3571 PyObject *__pyx_n_s_cline_in_traceback;
3572 PyObject *__pyx_n_s_close;
3573 PyObject *__pyx_n_s_collections;
3574 PyObject *__pyx_n_s_compare;
3575 PyObject *__pyx_kp_u_compare_line_492;
3576 PyObject *__pyx_n_s_complexifier;
3577 PyObject *__pyx_kp_u_complexifier_line_1639;
3578 PyObject *__pyx_n_s_conj;
3579 PyObject *__pyx_kp_u_conj_line_1548;
3580 PyObject *__pyx_n_s_copy;
3581 PyObject *__pyx_n_s_cos;
3582 PyObject *__pyx_kp_u_cos_line_1714;
3583 PyObject *__pyx_n_s_cosh;
3584 PyObject *__pyx_kp_u_cosh_line_1752;
3585 PyObject *__pyx_n_s_count;
3586 PyObject *__pyx_n_s_count_neg;
3587 PyObject *__pyx_n_s_count_pos;
3588 PyObject *__pyx_kp_u_disable;
3589 PyObject *__pyx_n_s_doctest;
3590 PyObject *__pyx_n_s_e;
3591 PyObject *__pyx_kp_u_e_line_1999;
3592 PyObject *__pyx_kp_u_enable;
3593 PyObject *__pyx_n_s_encode;
3594 PyObject *__pyx_n_s_err;
3595 PyObject *__pyx_n_s_error_msg_prefix;
3596 PyObject *__pyx_n_s_error_squared;
3597 PyObject *__pyx_kp_u_error_squared_line_1409;
3598 PyObject *__pyx_n_s_error_squared_tol;
3599 PyObject *__pyx_kp_u_error_squared_tol_line_1400;
3600 PyObject *__pyx_n_s_even;
3601 PyObject *__pyx_kp_u_even_line_1500;
3602 PyObject *__pyx_n_s_exp;
3603 PyObject *__pyx_kp_u_exp_line_1677;
3604 PyObject *__pyx_n_s_fill;
3605 PyObject *__pyx_n_s_frame;
3606 PyObject *__pyx_n_s_frm;
3607 PyObject *__pyx_kp_u_from;
3608 PyObject *__pyx_kp_u_gc;
3609 PyObject *__pyx_n_s_getstate;
3610 PyObject *__pyx_n_s_grade;
3611 PyObject *__pyx_n_s_hash_fn;
3612 PyObject *__pyx_n_s_i;
3613 PyObject *__pyx_n_s_imag;
3614 PyObject *__pyx_kp_u_imag_line_1478;
3615 PyObject *__pyx_n_s_import;
3616 PyObject *__pyx_n_s_index_set;
3617 PyObject *__pyx_kp_u_index_set___and___line_271;
3618 PyObject *__pyx_kp_u_index_set___getitem___line_191;
3619 PyObject *__pyx_kp_u_index_set___iand___line_282;
3620 PyObject *__pyx_kp_u_index_set___invert___line_240;
3621 PyObject *__pyx_kp_u_index_set___ior___line_304;
3622 PyObject *__pyx_n_s_index_set___iter;
3623 PyObject *__pyx_kp_u_index_set___iter___line_229;
3624 PyObject *__pyx_kp_u_index_set___ixor___line_260;
3625 PyObject *__pyx_kp_u_index_set___or___line_293;
3626 PyObject *__pyx_n_s_index_set___reduce_cython;
3627 PyObject *__pyx_kp_u_index_set___repr___line_384;
3628 PyObject *__pyx_kp_u_index_set___setitem___line_179;
3629 PyObject *__pyx_n_s_index_set___setstate_cython;
3630 PyObject *__pyx_kp_u_index_set___str___line_395;
3631 PyObject *__pyx_kp_u_index_set___xor___line_249;
3632 PyObject *__pyx_n_s_index_set_copy;
3633 PyObject *__pyx_kp_u_index_set_copy_line_65;
3634 PyObject *__pyx_n_s_index_set_count;
3635 PyObject *__pyx_kp_u_index_set_count_line_315;
3636 PyObject *__pyx_n_s_index_set_count_neg;
3637 PyObject *__pyx_kp_u_index_set_count_neg_line_324;
3638 PyObject *__pyx_n_s_index_set_count_pos;
3639 PyObject *__pyx_kp_u_index_set_count_pos_line_333;
3640 PyObject *__pyx_n_s_index_set_hash_fn;
3641 PyObject *__pyx_n_s_index_set_hidden_doctests;
3642 PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
3643 PyObject *__pyx_n_s_index_set_max;
3644 PyObject *__pyx_kp_u_index_set_max_line_351;
3645 PyObject *__pyx_n_s_index_set_min;
3646 PyObject *__pyx_kp_u_index_set_min_line_342;
3647 PyObject *__pyx_n_s_index_set_sign_of_mult;
3648 PyObject *__pyx_kp_u_index_set_sign_of_mult_line_366;
3649 PyObject *__pyx_n_s_index_set_sign_of_square;
3650 PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
3651 PyObject *__pyx_n_s_initializing;
3652 PyObject *__pyx_n_s_inv;
3653 PyObject *__pyx_kp_u_inv_line_1441;
3654 PyObject *__pyx_kp_u_invalid;
3655 PyObject *__pyx_kp_u_invalid_string;
3656 PyObject *__pyx_n_s_involute;
3657 PyObject *__pyx_kp_u_involute_line_1518;
3658 PyObject *__pyx_n_s_is_coroutine;
3659 PyObject *__pyx_kp_u_isenabled;
3660 PyObject *__pyx_n_s_isinf;
3661 PyObject *__pyx_n_s_isnan;
3662 PyObject *__pyx_n_s_ist;
3663 PyObject *__pyx_n_s_istpq;
3664 PyObject *__pyx_kp_u_istpq_line_2012;
3665 PyObject *__pyx_n_s_iter;
3666 PyObject *__pyx_n_s_ixt;
3667 PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
3668 PyObject *__pyx_n_s_lhs;
3669 PyObject *__pyx_n_s_limit;
3670 PyObject *__pyx_n_s_log;
3671 PyObject *__pyx_kp_u_log_line_1691;
3672 PyObject *__pyx_n_s_lst;
3673 PyObject *__pyx_n_s_m;
3674 PyObject *__pyx_n_s_main;
3675 PyObject *__pyx_n_u_main;
3676 PyObject *__pyx_n_s_math;
3677 PyObject *__pyx_n_s_max;
3678 PyObject *__pyx_n_s_max_abs;
3679 PyObject *__pyx_kp_u_max_abs_line_1594;
3680 PyObject *__pyx_n_s_max_pos;
3681 PyObject *__pyx_kp_u_max_pos_line_513;
3682 PyObject *__pyx_n_s_min;
3683 PyObject *__pyx_n_s_min_neg;
3684 PyObject *__pyx_kp_u_min_neg_line_504;
3685 PyObject *__pyx_n_s_n;
3686 PyObject *__pyx_n_s_name;
3687 PyObject *__pyx_n_s_nbar3;
3688 PyObject *__pyx_n_s_ninf3;
3689 PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
3690 PyObject *__pyx_n_s_norm;
3691 PyObject *__pyx_kp_u_norm_line_1574;
3692 PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
3693 PyObject *__pyx_n_s_numbers;
3694 PyObject *__pyx_n_s_obj;
3695 PyObject *__pyx_n_s_odd;
3696 PyObject *__pyx_kp_u_odd_line_1509;
3697 PyObject *__pyx_n_s_other;
3698 PyObject *__pyx_n_s_outer_pow;
3699 PyObject *__pyx_kp_u_outer_pow_line_1630;
3700 PyObject *__pyx_n_s_p;
3701 PyObject *__pyx_n_s_pi;
3702 PyObject *__pyx_n_s_pow;
3703 PyObject *__pyx_kp_u_pow_line_1606;
3704 PyObject *__pyx_n_s_pure;
3705 PyObject *__pyx_kp_u_pure_line_1489;
3706 PyObject *__pyx_n_s_pyx_state;
3707 PyObject *__pyx_n_s_pyx_vtable;
3708 PyObject *__pyx_n_s_q;
3709 PyObject *__pyx_n_s_quad;
3710 PyObject *__pyx_kp_u_quad_line_1563;
3711 PyObject *__pyx_n_s_random_clifford;
3712 PyObject *__pyx_kp_u_random_clifford_line_1927;
3713 PyObject *__pyx_n_s_range;
3714 PyObject *__pyx_n_s_real;
3715 PyObject *__pyx_kp_u_real_line_1467;
3716 PyObject *__pyx_n_s_reduce;
3717 PyObject *__pyx_n_s_reduce_cython;
3718 PyObject *__pyx_n_s_reduce_ex;
3719 PyObject *__pyx_n_s_reframe;
3720 PyObject *__pyx_n_s_result;
3721 PyObject *__pyx_n_s_reverse;
3722 PyObject *__pyx_kp_u_reverse_line_1533;
3723 PyObject *__pyx_n_s_rhs;
3724 PyObject *__pyx_n_s_scalar;
3725 PyObject *__pyx_n_s_scalar_epsilon;
3726 PyObject *__pyx_kp_u_scalar_line_1456;
3727 PyObject *__pyx_n_s_self;
3728 PyObject *__pyx_n_s_send;
3729 PyObject *__pyx_n_s_setstate;
3730 PyObject *__pyx_n_s_setstate_cython;
3731 PyObject *__pyx_n_s_sign_of_mult;
3732 PyObject *__pyx_n_s_sign_of_square;
3733 PyObject *__pyx_n_s_sin;
3734 PyObject *__pyx_kp_u_sin_line_1791;
3735 PyObject *__pyx_n_s_sinh;
3736 PyObject *__pyx_kp_u_sinh_line_1831;
3737 PyObject *__pyx_n_s_spec;
3738 PyObject *__pyx_n_s_sqrt;
3739 PyObject *__pyx_kp_u_sqrt_line_1654;
3740 PyObject *__pyx_kp_s_stringsource;
3741 PyObject *__pyx_n_s_tan;
3742 PyObject *__pyx_kp_u_tan_line_1864;
3743 PyObject *__pyx_n_s_tanh;
3744 PyObject *__pyx_kp_u_tanh_line_1898;
3745 PyObject *__pyx_n_s_tau;
3746 PyObject *__pyx_n_s_test;
3747 PyObject *__pyx_n_s_test_2;
3748 PyObject *__pyx_n_s_testmod;
3749 PyObject *__pyx_n_s_threshold;
3750 PyObject *__pyx_n_s_throw;
3751 PyObject *__pyx_kp_u_to_frame;
3752 PyObject *__pyx_n_s_tol;
3753 PyObject *__pyx_n_s_truncated;
3754 PyObject *__pyx_kp_u_using;
3755 PyObject *__pyx_kp_u_using_invalid;
3756 PyObject *__pyx_kp_u_utf_8;
3757 PyObject *__pyx_kp_u_value;
3758 PyObject *__pyx_n_s_vec;
3759 PyObject *__pyx_n_s_vector_part;
3760 PyObject *__pyx_n_s_version;
3761 PyObject *__pyx_n_s_xrange;
3762 PyObject *__pyx_float_0_0;
3763 PyObject *__pyx_float_1_0;
3764 PyObject *__pyx_float_4_0;
3765 PyObject *__pyx_float_8_0;
3766 PyObject *__pyx_int_0;
3767 PyObject *__pyx_int_1;
3768 PyObject *__pyx_int_4;
3769 PyObject *__pyx_int_neg_1;
3770 PyObject *__pyx_tuple__8;
3771 PyObject *__pyx_tuple__10;
3772 PyObject *__pyx_tuple__18;
3773 PyObject *__pyx_tuple__22;
3774 PyObject *__pyx_tuple__25;
3775 PyObject *__pyx_tuple__27;
3776 PyObject *__pyx_tuple__31;
3777 PyObject *__pyx_tuple__34;
3778 PyObject *__pyx_tuple__41;
3779 PyObject *__pyx_tuple__43;
3780 PyObject *__pyx_tuple__51;
3781 PyObject *__pyx_tuple__60;
3782 PyObject *__pyx_tuple__62;
3783 PyObject *__pyx_tuple__64;
3784 PyObject *__pyx_tuple__79;
3785 PyObject *__pyx_tuple__83;
3786 PyObject *__pyx_tuple__99;
3787 PyObject *__pyx_tuple__101;
3788 PyObject *__pyx_tuple__105;
3789 PyObject *__pyx_tuple__107;
3790 PyObject *__pyx_tuple__109;
3791 PyObject *__pyx_tuple__110;
3792 PyObject *__pyx_tuple__111;
3793 PyObject *__pyx_codeobj__11;
3794 PyObject *__pyx_codeobj__12;
3795 PyObject *__pyx_codeobj__13;
3796 PyObject *__pyx_codeobj__14;
3797 PyObject *__pyx_codeobj__15;
3798 PyObject *__pyx_codeobj__16;
3799 PyObject *__pyx_codeobj__17;
3800 PyObject *__pyx_codeobj__19;
3801 PyObject *__pyx_codeobj__20;
3802 PyObject *__pyx_codeobj__21;
3803 PyObject *__pyx_codeobj__23;
3804 PyObject *__pyx_codeobj__24;
3805 PyObject *__pyx_codeobj__26;
3806 PyObject *__pyx_codeobj__28;
3807 PyObject *__pyx_codeobj__29;
3808 PyObject *__pyx_codeobj__30;
3809 PyObject *__pyx_codeobj__32;
3810 PyObject *__pyx_codeobj__33;
3811 PyObject *__pyx_codeobj__35;
3812 PyObject *__pyx_codeobj__36;
3813 PyObject *__pyx_codeobj__37;
3814 PyObject *__pyx_codeobj__38;
3815 PyObject *__pyx_codeobj__39;
3816 PyObject *__pyx_codeobj__40;
3817 PyObject *__pyx_codeobj__42;
3818 PyObject *__pyx_codeobj__44;
3819 PyObject *__pyx_codeobj__45;
3820 PyObject *__pyx_codeobj__46;
3821 PyObject *__pyx_codeobj__47;
3822 PyObject *__pyx_codeobj__48;
3823 PyObject *__pyx_codeobj__49;
3824 PyObject *__pyx_codeobj__50;
3825 PyObject *__pyx_codeobj__52;
3826 PyObject *__pyx_codeobj__53;
3827 PyObject *__pyx_codeobj__54;
3828 PyObject *__pyx_codeobj__55;
3829 PyObject *__pyx_codeobj__56;
3830 PyObject *__pyx_codeobj__57;
3831 PyObject *__pyx_codeobj__58;
3832 PyObject *__pyx_codeobj__59;
3833 PyObject *__pyx_codeobj__61;
3834 PyObject *__pyx_codeobj__63;
3835 PyObject *__pyx_codeobj__65;
3836 PyObject *__pyx_codeobj__66;
3837 PyObject *__pyx_codeobj__67;
3838 PyObject *__pyx_codeobj__68;
3839 PyObject *__pyx_codeobj__69;
3840 PyObject *__pyx_codeobj__70;
3841 PyObject *__pyx_codeobj__71;
3842 PyObject *__pyx_codeobj__72;
3843 PyObject *__pyx_codeobj__73;
3844 PyObject *__pyx_codeobj__74;
3845 PyObject *__pyx_codeobj__75;
3846 PyObject *__pyx_codeobj__76;
3847 PyObject *__pyx_codeobj__77;
3848 PyObject *__pyx_codeobj__78;
3849 PyObject *__pyx_codeobj__80;
3850 PyObject *__pyx_codeobj__81;
3851 PyObject *__pyx_codeobj__82;
3852 PyObject *__pyx_codeobj__84;
3853 PyObject *__pyx_codeobj__85;
3854 PyObject *__pyx_codeobj__86;
3855 PyObject *__pyx_codeobj__87;
3856 PyObject *__pyx_codeobj__88;
3857 PyObject *__pyx_codeobj__89;
3858 PyObject *__pyx_codeobj__90;
3859 PyObject *__pyx_codeobj__91;
3860 PyObject *__pyx_codeobj__92;
3861 PyObject *__pyx_codeobj__93;
3862 PyObject *__pyx_codeobj__94;
3863 PyObject *__pyx_codeobj__95;
3864 PyObject *__pyx_codeobj__96;
3865 PyObject *__pyx_codeobj__97;
3866 PyObject *__pyx_codeobj__98;
3867 PyObject *__pyx_codeobj__100;
3868 PyObject *__pyx_codeobj__102;
3869 PyObject *__pyx_codeobj__103;
3870 PyObject *__pyx_codeobj__104;
3871 PyObject *__pyx_codeobj__106;
3872 PyObject *__pyx_codeobj__108;
3873 PyObject *__pyx_codeobj__112;
3876 #if CYTHON_USE_MODULE_STATE 3879 extern struct PyModuleDef __pyx_moduledef;
3882 static struct PyModuleDef __pyx_moduledef;
3885 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) 3887 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) 3889 #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) 3891 static __pyx_mstate __pyx_mstate_global_static =
3897 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
3900 #if CYTHON_USE_MODULE_STATE 3901 static int __pyx_m_clear(PyObject *m) {
3902 __pyx_mstate *clear_module_state = __pyx_mstate(m);
3903 if (!clear_module_state)
return 0;
3904 Py_CLEAR(clear_module_state->__pyx_d);
3905 Py_CLEAR(clear_module_state->__pyx_b);
3906 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
3907 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
3908 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
3909 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
3910 #ifdef __Pyx_CyFunction_USED 3911 Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
3913 #ifdef __Pyx_FusedFunction_USED 3914 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
3916 Py_CLEAR(clear_module_state->__pyx_ptype_8PyClical_index_set);
3917 Py_CLEAR(clear_module_state->__pyx_type_8PyClical_index_set);
3918 Py_CLEAR(clear_module_state->__pyx_ptype_8PyClical_clifford);
3919 Py_CLEAR(clear_module_state->__pyx_type_8PyClical_clifford);
3920 Py_CLEAR(clear_module_state->__pyx_ptype_8PyClical___pyx_scope_struct____iter__);
3921 Py_CLEAR(clear_module_state->__pyx_type_8PyClical___pyx_scope_struct____iter__);
3922 Py_CLEAR(clear_module_state->__pyx_kp_u_);
3923 Py_CLEAR(clear_module_state->__pyx_kp_u_Abbreviation_for_clifford_index);
3924 Py_CLEAR(clear_module_state->__pyx_kp_u_Abbreviation_for_index_set_q_p);
3925 Py_CLEAR(clear_module_state->__pyx_kp_u_Absolute_value_of_multivector_m);
3926 Py_CLEAR(clear_module_state->__pyx_kp_u_Absolute_value_square_root_of_n);
3927 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_initialize_clifford_objec);
3928 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_initialize_index_set_obje);
3929 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_reframe);
3930 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_take_vector_part_of);
3931 Py_CLEAR(clear_module_state->__pyx_kp_u_Cardinality_Number_of_indices_i);
3932 Py_CLEAR(clear_module_state->__pyx_kp_u_Check_if_a_multivector_contains);
3933 Py_CLEAR(clear_module_state->__pyx_kp_u_Check_if_a_multivector_contains_2);
3934 Py_CLEAR(clear_module_state->__pyx_kp_u_Conjugation_reverse_o_involute);
3935 Py_CLEAR(clear_module_state->__pyx_kp_u_Conjugation_reverse_o_involute_2);
3936 Py_CLEAR(clear_module_state->__pyx_kp_u_Contraction_print_2_clifford_2);
3937 Py_CLEAR(clear_module_state->__pyx_kp_u_Contraction_print_clifford_1_cl);
3938 Py_CLEAR(clear_module_state->__pyx_kp_u_Contraction_x_clifford_1_x_clif);
3939 Py_CLEAR(clear_module_state->__pyx_kp_u_Convert_CGA3_null_vector_to_Euc);
3940 Py_CLEAR(clear_module_state->__pyx_kp_u_Convert_CGA3_null_vector_to_sta);
3941 Py_CLEAR(clear_module_state->__pyx_kp_u_Convert_Euclidean_3D_multivecto);
3942 Py_CLEAR(clear_module_state->__pyx_kp_u_Copy_this_clifford_object_x_cli);
3943 Py_CLEAR(clear_module_state->__pyx_kp_u_Copy_this_index_set_object_s_in);
3944 Py_CLEAR(clear_module_state->__pyx_kp_u_Cosine_of_multivector_with_opti);
3945 Py_CLEAR(clear_module_state->__pyx_kp_u_Even_part_of_multivector_sum_of);
3946 Py_CLEAR(clear_module_state->__pyx_kp_u_Even_part_of_multivector_sum_of_2);
3947 Py_CLEAR(clear_module_state->__pyx_kp_u_Exponential_of_multivector_x_cl);
3948 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_difference_print_1_cl);
3949 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_difference_print_clif);
3950 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_difference_x_clifford);
3951 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_multiplicative_invers);
3952 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_multiplicative_invers_2);
3953 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_product_print_2_cliff);
3954 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_product_print_cliffor);
3955 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_product_x_clifford_2);
3956 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_quotient_print_2_clif);
3957 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_quotient_print_cliffo);
3958 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_quotient_x_clifford_1);
3959 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_sum_print_1_clifford);
3960 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_sum_print_clifford_1);
3961 Py_CLEAR(clear_module_state->__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl);
3962 Py_CLEAR(clear_module_state->__pyx_kp_u_Get_the_value_of_an_index_set_o);
3963 Py_CLEAR(clear_module_state->__pyx_kp_u_Hyperbolic_cosine_of_multivecto);
3964 Py_CLEAR(clear_module_state->__pyx_kp_u_Hyperbolic_sine_of_multivector);
3965 Py_CLEAR(clear_module_state->__pyx_kp_u_Hyperbolic_tangent_of_multivect);
3966 Py_CLEAR(clear_module_state->__pyx_kp_u_Imaginary_part_deprecated_alway);
3967 Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
3968 Py_CLEAR(clear_module_state->__pyx_kp_u_Inner_product_print_2_clifford);
3969 Py_CLEAR(clear_module_state->__pyx_kp_u_Inner_product_print_clifford_1);
3970 Py_CLEAR(clear_module_state->__pyx_kp_u_Inner_product_x_clifford_1_x_cl);
3971 Py_CLEAR(clear_module_state->__pyx_kp_u_Integer_power_of_multivector_ob);
3972 Py_CLEAR(clear_module_state->__pyx_n_s_Integral);
3973 Py_CLEAR(clear_module_state->__pyx_kp_u_Inverse_cosine_of_multivector_w);
3974 Py_CLEAR(clear_module_state->__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu);
3975 Py_CLEAR(clear_module_state->__pyx_kp_u_Inverse_hyperbolic_sine_of_mult);
3976 Py_CLEAR(clear_module_state->__pyx_kp_u_Inverse_hyperbolic_tangent_of_m);
3977 Py_CLEAR(clear_module_state->__pyx_kp_u_Inverse_sine_of_multivector_wit);
3978 Py_CLEAR(clear_module_state->__pyx_kp_u_Inverse_tangent_of_multivector);
3979 Py_CLEAR(clear_module_state->__pyx_kp_u_Iterate_over_the_indices_of_an);
3980 Py_CLEAR(clear_module_state->__pyx_kp_u_Main_involution_each_i_is_repla);
3981 Py_CLEAR(clear_module_state->__pyx_kp_u_Main_involution_each_i_is_repla_2);
3982 Py_CLEAR(clear_module_state->__pyx_kp_u_Maximum_absolute_value_of_coord);
3983 Py_CLEAR(clear_module_state->__pyx_kp_u_Maximum_member_index_set_1_1_2);
3984 Py_CLEAR(clear_module_state->__pyx_kp_u_Maximum_of_absolute_values_of_c);
3985 Py_CLEAR(clear_module_state->__pyx_kp_u_Maximum_positive_index_or_0_if);
3986 Py_CLEAR(clear_module_state->__pyx_kp_u_Minimum_member_index_set_1_1_2);
3987 Py_CLEAR(clear_module_state->__pyx_kp_u_Minimum_negative_index_or_0_if);
3988 Py_CLEAR(clear_module_state->__pyx_kp_u_Natural_logarithm_of_multivecto);
3989 Py_CLEAR(clear_module_state->__pyx_kp_u_Norm_sum_of_squares_of_coordina);
3990 Py_CLEAR(clear_module_state->__pyx_n_s_NotImplemented);
3991 Py_CLEAR(clear_module_state->__pyx_kp_u_Not_applicable);
3992 Py_CLEAR(clear_module_state->__pyx_kp_u_Not_applicable_for_a_in_cliffor);
3993 Py_CLEAR(clear_module_state->__pyx_kp_u_Number_of_negative_indices_incl);
3994 Py_CLEAR(clear_module_state->__pyx_kp_u_Number_of_positive_indices_incl);
3995 Py_CLEAR(clear_module_state->__pyx_kp_u_Odd_part_of_multivector_sum_of);
3996 Py_CLEAR(clear_module_state->__pyx_kp_u_Odd_part_of_multivector_sum_of_2);
3997 Py_CLEAR(clear_module_state->__pyx_kp_u_Outer_product_power_of_multivec);
3998 Py_CLEAR(clear_module_state->__pyx_kp_u_Outer_product_power_x_clifford);
3999 Py_CLEAR(clear_module_state->__pyx_kp_u_Outer_product_print_2_clifford);
4000 Py_CLEAR(clear_module_state->__pyx_kp_u_Outer_product_print_clifford_1);
4001 Py_CLEAR(clear_module_state->__pyx_kp_u_Outer_product_x_clifford_1_x_cl);
4002 Py_CLEAR(clear_module_state->__pyx_kp_u_Power_self_to_the_m_x_clifford);
4003 Py_CLEAR(clear_module_state->__pyx_kp_u_Power_self_to_the_m_x_clifford_2);
4004 Py_CLEAR(clear_module_state->__pyx_kp_u_Pure_grade_vector_part_print_cl);
4005 Py_CLEAR(clear_module_state->__pyx_kp_u_Pure_part_print_clifford_1_1_1);
4006 Py_CLEAR(clear_module_state->__pyx_kp_u_Pure_part_print_pure_clifford_1);
4007 Py_CLEAR(clear_module_state->__pyx_kp_u_Put_self_into_a_larger_frame_co);
4008 Py_CLEAR(clear_module_state->__pyx_n_s_PyClical);
4009 Py_CLEAR(clear_module_state->__pyx_kp_s_PyClical_pyx);
4010 Py_CLEAR(clear_module_state->__pyx_kp_u_Quadratic_form_rev_x_x_0_print);
4011 Py_CLEAR(clear_module_state->__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2);
4012 Py_CLEAR(clear_module_state->__pyx_kp_u_Quadratic_norm_error_tolerance);
4013 Py_CLEAR(clear_module_state->__pyx_kp_u_Random_multivector_within_a_fra);
4014 Py_CLEAR(clear_module_state->__pyx_n_s_Real);
4015 Py_CLEAR(clear_module_state->__pyx_kp_u_Real_part_synonym_for_scalar_pa);
4016 Py_CLEAR(clear_module_state->__pyx_kp_u_Relative_or_absolute_error_usin);
4017 Py_CLEAR(clear_module_state->__pyx_kp_u_Remove_all_terms_of_self_with_r);
4018 Py_CLEAR(clear_module_state->__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve);
4019 Py_CLEAR(clear_module_state->__pyx_kp_u_Reversion_eg_clifford_1_cliffor);
4020 Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
4021 Py_CLEAR(clear_module_state->__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc);
4022 Py_CLEAR(clear_module_state->__pyx_kp_u_Scalar_part_scalar_clifford_1_1);
4023 Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
4024 Py_CLEAR(clear_module_state->__pyx_kp_u_Set_complement_not_print_index);
4025 Py_CLEAR(clear_module_state->__pyx_kp_u_Set_intersection_and_print_inde);
4026 Py_CLEAR(clear_module_state->__pyx_kp_u_Set_intersection_and_x_index_se);
4027 Py_CLEAR(clear_module_state->__pyx_kp_u_Set_the_value_of_an_index_set_o);
4028 Py_CLEAR(clear_module_state->__pyx_kp_u_Set_union_or_print_index_set_1);
4029 Py_CLEAR(clear_module_state->__pyx_kp_u_Set_union_or_x_index_set_1_x_in);
4030 Py_CLEAR(clear_module_state->__pyx_kp_u_Sign_of_geometric_product_of_tw);
4031 Py_CLEAR(clear_module_state->__pyx_kp_u_Sign_of_geometric_square_of_a_C);
4032 Py_CLEAR(clear_module_state->__pyx_kp_u_Sine_of_multivector_with_option);
4033 Py_CLEAR(clear_module_state->__pyx_kp_u_Square_root_of_1_which_commutes);
4034 Py_CLEAR(clear_module_state->__pyx_kp_u_Square_root_of_multivector_with);
4035 Py_CLEAR(clear_module_state->__pyx_kp_u_Subalgebra_generated_by_all_gen);
4036 Py_CLEAR(clear_module_state->__pyx_kp_u_Subscripting_map_from_index_set);
4037 Py_CLEAR(clear_module_state->__pyx_kp_u_Symmetric_set_difference_exclus);
4038 Py_CLEAR(clear_module_state->__pyx_kp_u_Symmetric_set_difference_exclus_2);
4039 Py_CLEAR(clear_module_state->__pyx_kp_u_Tangent_of_multivector_with_opt);
4040 Py_CLEAR(clear_module_state->__pyx_kp_u_Test_for_approximate_equality_o);
4041 Py_CLEAR(clear_module_state->__pyx_kp_u_Tests_for_functions_that_Doctes);
4042 Py_CLEAR(clear_module_state->__pyx_kp_u_Tests_for_functions_that_Doctes_2);
4043 Py_CLEAR(clear_module_state->__pyx_kp_u_The_informal_string_representat);
4044 Py_CLEAR(clear_module_state->__pyx_kp_u_The_informal_string_representat_2);
4045 Py_CLEAR(clear_module_state->__pyx_kp_u_The_official_string_representat);
4046 Py_CLEAR(clear_module_state->__pyx_kp_u_The_official_string_representat_2);
4047 Py_CLEAR(clear_module_state->__pyx_kp_u_This_comparison_operator_is_not);
4048 Py_CLEAR(clear_module_state->__pyx_kp_u_Transform_left_hand_side_using);
4049 Py_CLEAR(clear_module_state->__pyx_kp_u_Transform_left_hand_side_using_2);
4050 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
4051 Py_CLEAR(clear_module_state->__pyx_kp_u_UTF_8);
4052 Py_CLEAR(clear_module_state->__pyx_kp_u_Unary_print_clifford_1_1);
4053 Py_CLEAR(clear_module_state->__pyx_kp_u_Unary_print_clifford_1_1_2);
4054 Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
4055 Py_CLEAR(clear_module_state->__pyx_kp_u_Vector_part_of_multivector_as_a);
4056 Py_CLEAR(clear_module_state->__pyx_n_s__113);
4057 Py_CLEAR(clear_module_state->__pyx_kp_u__2);
4058 Py_CLEAR(clear_module_state->__pyx_kp_u__3);
4059 Py_CLEAR(clear_module_state->__pyx_kp_u__4);
4060 Py_CLEAR(clear_module_state->__pyx_kp_u__5);
4061 Py_CLEAR(clear_module_state->__pyx_kp_u__6);
4062 Py_CLEAR(clear_module_state->__pyx_kp_u__7);
4063 Py_CLEAR(clear_module_state->__pyx_n_s__9);
4064 Py_CLEAR(clear_module_state->__pyx_n_s_abc);
4065 Py_CLEAR(clear_module_state->__pyx_n_s_abs);
4066 Py_CLEAR(clear_module_state->__pyx_kp_u_abs_line_1585);
4067 Py_CLEAR(clear_module_state->__pyx_n_s_acos);
4068 Py_CLEAR(clear_module_state->__pyx_kp_u_acos_line_1731);
4069 Py_CLEAR(clear_module_state->__pyx_n_s_acosh);
4070 Py_CLEAR(clear_module_state->__pyx_kp_u_acosh_line_1768);
4071 Py_CLEAR(clear_module_state->__pyx_n_s_agc3);
4072 Py_CLEAR(clear_module_state->__pyx_kp_u_agc3_line_1956);
4073 Py_CLEAR(clear_module_state->__pyx_n_s_approx_equal);
4074 Py_CLEAR(clear_module_state->__pyx_kp_u_approx_equal_line_1422);
4075 Py_CLEAR(clear_module_state->__pyx_n_s_args);
4076 Py_CLEAR(clear_module_state->__pyx_kp_u_as_frame);
4077 Py_CLEAR(clear_module_state->__pyx_n_s_asin);
4078 Py_CLEAR(clear_module_state->__pyx_kp_u_asin_line_1810);
4079 Py_CLEAR(clear_module_state->__pyx_n_s_asinh);
4080 Py_CLEAR(clear_module_state->__pyx_kp_u_asinh_line_1845);
4081 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
4082 Py_CLEAR(clear_module_state->__pyx_n_s_atan);
4083 Py_CLEAR(clear_module_state->__pyx_kp_u_atan_line_1881);
4084 Py_CLEAR(clear_module_state->__pyx_n_s_atanh);
4085 Py_CLEAR(clear_module_state->__pyx_kp_u_atanh_line_1910);
4086 Py_CLEAR(clear_module_state->__pyx_n_s_cga3);
4087 Py_CLEAR(clear_module_state->__pyx_kp_u_cga3_line_1936);
4088 Py_CLEAR(clear_module_state->__pyx_n_s_cga3std);
4089 Py_CLEAR(clear_module_state->__pyx_kp_u_cga3std_line_1945);
4090 Py_CLEAR(clear_module_state->__pyx_n_s_cl);
4091 Py_CLEAR(clear_module_state->__pyx_n_s_clifford);
4092 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___add___line_740);
4093 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___and___line_872);
4094 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___call___line_1083);
4095 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___getitem___line_707);
4096 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___iadd___line_760);
4097 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___iand___line_896);
4098 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___idiv___line_974);
4099 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___imod___line_857);
4100 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___imul___line_820);
4101 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___ior___line_1013);
4102 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___isub___line_789);
4103 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___iter___line_638);
4104 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___ixor___line_935);
4105 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___mod___line_833);
4106 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___mul___line_798);
4107 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___neg___line_722);
4108 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___or___line_1002);
4109 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___pos___line_731);
4110 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___pow___line_1024);
4111 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___radd___line_751);
4112 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___rand___line_887);
4113 Py_CLEAR(clear_module_state->__pyx_n_s_clifford___reduce_cython);
4114 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___repr___line_1298);
4115 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___rmod___line_848);
4116 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___rmul___line_811);
4117 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___rsub___line_780);
4118 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___rtruediv___line_965);
4119 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___rxor___line_926);
4120 Py_CLEAR(clear_module_state->__pyx_n_s_clifford___setstate_cython);
4121 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___str___line_1307);
4122 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___sub___line_769);
4123 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___truediv___line_950);
4124 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford___xor___line_911);
4125 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_abs);
4126 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_abs_line_1238);
4127 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_conj);
4128 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_conj_line_1201);
4129 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_copy);
4130 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_copy_line_556);
4131 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_even);
4132 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_even_line_1124);
4133 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_frame);
4134 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_frame_line_1287);
4135 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_hidden_doctests);
4136 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_hidden_doctests_line_13);
4137 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_inv);
4138 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_inv_line_989);
4139 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_involute);
4140 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_involute_line_1170);
4141 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_isinf);
4142 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_isinf_line_1269);
4143 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_isnan);
4144 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_isnan_line_1278);
4145 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_max_abs);
4146 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_max_abs_line_1247);
4147 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_norm);
4148 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_norm_line_1227);
4149 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_odd);
4150 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_odd_line_1133);
4151 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_outer_pow);
4152 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_outer_pow_line_1067);
4153 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_pow);
4154 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_pow_line_1043);
4155 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_pure);
4156 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_pure_line_1113);
4157 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_quad);
4158 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_quad_line_1216);
4159 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_reframe);
4160 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_reframe_line_649);
4161 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_reverse);
4162 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_reverse_line_1186);
4163 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_scalar);
4164 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_scalar_line_1102);
4165 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_truncated);
4166 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_truncated_line_1258);
4167 Py_CLEAR(clear_module_state->__pyx_n_s_clifford_vector_part);
4168 Py_CLEAR(clear_module_state->__pyx_kp_u_clifford_vector_part_line_1142);
4169 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
4170 Py_CLEAR(clear_module_state->__pyx_n_s_close);
4171 Py_CLEAR(clear_module_state->__pyx_n_s_collections);
4172 Py_CLEAR(clear_module_state->__pyx_n_s_compare);
4173 Py_CLEAR(clear_module_state->__pyx_kp_u_compare_line_492);
4174 Py_CLEAR(clear_module_state->__pyx_n_s_complexifier);
4175 Py_CLEAR(clear_module_state->__pyx_kp_u_complexifier_line_1639);
4176 Py_CLEAR(clear_module_state->__pyx_n_s_conj);
4177 Py_CLEAR(clear_module_state->__pyx_kp_u_conj_line_1548);
4178 Py_CLEAR(clear_module_state->__pyx_n_s_copy);
4179 Py_CLEAR(clear_module_state->__pyx_n_s_cos);
4180 Py_CLEAR(clear_module_state->__pyx_kp_u_cos_line_1714);
4181 Py_CLEAR(clear_module_state->__pyx_n_s_cosh);
4182 Py_CLEAR(clear_module_state->__pyx_kp_u_cosh_line_1752);
4183 Py_CLEAR(clear_module_state->__pyx_n_s_count);
4184 Py_CLEAR(clear_module_state->__pyx_n_s_count_neg);
4185 Py_CLEAR(clear_module_state->__pyx_n_s_count_pos);
4186 Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
4187 Py_CLEAR(clear_module_state->__pyx_n_s_doctest);
4188 Py_CLEAR(clear_module_state->__pyx_n_s_e);
4189 Py_CLEAR(clear_module_state->__pyx_kp_u_e_line_1999);
4190 Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
4191 Py_CLEAR(clear_module_state->__pyx_n_s_encode);
4192 Py_CLEAR(clear_module_state->__pyx_n_s_err);
4193 Py_CLEAR(clear_module_state->__pyx_n_s_error_msg_prefix);
4194 Py_CLEAR(clear_module_state->__pyx_n_s_error_squared);
4195 Py_CLEAR(clear_module_state->__pyx_kp_u_error_squared_line_1409);
4196 Py_CLEAR(clear_module_state->__pyx_n_s_error_squared_tol);
4197 Py_CLEAR(clear_module_state->__pyx_kp_u_error_squared_tol_line_1400);
4198 Py_CLEAR(clear_module_state->__pyx_n_s_even);
4199 Py_CLEAR(clear_module_state->__pyx_kp_u_even_line_1500);
4200 Py_CLEAR(clear_module_state->__pyx_n_s_exp);
4201 Py_CLEAR(clear_module_state->__pyx_kp_u_exp_line_1677);
4202 Py_CLEAR(clear_module_state->__pyx_n_s_fill);
4203 Py_CLEAR(clear_module_state->__pyx_n_s_frame);
4204 Py_CLEAR(clear_module_state->__pyx_n_s_frm);
4205 Py_CLEAR(clear_module_state->__pyx_kp_u_from);
4206 Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
4207 Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
4208 Py_CLEAR(clear_module_state->__pyx_n_s_grade);
4209 Py_CLEAR(clear_module_state->__pyx_n_s_hash_fn);
4210 Py_CLEAR(clear_module_state->__pyx_n_s_i);
4211 Py_CLEAR(clear_module_state->__pyx_n_s_imag);
4212 Py_CLEAR(clear_module_state->__pyx_kp_u_imag_line_1478);
4213 Py_CLEAR(clear_module_state->__pyx_n_s_import);
4214 Py_CLEAR(clear_module_state->__pyx_n_s_index_set);
4215 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___and___line_271);
4216 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___getitem___line_191);
4217 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___iand___line_282);
4218 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___invert___line_240);
4219 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___ior___line_304);
4220 Py_CLEAR(clear_module_state->__pyx_n_s_index_set___iter);
4221 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___iter___line_229);
4222 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___ixor___line_260);
4223 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___or___line_293);
4224 Py_CLEAR(clear_module_state->__pyx_n_s_index_set___reduce_cython);
4225 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___repr___line_384);
4226 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___setitem___line_179);
4227 Py_CLEAR(clear_module_state->__pyx_n_s_index_set___setstate_cython);
4228 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___str___line_395);
4229 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set___xor___line_249);
4230 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_copy);
4231 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_copy_line_65);
4232 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_count);
4233 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_count_line_315);
4234 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_count_neg);
4235 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_count_neg_line_324);
4236 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_count_pos);
4237 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_count_pos_line_333);
4238 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_hash_fn);
4239 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_hidden_doctests);
4240 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_hidden_doctests_line_4);
4241 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_max);
4242 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_max_line_351);
4243 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_min);
4244 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_min_line_342);
4245 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_sign_of_mult);
4246 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_sign_of_mult_line_366);
4247 Py_CLEAR(clear_module_state->__pyx_n_s_index_set_sign_of_square);
4248 Py_CLEAR(clear_module_state->__pyx_kp_u_index_set_sign_of_square_line_37);
4249 Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
4250 Py_CLEAR(clear_module_state->__pyx_n_s_inv);
4251 Py_CLEAR(clear_module_state->__pyx_kp_u_inv_line_1441);
4252 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid);
4253 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_string);
4254 Py_CLEAR(clear_module_state->__pyx_n_s_involute);
4255 Py_CLEAR(clear_module_state->__pyx_kp_u_involute_line_1518);
4256 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
4257 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
4258 Py_CLEAR(clear_module_state->__pyx_n_s_isinf);
4259 Py_CLEAR(clear_module_state->__pyx_n_s_isnan);
4260 Py_CLEAR(clear_module_state->__pyx_n_s_ist);
4261 Py_CLEAR(clear_module_state->__pyx_n_s_istpq);
4262 Py_CLEAR(clear_module_state->__pyx_kp_u_istpq_line_2012);
4263 Py_CLEAR(clear_module_state->__pyx_n_s_iter);
4264 Py_CLEAR(clear_module_state->__pyx_n_s_ixt);
4265 Py_CLEAR(clear_module_state->__pyx_kp_u_lexicographic_compare_eg_3_4_5);
4266 Py_CLEAR(clear_module_state->__pyx_n_s_lhs);
4267 Py_CLEAR(clear_module_state->__pyx_n_s_limit);
4268 Py_CLEAR(clear_module_state->__pyx_n_s_log);
4269 Py_CLEAR(clear_module_state->__pyx_kp_u_log_line_1691);
4270 Py_CLEAR(clear_module_state->__pyx_n_s_lst);
4271 Py_CLEAR(clear_module_state->__pyx_n_s_m);
4272 Py_CLEAR(clear_module_state->__pyx_n_s_main);
4273 Py_CLEAR(clear_module_state->__pyx_n_u_main);
4274 Py_CLEAR(clear_module_state->__pyx_n_s_math);
4275 Py_CLEAR(clear_module_state->__pyx_n_s_max);
4276 Py_CLEAR(clear_module_state->__pyx_n_s_max_abs);
4277 Py_CLEAR(clear_module_state->__pyx_kp_u_max_abs_line_1594);
4278 Py_CLEAR(clear_module_state->__pyx_n_s_max_pos);
4279 Py_CLEAR(clear_module_state->__pyx_kp_u_max_pos_line_513);
4280 Py_CLEAR(clear_module_state->__pyx_n_s_min);
4281 Py_CLEAR(clear_module_state->__pyx_n_s_min_neg);
4282 Py_CLEAR(clear_module_state->__pyx_kp_u_min_neg_line_504);
4283 Py_CLEAR(clear_module_state->__pyx_n_s_n);
4284 Py_CLEAR(clear_module_state->__pyx_n_s_name);
4285 Py_CLEAR(clear_module_state->__pyx_n_s_nbar3);
4286 Py_CLEAR(clear_module_state->__pyx_n_s_ninf3);
4287 Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
4288 Py_CLEAR(clear_module_state->__pyx_n_s_norm);
4289 Py_CLEAR(clear_module_state->__pyx_kp_u_norm_line_1574);
4290 Py_CLEAR(clear_module_state->__pyx_kp_u_norm_sum_of_squares_of_coordina);
4291 Py_CLEAR(clear_module_state->__pyx_n_s_numbers);
4292 Py_CLEAR(clear_module_state->__pyx_n_s_obj);
4293 Py_CLEAR(clear_module_state->__pyx_n_s_odd);
4294 Py_CLEAR(clear_module_state->__pyx_kp_u_odd_line_1509);
4295 Py_CLEAR(clear_module_state->__pyx_n_s_other);
4296 Py_CLEAR(clear_module_state->__pyx_n_s_outer_pow);
4297 Py_CLEAR(clear_module_state->__pyx_kp_u_outer_pow_line_1630);
4298 Py_CLEAR(clear_module_state->__pyx_n_s_p);
4299 Py_CLEAR(clear_module_state->__pyx_n_s_pi);
4300 Py_CLEAR(clear_module_state->__pyx_n_s_pow);
4301 Py_CLEAR(clear_module_state->__pyx_kp_u_pow_line_1606);
4302 Py_CLEAR(clear_module_state->__pyx_n_s_pure);
4303 Py_CLEAR(clear_module_state->__pyx_kp_u_pure_line_1489);
4304 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
4305 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
4306 Py_CLEAR(clear_module_state->__pyx_n_s_q);
4307 Py_CLEAR(clear_module_state->__pyx_n_s_quad);
4308 Py_CLEAR(clear_module_state->__pyx_kp_u_quad_line_1563);
4309 Py_CLEAR(clear_module_state->__pyx_n_s_random_clifford);
4310 Py_CLEAR(clear_module_state->__pyx_kp_u_random_clifford_line_1927);
4311 Py_CLEAR(clear_module_state->__pyx_n_s_range);
4312 Py_CLEAR(clear_module_state->__pyx_n_s_real);
4313 Py_CLEAR(clear_module_state->__pyx_kp_u_real_line_1467);
4314 Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
4315 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
4316 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
4317 Py_CLEAR(clear_module_state->__pyx_n_s_reframe);
4318 Py_CLEAR(clear_module_state->__pyx_n_s_result);
4319 Py_CLEAR(clear_module_state->__pyx_n_s_reverse);
4320 Py_CLEAR(clear_module_state->__pyx_kp_u_reverse_line_1533);
4321 Py_CLEAR(clear_module_state->__pyx_n_s_rhs);
4322 Py_CLEAR(clear_module_state->__pyx_n_s_scalar);
4323 Py_CLEAR(clear_module_state->__pyx_n_s_scalar_epsilon);
4324 Py_CLEAR(clear_module_state->__pyx_kp_u_scalar_line_1456);
4325 Py_CLEAR(clear_module_state->__pyx_n_s_self);
4326 Py_CLEAR(clear_module_state->__pyx_n_s_send);
4327 Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
4328 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
4329 Py_CLEAR(clear_module_state->__pyx_n_s_sign_of_mult);
4330 Py_CLEAR(clear_module_state->__pyx_n_s_sign_of_square);
4331 Py_CLEAR(clear_module_state->__pyx_n_s_sin);
4332 Py_CLEAR(clear_module_state->__pyx_kp_u_sin_line_1791);
4333 Py_CLEAR(clear_module_state->__pyx_n_s_sinh);
4334 Py_CLEAR(clear_module_state->__pyx_kp_u_sinh_line_1831);
4335 Py_CLEAR(clear_module_state->__pyx_n_s_spec);
4336 Py_CLEAR(clear_module_state->__pyx_n_s_sqrt);
4337 Py_CLEAR(clear_module_state->__pyx_kp_u_sqrt_line_1654);
4338 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
4339 Py_CLEAR(clear_module_state->__pyx_n_s_tan);
4340 Py_CLEAR(clear_module_state->__pyx_kp_u_tan_line_1864);
4341 Py_CLEAR(clear_module_state->__pyx_n_s_tanh);
4342 Py_CLEAR(clear_module_state->__pyx_kp_u_tanh_line_1898);
4343 Py_CLEAR(clear_module_state->__pyx_n_s_tau);
4344 Py_CLEAR(clear_module_state->__pyx_n_s_test);
4345 Py_CLEAR(clear_module_state->__pyx_n_s_test_2);
4346 Py_CLEAR(clear_module_state->__pyx_n_s_testmod);
4347 Py_CLEAR(clear_module_state->__pyx_n_s_threshold);
4348 Py_CLEAR(clear_module_state->__pyx_n_s_throw);
4349 Py_CLEAR(clear_module_state->__pyx_kp_u_to_frame);
4350 Py_CLEAR(clear_module_state->__pyx_n_s_tol);
4351 Py_CLEAR(clear_module_state->__pyx_n_s_truncated);
4352 Py_CLEAR(clear_module_state->__pyx_kp_u_using);
4353 Py_CLEAR(clear_module_state->__pyx_kp_u_using_invalid);
4354 Py_CLEAR(clear_module_state->__pyx_kp_u_utf_8);
4355 Py_CLEAR(clear_module_state->__pyx_kp_u_value);
4356 Py_CLEAR(clear_module_state->__pyx_n_s_vec);
4357 Py_CLEAR(clear_module_state->__pyx_n_s_vector_part);
4358 Py_CLEAR(clear_module_state->__pyx_n_s_version);
4359 Py_CLEAR(clear_module_state->__pyx_n_s_xrange);
4360 Py_CLEAR(clear_module_state->__pyx_float_0_0);
4361 Py_CLEAR(clear_module_state->__pyx_float_1_0);
4362 Py_CLEAR(clear_module_state->__pyx_float_4_0);
4363 Py_CLEAR(clear_module_state->__pyx_float_8_0);
4364 Py_CLEAR(clear_module_state->__pyx_int_0);
4365 Py_CLEAR(clear_module_state->__pyx_int_1);
4366 Py_CLEAR(clear_module_state->__pyx_int_4);
4367 Py_CLEAR(clear_module_state->__pyx_int_neg_1);
4368 Py_CLEAR(clear_module_state->__pyx_tuple__8);
4369 Py_CLEAR(clear_module_state->__pyx_tuple__10);
4370 Py_CLEAR(clear_module_state->__pyx_tuple__18);
4371 Py_CLEAR(clear_module_state->__pyx_tuple__22);
4372 Py_CLEAR(clear_module_state->__pyx_tuple__25);
4373 Py_CLEAR(clear_module_state->__pyx_tuple__27);
4374 Py_CLEAR(clear_module_state->__pyx_tuple__31);
4375 Py_CLEAR(clear_module_state->__pyx_tuple__34);
4376 Py_CLEAR(clear_module_state->__pyx_tuple__41);
4377 Py_CLEAR(clear_module_state->__pyx_tuple__43);
4378 Py_CLEAR(clear_module_state->__pyx_tuple__51);
4379 Py_CLEAR(clear_module_state->__pyx_tuple__60);
4380 Py_CLEAR(clear_module_state->__pyx_tuple__62);
4381 Py_CLEAR(clear_module_state->__pyx_tuple__64);
4382 Py_CLEAR(clear_module_state->__pyx_tuple__79);
4383 Py_CLEAR(clear_module_state->__pyx_tuple__83);
4384 Py_CLEAR(clear_module_state->__pyx_tuple__99);
4385 Py_CLEAR(clear_module_state->__pyx_tuple__101);
4386 Py_CLEAR(clear_module_state->__pyx_tuple__105);
4387 Py_CLEAR(clear_module_state->__pyx_tuple__107);
4388 Py_CLEAR(clear_module_state->__pyx_tuple__109);
4389 Py_CLEAR(clear_module_state->__pyx_tuple__110);
4390 Py_CLEAR(clear_module_state->__pyx_tuple__111);
4391 Py_CLEAR(clear_module_state->__pyx_codeobj__11);
4392 Py_CLEAR(clear_module_state->__pyx_codeobj__12);
4393 Py_CLEAR(clear_module_state->__pyx_codeobj__13);
4394 Py_CLEAR(clear_module_state->__pyx_codeobj__14);
4395 Py_CLEAR(clear_module_state->__pyx_codeobj__15);
4396 Py_CLEAR(clear_module_state->__pyx_codeobj__16);
4397 Py_CLEAR(clear_module_state->__pyx_codeobj__17);
4398 Py_CLEAR(clear_module_state->__pyx_codeobj__19);
4399 Py_CLEAR(clear_module_state->__pyx_codeobj__20);
4400 Py_CLEAR(clear_module_state->__pyx_codeobj__21);
4401 Py_CLEAR(clear_module_state->__pyx_codeobj__23);
4402 Py_CLEAR(clear_module_state->__pyx_codeobj__24);
4403 Py_CLEAR(clear_module_state->__pyx_codeobj__26);
4404 Py_CLEAR(clear_module_state->__pyx_codeobj__28);
4405 Py_CLEAR(clear_module_state->__pyx_codeobj__29);
4406 Py_CLEAR(clear_module_state->__pyx_codeobj__30);
4407 Py_CLEAR(clear_module_state->__pyx_codeobj__32);
4408 Py_CLEAR(clear_module_state->__pyx_codeobj__33);
4409 Py_CLEAR(clear_module_state->__pyx_codeobj__35);
4410 Py_CLEAR(clear_module_state->__pyx_codeobj__36);
4411 Py_CLEAR(clear_module_state->__pyx_codeobj__37);
4412 Py_CLEAR(clear_module_state->__pyx_codeobj__38);
4413 Py_CLEAR(clear_module_state->__pyx_codeobj__39);
4414 Py_CLEAR(clear_module_state->__pyx_codeobj__40);
4415 Py_CLEAR(clear_module_state->__pyx_codeobj__42);
4416 Py_CLEAR(clear_module_state->__pyx_codeobj__44);
4417 Py_CLEAR(clear_module_state->__pyx_codeobj__45);
4418 Py_CLEAR(clear_module_state->__pyx_codeobj__46);
4419 Py_CLEAR(clear_module_state->__pyx_codeobj__47);
4420 Py_CLEAR(clear_module_state->__pyx_codeobj__48);
4421 Py_CLEAR(clear_module_state->__pyx_codeobj__49);
4422 Py_CLEAR(clear_module_state->__pyx_codeobj__50);
4423 Py_CLEAR(clear_module_state->__pyx_codeobj__52);
4424 Py_CLEAR(clear_module_state->__pyx_codeobj__53);
4425 Py_CLEAR(clear_module_state->__pyx_codeobj__54);
4426 Py_CLEAR(clear_module_state->__pyx_codeobj__55);
4427 Py_CLEAR(clear_module_state->__pyx_codeobj__56);
4428 Py_CLEAR(clear_module_state->__pyx_codeobj__57);
4429 Py_CLEAR(clear_module_state->__pyx_codeobj__58);
4430 Py_CLEAR(clear_module_state->__pyx_codeobj__59);
4431 Py_CLEAR(clear_module_state->__pyx_codeobj__61);
4432 Py_CLEAR(clear_module_state->__pyx_codeobj__63);
4433 Py_CLEAR(clear_module_state->__pyx_codeobj__65);
4434 Py_CLEAR(clear_module_state->__pyx_codeobj__66);
4435 Py_CLEAR(clear_module_state->__pyx_codeobj__67);
4436 Py_CLEAR(clear_module_state->__pyx_codeobj__68);
4437 Py_CLEAR(clear_module_state->__pyx_codeobj__69);
4438 Py_CLEAR(clear_module_state->__pyx_codeobj__70);
4439 Py_CLEAR(clear_module_state->__pyx_codeobj__71);
4440 Py_CLEAR(clear_module_state->__pyx_codeobj__72);
4441 Py_CLEAR(clear_module_state->__pyx_codeobj__73);
4442 Py_CLEAR(clear_module_state->__pyx_codeobj__74);
4443 Py_CLEAR(clear_module_state->__pyx_codeobj__75);
4444 Py_CLEAR(clear_module_state->__pyx_codeobj__76);
4445 Py_CLEAR(clear_module_state->__pyx_codeobj__77);
4446 Py_CLEAR(clear_module_state->__pyx_codeobj__78);
4447 Py_CLEAR(clear_module_state->__pyx_codeobj__80);
4448 Py_CLEAR(clear_module_state->__pyx_codeobj__81);
4449 Py_CLEAR(clear_module_state->__pyx_codeobj__82);
4450 Py_CLEAR(clear_module_state->__pyx_codeobj__84);
4451 Py_CLEAR(clear_module_state->__pyx_codeobj__85);
4452 Py_CLEAR(clear_module_state->__pyx_codeobj__86);
4453 Py_CLEAR(clear_module_state->__pyx_codeobj__87);
4454 Py_CLEAR(clear_module_state->__pyx_codeobj__88);
4455 Py_CLEAR(clear_module_state->__pyx_codeobj__89);
4456 Py_CLEAR(clear_module_state->__pyx_codeobj__90);
4457 Py_CLEAR(clear_module_state->__pyx_codeobj__91);
4458 Py_CLEAR(clear_module_state->__pyx_codeobj__92);
4459 Py_CLEAR(clear_module_state->__pyx_codeobj__93);
4460 Py_CLEAR(clear_module_state->__pyx_codeobj__94);
4461 Py_CLEAR(clear_module_state->__pyx_codeobj__95);
4462 Py_CLEAR(clear_module_state->__pyx_codeobj__96);
4463 Py_CLEAR(clear_module_state->__pyx_codeobj__97);
4464 Py_CLEAR(clear_module_state->__pyx_codeobj__98);
4465 Py_CLEAR(clear_module_state->__pyx_codeobj__100);
4466 Py_CLEAR(clear_module_state->__pyx_codeobj__102);
4467 Py_CLEAR(clear_module_state->__pyx_codeobj__103);
4468 Py_CLEAR(clear_module_state->__pyx_codeobj__104);
4469 Py_CLEAR(clear_module_state->__pyx_codeobj__106);
4470 Py_CLEAR(clear_module_state->__pyx_codeobj__108);
4471 Py_CLEAR(clear_module_state->__pyx_codeobj__112);
4476 #if CYTHON_USE_MODULE_STATE 4477 static int __pyx_m_traverse(PyObject *m, visitproc visit,
void *arg) {
4478 __pyx_mstate *traverse_module_state = __pyx_mstate(m);
4479 if (!traverse_module_state)
return 0;
4480 Py_VISIT(traverse_module_state->__pyx_d);
4481 Py_VISIT(traverse_module_state->__pyx_b);
4482 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
4483 Py_VISIT(traverse_module_state->__pyx_empty_tuple);
4484 Py_VISIT(traverse_module_state->__pyx_empty_bytes);
4485 Py_VISIT(traverse_module_state->__pyx_empty_unicode);
4486 #ifdef __Pyx_CyFunction_USED 4487 Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
4489 #ifdef __Pyx_FusedFunction_USED 4490 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
4492 Py_VISIT(traverse_module_state->__pyx_ptype_8PyClical_index_set);
4493 Py_VISIT(traverse_module_state->__pyx_type_8PyClical_index_set);
4494 Py_VISIT(traverse_module_state->__pyx_ptype_8PyClical_clifford);
4495 Py_VISIT(traverse_module_state->__pyx_type_8PyClical_clifford);
4496 Py_VISIT(traverse_module_state->__pyx_ptype_8PyClical___pyx_scope_struct____iter__);
4497 Py_VISIT(traverse_module_state->__pyx_type_8PyClical___pyx_scope_struct____iter__);
4498 Py_VISIT(traverse_module_state->__pyx_kp_u_);
4499 Py_VISIT(traverse_module_state->__pyx_kp_u_Abbreviation_for_clifford_index);
4500 Py_VISIT(traverse_module_state->__pyx_kp_u_Abbreviation_for_index_set_q_p);
4501 Py_VISIT(traverse_module_state->__pyx_kp_u_Absolute_value_of_multivector_m);
4502 Py_VISIT(traverse_module_state->__pyx_kp_u_Absolute_value_square_root_of_n);
4503 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_initialize_clifford_objec);
4504 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_initialize_index_set_obje);
4505 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_reframe);
4506 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_take_vector_part_of);
4507 Py_VISIT(traverse_module_state->__pyx_kp_u_Cardinality_Number_of_indices_i);
4508 Py_VISIT(traverse_module_state->__pyx_kp_u_Check_if_a_multivector_contains);
4509 Py_VISIT(traverse_module_state->__pyx_kp_u_Check_if_a_multivector_contains_2);
4510 Py_VISIT(traverse_module_state->__pyx_kp_u_Conjugation_reverse_o_involute);
4511 Py_VISIT(traverse_module_state->__pyx_kp_u_Conjugation_reverse_o_involute_2);
4512 Py_VISIT(traverse_module_state->__pyx_kp_u_Contraction_print_2_clifford_2);
4513 Py_VISIT(traverse_module_state->__pyx_kp_u_Contraction_print_clifford_1_cl);
4514 Py_VISIT(traverse_module_state->__pyx_kp_u_Contraction_x_clifford_1_x_clif);
4515 Py_VISIT(traverse_module_state->__pyx_kp_u_Convert_CGA3_null_vector_to_Euc);
4516 Py_VISIT(traverse_module_state->__pyx_kp_u_Convert_CGA3_null_vector_to_sta);
4517 Py_VISIT(traverse_module_state->__pyx_kp_u_Convert_Euclidean_3D_multivecto);
4518 Py_VISIT(traverse_module_state->__pyx_kp_u_Copy_this_clifford_object_x_cli);
4519 Py_VISIT(traverse_module_state->__pyx_kp_u_Copy_this_index_set_object_s_in);
4520 Py_VISIT(traverse_module_state->__pyx_kp_u_Cosine_of_multivector_with_opti);
4521 Py_VISIT(traverse_module_state->__pyx_kp_u_Even_part_of_multivector_sum_of);
4522 Py_VISIT(traverse_module_state->__pyx_kp_u_Even_part_of_multivector_sum_of_2);
4523 Py_VISIT(traverse_module_state->__pyx_kp_u_Exponential_of_multivector_x_cl);
4524 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_difference_print_1_cl);
4525 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_difference_print_clif);
4526 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_difference_x_clifford);
4527 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_multiplicative_invers);
4528 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_multiplicative_invers_2);
4529 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_product_print_2_cliff);
4530 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_product_print_cliffor);
4531 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_product_x_clifford_2);
4532 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_quotient_print_2_clif);
4533 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_quotient_print_cliffo);
4534 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_quotient_x_clifford_1);
4535 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_sum_print_1_clifford);
4536 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_sum_print_clifford_1);
4537 Py_VISIT(traverse_module_state->__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl);
4538 Py_VISIT(traverse_module_state->__pyx_kp_u_Get_the_value_of_an_index_set_o);
4539 Py_VISIT(traverse_module_state->__pyx_kp_u_Hyperbolic_cosine_of_multivecto);
4540 Py_VISIT(traverse_module_state->__pyx_kp_u_Hyperbolic_sine_of_multivector);
4541 Py_VISIT(traverse_module_state->__pyx_kp_u_Hyperbolic_tangent_of_multivect);
4542 Py_VISIT(traverse_module_state->__pyx_kp_u_Imaginary_part_deprecated_alway);
4543 Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
4544 Py_VISIT(traverse_module_state->__pyx_kp_u_Inner_product_print_2_clifford);
4545 Py_VISIT(traverse_module_state->__pyx_kp_u_Inner_product_print_clifford_1);
4546 Py_VISIT(traverse_module_state->__pyx_kp_u_Inner_product_x_clifford_1_x_cl);
4547 Py_VISIT(traverse_module_state->__pyx_kp_u_Integer_power_of_multivector_ob);
4548 Py_VISIT(traverse_module_state->__pyx_n_s_Integral);
4549 Py_VISIT(traverse_module_state->__pyx_kp_u_Inverse_cosine_of_multivector_w);
4550 Py_VISIT(traverse_module_state->__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu);
4551 Py_VISIT(traverse_module_state->__pyx_kp_u_Inverse_hyperbolic_sine_of_mult);
4552 Py_VISIT(traverse_module_state->__pyx_kp_u_Inverse_hyperbolic_tangent_of_m);
4553 Py_VISIT(traverse_module_state->__pyx_kp_u_Inverse_sine_of_multivector_wit);
4554 Py_VISIT(traverse_module_state->__pyx_kp_u_Inverse_tangent_of_multivector);
4555 Py_VISIT(traverse_module_state->__pyx_kp_u_Iterate_over_the_indices_of_an);
4556 Py_VISIT(traverse_module_state->__pyx_kp_u_Main_involution_each_i_is_repla);
4557 Py_VISIT(traverse_module_state->__pyx_kp_u_Main_involution_each_i_is_repla_2);
4558 Py_VISIT(traverse_module_state->__pyx_kp_u_Maximum_absolute_value_of_coord);
4559 Py_VISIT(traverse_module_state->__pyx_kp_u_Maximum_member_index_set_1_1_2);
4560 Py_VISIT(traverse_module_state->__pyx_kp_u_Maximum_of_absolute_values_of_c);
4561 Py_VISIT(traverse_module_state->__pyx_kp_u_Maximum_positive_index_or_0_if);
4562 Py_VISIT(traverse_module_state->__pyx_kp_u_Minimum_member_index_set_1_1_2);
4563 Py_VISIT(traverse_module_state->__pyx_kp_u_Minimum_negative_index_or_0_if);
4564 Py_VISIT(traverse_module_state->__pyx_kp_u_Natural_logarithm_of_multivecto);
4565 Py_VISIT(traverse_module_state->__pyx_kp_u_Norm_sum_of_squares_of_coordina);
4566 Py_VISIT(traverse_module_state->__pyx_n_s_NotImplemented);
4567 Py_VISIT(traverse_module_state->__pyx_kp_u_Not_applicable);
4568 Py_VISIT(traverse_module_state->__pyx_kp_u_Not_applicable_for_a_in_cliffor);
4569 Py_VISIT(traverse_module_state->__pyx_kp_u_Number_of_negative_indices_incl);
4570 Py_VISIT(traverse_module_state->__pyx_kp_u_Number_of_positive_indices_incl);
4571 Py_VISIT(traverse_module_state->__pyx_kp_u_Odd_part_of_multivector_sum_of);
4572 Py_VISIT(traverse_module_state->__pyx_kp_u_Odd_part_of_multivector_sum_of_2);
4573 Py_VISIT(traverse_module_state->__pyx_kp_u_Outer_product_power_of_multivec);
4574 Py_VISIT(traverse_module_state->__pyx_kp_u_Outer_product_power_x_clifford);
4575 Py_VISIT(traverse_module_state->__pyx_kp_u_Outer_product_print_2_clifford);
4576 Py_VISIT(traverse_module_state->__pyx_kp_u_Outer_product_print_clifford_1);
4577 Py_VISIT(traverse_module_state->__pyx_kp_u_Outer_product_x_clifford_1_x_cl);
4578 Py_VISIT(traverse_module_state->__pyx_kp_u_Power_self_to_the_m_x_clifford);
4579 Py_VISIT(traverse_module_state->__pyx_kp_u_Power_self_to_the_m_x_clifford_2);
4580 Py_VISIT(traverse_module_state->__pyx_kp_u_Pure_grade_vector_part_print_cl);
4581 Py_VISIT(traverse_module_state->__pyx_kp_u_Pure_part_print_clifford_1_1_1);
4582 Py_VISIT(traverse_module_state->__pyx_kp_u_Pure_part_print_pure_clifford_1);
4583 Py_VISIT(traverse_module_state->__pyx_kp_u_Put_self_into_a_larger_frame_co);
4584 Py_VISIT(traverse_module_state->__pyx_n_s_PyClical);
4585 Py_VISIT(traverse_module_state->__pyx_kp_s_PyClical_pyx);
4586 Py_VISIT(traverse_module_state->__pyx_kp_u_Quadratic_form_rev_x_x_0_print);
4587 Py_VISIT(traverse_module_state->__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2);
4588 Py_VISIT(traverse_module_state->__pyx_kp_u_Quadratic_norm_error_tolerance);
4589 Py_VISIT(traverse_module_state->__pyx_kp_u_Random_multivector_within_a_fra);
4590 Py_VISIT(traverse_module_state->__pyx_n_s_Real);
4591 Py_VISIT(traverse_module_state->__pyx_kp_u_Real_part_synonym_for_scalar_pa);
4592 Py_VISIT(traverse_module_state->__pyx_kp_u_Relative_or_absolute_error_usin);
4593 Py_VISIT(traverse_module_state->__pyx_kp_u_Remove_all_terms_of_self_with_r);
4594 Py_VISIT(traverse_module_state->__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve);
4595 Py_VISIT(traverse_module_state->__pyx_kp_u_Reversion_eg_clifford_1_cliffor);
4596 Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
4597 Py_VISIT(traverse_module_state->__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc);
4598 Py_VISIT(traverse_module_state->__pyx_kp_u_Scalar_part_scalar_clifford_1_1);
4599 Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
4600 Py_VISIT(traverse_module_state->__pyx_kp_u_Set_complement_not_print_index);
4601 Py_VISIT(traverse_module_state->__pyx_kp_u_Set_intersection_and_print_inde);
4602 Py_VISIT(traverse_module_state->__pyx_kp_u_Set_intersection_and_x_index_se);
4603 Py_VISIT(traverse_module_state->__pyx_kp_u_Set_the_value_of_an_index_set_o);
4604 Py_VISIT(traverse_module_state->__pyx_kp_u_Set_union_or_print_index_set_1);
4605 Py_VISIT(traverse_module_state->__pyx_kp_u_Set_union_or_x_index_set_1_x_in);
4606 Py_VISIT(traverse_module_state->__pyx_kp_u_Sign_of_geometric_product_of_tw);
4607 Py_VISIT(traverse_module_state->__pyx_kp_u_Sign_of_geometric_square_of_a_C);
4608 Py_VISIT(traverse_module_state->__pyx_kp_u_Sine_of_multivector_with_option);
4609 Py_VISIT(traverse_module_state->__pyx_kp_u_Square_root_of_1_which_commutes);
4610 Py_VISIT(traverse_module_state->__pyx_kp_u_Square_root_of_multivector_with);
4611 Py_VISIT(traverse_module_state->__pyx_kp_u_Subalgebra_generated_by_all_gen);
4612 Py_VISIT(traverse_module_state->__pyx_kp_u_Subscripting_map_from_index_set);
4613 Py_VISIT(traverse_module_state->__pyx_kp_u_Symmetric_set_difference_exclus);
4614 Py_VISIT(traverse_module_state->__pyx_kp_u_Symmetric_set_difference_exclus_2);
4615 Py_VISIT(traverse_module_state->__pyx_kp_u_Tangent_of_multivector_with_opt);
4616 Py_VISIT(traverse_module_state->__pyx_kp_u_Test_for_approximate_equality_o);
4617 Py_VISIT(traverse_module_state->__pyx_kp_u_Tests_for_functions_that_Doctes);
4618 Py_VISIT(traverse_module_state->__pyx_kp_u_Tests_for_functions_that_Doctes_2);
4619 Py_VISIT(traverse_module_state->__pyx_kp_u_The_informal_string_representat);
4620 Py_VISIT(traverse_module_state->__pyx_kp_u_The_informal_string_representat_2);
4621 Py_VISIT(traverse_module_state->__pyx_kp_u_The_official_string_representat);
4622 Py_VISIT(traverse_module_state->__pyx_kp_u_The_official_string_representat_2);
4623 Py_VISIT(traverse_module_state->__pyx_kp_u_This_comparison_operator_is_not);
4624 Py_VISIT(traverse_module_state->__pyx_kp_u_Transform_left_hand_side_using);
4625 Py_VISIT(traverse_module_state->__pyx_kp_u_Transform_left_hand_side_using_2);
4626 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
4627 Py_VISIT(traverse_module_state->__pyx_kp_u_UTF_8);
4628 Py_VISIT(traverse_module_state->__pyx_kp_u_Unary_print_clifford_1_1);
4629 Py_VISIT(traverse_module_state->__pyx_kp_u_Unary_print_clifford_1_1_2);
4630 Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
4631 Py_VISIT(traverse_module_state->__pyx_kp_u_Vector_part_of_multivector_as_a);
4632 Py_VISIT(traverse_module_state->__pyx_n_s__113);
4633 Py_VISIT(traverse_module_state->__pyx_kp_u__2);
4634 Py_VISIT(traverse_module_state->__pyx_kp_u__3);
4635 Py_VISIT(traverse_module_state->__pyx_kp_u__4);
4636 Py_VISIT(traverse_module_state->__pyx_kp_u__5);
4637 Py_VISIT(traverse_module_state->__pyx_kp_u__6);
4638 Py_VISIT(traverse_module_state->__pyx_kp_u__7);
4639 Py_VISIT(traverse_module_state->__pyx_n_s__9);
4640 Py_VISIT(traverse_module_state->__pyx_n_s_abc);
4641 Py_VISIT(traverse_module_state->__pyx_n_s_abs);
4642 Py_VISIT(traverse_module_state->__pyx_kp_u_abs_line_1585);
4643 Py_VISIT(traverse_module_state->__pyx_n_s_acos);
4644 Py_VISIT(traverse_module_state->__pyx_kp_u_acos_line_1731);
4645 Py_VISIT(traverse_module_state->__pyx_n_s_acosh);
4646 Py_VISIT(traverse_module_state->__pyx_kp_u_acosh_line_1768);
4647 Py_VISIT(traverse_module_state->__pyx_n_s_agc3);
4648 Py_VISIT(traverse_module_state->__pyx_kp_u_agc3_line_1956);
4649 Py_VISIT(traverse_module_state->__pyx_n_s_approx_equal);
4650 Py_VISIT(traverse_module_state->__pyx_kp_u_approx_equal_line_1422);
4651 Py_VISIT(traverse_module_state->__pyx_n_s_args);
4652 Py_VISIT(traverse_module_state->__pyx_kp_u_as_frame);
4653 Py_VISIT(traverse_module_state->__pyx_n_s_asin);
4654 Py_VISIT(traverse_module_state->__pyx_kp_u_asin_line_1810);
4655 Py_VISIT(traverse_module_state->__pyx_n_s_asinh);
4656 Py_VISIT(traverse_module_state->__pyx_kp_u_asinh_line_1845);
4657 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
4658 Py_VISIT(traverse_module_state->__pyx_n_s_atan);
4659 Py_VISIT(traverse_module_state->__pyx_kp_u_atan_line_1881);
4660 Py_VISIT(traverse_module_state->__pyx_n_s_atanh);
4661 Py_VISIT(traverse_module_state->__pyx_kp_u_atanh_line_1910);
4662 Py_VISIT(traverse_module_state->__pyx_n_s_cga3);
4663 Py_VISIT(traverse_module_state->__pyx_kp_u_cga3_line_1936);
4664 Py_VISIT(traverse_module_state->__pyx_n_s_cga3std);
4665 Py_VISIT(traverse_module_state->__pyx_kp_u_cga3std_line_1945);
4666 Py_VISIT(traverse_module_state->__pyx_n_s_cl);
4667 Py_VISIT(traverse_module_state->__pyx_n_s_clifford);
4668 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___add___line_740);
4669 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___and___line_872);
4670 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___call___line_1083);
4671 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___getitem___line_707);
4672 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___iadd___line_760);
4673 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___iand___line_896);
4674 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___idiv___line_974);
4675 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___imod___line_857);
4676 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___imul___line_820);
4677 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___ior___line_1013);
4678 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___isub___line_789);
4679 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___iter___line_638);
4680 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___ixor___line_935);
4681 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___mod___line_833);
4682 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___mul___line_798);
4683 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___neg___line_722);
4684 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___or___line_1002);
4685 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___pos___line_731);
4686 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___pow___line_1024);
4687 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___radd___line_751);
4688 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___rand___line_887);
4689 Py_VISIT(traverse_module_state->__pyx_n_s_clifford___reduce_cython);
4690 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___repr___line_1298);
4691 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___rmod___line_848);
4692 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___rmul___line_811);
4693 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___rsub___line_780);
4694 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___rtruediv___line_965);
4695 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___rxor___line_926);
4696 Py_VISIT(traverse_module_state->__pyx_n_s_clifford___setstate_cython);
4697 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___str___line_1307);
4698 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___sub___line_769);
4699 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___truediv___line_950);
4700 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford___xor___line_911);
4701 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_abs);
4702 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_abs_line_1238);
4703 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_conj);
4704 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_conj_line_1201);
4705 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_copy);
4706 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_copy_line_556);
4707 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_even);
4708 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_even_line_1124);
4709 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_frame);
4710 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_frame_line_1287);
4711 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_hidden_doctests);
4712 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_hidden_doctests_line_13);
4713 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_inv);
4714 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_inv_line_989);
4715 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_involute);
4716 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_involute_line_1170);
4717 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_isinf);
4718 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_isinf_line_1269);
4719 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_isnan);
4720 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_isnan_line_1278);
4721 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_max_abs);
4722 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_max_abs_line_1247);
4723 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_norm);
4724 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_norm_line_1227);
4725 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_odd);
4726 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_odd_line_1133);
4727 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_outer_pow);
4728 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_outer_pow_line_1067);
4729 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_pow);
4730 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_pow_line_1043);
4731 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_pure);
4732 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_pure_line_1113);
4733 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_quad);
4734 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_quad_line_1216);
4735 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_reframe);
4736 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_reframe_line_649);
4737 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_reverse);
4738 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_reverse_line_1186);
4739 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_scalar);
4740 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_scalar_line_1102);
4741 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_truncated);
4742 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_truncated_line_1258);
4743 Py_VISIT(traverse_module_state->__pyx_n_s_clifford_vector_part);
4744 Py_VISIT(traverse_module_state->__pyx_kp_u_clifford_vector_part_line_1142);
4745 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
4746 Py_VISIT(traverse_module_state->__pyx_n_s_close);
4747 Py_VISIT(traverse_module_state->__pyx_n_s_collections);
4748 Py_VISIT(traverse_module_state->__pyx_n_s_compare);
4749 Py_VISIT(traverse_module_state->__pyx_kp_u_compare_line_492);
4750 Py_VISIT(traverse_module_state->__pyx_n_s_complexifier);
4751 Py_VISIT(traverse_module_state->__pyx_kp_u_complexifier_line_1639);
4752 Py_VISIT(traverse_module_state->__pyx_n_s_conj);
4753 Py_VISIT(traverse_module_state->__pyx_kp_u_conj_line_1548);
4754 Py_VISIT(traverse_module_state->__pyx_n_s_copy);
4755 Py_VISIT(traverse_module_state->__pyx_n_s_cos);
4756 Py_VISIT(traverse_module_state->__pyx_kp_u_cos_line_1714);
4757 Py_VISIT(traverse_module_state->__pyx_n_s_cosh);
4758 Py_VISIT(traverse_module_state->__pyx_kp_u_cosh_line_1752);
4759 Py_VISIT(traverse_module_state->__pyx_n_s_count);
4760 Py_VISIT(traverse_module_state->__pyx_n_s_count_neg);
4761 Py_VISIT(traverse_module_state->__pyx_n_s_count_pos);
4762 Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
4763 Py_VISIT(traverse_module_state->__pyx_n_s_doctest);
4764 Py_VISIT(traverse_module_state->__pyx_n_s_e);
4765 Py_VISIT(traverse_module_state->__pyx_kp_u_e_line_1999);
4766 Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
4767 Py_VISIT(traverse_module_state->__pyx_n_s_encode);
4768 Py_VISIT(traverse_module_state->__pyx_n_s_err);
4769 Py_VISIT(traverse_module_state->__pyx_n_s_error_msg_prefix);
4770 Py_VISIT(traverse_module_state->__pyx_n_s_error_squared);
4771 Py_VISIT(traverse_module_state->__pyx_kp_u_error_squared_line_1409);
4772 Py_VISIT(traverse_module_state->__pyx_n_s_error_squared_tol);
4773 Py_VISIT(traverse_module_state->__pyx_kp_u_error_squared_tol_line_1400);
4774 Py_VISIT(traverse_module_state->__pyx_n_s_even);
4775 Py_VISIT(traverse_module_state->__pyx_kp_u_even_line_1500);
4776 Py_VISIT(traverse_module_state->__pyx_n_s_exp);
4777 Py_VISIT(traverse_module_state->__pyx_kp_u_exp_line_1677);
4778 Py_VISIT(traverse_module_state->__pyx_n_s_fill);
4779 Py_VISIT(traverse_module_state->__pyx_n_s_frame);
4780 Py_VISIT(traverse_module_state->__pyx_n_s_frm);
4781 Py_VISIT(traverse_module_state->__pyx_kp_u_from);
4782 Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
4783 Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
4784 Py_VISIT(traverse_module_state->__pyx_n_s_grade);
4785 Py_VISIT(traverse_module_state->__pyx_n_s_hash_fn);
4786 Py_VISIT(traverse_module_state->__pyx_n_s_i);
4787 Py_VISIT(traverse_module_state->__pyx_n_s_imag);
4788 Py_VISIT(traverse_module_state->__pyx_kp_u_imag_line_1478);
4789 Py_VISIT(traverse_module_state->__pyx_n_s_import);
4790 Py_VISIT(traverse_module_state->__pyx_n_s_index_set);
4791 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___and___line_271);
4792 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___getitem___line_191);
4793 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___iand___line_282);
4794 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___invert___line_240);
4795 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___ior___line_304);
4796 Py_VISIT(traverse_module_state->__pyx_n_s_index_set___iter);
4797 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___iter___line_229);
4798 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___ixor___line_260);
4799 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___or___line_293);
4800 Py_VISIT(traverse_module_state->__pyx_n_s_index_set___reduce_cython);
4801 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___repr___line_384);
4802 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___setitem___line_179);
4803 Py_VISIT(traverse_module_state->__pyx_n_s_index_set___setstate_cython);
4804 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___str___line_395);
4805 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set___xor___line_249);
4806 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_copy);
4807 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_copy_line_65);
4808 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_count);
4809 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_count_line_315);
4810 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_count_neg);
4811 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_count_neg_line_324);
4812 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_count_pos);
4813 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_count_pos_line_333);
4814 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_hash_fn);
4815 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_hidden_doctests);
4816 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_hidden_doctests_line_4);
4817 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_max);
4818 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_max_line_351);
4819 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_min);
4820 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_min_line_342);
4821 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_sign_of_mult);
4822 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_sign_of_mult_line_366);
4823 Py_VISIT(traverse_module_state->__pyx_n_s_index_set_sign_of_square);
4824 Py_VISIT(traverse_module_state->__pyx_kp_u_index_set_sign_of_square_line_37);
4825 Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
4826 Py_VISIT(traverse_module_state->__pyx_n_s_inv);
4827 Py_VISIT(traverse_module_state->__pyx_kp_u_inv_line_1441);
4828 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid);
4829 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_string);
4830 Py_VISIT(traverse_module_state->__pyx_n_s_involute);
4831 Py_VISIT(traverse_module_state->__pyx_kp_u_involute_line_1518);
4832 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
4833 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
4834 Py_VISIT(traverse_module_state->__pyx_n_s_isinf);
4835 Py_VISIT(traverse_module_state->__pyx_n_s_isnan);
4836 Py_VISIT(traverse_module_state->__pyx_n_s_ist);
4837 Py_VISIT(traverse_module_state->__pyx_n_s_istpq);
4838 Py_VISIT(traverse_module_state->__pyx_kp_u_istpq_line_2012);
4839 Py_VISIT(traverse_module_state->__pyx_n_s_iter);
4840 Py_VISIT(traverse_module_state->__pyx_n_s_ixt);
4841 Py_VISIT(traverse_module_state->__pyx_kp_u_lexicographic_compare_eg_3_4_5);
4842 Py_VISIT(traverse_module_state->__pyx_n_s_lhs);
4843 Py_VISIT(traverse_module_state->__pyx_n_s_limit);
4844 Py_VISIT(traverse_module_state->__pyx_n_s_log);
4845 Py_VISIT(traverse_module_state->__pyx_kp_u_log_line_1691);
4846 Py_VISIT(traverse_module_state->__pyx_n_s_lst);
4847 Py_VISIT(traverse_module_state->__pyx_n_s_m);
4848 Py_VISIT(traverse_module_state->__pyx_n_s_main);
4849 Py_VISIT(traverse_module_state->__pyx_n_u_main);
4850 Py_VISIT(traverse_module_state->__pyx_n_s_math);
4851 Py_VISIT(traverse_module_state->__pyx_n_s_max);
4852 Py_VISIT(traverse_module_state->__pyx_n_s_max_abs);
4853 Py_VISIT(traverse_module_state->__pyx_kp_u_max_abs_line_1594);
4854 Py_VISIT(traverse_module_state->__pyx_n_s_max_pos);
4855 Py_VISIT(traverse_module_state->__pyx_kp_u_max_pos_line_513);
4856 Py_VISIT(traverse_module_state->__pyx_n_s_min);
4857 Py_VISIT(traverse_module_state->__pyx_n_s_min_neg);
4858 Py_VISIT(traverse_module_state->__pyx_kp_u_min_neg_line_504);
4859 Py_VISIT(traverse_module_state->__pyx_n_s_n);
4860 Py_VISIT(traverse_module_state->__pyx_n_s_name);
4861 Py_VISIT(traverse_module_state->__pyx_n_s_nbar3);
4862 Py_VISIT(traverse_module_state->__pyx_n_s_ninf3);
4863 Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
4864 Py_VISIT(traverse_module_state->__pyx_n_s_norm);
4865 Py_VISIT(traverse_module_state->__pyx_kp_u_norm_line_1574);
4866 Py_VISIT(traverse_module_state->__pyx_kp_u_norm_sum_of_squares_of_coordina);
4867 Py_VISIT(traverse_module_state->__pyx_n_s_numbers);
4868 Py_VISIT(traverse_module_state->__pyx_n_s_obj);
4869 Py_VISIT(traverse_module_state->__pyx_n_s_odd);
4870 Py_VISIT(traverse_module_state->__pyx_kp_u_odd_line_1509);
4871 Py_VISIT(traverse_module_state->__pyx_n_s_other);
4872 Py_VISIT(traverse_module_state->__pyx_n_s_outer_pow);
4873 Py_VISIT(traverse_module_state->__pyx_kp_u_outer_pow_line_1630);
4874 Py_VISIT(traverse_module_state->__pyx_n_s_p);
4875 Py_VISIT(traverse_module_state->__pyx_n_s_pi);
4876 Py_VISIT(traverse_module_state->__pyx_n_s_pow);
4877 Py_VISIT(traverse_module_state->__pyx_kp_u_pow_line_1606);
4878 Py_VISIT(traverse_module_state->__pyx_n_s_pure);
4879 Py_VISIT(traverse_module_state->__pyx_kp_u_pure_line_1489);
4880 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
4881 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
4882 Py_VISIT(traverse_module_state->__pyx_n_s_q);
4883 Py_VISIT(traverse_module_state->__pyx_n_s_quad);
4884 Py_VISIT(traverse_module_state->__pyx_kp_u_quad_line_1563);
4885 Py_VISIT(traverse_module_state->__pyx_n_s_random_clifford);
4886 Py_VISIT(traverse_module_state->__pyx_kp_u_random_clifford_line_1927);
4887 Py_VISIT(traverse_module_state->__pyx_n_s_range);
4888 Py_VISIT(traverse_module_state->__pyx_n_s_real);
4889 Py_VISIT(traverse_module_state->__pyx_kp_u_real_line_1467);
4890 Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
4891 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
4892 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
4893 Py_VISIT(traverse_module_state->__pyx_n_s_reframe);
4894 Py_VISIT(traverse_module_state->__pyx_n_s_result);
4895 Py_VISIT(traverse_module_state->__pyx_n_s_reverse);
4896 Py_VISIT(traverse_module_state->__pyx_kp_u_reverse_line_1533);
4897 Py_VISIT(traverse_module_state->__pyx_n_s_rhs);
4898 Py_VISIT(traverse_module_state->__pyx_n_s_scalar);
4899 Py_VISIT(traverse_module_state->__pyx_n_s_scalar_epsilon);
4900 Py_VISIT(traverse_module_state->__pyx_kp_u_scalar_line_1456);
4901 Py_VISIT(traverse_module_state->__pyx_n_s_self);
4902 Py_VISIT(traverse_module_state->__pyx_n_s_send);
4903 Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
4904 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
4905 Py_VISIT(traverse_module_state->__pyx_n_s_sign_of_mult);
4906 Py_VISIT(traverse_module_state->__pyx_n_s_sign_of_square);
4907 Py_VISIT(traverse_module_state->__pyx_n_s_sin);
4908 Py_VISIT(traverse_module_state->__pyx_kp_u_sin_line_1791);
4909 Py_VISIT(traverse_module_state->__pyx_n_s_sinh);
4910 Py_VISIT(traverse_module_state->__pyx_kp_u_sinh_line_1831);
4911 Py_VISIT(traverse_module_state->__pyx_n_s_spec);
4912 Py_VISIT(traverse_module_state->__pyx_n_s_sqrt);
4913 Py_VISIT(traverse_module_state->__pyx_kp_u_sqrt_line_1654);
4914 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
4915 Py_VISIT(traverse_module_state->__pyx_n_s_tan);
4916 Py_VISIT(traverse_module_state->__pyx_kp_u_tan_line_1864);
4917 Py_VISIT(traverse_module_state->__pyx_n_s_tanh);
4918 Py_VISIT(traverse_module_state->__pyx_kp_u_tanh_line_1898);
4919 Py_VISIT(traverse_module_state->__pyx_n_s_tau);
4920 Py_VISIT(traverse_module_state->__pyx_n_s_test);
4921 Py_VISIT(traverse_module_state->__pyx_n_s_test_2);
4922 Py_VISIT(traverse_module_state->__pyx_n_s_testmod);
4923 Py_VISIT(traverse_module_state->__pyx_n_s_threshold);
4924 Py_VISIT(traverse_module_state->__pyx_n_s_throw);
4925 Py_VISIT(traverse_module_state->__pyx_kp_u_to_frame);
4926 Py_VISIT(traverse_module_state->__pyx_n_s_tol);
4927 Py_VISIT(traverse_module_state->__pyx_n_s_truncated);
4928 Py_VISIT(traverse_module_state->__pyx_kp_u_using);
4929 Py_VISIT(traverse_module_state->__pyx_kp_u_using_invalid);
4930 Py_VISIT(traverse_module_state->__pyx_kp_u_utf_8);
4931 Py_VISIT(traverse_module_state->__pyx_kp_u_value);
4932 Py_VISIT(traverse_module_state->__pyx_n_s_vec);
4933 Py_VISIT(traverse_module_state->__pyx_n_s_vector_part);
4934 Py_VISIT(traverse_module_state->__pyx_n_s_version);
4935 Py_VISIT(traverse_module_state->__pyx_n_s_xrange);
4936 Py_VISIT(traverse_module_state->__pyx_float_0_0);
4937 Py_VISIT(traverse_module_state->__pyx_float_1_0);
4938 Py_VISIT(traverse_module_state->__pyx_float_4_0);
4939 Py_VISIT(traverse_module_state->__pyx_float_8_0);
4940 Py_VISIT(traverse_module_state->__pyx_int_0);
4941 Py_VISIT(traverse_module_state->__pyx_int_1);
4942 Py_VISIT(traverse_module_state->__pyx_int_4);
4943 Py_VISIT(traverse_module_state->__pyx_int_neg_1);
4944 Py_VISIT(traverse_module_state->__pyx_tuple__8);
4945 Py_VISIT(traverse_module_state->__pyx_tuple__10);
4946 Py_VISIT(traverse_module_state->__pyx_tuple__18);
4947 Py_VISIT(traverse_module_state->__pyx_tuple__22);
4948 Py_VISIT(traverse_module_state->__pyx_tuple__25);
4949 Py_VISIT(traverse_module_state->__pyx_tuple__27);
4950 Py_VISIT(traverse_module_state->__pyx_tuple__31);
4951 Py_VISIT(traverse_module_state->__pyx_tuple__34);
4952 Py_VISIT(traverse_module_state->__pyx_tuple__41);
4953 Py_VISIT(traverse_module_state->__pyx_tuple__43);
4954 Py_VISIT(traverse_module_state->__pyx_tuple__51);
4955 Py_VISIT(traverse_module_state->__pyx_tuple__60);
4956 Py_VISIT(traverse_module_state->__pyx_tuple__62);
4957 Py_VISIT(traverse_module_state->__pyx_tuple__64);
4958 Py_VISIT(traverse_module_state->__pyx_tuple__79);
4959 Py_VISIT(traverse_module_state->__pyx_tuple__83);
4960 Py_VISIT(traverse_module_state->__pyx_tuple__99);
4961 Py_VISIT(traverse_module_state->__pyx_tuple__101);
4962 Py_VISIT(traverse_module_state->__pyx_tuple__105);
4963 Py_VISIT(traverse_module_state->__pyx_tuple__107);
4964 Py_VISIT(traverse_module_state->__pyx_tuple__109);
4965 Py_VISIT(traverse_module_state->__pyx_tuple__110);
4966 Py_VISIT(traverse_module_state->__pyx_tuple__111);
4967 Py_VISIT(traverse_module_state->__pyx_codeobj__11);
4968 Py_VISIT(traverse_module_state->__pyx_codeobj__12);
4969 Py_VISIT(traverse_module_state->__pyx_codeobj__13);
4970 Py_VISIT(traverse_module_state->__pyx_codeobj__14);
4971 Py_VISIT(traverse_module_state->__pyx_codeobj__15);
4972 Py_VISIT(traverse_module_state->__pyx_codeobj__16);
4973 Py_VISIT(traverse_module_state->__pyx_codeobj__17);
4974 Py_VISIT(traverse_module_state->__pyx_codeobj__19);
4975 Py_VISIT(traverse_module_state->__pyx_codeobj__20);
4976 Py_VISIT(traverse_module_state->__pyx_codeobj__21);
4977 Py_VISIT(traverse_module_state->__pyx_codeobj__23);
4978 Py_VISIT(traverse_module_state->__pyx_codeobj__24);
4979 Py_VISIT(traverse_module_state->__pyx_codeobj__26);
4980 Py_VISIT(traverse_module_state->__pyx_codeobj__28);
4981 Py_VISIT(traverse_module_state->__pyx_codeobj__29);
4982 Py_VISIT(traverse_module_state->__pyx_codeobj__30);
4983 Py_VISIT(traverse_module_state->__pyx_codeobj__32);
4984 Py_VISIT(traverse_module_state->__pyx_codeobj__33);
4985 Py_VISIT(traverse_module_state->__pyx_codeobj__35);
4986 Py_VISIT(traverse_module_state->__pyx_codeobj__36);
4987 Py_VISIT(traverse_module_state->__pyx_codeobj__37);
4988 Py_VISIT(traverse_module_state->__pyx_codeobj__38);
4989 Py_VISIT(traverse_module_state->__pyx_codeobj__39);
4990 Py_VISIT(traverse_module_state->__pyx_codeobj__40);
4991 Py_VISIT(traverse_module_state->__pyx_codeobj__42);
4992 Py_VISIT(traverse_module_state->__pyx_codeobj__44);
4993 Py_VISIT(traverse_module_state->__pyx_codeobj__45);
4994 Py_VISIT(traverse_module_state->__pyx_codeobj__46);
4995 Py_VISIT(traverse_module_state->__pyx_codeobj__47);
4996 Py_VISIT(traverse_module_state->__pyx_codeobj__48);
4997 Py_VISIT(traverse_module_state->__pyx_codeobj__49);
4998 Py_VISIT(traverse_module_state->__pyx_codeobj__50);
4999 Py_VISIT(traverse_module_state->__pyx_codeobj__52);
5000 Py_VISIT(traverse_module_state->__pyx_codeobj__53);
5001 Py_VISIT(traverse_module_state->__pyx_codeobj__54);
5002 Py_VISIT(traverse_module_state->__pyx_codeobj__55);
5003 Py_VISIT(traverse_module_state->__pyx_codeobj__56);
5004 Py_VISIT(traverse_module_state->__pyx_codeobj__57);
5005 Py_VISIT(traverse_module_state->__pyx_codeobj__58);
5006 Py_VISIT(traverse_module_state->__pyx_codeobj__59);
5007 Py_VISIT(traverse_module_state->__pyx_codeobj__61);
5008 Py_VISIT(traverse_module_state->__pyx_codeobj__63);
5009 Py_VISIT(traverse_module_state->__pyx_codeobj__65);
5010 Py_VISIT(traverse_module_state->__pyx_codeobj__66);
5011 Py_VISIT(traverse_module_state->__pyx_codeobj__67);
5012 Py_VISIT(traverse_module_state->__pyx_codeobj__68);
5013 Py_VISIT(traverse_module_state->__pyx_codeobj__69);
5014 Py_VISIT(traverse_module_state->__pyx_codeobj__70);
5015 Py_VISIT(traverse_module_state->__pyx_codeobj__71);
5016 Py_VISIT(traverse_module_state->__pyx_codeobj__72);
5017 Py_VISIT(traverse_module_state->__pyx_codeobj__73);
5018 Py_VISIT(traverse_module_state->__pyx_codeobj__74);
5019 Py_VISIT(traverse_module_state->__pyx_codeobj__75);
5020 Py_VISIT(traverse_module_state->__pyx_codeobj__76);
5021 Py_VISIT(traverse_module_state->__pyx_codeobj__77);
5022 Py_VISIT(traverse_module_state->__pyx_codeobj__78);
5023 Py_VISIT(traverse_module_state->__pyx_codeobj__80);
5024 Py_VISIT(traverse_module_state->__pyx_codeobj__81);
5025 Py_VISIT(traverse_module_state->__pyx_codeobj__82);
5026 Py_VISIT(traverse_module_state->__pyx_codeobj__84);
5027 Py_VISIT(traverse_module_state->__pyx_codeobj__85);
5028 Py_VISIT(traverse_module_state->__pyx_codeobj__86);
5029 Py_VISIT(traverse_module_state->__pyx_codeobj__87);
5030 Py_VISIT(traverse_module_state->__pyx_codeobj__88);
5031 Py_VISIT(traverse_module_state->__pyx_codeobj__89);
5032 Py_VISIT(traverse_module_state->__pyx_codeobj__90);
5033 Py_VISIT(traverse_module_state->__pyx_codeobj__91);
5034 Py_VISIT(traverse_module_state->__pyx_codeobj__92);
5035 Py_VISIT(traverse_module_state->__pyx_codeobj__93);
5036 Py_VISIT(traverse_module_state->__pyx_codeobj__94);
5037 Py_VISIT(traverse_module_state->__pyx_codeobj__95);
5038 Py_VISIT(traverse_module_state->__pyx_codeobj__96);
5039 Py_VISIT(traverse_module_state->__pyx_codeobj__97);
5040 Py_VISIT(traverse_module_state->__pyx_codeobj__98);
5041 Py_VISIT(traverse_module_state->__pyx_codeobj__100);
5042 Py_VISIT(traverse_module_state->__pyx_codeobj__102);
5043 Py_VISIT(traverse_module_state->__pyx_codeobj__103);
5044 Py_VISIT(traverse_module_state->__pyx_codeobj__104);
5045 Py_VISIT(traverse_module_state->__pyx_codeobj__106);
5046 Py_VISIT(traverse_module_state->__pyx_codeobj__108);
5047 Py_VISIT(traverse_module_state->__pyx_codeobj__112);
5052 #define __pyx_d __pyx_mstate_global->__pyx_d 5053 #define __pyx_b __pyx_mstate_global->__pyx_b 5054 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime 5055 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple 5056 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes 5057 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode 5058 #ifdef __Pyx_CyFunction_USED 5059 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType 5061 #ifdef __Pyx_FusedFunction_USED 5062 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType 5064 #ifdef __Pyx_Generator_USED 5065 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType 5067 #ifdef __Pyx_IterableCoroutine_USED 5068 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType 5070 #ifdef __Pyx_Coroutine_USED 5071 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType 5073 #ifdef __Pyx_Coroutine_USED 5074 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType 5076 #if CYTHON_USE_MODULE_STATE 5078 #if CYTHON_USE_MODULE_STATE 5080 #if CYTHON_USE_MODULE_STATE 5082 #if CYTHON_USE_MODULE_STATE 5084 #if CYTHON_USE_MODULE_STATE 5085 #define __pyx_type_8PyClical_index_set __pyx_mstate_global->__pyx_type_8PyClical_index_set 5086 #define __pyx_type_8PyClical_clifford __pyx_mstate_global->__pyx_type_8PyClical_clifford 5087 #define __pyx_type_8PyClical___pyx_scope_struct____iter__ __pyx_mstate_global->__pyx_type_8PyClical___pyx_scope_struct____iter__ 5089 #define __pyx_ptype_8PyClical_index_set __pyx_mstate_global->__pyx_ptype_8PyClical_index_set 5090 #define __pyx_ptype_8PyClical_clifford __pyx_mstate_global->__pyx_ptype_8PyClical_clifford 5091 #define __pyx_ptype_8PyClical___pyx_scope_struct____iter__ __pyx_mstate_global->__pyx_ptype_8PyClical___pyx_scope_struct____iter__ 5092 #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_ 5093 #define __pyx_kp_u_Abbreviation_for_clifford_index __pyx_mstate_global->__pyx_kp_u_Abbreviation_for_clifford_index 5094 #define __pyx_kp_u_Abbreviation_for_index_set_q_p __pyx_mstate_global->__pyx_kp_u_Abbreviation_for_index_set_q_p 5095 #define __pyx_kp_u_Absolute_value_of_multivector_m __pyx_mstate_global->__pyx_kp_u_Absolute_value_of_multivector_m 5096 #define __pyx_kp_u_Absolute_value_square_root_of_n __pyx_mstate_global->__pyx_kp_u_Absolute_value_square_root_of_n 5097 #define __pyx_kp_u_Cannot_initialize_clifford_objec __pyx_mstate_global->__pyx_kp_u_Cannot_initialize_clifford_objec 5098 #define __pyx_kp_u_Cannot_initialize_index_set_obje __pyx_mstate_global->__pyx_kp_u_Cannot_initialize_index_set_obje 5099 #define __pyx_kp_u_Cannot_reframe __pyx_mstate_global->__pyx_kp_u_Cannot_reframe 5100 #define __pyx_kp_u_Cannot_take_vector_part_of __pyx_mstate_global->__pyx_kp_u_Cannot_take_vector_part_of 5101 #define __pyx_kp_u_Cardinality_Number_of_indices_i __pyx_mstate_global->__pyx_kp_u_Cardinality_Number_of_indices_i 5102 #define __pyx_kp_u_Check_if_a_multivector_contains __pyx_mstate_global->__pyx_kp_u_Check_if_a_multivector_contains 5103 #define __pyx_kp_u_Check_if_a_multivector_contains_2 __pyx_mstate_global->__pyx_kp_u_Check_if_a_multivector_contains_2 5104 #define __pyx_kp_u_Conjugation_reverse_o_involute __pyx_mstate_global->__pyx_kp_u_Conjugation_reverse_o_involute 5105 #define __pyx_kp_u_Conjugation_reverse_o_involute_2 __pyx_mstate_global->__pyx_kp_u_Conjugation_reverse_o_involute_2 5106 #define __pyx_kp_u_Contraction_print_2_clifford_2 __pyx_mstate_global->__pyx_kp_u_Contraction_print_2_clifford_2 5107 #define __pyx_kp_u_Contraction_print_clifford_1_cl __pyx_mstate_global->__pyx_kp_u_Contraction_print_clifford_1_cl 5108 #define __pyx_kp_u_Contraction_x_clifford_1_x_clif __pyx_mstate_global->__pyx_kp_u_Contraction_x_clifford_1_x_clif 5109 #define __pyx_kp_u_Convert_CGA3_null_vector_to_Euc __pyx_mstate_global->__pyx_kp_u_Convert_CGA3_null_vector_to_Euc 5110 #define __pyx_kp_u_Convert_CGA3_null_vector_to_sta __pyx_mstate_global->__pyx_kp_u_Convert_CGA3_null_vector_to_sta 5111 #define __pyx_kp_u_Convert_Euclidean_3D_multivecto __pyx_mstate_global->__pyx_kp_u_Convert_Euclidean_3D_multivecto 5112 #define __pyx_kp_u_Copy_this_clifford_object_x_cli __pyx_mstate_global->__pyx_kp_u_Copy_this_clifford_object_x_cli 5113 #define __pyx_kp_u_Copy_this_index_set_object_s_in __pyx_mstate_global->__pyx_kp_u_Copy_this_index_set_object_s_in 5114 #define __pyx_kp_u_Cosine_of_multivector_with_opti __pyx_mstate_global->__pyx_kp_u_Cosine_of_multivector_with_opti 5115 #define __pyx_kp_u_Even_part_of_multivector_sum_of __pyx_mstate_global->__pyx_kp_u_Even_part_of_multivector_sum_of 5116 #define __pyx_kp_u_Even_part_of_multivector_sum_of_2 __pyx_mstate_global->__pyx_kp_u_Even_part_of_multivector_sum_of_2 5117 #define __pyx_kp_u_Exponential_of_multivector_x_cl __pyx_mstate_global->__pyx_kp_u_Exponential_of_multivector_x_cl 5118 #define __pyx_kp_u_Geometric_difference_print_1_cl __pyx_mstate_global->__pyx_kp_u_Geometric_difference_print_1_cl 5119 #define __pyx_kp_u_Geometric_difference_print_clif __pyx_mstate_global->__pyx_kp_u_Geometric_difference_print_clif 5120 #define __pyx_kp_u_Geometric_difference_x_clifford __pyx_mstate_global->__pyx_kp_u_Geometric_difference_x_clifford 5121 #define __pyx_kp_u_Geometric_multiplicative_invers __pyx_mstate_global->__pyx_kp_u_Geometric_multiplicative_invers 5122 #define __pyx_kp_u_Geometric_multiplicative_invers_2 __pyx_mstate_global->__pyx_kp_u_Geometric_multiplicative_invers_2 5123 #define __pyx_kp_u_Geometric_product_print_2_cliff __pyx_mstate_global->__pyx_kp_u_Geometric_product_print_2_cliff 5124 #define __pyx_kp_u_Geometric_product_print_cliffor __pyx_mstate_global->__pyx_kp_u_Geometric_product_print_cliffor 5125 #define __pyx_kp_u_Geometric_product_x_clifford_2 __pyx_mstate_global->__pyx_kp_u_Geometric_product_x_clifford_2 5126 #define __pyx_kp_u_Geometric_quotient_print_2_clif __pyx_mstate_global->__pyx_kp_u_Geometric_quotient_print_2_clif 5127 #define __pyx_kp_u_Geometric_quotient_print_cliffo __pyx_mstate_global->__pyx_kp_u_Geometric_quotient_print_cliffo 5128 #define __pyx_kp_u_Geometric_quotient_x_clifford_1 __pyx_mstate_global->__pyx_kp_u_Geometric_quotient_x_clifford_1 5129 #define __pyx_kp_u_Geometric_sum_print_1_clifford __pyx_mstate_global->__pyx_kp_u_Geometric_sum_print_1_clifford 5130 #define __pyx_kp_u_Geometric_sum_print_clifford_1 __pyx_mstate_global->__pyx_kp_u_Geometric_sum_print_clifford_1 5131 #define __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl __pyx_mstate_global->__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl 5132 #define __pyx_kp_u_Get_the_value_of_an_index_set_o __pyx_mstate_global->__pyx_kp_u_Get_the_value_of_an_index_set_o 5133 #define __pyx_kp_u_Hyperbolic_cosine_of_multivecto __pyx_mstate_global->__pyx_kp_u_Hyperbolic_cosine_of_multivecto 5134 #define __pyx_kp_u_Hyperbolic_sine_of_multivector __pyx_mstate_global->__pyx_kp_u_Hyperbolic_sine_of_multivector 5135 #define __pyx_kp_u_Hyperbolic_tangent_of_multivect __pyx_mstate_global->__pyx_kp_u_Hyperbolic_tangent_of_multivect 5136 #define __pyx_kp_u_Imaginary_part_deprecated_alway __pyx_mstate_global->__pyx_kp_u_Imaginary_part_deprecated_alway 5137 #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError 5138 #define __pyx_kp_u_Inner_product_print_2_clifford __pyx_mstate_global->__pyx_kp_u_Inner_product_print_2_clifford 5139 #define __pyx_kp_u_Inner_product_print_clifford_1 __pyx_mstate_global->__pyx_kp_u_Inner_product_print_clifford_1 5140 #define __pyx_kp_u_Inner_product_x_clifford_1_x_cl __pyx_mstate_global->__pyx_kp_u_Inner_product_x_clifford_1_x_cl 5141 #define __pyx_kp_u_Integer_power_of_multivector_ob __pyx_mstate_global->__pyx_kp_u_Integer_power_of_multivector_ob 5142 #define __pyx_n_s_Integral __pyx_mstate_global->__pyx_n_s_Integral 5143 #define __pyx_kp_u_Inverse_cosine_of_multivector_w __pyx_mstate_global->__pyx_kp_u_Inverse_cosine_of_multivector_w 5144 #define __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu __pyx_mstate_global->__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu 5145 #define __pyx_kp_u_Inverse_hyperbolic_sine_of_mult __pyx_mstate_global->__pyx_kp_u_Inverse_hyperbolic_sine_of_mult 5146 #define __pyx_kp_u_Inverse_hyperbolic_tangent_of_m __pyx_mstate_global->__pyx_kp_u_Inverse_hyperbolic_tangent_of_m 5147 #define __pyx_kp_u_Inverse_sine_of_multivector_wit __pyx_mstate_global->__pyx_kp_u_Inverse_sine_of_multivector_wit 5148 #define __pyx_kp_u_Inverse_tangent_of_multivector __pyx_mstate_global->__pyx_kp_u_Inverse_tangent_of_multivector 5149 #define __pyx_kp_u_Iterate_over_the_indices_of_an __pyx_mstate_global->__pyx_kp_u_Iterate_over_the_indices_of_an 5150 #define __pyx_kp_u_Main_involution_each_i_is_repla __pyx_mstate_global->__pyx_kp_u_Main_involution_each_i_is_repla 5151 #define __pyx_kp_u_Main_involution_each_i_is_repla_2 __pyx_mstate_global->__pyx_kp_u_Main_involution_each_i_is_repla_2 5152 #define __pyx_kp_u_Maximum_absolute_value_of_coord __pyx_mstate_global->__pyx_kp_u_Maximum_absolute_value_of_coord 5153 #define __pyx_kp_u_Maximum_member_index_set_1_1_2 __pyx_mstate_global->__pyx_kp_u_Maximum_member_index_set_1_1_2 5154 #define __pyx_kp_u_Maximum_of_absolute_values_of_c __pyx_mstate_global->__pyx_kp_u_Maximum_of_absolute_values_of_c 5155 #define __pyx_kp_u_Maximum_positive_index_or_0_if __pyx_mstate_global->__pyx_kp_u_Maximum_positive_index_or_0_if 5156 #define __pyx_kp_u_Minimum_member_index_set_1_1_2 __pyx_mstate_global->__pyx_kp_u_Minimum_member_index_set_1_1_2 5157 #define __pyx_kp_u_Minimum_negative_index_or_0_if __pyx_mstate_global->__pyx_kp_u_Minimum_negative_index_or_0_if 5158 #define __pyx_kp_u_Natural_logarithm_of_multivecto __pyx_mstate_global->__pyx_kp_u_Natural_logarithm_of_multivecto 5159 #define __pyx_kp_u_Norm_sum_of_squares_of_coordina __pyx_mstate_global->__pyx_kp_u_Norm_sum_of_squares_of_coordina 5160 #define __pyx_n_s_NotImplemented __pyx_mstate_global->__pyx_n_s_NotImplemented 5161 #define __pyx_kp_u_Not_applicable __pyx_mstate_global->__pyx_kp_u_Not_applicable 5162 #define __pyx_kp_u_Not_applicable_for_a_in_cliffor __pyx_mstate_global->__pyx_kp_u_Not_applicable_for_a_in_cliffor 5163 #define __pyx_kp_u_Number_of_negative_indices_incl __pyx_mstate_global->__pyx_kp_u_Number_of_negative_indices_incl 5164 #define __pyx_kp_u_Number_of_positive_indices_incl __pyx_mstate_global->__pyx_kp_u_Number_of_positive_indices_incl 5165 #define __pyx_kp_u_Odd_part_of_multivector_sum_of __pyx_mstate_global->__pyx_kp_u_Odd_part_of_multivector_sum_of 5166 #define __pyx_kp_u_Odd_part_of_multivector_sum_of_2 __pyx_mstate_global->__pyx_kp_u_Odd_part_of_multivector_sum_of_2 5167 #define __pyx_kp_u_Outer_product_power_of_multivec __pyx_mstate_global->__pyx_kp_u_Outer_product_power_of_multivec 5168 #define __pyx_kp_u_Outer_product_power_x_clifford __pyx_mstate_global->__pyx_kp_u_Outer_product_power_x_clifford 5169 #define __pyx_kp_u_Outer_product_print_2_clifford __pyx_mstate_global->__pyx_kp_u_Outer_product_print_2_clifford 5170 #define __pyx_kp_u_Outer_product_print_clifford_1 __pyx_mstate_global->__pyx_kp_u_Outer_product_print_clifford_1 5171 #define __pyx_kp_u_Outer_product_x_clifford_1_x_cl __pyx_mstate_global->__pyx_kp_u_Outer_product_x_clifford_1_x_cl 5172 #define __pyx_kp_u_Power_self_to_the_m_x_clifford __pyx_mstate_global->__pyx_kp_u_Power_self_to_the_m_x_clifford 5173 #define __pyx_kp_u_Power_self_to_the_m_x_clifford_2 __pyx_mstate_global->__pyx_kp_u_Power_self_to_the_m_x_clifford_2 5174 #define __pyx_kp_u_Pure_grade_vector_part_print_cl __pyx_mstate_global->__pyx_kp_u_Pure_grade_vector_part_print_cl 5175 #define __pyx_kp_u_Pure_part_print_clifford_1_1_1 __pyx_mstate_global->__pyx_kp_u_Pure_part_print_clifford_1_1_1 5176 #define __pyx_kp_u_Pure_part_print_pure_clifford_1 __pyx_mstate_global->__pyx_kp_u_Pure_part_print_pure_clifford_1 5177 #define __pyx_kp_u_Put_self_into_a_larger_frame_co __pyx_mstate_global->__pyx_kp_u_Put_self_into_a_larger_frame_co 5178 #define __pyx_n_s_PyClical __pyx_mstate_global->__pyx_n_s_PyClical 5179 #define __pyx_kp_s_PyClical_pyx __pyx_mstate_global->__pyx_kp_s_PyClical_pyx 5180 #define __pyx_kp_u_Quadratic_form_rev_x_x_0_print __pyx_mstate_global->__pyx_kp_u_Quadratic_form_rev_x_x_0_print 5181 #define __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2 __pyx_mstate_global->__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2 5182 #define __pyx_kp_u_Quadratic_norm_error_tolerance __pyx_mstate_global->__pyx_kp_u_Quadratic_norm_error_tolerance 5183 #define __pyx_kp_u_Random_multivector_within_a_fra __pyx_mstate_global->__pyx_kp_u_Random_multivector_within_a_fra 5184 #define __pyx_n_s_Real __pyx_mstate_global->__pyx_n_s_Real 5185 #define __pyx_kp_u_Real_part_synonym_for_scalar_pa __pyx_mstate_global->__pyx_kp_u_Real_part_synonym_for_scalar_pa 5186 #define __pyx_kp_u_Relative_or_absolute_error_usin __pyx_mstate_global->__pyx_kp_u_Relative_or_absolute_error_usin 5187 #define __pyx_kp_u_Remove_all_terms_of_self_with_r __pyx_mstate_global->__pyx_kp_u_Remove_all_terms_of_self_with_r 5188 #define __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve __pyx_mstate_global->__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve 5189 #define __pyx_kp_u_Reversion_eg_clifford_1_cliffor __pyx_mstate_global->__pyx_kp_u_Reversion_eg_clifford_1_cliffor 5190 #define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError 5191 #define __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc __pyx_mstate_global->__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc 5192 #define __pyx_kp_u_Scalar_part_scalar_clifford_1_1 __pyx_mstate_global->__pyx_kp_u_Scalar_part_scalar_clifford_1_1 5193 #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence 5194 #define __pyx_kp_u_Set_complement_not_print_index __pyx_mstate_global->__pyx_kp_u_Set_complement_not_print_index 5195 #define __pyx_kp_u_Set_intersection_and_print_inde __pyx_mstate_global->__pyx_kp_u_Set_intersection_and_print_inde 5196 #define __pyx_kp_u_Set_intersection_and_x_index_se __pyx_mstate_global->__pyx_kp_u_Set_intersection_and_x_index_se 5197 #define __pyx_kp_u_Set_the_value_of_an_index_set_o __pyx_mstate_global->__pyx_kp_u_Set_the_value_of_an_index_set_o 5198 #define __pyx_kp_u_Set_union_or_print_index_set_1 __pyx_mstate_global->__pyx_kp_u_Set_union_or_print_index_set_1 5199 #define __pyx_kp_u_Set_union_or_x_index_set_1_x_in __pyx_mstate_global->__pyx_kp_u_Set_union_or_x_index_set_1_x_in 5200 #define __pyx_kp_u_Sign_of_geometric_product_of_tw __pyx_mstate_global->__pyx_kp_u_Sign_of_geometric_product_of_tw 5201 #define __pyx_kp_u_Sign_of_geometric_square_of_a_C __pyx_mstate_global->__pyx_kp_u_Sign_of_geometric_square_of_a_C 5202 #define __pyx_kp_u_Sine_of_multivector_with_option __pyx_mstate_global->__pyx_kp_u_Sine_of_multivector_with_option 5203 #define __pyx_kp_u_Square_root_of_1_which_commutes __pyx_mstate_global->__pyx_kp_u_Square_root_of_1_which_commutes 5204 #define __pyx_kp_u_Square_root_of_multivector_with __pyx_mstate_global->__pyx_kp_u_Square_root_of_multivector_with 5205 #define __pyx_kp_u_Subalgebra_generated_by_all_gen __pyx_mstate_global->__pyx_kp_u_Subalgebra_generated_by_all_gen 5206 #define __pyx_kp_u_Subscripting_map_from_index_set __pyx_mstate_global->__pyx_kp_u_Subscripting_map_from_index_set 5207 #define __pyx_kp_u_Symmetric_set_difference_exclus __pyx_mstate_global->__pyx_kp_u_Symmetric_set_difference_exclus 5208 #define __pyx_kp_u_Symmetric_set_difference_exclus_2 __pyx_mstate_global->__pyx_kp_u_Symmetric_set_difference_exclus_2 5209 #define __pyx_kp_u_Tangent_of_multivector_with_opt __pyx_mstate_global->__pyx_kp_u_Tangent_of_multivector_with_opt 5210 #define __pyx_kp_u_Test_for_approximate_equality_o __pyx_mstate_global->__pyx_kp_u_Test_for_approximate_equality_o 5211 #define __pyx_kp_u_Tests_for_functions_that_Doctes __pyx_mstate_global->__pyx_kp_u_Tests_for_functions_that_Doctes 5212 #define __pyx_kp_u_Tests_for_functions_that_Doctes_2 __pyx_mstate_global->__pyx_kp_u_Tests_for_functions_that_Doctes_2 5213 #define __pyx_kp_u_The_informal_string_representat __pyx_mstate_global->__pyx_kp_u_The_informal_string_representat 5214 #define __pyx_kp_u_The_informal_string_representat_2 __pyx_mstate_global->__pyx_kp_u_The_informal_string_representat_2 5215 #define __pyx_kp_u_The_official_string_representat __pyx_mstate_global->__pyx_kp_u_The_official_string_representat 5216 #define __pyx_kp_u_The_official_string_representat_2 __pyx_mstate_global->__pyx_kp_u_The_official_string_representat_2 5217 #define __pyx_kp_u_This_comparison_operator_is_not __pyx_mstate_global->__pyx_kp_u_This_comparison_operator_is_not 5218 #define __pyx_kp_u_Transform_left_hand_side_using __pyx_mstate_global->__pyx_kp_u_Transform_left_hand_side_using 5219 #define __pyx_kp_u_Transform_left_hand_side_using_2 __pyx_mstate_global->__pyx_kp_u_Transform_left_hand_side_using_2 5220 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError 5221 #define __pyx_kp_u_UTF_8 __pyx_mstate_global->__pyx_kp_u_UTF_8 5222 #define __pyx_kp_u_Unary_print_clifford_1_1 __pyx_mstate_global->__pyx_kp_u_Unary_print_clifford_1_1 5223 #define __pyx_kp_u_Unary_print_clifford_1_1_2 __pyx_mstate_global->__pyx_kp_u_Unary_print_clifford_1_1_2 5224 #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError 5225 #define __pyx_kp_u_Vector_part_of_multivector_as_a __pyx_mstate_global->__pyx_kp_u_Vector_part_of_multivector_as_a 5226 #define __pyx_n_s__113 __pyx_mstate_global->__pyx_n_s__113 5227 #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2 5228 #define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 5229 #define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4 5230 #define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5 5231 #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6 5232 #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7 5233 #define __pyx_n_s__9 __pyx_mstate_global->__pyx_n_s__9 5234 #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc 5235 #define __pyx_n_s_abs __pyx_mstate_global->__pyx_n_s_abs 5236 #define __pyx_kp_u_abs_line_1585 __pyx_mstate_global->__pyx_kp_u_abs_line_1585 5237 #define __pyx_n_s_acos __pyx_mstate_global->__pyx_n_s_acos 5238 #define __pyx_kp_u_acos_line_1731 __pyx_mstate_global->__pyx_kp_u_acos_line_1731 5239 #define __pyx_n_s_acosh __pyx_mstate_global->__pyx_n_s_acosh 5240 #define __pyx_kp_u_acosh_line_1768 __pyx_mstate_global->__pyx_kp_u_acosh_line_1768 5241 #define __pyx_n_s_agc3 __pyx_mstate_global->__pyx_n_s_agc3 5242 #define __pyx_kp_u_agc3_line_1956 __pyx_mstate_global->__pyx_kp_u_agc3_line_1956 5243 #define __pyx_n_s_approx_equal __pyx_mstate_global->__pyx_n_s_approx_equal 5244 #define __pyx_kp_u_approx_equal_line_1422 __pyx_mstate_global->__pyx_kp_u_approx_equal_line_1422 5245 #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args 5246 #define __pyx_kp_u_as_frame __pyx_mstate_global->__pyx_kp_u_as_frame 5247 #define __pyx_n_s_asin __pyx_mstate_global->__pyx_n_s_asin 5248 #define __pyx_kp_u_asin_line_1810 __pyx_mstate_global->__pyx_kp_u_asin_line_1810 5249 #define __pyx_n_s_asinh __pyx_mstate_global->__pyx_n_s_asinh 5250 #define __pyx_kp_u_asinh_line_1845 __pyx_mstate_global->__pyx_kp_u_asinh_line_1845 5251 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines 5252 #define __pyx_n_s_atan __pyx_mstate_global->__pyx_n_s_atan 5253 #define __pyx_kp_u_atan_line_1881 __pyx_mstate_global->__pyx_kp_u_atan_line_1881 5254 #define __pyx_n_s_atanh __pyx_mstate_global->__pyx_n_s_atanh 5255 #define __pyx_kp_u_atanh_line_1910 __pyx_mstate_global->__pyx_kp_u_atanh_line_1910 5256 #define __pyx_n_s_cga3 __pyx_mstate_global->__pyx_n_s_cga3 5257 #define __pyx_kp_u_cga3_line_1936 __pyx_mstate_global->__pyx_kp_u_cga3_line_1936 5258 #define __pyx_n_s_cga3std __pyx_mstate_global->__pyx_n_s_cga3std 5259 #define __pyx_kp_u_cga3std_line_1945 __pyx_mstate_global->__pyx_kp_u_cga3std_line_1945 5260 #define __pyx_n_s_cl __pyx_mstate_global->__pyx_n_s_cl 5261 #define __pyx_n_s_clifford __pyx_mstate_global->__pyx_n_s_clifford 5262 #define __pyx_kp_u_clifford___add___line_740 __pyx_mstate_global->__pyx_kp_u_clifford___add___line_740 5263 #define __pyx_kp_u_clifford___and___line_872 __pyx_mstate_global->__pyx_kp_u_clifford___and___line_872 5264 #define __pyx_kp_u_clifford___call___line_1083 __pyx_mstate_global->__pyx_kp_u_clifford___call___line_1083 5265 #define __pyx_kp_u_clifford___getitem___line_707 __pyx_mstate_global->__pyx_kp_u_clifford___getitem___line_707 5266 #define __pyx_kp_u_clifford___iadd___line_760 __pyx_mstate_global->__pyx_kp_u_clifford___iadd___line_760 5267 #define __pyx_kp_u_clifford___iand___line_896 __pyx_mstate_global->__pyx_kp_u_clifford___iand___line_896 5268 #define __pyx_kp_u_clifford___idiv___line_974 __pyx_mstate_global->__pyx_kp_u_clifford___idiv___line_974 5269 #define __pyx_kp_u_clifford___imod___line_857 __pyx_mstate_global->__pyx_kp_u_clifford___imod___line_857 5270 #define __pyx_kp_u_clifford___imul___line_820 __pyx_mstate_global->__pyx_kp_u_clifford___imul___line_820 5271 #define __pyx_kp_u_clifford___ior___line_1013 __pyx_mstate_global->__pyx_kp_u_clifford___ior___line_1013 5272 #define __pyx_kp_u_clifford___isub___line_789 __pyx_mstate_global->__pyx_kp_u_clifford___isub___line_789 5273 #define __pyx_kp_u_clifford___iter___line_638 __pyx_mstate_global->__pyx_kp_u_clifford___iter___line_638 5274 #define __pyx_kp_u_clifford___ixor___line_935 __pyx_mstate_global->__pyx_kp_u_clifford___ixor___line_935 5275 #define __pyx_kp_u_clifford___mod___line_833 __pyx_mstate_global->__pyx_kp_u_clifford___mod___line_833 5276 #define __pyx_kp_u_clifford___mul___line_798 __pyx_mstate_global->__pyx_kp_u_clifford___mul___line_798 5277 #define __pyx_kp_u_clifford___neg___line_722 __pyx_mstate_global->__pyx_kp_u_clifford___neg___line_722 5278 #define __pyx_kp_u_clifford___or___line_1002 __pyx_mstate_global->__pyx_kp_u_clifford___or___line_1002 5279 #define __pyx_kp_u_clifford___pos___line_731 __pyx_mstate_global->__pyx_kp_u_clifford___pos___line_731 5280 #define __pyx_kp_u_clifford___pow___line_1024 __pyx_mstate_global->__pyx_kp_u_clifford___pow___line_1024 5281 #define __pyx_kp_u_clifford___radd___line_751 __pyx_mstate_global->__pyx_kp_u_clifford___radd___line_751 5282 #define __pyx_kp_u_clifford___rand___line_887 __pyx_mstate_global->__pyx_kp_u_clifford___rand___line_887 5283 #define __pyx_n_s_clifford___reduce_cython __pyx_mstate_global->__pyx_n_s_clifford___reduce_cython 5284 #define __pyx_kp_u_clifford___repr___line_1298 __pyx_mstate_global->__pyx_kp_u_clifford___repr___line_1298 5285 #define __pyx_kp_u_clifford___rmod___line_848 __pyx_mstate_global->__pyx_kp_u_clifford___rmod___line_848 5286 #define __pyx_kp_u_clifford___rmul___line_811 __pyx_mstate_global->__pyx_kp_u_clifford___rmul___line_811 5287 #define __pyx_kp_u_clifford___rsub___line_780 __pyx_mstate_global->__pyx_kp_u_clifford___rsub___line_780 5288 #define __pyx_kp_u_clifford___rtruediv___line_965 __pyx_mstate_global->__pyx_kp_u_clifford___rtruediv___line_965 5289 #define __pyx_kp_u_clifford___rxor___line_926 __pyx_mstate_global->__pyx_kp_u_clifford___rxor___line_926 5290 #define __pyx_n_s_clifford___setstate_cython __pyx_mstate_global->__pyx_n_s_clifford___setstate_cython 5291 #define __pyx_kp_u_clifford___str___line_1307 __pyx_mstate_global->__pyx_kp_u_clifford___str___line_1307 5292 #define __pyx_kp_u_clifford___sub___line_769 __pyx_mstate_global->__pyx_kp_u_clifford___sub___line_769 5293 #define __pyx_kp_u_clifford___truediv___line_950 __pyx_mstate_global->__pyx_kp_u_clifford___truediv___line_950 5294 #define __pyx_kp_u_clifford___xor___line_911 __pyx_mstate_global->__pyx_kp_u_clifford___xor___line_911 5295 #define __pyx_n_s_clifford_abs __pyx_mstate_global->__pyx_n_s_clifford_abs 5296 #define __pyx_kp_u_clifford_abs_line_1238 __pyx_mstate_global->__pyx_kp_u_clifford_abs_line_1238 5297 #define __pyx_n_s_clifford_conj __pyx_mstate_global->__pyx_n_s_clifford_conj 5298 #define __pyx_kp_u_clifford_conj_line_1201 __pyx_mstate_global->__pyx_kp_u_clifford_conj_line_1201 5299 #define __pyx_n_s_clifford_copy __pyx_mstate_global->__pyx_n_s_clifford_copy 5300 #define __pyx_kp_u_clifford_copy_line_556 __pyx_mstate_global->__pyx_kp_u_clifford_copy_line_556 5301 #define __pyx_n_s_clifford_even __pyx_mstate_global->__pyx_n_s_clifford_even 5302 #define __pyx_kp_u_clifford_even_line_1124 __pyx_mstate_global->__pyx_kp_u_clifford_even_line_1124 5303 #define __pyx_n_s_clifford_frame __pyx_mstate_global->__pyx_n_s_clifford_frame 5304 #define __pyx_kp_u_clifford_frame_line_1287 __pyx_mstate_global->__pyx_kp_u_clifford_frame_line_1287 5305 #define __pyx_n_s_clifford_hidden_doctests __pyx_mstate_global->__pyx_n_s_clifford_hidden_doctests 5306 #define __pyx_kp_u_clifford_hidden_doctests_line_13 __pyx_mstate_global->__pyx_kp_u_clifford_hidden_doctests_line_13 5307 #define __pyx_n_s_clifford_inv __pyx_mstate_global->__pyx_n_s_clifford_inv 5308 #define __pyx_kp_u_clifford_inv_line_989 __pyx_mstate_global->__pyx_kp_u_clifford_inv_line_989 5309 #define __pyx_n_s_clifford_involute __pyx_mstate_global->__pyx_n_s_clifford_involute 5310 #define __pyx_kp_u_clifford_involute_line_1170 __pyx_mstate_global->__pyx_kp_u_clifford_involute_line_1170 5311 #define __pyx_n_s_clifford_isinf __pyx_mstate_global->__pyx_n_s_clifford_isinf 5312 #define __pyx_kp_u_clifford_isinf_line_1269 __pyx_mstate_global->__pyx_kp_u_clifford_isinf_line_1269 5313 #define __pyx_n_s_clifford_isnan __pyx_mstate_global->__pyx_n_s_clifford_isnan 5314 #define __pyx_kp_u_clifford_isnan_line_1278 __pyx_mstate_global->__pyx_kp_u_clifford_isnan_line_1278 5315 #define __pyx_n_s_clifford_max_abs __pyx_mstate_global->__pyx_n_s_clifford_max_abs 5316 #define __pyx_kp_u_clifford_max_abs_line_1247 __pyx_mstate_global->__pyx_kp_u_clifford_max_abs_line_1247 5317 #define __pyx_n_s_clifford_norm __pyx_mstate_global->__pyx_n_s_clifford_norm 5318 #define __pyx_kp_u_clifford_norm_line_1227 __pyx_mstate_global->__pyx_kp_u_clifford_norm_line_1227 5319 #define __pyx_n_s_clifford_odd __pyx_mstate_global->__pyx_n_s_clifford_odd 5320 #define __pyx_kp_u_clifford_odd_line_1133 __pyx_mstate_global->__pyx_kp_u_clifford_odd_line_1133 5321 #define __pyx_n_s_clifford_outer_pow __pyx_mstate_global->__pyx_n_s_clifford_outer_pow 5322 #define __pyx_kp_u_clifford_outer_pow_line_1067 __pyx_mstate_global->__pyx_kp_u_clifford_outer_pow_line_1067 5323 #define __pyx_n_s_clifford_pow __pyx_mstate_global->__pyx_n_s_clifford_pow 5324 #define __pyx_kp_u_clifford_pow_line_1043 __pyx_mstate_global->__pyx_kp_u_clifford_pow_line_1043 5325 #define __pyx_n_s_clifford_pure __pyx_mstate_global->__pyx_n_s_clifford_pure 5326 #define __pyx_kp_u_clifford_pure_line_1113 __pyx_mstate_global->__pyx_kp_u_clifford_pure_line_1113 5327 #define __pyx_n_s_clifford_quad __pyx_mstate_global->__pyx_n_s_clifford_quad 5328 #define __pyx_kp_u_clifford_quad_line_1216 __pyx_mstate_global->__pyx_kp_u_clifford_quad_line_1216 5329 #define __pyx_n_s_clifford_reframe __pyx_mstate_global->__pyx_n_s_clifford_reframe 5330 #define __pyx_kp_u_clifford_reframe_line_649 __pyx_mstate_global->__pyx_kp_u_clifford_reframe_line_649 5331 #define __pyx_n_s_clifford_reverse __pyx_mstate_global->__pyx_n_s_clifford_reverse 5332 #define __pyx_kp_u_clifford_reverse_line_1186 __pyx_mstate_global->__pyx_kp_u_clifford_reverse_line_1186 5333 #define __pyx_n_s_clifford_scalar __pyx_mstate_global->__pyx_n_s_clifford_scalar 5334 #define __pyx_kp_u_clifford_scalar_line_1102 __pyx_mstate_global->__pyx_kp_u_clifford_scalar_line_1102 5335 #define __pyx_n_s_clifford_truncated __pyx_mstate_global->__pyx_n_s_clifford_truncated 5336 #define __pyx_kp_u_clifford_truncated_line_1258 __pyx_mstate_global->__pyx_kp_u_clifford_truncated_line_1258 5337 #define __pyx_n_s_clifford_vector_part __pyx_mstate_global->__pyx_n_s_clifford_vector_part 5338 #define __pyx_kp_u_clifford_vector_part_line_1142 __pyx_mstate_global->__pyx_kp_u_clifford_vector_part_line_1142 5339 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback 5340 #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close 5341 #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections 5342 #define __pyx_n_s_compare __pyx_mstate_global->__pyx_n_s_compare 5343 #define __pyx_kp_u_compare_line_492 __pyx_mstate_global->__pyx_kp_u_compare_line_492 5344 #define __pyx_n_s_complexifier __pyx_mstate_global->__pyx_n_s_complexifier 5345 #define __pyx_kp_u_complexifier_line_1639 __pyx_mstate_global->__pyx_kp_u_complexifier_line_1639 5346 #define __pyx_n_s_conj __pyx_mstate_global->__pyx_n_s_conj 5347 #define __pyx_kp_u_conj_line_1548 __pyx_mstate_global->__pyx_kp_u_conj_line_1548 5348 #define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy 5349 #define __pyx_n_s_cos __pyx_mstate_global->__pyx_n_s_cos 5350 #define __pyx_kp_u_cos_line_1714 __pyx_mstate_global->__pyx_kp_u_cos_line_1714 5351 #define __pyx_n_s_cosh __pyx_mstate_global->__pyx_n_s_cosh 5352 #define __pyx_kp_u_cosh_line_1752 __pyx_mstate_global->__pyx_kp_u_cosh_line_1752 5353 #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count 5354 #define __pyx_n_s_count_neg __pyx_mstate_global->__pyx_n_s_count_neg 5355 #define __pyx_n_s_count_pos __pyx_mstate_global->__pyx_n_s_count_pos 5356 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable 5357 #define __pyx_n_s_doctest __pyx_mstate_global->__pyx_n_s_doctest 5358 #define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e 5359 #define __pyx_kp_u_e_line_1999 __pyx_mstate_global->__pyx_kp_u_e_line_1999 5360 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable 5361 #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode 5362 #define __pyx_n_s_err __pyx_mstate_global->__pyx_n_s_err 5363 #define __pyx_n_s_error_msg_prefix __pyx_mstate_global->__pyx_n_s_error_msg_prefix 5364 #define __pyx_n_s_error_squared __pyx_mstate_global->__pyx_n_s_error_squared 5365 #define __pyx_kp_u_error_squared_line_1409 __pyx_mstate_global->__pyx_kp_u_error_squared_line_1409 5366 #define __pyx_n_s_error_squared_tol __pyx_mstate_global->__pyx_n_s_error_squared_tol 5367 #define __pyx_kp_u_error_squared_tol_line_1400 __pyx_mstate_global->__pyx_kp_u_error_squared_tol_line_1400 5368 #define __pyx_n_s_even __pyx_mstate_global->__pyx_n_s_even 5369 #define __pyx_kp_u_even_line_1500 __pyx_mstate_global->__pyx_kp_u_even_line_1500 5370 #define __pyx_n_s_exp __pyx_mstate_global->__pyx_n_s_exp 5371 #define __pyx_kp_u_exp_line_1677 __pyx_mstate_global->__pyx_kp_u_exp_line_1677 5372 #define __pyx_n_s_fill __pyx_mstate_global->__pyx_n_s_fill 5373 #define __pyx_n_s_frame __pyx_mstate_global->__pyx_n_s_frame 5374 #define __pyx_n_s_frm __pyx_mstate_global->__pyx_n_s_frm 5375 #define __pyx_kp_u_from __pyx_mstate_global->__pyx_kp_u_from 5376 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc 5377 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate 5378 #define __pyx_n_s_grade __pyx_mstate_global->__pyx_n_s_grade 5379 #define __pyx_n_s_hash_fn __pyx_mstate_global->__pyx_n_s_hash_fn 5380 #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i 5381 #define __pyx_n_s_imag __pyx_mstate_global->__pyx_n_s_imag 5382 #define __pyx_kp_u_imag_line_1478 __pyx_mstate_global->__pyx_kp_u_imag_line_1478 5383 #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import 5384 #define __pyx_n_s_index_set __pyx_mstate_global->__pyx_n_s_index_set 5385 #define __pyx_kp_u_index_set___and___line_271 __pyx_mstate_global->__pyx_kp_u_index_set___and___line_271 5386 #define __pyx_kp_u_index_set___getitem___line_191 __pyx_mstate_global->__pyx_kp_u_index_set___getitem___line_191 5387 #define __pyx_kp_u_index_set___iand___line_282 __pyx_mstate_global->__pyx_kp_u_index_set___iand___line_282 5388 #define __pyx_kp_u_index_set___invert___line_240 __pyx_mstate_global->__pyx_kp_u_index_set___invert___line_240 5389 #define __pyx_kp_u_index_set___ior___line_304 __pyx_mstate_global->__pyx_kp_u_index_set___ior___line_304 5390 #define __pyx_n_s_index_set___iter __pyx_mstate_global->__pyx_n_s_index_set___iter 5391 #define __pyx_kp_u_index_set___iter___line_229 __pyx_mstate_global->__pyx_kp_u_index_set___iter___line_229 5392 #define __pyx_kp_u_index_set___ixor___line_260 __pyx_mstate_global->__pyx_kp_u_index_set___ixor___line_260 5393 #define __pyx_kp_u_index_set___or___line_293 __pyx_mstate_global->__pyx_kp_u_index_set___or___line_293 5394 #define __pyx_n_s_index_set___reduce_cython __pyx_mstate_global->__pyx_n_s_index_set___reduce_cython 5395 #define __pyx_kp_u_index_set___repr___line_384 __pyx_mstate_global->__pyx_kp_u_index_set___repr___line_384 5396 #define __pyx_kp_u_index_set___setitem___line_179 __pyx_mstate_global->__pyx_kp_u_index_set___setitem___line_179 5397 #define __pyx_n_s_index_set___setstate_cython __pyx_mstate_global->__pyx_n_s_index_set___setstate_cython 5398 #define __pyx_kp_u_index_set___str___line_395 __pyx_mstate_global->__pyx_kp_u_index_set___str___line_395 5399 #define __pyx_kp_u_index_set___xor___line_249 __pyx_mstate_global->__pyx_kp_u_index_set___xor___line_249 5400 #define __pyx_n_s_index_set_copy __pyx_mstate_global->__pyx_n_s_index_set_copy 5401 #define __pyx_kp_u_index_set_copy_line_65 __pyx_mstate_global->__pyx_kp_u_index_set_copy_line_65 5402 #define __pyx_n_s_index_set_count __pyx_mstate_global->__pyx_n_s_index_set_count 5403 #define __pyx_kp_u_index_set_count_line_315 __pyx_mstate_global->__pyx_kp_u_index_set_count_line_315 5404 #define __pyx_n_s_index_set_count_neg __pyx_mstate_global->__pyx_n_s_index_set_count_neg 5405 #define __pyx_kp_u_index_set_count_neg_line_324 __pyx_mstate_global->__pyx_kp_u_index_set_count_neg_line_324 5406 #define __pyx_n_s_index_set_count_pos __pyx_mstate_global->__pyx_n_s_index_set_count_pos 5407 #define __pyx_kp_u_index_set_count_pos_line_333 __pyx_mstate_global->__pyx_kp_u_index_set_count_pos_line_333 5408 #define __pyx_n_s_index_set_hash_fn __pyx_mstate_global->__pyx_n_s_index_set_hash_fn 5409 #define __pyx_n_s_index_set_hidden_doctests __pyx_mstate_global->__pyx_n_s_index_set_hidden_doctests 5410 #define __pyx_kp_u_index_set_hidden_doctests_line_4 __pyx_mstate_global->__pyx_kp_u_index_set_hidden_doctests_line_4 5411 #define __pyx_n_s_index_set_max __pyx_mstate_global->__pyx_n_s_index_set_max 5412 #define __pyx_kp_u_index_set_max_line_351 __pyx_mstate_global->__pyx_kp_u_index_set_max_line_351 5413 #define __pyx_n_s_index_set_min __pyx_mstate_global->__pyx_n_s_index_set_min 5414 #define __pyx_kp_u_index_set_min_line_342 __pyx_mstate_global->__pyx_kp_u_index_set_min_line_342 5415 #define __pyx_n_s_index_set_sign_of_mult __pyx_mstate_global->__pyx_n_s_index_set_sign_of_mult 5416 #define __pyx_kp_u_index_set_sign_of_mult_line_366 __pyx_mstate_global->__pyx_kp_u_index_set_sign_of_mult_line_366 5417 #define __pyx_n_s_index_set_sign_of_square __pyx_mstate_global->__pyx_n_s_index_set_sign_of_square 5418 #define __pyx_kp_u_index_set_sign_of_square_line_37 __pyx_mstate_global->__pyx_kp_u_index_set_sign_of_square_line_37 5419 #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing 5420 #define __pyx_n_s_inv __pyx_mstate_global->__pyx_n_s_inv 5421 #define __pyx_kp_u_inv_line_1441 __pyx_mstate_global->__pyx_kp_u_inv_line_1441 5422 #define __pyx_kp_u_invalid __pyx_mstate_global->__pyx_kp_u_invalid 5423 #define __pyx_kp_u_invalid_string __pyx_mstate_global->__pyx_kp_u_invalid_string 5424 #define __pyx_n_s_involute __pyx_mstate_global->__pyx_n_s_involute 5425 #define __pyx_kp_u_involute_line_1518 __pyx_mstate_global->__pyx_kp_u_involute_line_1518 5426 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine 5427 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled 5428 #define __pyx_n_s_isinf __pyx_mstate_global->__pyx_n_s_isinf 5429 #define __pyx_n_s_isnan __pyx_mstate_global->__pyx_n_s_isnan 5430 #define __pyx_n_s_ist __pyx_mstate_global->__pyx_n_s_ist 5431 #define __pyx_n_s_istpq __pyx_mstate_global->__pyx_n_s_istpq 5432 #define __pyx_kp_u_istpq_line_2012 __pyx_mstate_global->__pyx_kp_u_istpq_line_2012 5433 #define __pyx_n_s_iter __pyx_mstate_global->__pyx_n_s_iter 5434 #define __pyx_n_s_ixt __pyx_mstate_global->__pyx_n_s_ixt 5435 #define __pyx_kp_u_lexicographic_compare_eg_3_4_5 __pyx_mstate_global->__pyx_kp_u_lexicographic_compare_eg_3_4_5 5436 #define __pyx_n_s_lhs __pyx_mstate_global->__pyx_n_s_lhs 5437 #define __pyx_n_s_limit __pyx_mstate_global->__pyx_n_s_limit 5438 #define __pyx_n_s_log __pyx_mstate_global->__pyx_n_s_log 5439 #define __pyx_kp_u_log_line_1691 __pyx_mstate_global->__pyx_kp_u_log_line_1691 5440 #define __pyx_n_s_lst __pyx_mstate_global->__pyx_n_s_lst 5441 #define __pyx_n_s_m __pyx_mstate_global->__pyx_n_s_m 5442 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main 5443 #define __pyx_n_u_main __pyx_mstate_global->__pyx_n_u_main 5444 #define __pyx_n_s_math __pyx_mstate_global->__pyx_n_s_math 5445 #define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max 5446 #define __pyx_n_s_max_abs __pyx_mstate_global->__pyx_n_s_max_abs 5447 #define __pyx_kp_u_max_abs_line_1594 __pyx_mstate_global->__pyx_kp_u_max_abs_line_1594 5448 #define __pyx_n_s_max_pos __pyx_mstate_global->__pyx_n_s_max_pos 5449 #define __pyx_kp_u_max_pos_line_513 __pyx_mstate_global->__pyx_kp_u_max_pos_line_513 5450 #define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min 5451 #define __pyx_n_s_min_neg __pyx_mstate_global->__pyx_n_s_min_neg 5452 #define __pyx_kp_u_min_neg_line_504 __pyx_mstate_global->__pyx_kp_u_min_neg_line_504 5453 #define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n 5454 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name 5455 #define __pyx_n_s_nbar3 __pyx_mstate_global->__pyx_n_s_nbar3 5456 #define __pyx_n_s_ninf3 __pyx_mstate_global->__pyx_n_s_ninf3 5457 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non 5458 #define __pyx_n_s_norm __pyx_mstate_global->__pyx_n_s_norm 5459 #define __pyx_kp_u_norm_line_1574 __pyx_mstate_global->__pyx_kp_u_norm_line_1574 5460 #define __pyx_kp_u_norm_sum_of_squares_of_coordina __pyx_mstate_global->__pyx_kp_u_norm_sum_of_squares_of_coordina 5461 #define __pyx_n_s_numbers __pyx_mstate_global->__pyx_n_s_numbers 5462 #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj 5463 #define __pyx_n_s_odd __pyx_mstate_global->__pyx_n_s_odd 5464 #define __pyx_kp_u_odd_line_1509 __pyx_mstate_global->__pyx_kp_u_odd_line_1509 5465 #define __pyx_n_s_other __pyx_mstate_global->__pyx_n_s_other 5466 #define __pyx_n_s_outer_pow __pyx_mstate_global->__pyx_n_s_outer_pow 5467 #define __pyx_kp_u_outer_pow_line_1630 __pyx_mstate_global->__pyx_kp_u_outer_pow_line_1630 5468 #define __pyx_n_s_p __pyx_mstate_global->__pyx_n_s_p 5469 #define __pyx_n_s_pi __pyx_mstate_global->__pyx_n_s_pi 5470 #define __pyx_n_s_pow __pyx_mstate_global->__pyx_n_s_pow 5471 #define __pyx_kp_u_pow_line_1606 __pyx_mstate_global->__pyx_kp_u_pow_line_1606 5472 #define __pyx_n_s_pure __pyx_mstate_global->__pyx_n_s_pure 5473 #define __pyx_kp_u_pure_line_1489 __pyx_mstate_global->__pyx_kp_u_pure_line_1489 5474 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state 5475 #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable 5476 #define __pyx_n_s_q __pyx_mstate_global->__pyx_n_s_q 5477 #define __pyx_n_s_quad __pyx_mstate_global->__pyx_n_s_quad 5478 #define __pyx_kp_u_quad_line_1563 __pyx_mstate_global->__pyx_kp_u_quad_line_1563 5479 #define __pyx_n_s_random_clifford __pyx_mstate_global->__pyx_n_s_random_clifford 5480 #define __pyx_kp_u_random_clifford_line_1927 __pyx_mstate_global->__pyx_kp_u_random_clifford_line_1927 5481 #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range 5482 #define __pyx_n_s_real __pyx_mstate_global->__pyx_n_s_real 5483 #define __pyx_kp_u_real_line_1467 __pyx_mstate_global->__pyx_kp_u_real_line_1467 5484 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce 5485 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython 5486 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex 5487 #define __pyx_n_s_reframe __pyx_mstate_global->__pyx_n_s_reframe 5488 #define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result 5489 #define __pyx_n_s_reverse __pyx_mstate_global->__pyx_n_s_reverse 5490 #define __pyx_kp_u_reverse_line_1533 __pyx_mstate_global->__pyx_kp_u_reverse_line_1533 5491 #define __pyx_n_s_rhs __pyx_mstate_global->__pyx_n_s_rhs 5492 #define __pyx_n_s_scalar __pyx_mstate_global->__pyx_n_s_scalar 5493 #define __pyx_n_s_scalar_epsilon __pyx_mstate_global->__pyx_n_s_scalar_epsilon 5494 #define __pyx_kp_u_scalar_line_1456 __pyx_mstate_global->__pyx_kp_u_scalar_line_1456 5495 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self 5496 #define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send 5497 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate 5498 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython 5499 #define __pyx_n_s_sign_of_mult __pyx_mstate_global->__pyx_n_s_sign_of_mult 5500 #define __pyx_n_s_sign_of_square __pyx_mstate_global->__pyx_n_s_sign_of_square 5501 #define __pyx_n_s_sin __pyx_mstate_global->__pyx_n_s_sin 5502 #define __pyx_kp_u_sin_line_1791 __pyx_mstate_global->__pyx_kp_u_sin_line_1791 5503 #define __pyx_n_s_sinh __pyx_mstate_global->__pyx_n_s_sinh 5504 #define __pyx_kp_u_sinh_line_1831 __pyx_mstate_global->__pyx_kp_u_sinh_line_1831 5505 #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec 5506 #define __pyx_n_s_sqrt __pyx_mstate_global->__pyx_n_s_sqrt 5507 #define __pyx_kp_u_sqrt_line_1654 __pyx_mstate_global->__pyx_kp_u_sqrt_line_1654 5508 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource 5509 #define __pyx_n_s_tan __pyx_mstate_global->__pyx_n_s_tan 5510 #define __pyx_kp_u_tan_line_1864 __pyx_mstate_global->__pyx_kp_u_tan_line_1864 5511 #define __pyx_n_s_tanh __pyx_mstate_global->__pyx_n_s_tanh 5512 #define __pyx_kp_u_tanh_line_1898 __pyx_mstate_global->__pyx_kp_u_tanh_line_1898 5513 #define __pyx_n_s_tau __pyx_mstate_global->__pyx_n_s_tau 5514 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test 5515 #define __pyx_n_s_test_2 __pyx_mstate_global->__pyx_n_s_test_2 5516 #define __pyx_n_s_testmod __pyx_mstate_global->__pyx_n_s_testmod 5517 #define __pyx_n_s_threshold __pyx_mstate_global->__pyx_n_s_threshold 5518 #define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw 5519 #define __pyx_kp_u_to_frame __pyx_mstate_global->__pyx_kp_u_to_frame 5520 #define __pyx_n_s_tol __pyx_mstate_global->__pyx_n_s_tol 5521 #define __pyx_n_s_truncated __pyx_mstate_global->__pyx_n_s_truncated 5522 #define __pyx_kp_u_using __pyx_mstate_global->__pyx_kp_u_using 5523 #define __pyx_kp_u_using_invalid __pyx_mstate_global->__pyx_kp_u_using_invalid 5524 #define __pyx_kp_u_utf_8 __pyx_mstate_global->__pyx_kp_u_utf_8 5525 #define __pyx_kp_u_value __pyx_mstate_global->__pyx_kp_u_value 5526 #define __pyx_n_s_vec __pyx_mstate_global->__pyx_n_s_vec 5527 #define __pyx_n_s_vector_part __pyx_mstate_global->__pyx_n_s_vector_part 5528 #define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version 5529 #define __pyx_n_s_xrange __pyx_mstate_global->__pyx_n_s_xrange 5530 #define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0 5531 #define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0 5532 #define __pyx_float_4_0 __pyx_mstate_global->__pyx_float_4_0 5533 #define __pyx_float_8_0 __pyx_mstate_global->__pyx_float_8_0 5534 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 5535 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 5536 #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4 5537 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 5538 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 5539 #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10 5540 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 5541 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 5542 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25 5543 #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27 5544 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 5545 #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34 5546 #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 5547 #define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43 5548 #define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51 5549 #define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60 5550 #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 5551 #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64 5552 #define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79 5553 #define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83 5554 #define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99 5555 #define __pyx_tuple__101 __pyx_mstate_global->__pyx_tuple__101 5556 #define __pyx_tuple__105 __pyx_mstate_global->__pyx_tuple__105 5557 #define __pyx_tuple__107 __pyx_mstate_global->__pyx_tuple__107 5558 #define __pyx_tuple__109 __pyx_mstate_global->__pyx_tuple__109 5559 #define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110 5560 #define __pyx_tuple__111 __pyx_mstate_global->__pyx_tuple__111 5561 #define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11 5562 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12 5563 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13 5564 #define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14 5565 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15 5566 #define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16 5567 #define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17 5568 #define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19 5569 #define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20 5570 #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21 5571 #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23 5572 #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24 5573 #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26 5574 #define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28 5575 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 5576 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30 5577 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32 5578 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 5579 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 5580 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36 5581 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37 5582 #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38 5583 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39 5584 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40 5585 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42 5586 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 5587 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 5588 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 5589 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 5590 #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 5591 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49 5592 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 5593 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 5594 #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53 5595 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 5596 #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 5597 #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 5598 #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57 5599 #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 5600 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59 5601 #define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61 5602 #define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 5603 #define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65 5604 #define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66 5605 #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 5606 #define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68 5607 #define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69 5608 #define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70 5609 #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71 5610 #define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 5611 #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73 5612 #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 5613 #define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75 5614 #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 5615 #define __pyx_codeobj__77 __pyx_mstate_global->__pyx_codeobj__77 5616 #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 5617 #define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 5618 #define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 5619 #define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 5620 #define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 5621 #define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85 5622 #define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86 5623 #define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 5624 #define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88 5625 #define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89 5626 #define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90 5627 #define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91 5628 #define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92 5629 #define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93 5630 #define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94 5631 #define __pyx_codeobj__95 __pyx_mstate_global->__pyx_codeobj__95 5632 #define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96 5633 #define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97 5634 #define __pyx_codeobj__98 __pyx_mstate_global->__pyx_codeobj__98 5635 #define __pyx_codeobj__100 __pyx_mstate_global->__pyx_codeobj__100 5636 #define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102 5637 #define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103 5638 #define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104 5639 #define __pyx_codeobj__106 __pyx_mstate_global->__pyx_codeobj__106 5640 #define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108 5641 #define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112 5652 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string
const &__pyx_v_s) {
5653 PyObject *__pyx_r = NULL;
5654 __Pyx_RefNannyDeclarations
5655 PyObject *__pyx_t_1 = NULL;
5656 int __pyx_lineno = 0;
5657 const char *__pyx_filename = NULL;
5658 int __pyx_clineno = 0;
5659 __Pyx_RefNannySetupContext(
"__pyx_convert_PyObject_string_to_py_std__in_string", 1);
5668 __Pyx_XDECREF(__pyx_r);
5669 __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size());
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
5670 __Pyx_GOTREF(__pyx_t_1);
5671 __pyx_r = __pyx_t_1;
5685 __Pyx_XDECREF(__pyx_t_1);
5686 __Pyx_AddTraceback(
"string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
5689 __Pyx_XGIVEREF(__pyx_r);
5690 __Pyx_RefNannyFinishContext();
5702 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string
const &__pyx_v_s) {
5703 PyObject *__pyx_r = NULL;
5704 __Pyx_RefNannyDeclarations
5705 PyObject *__pyx_t_1 = NULL;
5706 int __pyx_lineno = 0;
5707 const char *__pyx_filename = NULL;
5708 int __pyx_clineno = 0;
5709 __Pyx_RefNannySetupContext(
"__pyx_convert_PyUnicode_string_to_py_std__in_string", 1);
5718 __Pyx_XDECREF(__pyx_r);
5719 __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size());
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error)
5720 __Pyx_GOTREF(__pyx_t_1);
5721 __pyx_r = __pyx_t_1;
5735 __Pyx_XDECREF(__pyx_t_1);
5736 __Pyx_AddTraceback(
"string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
5739 __Pyx_XGIVEREF(__pyx_r);
5740 __Pyx_RefNannyFinishContext();
5752 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string
const &__pyx_v_s) {
5753 PyObject *__pyx_r = NULL;
5754 __Pyx_RefNannyDeclarations
5755 PyObject *__pyx_t_1 = NULL;
5756 int __pyx_lineno = 0;
5757 const char *__pyx_filename = NULL;
5758 int __pyx_clineno = 0;
5759 __Pyx_RefNannySetupContext(
"__pyx_convert_PyStr_string_to_py_std__in_string", 1);
5768 __Pyx_XDECREF(__pyx_r);
5769 __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size());
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
5770 __Pyx_GOTREF(__pyx_t_1);
5771 __pyx_r = __pyx_t_1;
5785 __Pyx_XDECREF(__pyx_t_1);
5786 __Pyx_AddTraceback(
"string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
5789 __Pyx_XGIVEREF(__pyx_r);
5790 __Pyx_RefNannyFinishContext();
5802 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string
const &__pyx_v_s) {
5803 PyObject *__pyx_r = NULL;
5804 __Pyx_RefNannyDeclarations
5805 PyObject *__pyx_t_1 = NULL;
5806 int __pyx_lineno = 0;
5807 const char *__pyx_filename = NULL;
5808 int __pyx_clineno = 0;
5809 __Pyx_RefNannySetupContext(
"__pyx_convert_PyBytes_string_to_py_std__in_string", 1);
5818 __Pyx_XDECREF(__pyx_r);
5819 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size());
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
5820 __Pyx_GOTREF(__pyx_t_1);
5821 __pyx_r = __pyx_t_1;
5835 __Pyx_XDECREF(__pyx_t_1);
5836 __Pyx_AddTraceback(
"string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
5839 __Pyx_XGIVEREF(__pyx_r);
5840 __Pyx_RefNannyFinishContext();
5852 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string
const &__pyx_v_s) {
5853 PyObject *__pyx_r = NULL;
5854 __Pyx_RefNannyDeclarations
5855 PyObject *__pyx_t_1 = NULL;
5856 int __pyx_lineno = 0;
5857 const char *__pyx_filename = NULL;
5858 int __pyx_clineno = 0;
5859 __Pyx_RefNannySetupContext(
"__pyx_convert_PyByteArray_string_to_py_std__in_string", 1);
5867 __Pyx_XDECREF(__pyx_r);
5868 __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size());
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
5869 __Pyx_GOTREF(__pyx_t_1);
5870 __pyx_r = __pyx_t_1;
5884 __Pyx_XDECREF(__pyx_t_1);
5885 __Pyx_AddTraceback(
"string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
5888 __Pyx_XGIVEREF(__pyx_r);
5889 __Pyx_RefNannyFinishContext();
5901 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
5903 __Pyx_RefNannyDeclarations
5904 PyObject *__pyx_t_1 = NULL;
5905 int __pyx_lineno = 0;
5906 const char *__pyx_filename = NULL;
5907 int __pyx_clineno = 0;
5908 __Pyx_RefNannySetupContext(
"toIndexSet", 1);
5917 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
5918 __Pyx_GOTREF(__pyx_t_1);
5919 __pyx_r = (((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
5920 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5933 __Pyx_XDECREF(__pyx_t_1);
5934 __Pyx_AddTraceback(
"PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
5935 __Pyx_pretend_to_initialize(&__pyx_r);
5937 __Pyx_RefNannyFinishContext();
5949 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other) {
5950 PyObject *__pyx_r = NULL;
5951 __Pyx_RefNannyDeclarations
5952 __Pyx_RefNannySetupContext(
"wrap", 1);
5961 (__pyx_v_self->instance[0]) = __pyx_v_other;
5970 __Pyx_XDECREF(__pyx_r);
5971 __Pyx_INCREF((PyObject *)__pyx_v_self);
5972 __pyx_r = ((PyObject *)__pyx_v_self);
5985 __Pyx_XGIVEREF(__pyx_r);
5986 __Pyx_RefNannyFinishContext();
5998 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
6008 __pyx_r = (__pyx_v_self->instance[0]);
6032 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self,
6033 #
if CYTHON_METH_FASTCALL
6034 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6036 PyObject *__pyx_args, PyObject *__pyx_kwds
6039 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch) {
6040 PyObject *__pyx_r = NULL;
6041 __Pyx_RefNannyDeclarations
6042 PyObject *__pyx_t_1 = NULL;
6043 PyObject *__pyx_t_2 = NULL;
6044 PyObject *__pyx_t_3 = NULL;
6045 PyObject *__pyx_t_4 = NULL;
6047 int __pyx_lineno = 0;
6048 const char *__pyx_filename = NULL;
6049 int __pyx_clineno = 0;
6050 __Pyx_RefNannySetupContext(
"copy", 1);
6052 if (unlikely(__pyx_skip_dispatch)) ;
6054 else if (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)))) {
6055 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS 6056 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6057 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6058 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6060 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
6061 __Pyx_GOTREF(__pyx_t_1);
6062 if (!__Pyx_IsSameCFunction(__pyx_t_1, (
void*) __pyx_pw_8PyClical_9index_set_1copy)) {
6063 __Pyx_XDECREF(__pyx_r);
6064 __Pyx_INCREF(__pyx_t_1);
6065 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6067 #if CYTHON_UNPACK_METHODS 6068 if (unlikely(PyMethod_Check(__pyx_t_3))) {
6069 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6070 if (likely(__pyx_t_4)) {
6071 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
6072 __Pyx_INCREF(__pyx_t_4);
6073 __Pyx_INCREF(
function);
6074 __Pyx_DECREF_SET(__pyx_t_3,
function);
6080 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
6081 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
6082 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6083 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
6084 __Pyx_GOTREF(__pyx_t_2);
6085 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6087 __pyx_r = __pyx_t_2;
6089 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6092 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS 6093 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6094 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6095 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
6096 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6099 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6100 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS 6112 __Pyx_XDECREF(__pyx_r);
6113 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), ((PyObject *)__pyx_v_self));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
6114 __Pyx_GOTREF(__pyx_t_1);
6115 __pyx_r = __pyx_t_1;
6129 __Pyx_XDECREF(__pyx_t_1);
6130 __Pyx_XDECREF(__pyx_t_2);
6131 __Pyx_XDECREF(__pyx_t_3);
6132 __Pyx_XDECREF(__pyx_t_4);
6133 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6136 __Pyx_XGIVEREF(__pyx_r);
6137 __Pyx_RefNannyFinishContext();
6142 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self,
6143 #
if CYTHON_METH_FASTCALL
6144 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6146 PyObject *__pyx_args, PyObject *__pyx_kwds
6149 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_copy,
"\n Copy this index_set object.\n\n >>> s=index_set(1); t=s.copy(); print(t)\n {1}\n ");
6150 static PyMethodDef __pyx_mdef_8PyClical_9index_set_1copy = {
"copy", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_1copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_copy};
6151 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self,
6152 #
if CYTHON_METH_FASTCALL
6153 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6155 PyObject *__pyx_args, PyObject *__pyx_kwds
6158 #if !CYTHON_METH_FASTCALL 6159 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6161 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6162 PyObject *__pyx_r = 0;
6163 __Pyx_RefNannyDeclarations
6164 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
6165 #if !CYTHON_METH_FASTCALL 6166 #if CYTHON_ASSUME_SAFE_MACROS 6167 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6169 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6172 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6173 if (unlikely(__pyx_nargs > 0)) {
6174 __Pyx_RaiseArgtupleInvalid(
"copy", 1, 0, 0, __pyx_nargs);
return NULL;}
6175 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"copy", 0)))
return NULL;
6176 __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
6179 __Pyx_RefNannyFinishContext();
6183 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
6184 PyObject *__pyx_r = NULL;
6185 __Pyx_RefNannyDeclarations
6186 PyObject *__pyx_t_1 = NULL;
6187 int __pyx_lineno = 0;
6188 const char *__pyx_filename = NULL;
6189 int __pyx_clineno = 0;
6190 __Pyx_RefNannySetupContext(
"copy", 1);
6191 __Pyx_XDECREF(__pyx_r);
6192 __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
6193 __Pyx_GOTREF(__pyx_t_1);
6194 __pyx_r = __pyx_t_1;
6200 __Pyx_XDECREF(__pyx_t_1);
6201 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6204 __Pyx_XGIVEREF(__pyx_r);
6205 __Pyx_RefNannyFinishContext();
6218 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6219 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6220 PyObject *__pyx_v_other = 0;
6221 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6222 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6223 PyObject* values[1] = {0};
6224 int __pyx_lineno = 0;
6225 const char *__pyx_filename = NULL;
6226 int __pyx_clineno = 0;
6228 __Pyx_RefNannyDeclarations
6229 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
6230 #if CYTHON_ASSUME_SAFE_MACROS 6231 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6233 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
6235 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6237 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
6238 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_0));
6241 switch (__pyx_nargs) {
6242 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
6245 default:
goto __pyx_L5_argtuple_error;
6247 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
6248 switch (__pyx_nargs) {
6251 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_other);
6252 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
6253 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error)
6256 if (unlikely(kw_args > 0)) {
6257 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6258 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"__cinit__") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
6261 switch (__pyx_nargs) {
6262 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
6265 default:
goto __pyx_L5_argtuple_error;
6268 __pyx_v_other = values[0];
6271 __pyx_L5_argtuple_error:;
6272 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 74, __pyx_L3_error)
6274 goto __pyx_L4_argument_unpacking_done;
6277 Py_ssize_t __pyx_temp;
6278 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6279 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
6282 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6283 __Pyx_RefNannyFinishContext();
6285 __pyx_L4_argument_unpacking_done:;
6286 __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
6290 Py_ssize_t __pyx_temp;
6291 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6292 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
6295 __Pyx_RefNannyFinishContext();
6299 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
6300 PyObject *__pyx_v_error_msg_prefix = NULL;
6301 PyObject *__pyx_v_idx = NULL;
6302 PyObject *__pyx_v_bother = NULL;
6304 __Pyx_RefNannyDeclarations
6308 PyObject *__pyx_t_4 = NULL;
6309 PyObject *__pyx_t_5 = NULL;
6312 PyObject *__pyx_t_8 = NULL;
6313 PyObject *__pyx_t_9 = NULL;
6314 PyObject *__pyx_t_10 = NULL;
6315 Py_ssize_t __pyx_t_11;
6316 PyObject *(*__pyx_t_12)(PyObject *);
6317 PyObject *__pyx_t_13 = NULL;
6318 PyObject *__pyx_t_14 = NULL;
6319 PyObject *__pyx_t_15 = NULL;
6320 PyObject *__pyx_t_16 = NULL;
6322 int __pyx_lineno = 0;
6323 const char *__pyx_filename = NULL;
6324 int __pyx_clineno = 0;
6325 __Pyx_RefNannySetupContext(
"__cinit__", 1);
6334 __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_index_set_obje);
6335 __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_index_set_obje;
6344 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6354 __pyx_t_2 = __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error)
6356 __pyx_t_3 =
new IndexSet(__pyx_t_2);
6358 __Pyx_CppExn2PyErr();
6359 __PYX_ERR(0, 95, __pyx_L1_error)
6361 __pyx_v_self->instance = __pyx_t_3;
6380 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
6381 __Pyx_GOTREF(__pyx_t_4);
6382 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
6383 __Pyx_GOTREF(__pyx_t_5);
6384 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6385 __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5);
if (unlikely(__pyx_t_1 == ((
int)-1))) __PYX_ERR(0, 96, __pyx_L1_error)
6386 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6396 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other);
if (unlikely((__pyx_t_6 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error)
6398 __pyx_t_3 =
new IndexSet(((
int)__pyx_t_6));
6400 __Pyx_CppExn2PyErr();
6401 __PYX_ERR(0, 97, __pyx_L1_error)
6403 __pyx_v_self->instance = __pyx_t_3;
6422 __pyx_t_7 = PySet_Check(__pyx_v_other);
6425 __pyx_t_1 = __pyx_t_7;
6426 goto __pyx_L4_bool_binop_done;
6428 __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
6429 __pyx_t_1 = __pyx_t_7;
6430 __pyx_L4_bool_binop_done:;
6441 __Pyx_PyThreadState_declare
6442 __Pyx_PyThreadState_assign
6443 __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
6444 __Pyx_XGOTREF(__pyx_t_8);
6445 __Pyx_XGOTREF(__pyx_t_9);
6446 __Pyx_XGOTREF(__pyx_t_10);
6457 __pyx_v_self->instance = __pyx_t_3;
6466 if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
6467 __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5);
6471 __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L6_error)
6472 __Pyx_GOTREF(__pyx_t_5);
6473 __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 101, __pyx_L6_error)
6476 if (likely(!__pyx_t_12)) {
6477 if (likely(PyList_CheckExact(__pyx_t_5))) {
6479 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
6480 #if !CYTHON_ASSUME_SAFE_MACROS 6481 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 101, __pyx_L6_error)
6483 if (__pyx_t_11 >= __pyx_temp)
break;
6485 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 6486 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++;
if (unlikely((0 < 0))) __PYX_ERR(0, 101, __pyx_L6_error)
6488 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++;
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L6_error)
6489 __Pyx_GOTREF(__pyx_t_4);
6493 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
6494 #if !CYTHON_ASSUME_SAFE_MACROS 6495 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 101, __pyx_L6_error)
6497 if (__pyx_t_11 >= __pyx_temp)
break;
6499 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 6500 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++;
if (unlikely((0 < 0))) __PYX_ERR(0, 101, __pyx_L6_error)
6502 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++;
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L6_error)
6503 __Pyx_GOTREF(__pyx_t_4);
6507 __pyx_t_4 = __pyx_t_12(__pyx_t_5);
6508 if (unlikely(!__pyx_t_4)) {
6509 PyObject* exc_type = PyErr_Occurred();
6511 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6512 else __PYX_ERR(0, 101, __pyx_L6_error)
6516 __Pyx_GOTREF(__pyx_t_4);
6518 __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
6528 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0))) __PYX_ERR(0, 102, __pyx_L6_error)
6538 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6548 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6549 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6550 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6551 goto __pyx_L11_try_end;
6553 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6554 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6563 __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
6565 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6566 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 103, __pyx_L8_except_error)
6567 __Pyx_XGOTREF(__pyx_t_5);
6568 __Pyx_XGOTREF(__pyx_t_4);
6569 __Pyx_XGOTREF(__pyx_t_13);
6578 __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 104, __pyx_L8_except_error)
6579 __Pyx_GOTREF(__pyx_t_14);
6580 __pyx_t_15 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
6581 __Pyx_GOTREF(__pyx_t_15);
6582 __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 104, __pyx_L8_except_error)
6583 __Pyx_GOTREF(__pyx_t_16);
6584 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
6585 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6586 __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_u_);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
6587 __Pyx_GOTREF(__pyx_t_15);
6588 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6589 __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_15);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 104, __pyx_L8_except_error)
6590 __Pyx_GOTREF(__pyx_t_16);
6591 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6592 __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6593 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6594 __PYX_ERR(0, 104, __pyx_L8_except_error)
6604 __pyx_t_6 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_RuntimeError, __pyx_builtin_TypeError);
6606 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6607 if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 105, __pyx_L8_except_error)
6608 __Pyx_XGOTREF(__pyx_t_13);
6609 __Pyx_XGOTREF(__pyx_t_4);
6610 __Pyx_XGOTREF(__pyx_t_5);
6619 __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 106, __pyx_L8_except_error)
6620 __Pyx_GOTREF(__pyx_t_16);
6621 __pyx_t_15 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
6622 __Pyx_GOTREF(__pyx_t_15);
6623 __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 106, __pyx_L8_except_error)
6624 __Pyx_GOTREF(__pyx_t_14);
6625 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6626 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6627 __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_u_);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
6628 __Pyx_GOTREF(__pyx_t_15);
6629 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
6630 __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 106, __pyx_L8_except_error)
6631 __Pyx_GOTREF(__pyx_t_14);
6632 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6633 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
6634 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
6635 __PYX_ERR(0, 106, __pyx_L8_except_error)
6637 goto __pyx_L8_except_error;
6646 __pyx_L8_except_error:;
6647 __Pyx_XGIVEREF(__pyx_t_8);
6648 __Pyx_XGIVEREF(__pyx_t_9);
6649 __Pyx_XGIVEREF(__pyx_t_10);
6650 __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
6651 goto __pyx_L1_error;
6672 __pyx_t_1 = PyUnicode_Check(__pyx_v_other);
6673 if (likely(__pyx_t_1)) {
6683 __Pyx_PyThreadState_declare
6684 __Pyx_PyThreadState_assign
6685 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
6686 __Pyx_XGOTREF(__pyx_t_10);
6687 __Pyx_XGOTREF(__pyx_t_9);
6688 __Pyx_XGOTREF(__pyx_t_8);
6698 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_encode);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L19_error)
6699 __Pyx_GOTREF(__pyx_t_4);
6702 #if CYTHON_UNPACK_METHODS 6703 if (likely(PyMethod_Check(__pyx_t_4))) {
6704 __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
6705 if (likely(__pyx_t_13)) {
6706 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_4);
6707 __Pyx_INCREF(__pyx_t_13);
6708 __Pyx_INCREF(
function);
6709 __Pyx_DECREF_SET(__pyx_t_4,
function);
6715 PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_kp_u_UTF_8};
6716 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
6717 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6718 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L19_error)
6719 __Pyx_GOTREF(__pyx_t_5);
6720 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6722 __pyx_v_bother = __pyx_t_5;
6732 __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_bother);
if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L19_error)
6734 __pyx_t_3 =
new IndexSet(((
char *)__pyx_t_17));
6736 __Pyx_CppExn2PyErr();
6737 __PYX_ERR(0, 110, __pyx_L19_error)
6739 __pyx_v_self->instance = __pyx_t_3;
6749 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6750 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6751 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6752 goto __pyx_L24_try_end;
6754 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6755 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
6756 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6757 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6758 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6759 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6768 __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6770 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6771 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 111, __pyx_L21_except_error)
6772 __Pyx_XGOTREF(__pyx_t_5);
6773 __Pyx_XGOTREF(__pyx_t_4);
6774 __Pyx_XGOTREF(__pyx_t_13);
6783 __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid_string);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 112, __pyx_L21_except_error)
6784 __Pyx_GOTREF(__pyx_t_14);
6785 __pyx_t_15 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L21_except_error)
6786 __Pyx_GOTREF(__pyx_t_15);
6787 __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L21_except_error)
6788 __Pyx_GOTREF(__pyx_t_16);
6789 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
6790 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6791 __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_u_);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L21_except_error)
6792 __Pyx_GOTREF(__pyx_t_15);
6793 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6794 __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L21_except_error)
6795 __Pyx_GOTREF(__pyx_t_16);
6796 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6797 __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6798 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6799 __PYX_ERR(0, 112, __pyx_L21_except_error)
6801 goto __pyx_L21_except_error;
6810 __pyx_L21_except_error:;
6811 __Pyx_XGIVEREF(__pyx_t_10);
6812 __Pyx_XGIVEREF(__pyx_t_9);
6813 __Pyx_XGIVEREF(__pyx_t_8);
6814 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
6815 goto __pyx_L1_error;
6837 __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 114, __pyx_L1_error)
6838 __Pyx_GOTREF(__pyx_t_13);
6839 __pyx_t_4 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_other)));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
6840 __Pyx_GOTREF(__pyx_t_4);
6841 __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
6842 __Pyx_GOTREF(__pyx_t_5);
6843 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6844 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6845 __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_5, __pyx_kp_u_);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
6846 __Pyx_GOTREF(__pyx_t_4);
6847 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6848 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
6849 __Pyx_GOTREF(__pyx_t_5);
6850 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6851 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
6852 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6853 __PYX_ERR(0, 114, __pyx_L1_error)
6869 __Pyx_XDECREF(__pyx_t_4);
6870 __Pyx_XDECREF(__pyx_t_5);
6871 __Pyx_XDECREF(__pyx_t_13);
6872 __Pyx_XDECREF(__pyx_t_14);
6873 __Pyx_XDECREF(__pyx_t_15);
6874 __Pyx_XDECREF(__pyx_t_16);
6875 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6878 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6879 __Pyx_XDECREF(__pyx_v_idx);
6880 __Pyx_XDECREF(__pyx_v_bother);
6881 __Pyx_RefNannyFinishContext();
6894 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self);
6895 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
6896 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6897 __Pyx_RefNannyDeclarations
6898 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
6899 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6900 __pyx_pf_8PyClical_9index_set_4__dealloc__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
6903 __Pyx_RefNannyFinishContext();
6906 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
6915 delete __pyx_v_self->instance;
6937 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
6938 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
6939 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6940 PyObject *__pyx_r = 0;
6941 __Pyx_RefNannyDeclarations
6942 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
6943 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6944 __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
6947 __Pyx_RefNannyFinishContext();
6951 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
6952 PyObject *__pyx_v_eq = NULL;
6953 PyObject *__pyx_v_lt = NULL;
6954 PyObject *__pyx_r = NULL;
6955 __Pyx_RefNannyDeclarations
6958 PyObject *__pyx_t_3 = NULL;
6961 int __pyx_lineno = 0;
6962 const char *__pyx_filename = NULL;
6963 int __pyx_clineno = 0;
6964 __Pyx_RefNannySetupContext(
"__richcmp__", 1);
6973 __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
6976 __pyx_t_1 = __pyx_t_2;
6977 goto __pyx_L4_bool_binop_done;
6979 __pyx_t_2 = (__pyx_v_rhs == Py_None);
6980 __pyx_t_1 = __pyx_t_2;
6981 __pyx_L4_bool_binop_done:;
6991 __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
6992 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
6993 __Pyx_GOTREF(__pyx_t_3);
6994 __pyx_v_eq = __pyx_t_3;
7004 switch (__pyx_v_op) {
7014 __Pyx_XDECREF(__pyx_r);
7015 __Pyx_INCREF(__pyx_v_eq);
7016 __pyx_r = __pyx_v_eq;
7036 __Pyx_XDECREF(__pyx_r);
7037 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 148, __pyx_L1_error)
7038 __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
7039 __Pyx_GOTREF(__pyx_t_3);
7040 __pyx_r = __pyx_t_3;
7061 switch (__pyx_v_op) {
7071 __Pyx_XDECREF(__pyx_r);
7072 __Pyx_INCREF(Py_False);
7093 __Pyx_XDECREF(__pyx_r);
7094 __Pyx_INCREF(__pyx_v_eq);
7095 __pyx_r = __pyx_v_eq;
7115 __Pyx_XDECREF(__pyx_r);
7116 __Pyx_INCREF(Py_False);
7137 __Pyx_XDECREF(__pyx_r);
7138 __Pyx_INCREF(__pyx_v_eq);
7139 __pyx_r = __pyx_v_eq;
7159 __Pyx_XDECREF(__pyx_r);
7160 __Pyx_INCREF(__pyx_builtin_NotImplemented);
7161 __pyx_r = __pyx_builtin_NotImplemented;
7185 __pyx_t_4 = __pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L1_error)
7186 __pyx_t_5 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L1_error)
7187 __pyx_t_1 = (__pyx_t_4 == __pyx_t_5);
7188 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
7189 __Pyx_GOTREF(__pyx_t_3);
7190 __pyx_v_eq = __pyx_t_3;
7200 switch (__pyx_v_op) {
7210 __Pyx_XDECREF(__pyx_r);
7211 __Pyx_INCREF(__pyx_v_eq);
7212 __pyx_r = __pyx_v_eq;
7232 __Pyx_XDECREF(__pyx_r);
7233 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 165, __pyx_L1_error)
7234 __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
7235 __Pyx_GOTREF(__pyx_t_3);
7236 __pyx_r = __pyx_t_3;
7257 __pyx_t_5 = __pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
7258 __pyx_t_4 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
7259 __pyx_t_1 = (__pyx_t_5 < __pyx_t_4);
7260 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
7261 __Pyx_GOTREF(__pyx_t_3);
7262 __pyx_v_lt = __pyx_t_3;
7272 switch (__pyx_v_op) {
7282 __Pyx_XDECREF(__pyx_r);
7283 __Pyx_INCREF(__pyx_v_lt);
7284 __pyx_r = __pyx_v_lt;
7304 __Pyx_XDECREF(__pyx_r);
7305 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 171, __pyx_L1_error)
7308 __Pyx_INCREF(__pyx_v_lt);
7309 __pyx_t_3 = __pyx_v_lt;
7310 goto __pyx_L6_bool_binop_done;
7312 __Pyx_INCREF(__pyx_v_eq);
7313 __pyx_t_3 = __pyx_v_eq;
7314 __pyx_L6_bool_binop_done:;
7315 __pyx_r = __pyx_t_3;
7336 __Pyx_XDECREF(__pyx_r);
7337 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
7340 __pyx_t_1 = __pyx_t_2;
7341 goto __pyx_L8_bool_binop_done;
7343 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
7344 __pyx_t_1 = __pyx_t_2;
7345 __pyx_L8_bool_binop_done:;
7346 __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
7347 __Pyx_GOTREF(__pyx_t_3);
7348 __pyx_r = __pyx_t_3;
7369 __Pyx_XDECREF(__pyx_r);
7370 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 175, __pyx_L1_error)
7371 __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
7372 __Pyx_GOTREF(__pyx_t_3);
7373 __pyx_r = __pyx_t_3;
7394 __Pyx_XDECREF(__pyx_r);
7395 __Pyx_INCREF(__pyx_builtin_NotImplemented);
7396 __pyx_r = __pyx_builtin_NotImplemented;
7414 __Pyx_XDECREF(__pyx_t_3);
7415 __Pyx_AddTraceback(
"PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7418 __Pyx_XDECREF(__pyx_v_eq);
7419 __Pyx_XDECREF(__pyx_v_lt);
7420 __Pyx_XGIVEREF(__pyx_r);
7421 __Pyx_RefNannyFinishContext();
7434 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val);
7435 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_8__setitem__,
"\n Set the value of an index_set object at index idx to value val.\n\n >>> s=index_set({1}); s[2] = True; print(s)\n {1,2}\n >>> s=index_set({1,2}); s[1] = False; print(s)\n {2}\n ");
7436 #if CYTHON_UPDATE_DESCRIPTOR_DOC 7437 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
7439 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
7440 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7442 __Pyx_RefNannyDeclarations
7443 __Pyx_RefNannySetupContext(
"__setitem__ (wrapper)", 0);
7444 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7445 __pyx_r = __pyx_pf_8PyClical_9index_set_8__setitem__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx), ((PyObject *)__pyx_v_val));
7448 __Pyx_RefNannyFinishContext();
7452 static int __pyx_pf_8PyClical_9index_set_8__setitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
7456 int __pyx_lineno = 0;
7457 const char *__pyx_filename = NULL;
7458 int __pyx_clineno = 0;
7467 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
7468 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val);
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
7470 __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
7472 __Pyx_CppExn2PyErr();
7473 __PYX_ERR(0, 188, __pyx_L1_error)
7496 __Pyx_AddTraceback(
"PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7511 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
7512 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_10__getitem__,
"\n Get the value of an index_set object at an index.\n\n >>> index_set({1})[1]\n True\n >>> index_set({1})[2]\n False\n >>> index_set({2})[-1]\n False\n >>> index_set({2})[1]\n False\n >>> index_set({2})[2]\n True\n >>> index_set({2})[33]\n False\n ");
7513 #if CYTHON_UPDATE_DESCRIPTOR_DOC 7514 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
7516 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
7517 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7518 PyObject *__pyx_r = 0;
7519 __Pyx_RefNannyDeclarations
7520 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
7521 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7522 __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
7525 __Pyx_RefNannyFinishContext();
7529 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
7530 PyObject *__pyx_r = NULL;
7531 __Pyx_RefNannyDeclarations
7533 PyObject *__pyx_t_2 = NULL;
7534 int __pyx_lineno = 0;
7535 const char *__pyx_filename = NULL;
7536 int __pyx_clineno = 0;
7537 __Pyx_RefNannySetupContext(
"__getitem__", 1);
7546 __Pyx_XDECREF(__pyx_r);
7547 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error)
7548 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
7549 __Pyx_GOTREF(__pyx_t_2);
7550 __pyx_r = __pyx_t_2;
7564 __Pyx_XDECREF(__pyx_t_2);
7565 __Pyx_AddTraceback(
"PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7568 __Pyx_XGIVEREF(__pyx_r);
7569 __Pyx_RefNannyFinishContext();
7582 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
7583 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_12__contains__,
"\n Check that an index_set object contains the index idx: idx in self.\n\n >>> 1 in index_set({1})\n True\n >>> 2 in index_set({1})\n False\n >>> -1 in index_set({2})\n False\n >>> 1 in index_set({2})\n False\n >>> 2 in index_set({2})\n True\n >>> 33 in index_set({2})\n False\n ");
7584 #if CYTHON_UPDATE_DESCRIPTOR_DOC 7585 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
7587 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
7588 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7590 __Pyx_RefNannyDeclarations
7591 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
7592 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7593 __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
7596 __Pyx_RefNannyFinishContext();
7600 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
7603 int __pyx_lineno = 0;
7604 const char *__pyx_filename = NULL;
7605 int __pyx_clineno = 0;
7614 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error)
7615 __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
7628 __Pyx_AddTraceback(
"PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7633 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value);
7644 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self);
7645 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_14__iter__,
"\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}):print(i, end=\",\")\n -3,4,7,\n ");
7646 #if CYTHON_UPDATE_DESCRIPTOR_DOC 7647 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
7649 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
7650 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7651 PyObject *__pyx_r = 0;
7652 __Pyx_RefNannyDeclarations
7653 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
7654 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7655 __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
7658 __Pyx_RefNannyFinishContext();
7662 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
7663 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
7664 PyObject *__pyx_r = NULL;
7665 __Pyx_RefNannyDeclarations
7666 int __pyx_lineno = 0;
7667 const char *__pyx_filename = NULL;
7668 int __pyx_clineno = 0;
7669 __Pyx_RefNannySetupContext(
"__iter__", 0);
7670 __pyx_cur_scope = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(__pyx_ptype_8PyClical___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
7671 if (unlikely(!__pyx_cur_scope)) {
7672 __pyx_cur_scope = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
7673 __Pyx_INCREF(Py_None);
7674 __PYX_ERR(0, 229, __pyx_L1_error)
7676 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
7678 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
7679 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
7680 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
7682 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8PyClical_9index_set_16generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_index_set___iter, __pyx_n_s_PyClical);
if (unlikely(!gen)) __PYX_ERR(0, 229, __pyx_L1_error)
7683 __Pyx_DECREF(__pyx_cur_scope);
7684 __Pyx_RefNannyFinishContext();
7685 return (PyObject *) gen;
7690 __Pyx_AddTraceback(
"PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7692 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
7693 __Pyx_XGIVEREF(__pyx_r);
7694 __Pyx_RefNannyFinishContext();
7698 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value)
7700 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
7701 PyObject *__pyx_r = NULL;
7702 PyObject *__pyx_t_1 = NULL;
7703 PyObject *__pyx_t_2 = NULL;
7704 PyObject *__pyx_t_3 = NULL;
7706 PyObject *__pyx_t_5 = NULL;
7707 Py_ssize_t __pyx_t_6;
7708 PyObject *(*__pyx_t_7)(PyObject *);
7710 int __pyx_lineno = 0;
7711 const char *__pyx_filename = NULL;
7712 int __pyx_clineno = 0;
7713 __Pyx_RefNannyDeclarations
7714 __Pyx_RefNannySetupContext(
"__iter__", 0);
7715 switch (__pyx_generator->resume_label) {
7716 case 0:
goto __pyx_L3_first_run;
7717 case 1:
goto __pyx_L7_resume_from_yield;
7719 __Pyx_RefNannyFinishContext();
7722 __pyx_L3_first_run:;
7723 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 229, __pyx_L1_error)
7732 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_min);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
7733 __Pyx_GOTREF(__pyx_t_2);
7736 #if CYTHON_UNPACK_METHODS 7737 if (likely(PyMethod_Check(__pyx_t_2))) {
7738 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
7739 if (likely(__pyx_t_3)) {
7740 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
7741 __Pyx_INCREF(__pyx_t_3);
7742 __Pyx_INCREF(
function);
7743 __Pyx_DECREF_SET(__pyx_t_2,
function);
7749 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
7750 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
7751 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7752 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
7753 __Pyx_GOTREF(__pyx_t_1);
7754 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7756 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_max);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
7757 __Pyx_GOTREF(__pyx_t_3);
7760 #if CYTHON_UNPACK_METHODS 7761 if (likely(PyMethod_Check(__pyx_t_3))) {
7762 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
7763 if (likely(__pyx_t_5)) {
7764 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
7765 __Pyx_INCREF(__pyx_t_5);
7766 __Pyx_INCREF(
function);
7767 __Pyx_DECREF_SET(__pyx_t_3,
function);
7773 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
7774 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
7775 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7776 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
7777 __Pyx_GOTREF(__pyx_t_2);
7778 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7780 __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
7781 __Pyx_GOTREF(__pyx_t_3);
7782 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7783 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
7784 __Pyx_GOTREF(__pyx_t_2);
7785 __Pyx_GIVEREF(__pyx_t_1);
7786 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error);
7787 __Pyx_GIVEREF(__pyx_t_3);
7788 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error);
7791 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
7792 __Pyx_GOTREF(__pyx_t_3);
7793 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7794 if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
7795 __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
7799 __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
7800 __Pyx_GOTREF(__pyx_t_2);
7801 __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
7803 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7805 if (likely(!__pyx_t_7)) {
7806 if (likely(PyList_CheckExact(__pyx_t_2))) {
7808 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
7809 #if !CYTHON_ASSUME_SAFE_MACROS 7810 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 236, __pyx_L1_error)
7812 if (__pyx_t_6 >= __pyx_temp)
break;
7814 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 7815 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++;
if (unlikely((0 < 0))) __PYX_ERR(0, 236, __pyx_L1_error)
7817 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
7818 __Pyx_GOTREF(__pyx_t_3);
7822 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
7823 #if !CYTHON_ASSUME_SAFE_MACROS 7824 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 236, __pyx_L1_error)
7826 if (__pyx_t_6 >= __pyx_temp)
break;
7828 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 7829 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++;
if (unlikely((0 < 0))) __PYX_ERR(0, 236, __pyx_L1_error)
7831 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
7832 __Pyx_GOTREF(__pyx_t_3);
7836 __pyx_t_3 = __pyx_t_7(__pyx_t_2);
7837 if (unlikely(!__pyx_t_3)) {
7838 PyObject* exc_type = PyErr_Occurred();
7840 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7841 else __PYX_ERR(0, 236, __pyx_L1_error)
7845 __Pyx_GOTREF(__pyx_t_3);
7847 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
7848 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
7849 __Pyx_GIVEREF(__pyx_t_3);
7859 __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_idx, ((PyObject *)__pyx_cur_scope->__pyx_v_self), Py_EQ));
if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 237, __pyx_L1_error)
7869 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
7870 __pyx_r = __pyx_cur_scope->__pyx_v_idx;
7871 __Pyx_XGIVEREF(__pyx_t_2);
7872 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
7873 __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
7874 __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
7875 __Pyx_XGIVEREF(__pyx_r);
7876 __Pyx_RefNannyFinishContext();
7877 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
7879 __pyx_generator->resume_label = 1;
7881 __pyx_L7_resume_from_yield:;
7882 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
7883 __pyx_cur_scope->__pyx_t_0 = 0;
7884 __Pyx_XGOTREF(__pyx_t_2);
7885 __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
7886 __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
7887 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
7906 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7907 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
7918 PyErr_SetNone(PyExc_StopIteration);
7921 __Pyx_Generator_Replace_StopIteration(0);
7922 __Pyx_XDECREF(__pyx_t_1);
7923 __Pyx_XDECREF(__pyx_t_2);
7924 __Pyx_XDECREF(__pyx_t_3);
7925 __Pyx_XDECREF(__pyx_t_5);
7926 __Pyx_AddTraceback(
"__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7928 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
7929 #if !CYTHON_USE_EXC_INFO_STACK 7930 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
7932 __pyx_generator->resume_label = -1;
7933 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
7934 __Pyx_RefNannyFinishContext();
7947 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self);
7948 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_17__invert__,
"\n Set complement: not.\n\n >>> print(~index_set({-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}))\n {-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}\n ");
7949 #if CYTHON_UPDATE_DESCRIPTOR_DOC 7950 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
7952 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
7953 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7954 PyObject *__pyx_r = 0;
7955 __Pyx_RefNannyDeclarations
7956 __Pyx_RefNannySetupContext(
"__invert__ (wrapper)", 0);
7957 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7958 __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
7961 __Pyx_RefNannyFinishContext();
7965 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
7966 PyObject *__pyx_r = NULL;
7967 __Pyx_RefNannyDeclarations
7968 PyObject *__pyx_t_1 = NULL;
7969 PyObject *__pyx_t_2 = NULL;
7970 int __pyx_lineno = 0;
7971 const char *__pyx_filename = NULL;
7972 int __pyx_clineno = 0;
7973 __Pyx_RefNannySetupContext(
"__invert__", 1);
7982 __Pyx_XDECREF(__pyx_r);
7983 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
7984 __Pyx_GOTREF(__pyx_t_1);
7985 __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), __pyx_v_self->instance->operator~());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
7986 __Pyx_GOTREF(__pyx_t_2);
7987 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7988 __pyx_r = __pyx_t_2;
8002 __Pyx_XDECREF(__pyx_t_1);
8003 __Pyx_XDECREF(__pyx_t_2);
8004 __Pyx_AddTraceback(
"PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8007 __Pyx_XGIVEREF(__pyx_r);
8008 __Pyx_RefNannyFinishContext();
8021 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8022 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_19__xor__,
"\n Symmetric set difference: exclusive or.\n\n >>> print(index_set({1}) ^ index_set({2}))\n {1,2}\n >>> print(index_set({1,2}) ^ index_set({2}))\n {1}\n ");
8023 #if CYTHON_UPDATE_DESCRIPTOR_DOC 8024 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
8026 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8027 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8028 PyObject *__pyx_r = 0;
8029 __Pyx_RefNannyDeclarations
8030 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
8031 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8032 __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8035 __Pyx_RefNannyFinishContext();
8039 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8040 PyObject *__pyx_r = NULL;
8041 __Pyx_RefNannyDeclarations
8042 PyObject *__pyx_t_1 = NULL;
8045 PyObject *__pyx_t_4 = NULL;
8046 int __pyx_lineno = 0;
8047 const char *__pyx_filename = NULL;
8048 int __pyx_clineno = 0;
8049 __Pyx_RefNannySetupContext(
"__xor__", 1);
8058 __Pyx_XDECREF(__pyx_r);
8059 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
8060 __Pyx_GOTREF(__pyx_t_1);
8061 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
8062 __pyx_t_3 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
8063 __pyx_t_4 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_t_2 ^ __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error)
8064 __Pyx_GOTREF(__pyx_t_4);
8065 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8066 __pyx_r = __pyx_t_4;
8080 __Pyx_XDECREF(__pyx_t_1);
8081 __Pyx_XDECREF(__pyx_t_4);
8082 __Pyx_AddTraceback(
"PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8085 __Pyx_XGIVEREF(__pyx_r);
8086 __Pyx_RefNannyFinishContext();
8099 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8100 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_21__ixor__,
"\n Symmetric set difference: exclusive or.\n\n >>> x = index_set({1}); x ^= index_set({2}); print(x)\n {1,2}\n >>> x = index_set({1,2}); x ^= index_set({2}); print(x)\n {1}\n ");
8101 #if CYTHON_UPDATE_DESCRIPTOR_DOC 8102 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
8104 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8105 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8106 PyObject *__pyx_r = 0;
8107 __Pyx_RefNannyDeclarations
8108 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
8109 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8110 __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8113 __Pyx_RefNannyFinishContext();
8117 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
8118 PyObject *__pyx_r = NULL;
8119 __Pyx_RefNannyDeclarations
8122 PyObject *__pyx_t_3 = NULL;
8123 int __pyx_lineno = 0;
8124 const char *__pyx_filename = NULL;
8125 int __pyx_clineno = 0;
8126 __Pyx_RefNannySetupContext(
"__ixor__", 1);
8135 __Pyx_XDECREF(__pyx_r);
8136 __pyx_t_1 = __pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
8137 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
8138 __pyx_t_3 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_t_1 ^ __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
8139 __Pyx_GOTREF(__pyx_t_3);
8140 __pyx_r = __pyx_t_3;
8154 __Pyx_XDECREF(__pyx_t_3);
8155 __Pyx_AddTraceback(
"PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8158 __Pyx_XGIVEREF(__pyx_r);
8159 __Pyx_RefNannyFinishContext();
8172 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8173 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_23__and__,
"\n Set intersection: and.\n\n >>> print(index_set({1}) & index_set({2}))\n {}\n >>> print(index_set({1,2}) & index_set({2}))\n {2}\n ");
8174 #if CYTHON_UPDATE_DESCRIPTOR_DOC 8175 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
8177 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8178 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8179 PyObject *__pyx_r = 0;
8180 __Pyx_RefNannyDeclarations
8181 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
8182 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8183 __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8186 __Pyx_RefNannyFinishContext();
8190 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8191 PyObject *__pyx_r = NULL;
8192 __Pyx_RefNannyDeclarations
8193 PyObject *__pyx_t_1 = NULL;
8196 PyObject *__pyx_t_4 = NULL;
8197 int __pyx_lineno = 0;
8198 const char *__pyx_filename = NULL;
8199 int __pyx_clineno = 0;
8200 __Pyx_RefNannySetupContext(
"__and__", 1);
8209 __Pyx_XDECREF(__pyx_r);
8210 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
8211 __Pyx_GOTREF(__pyx_t_1);
8212 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L1_error)
8213 __pyx_t_3 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L1_error)
8214 __pyx_t_4 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_t_2 & __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
8215 __Pyx_GOTREF(__pyx_t_4);
8216 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8217 __pyx_r = __pyx_t_4;
8231 __Pyx_XDECREF(__pyx_t_1);
8232 __Pyx_XDECREF(__pyx_t_4);
8233 __Pyx_AddTraceback(
"PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8236 __Pyx_XGIVEREF(__pyx_r);
8237 __Pyx_RefNannyFinishContext();
8250 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8251 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_25__iand__,
"\n Set intersection: and.\n\n >>> x = index_set({1}); x &= index_set({2}); print(x)\n {}\n >>> x = index_set({1,2}); x &= index_set({2}); print(x)\n {2}\n ");
8252 #if CYTHON_UPDATE_DESCRIPTOR_DOC 8253 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
8255 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8256 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8257 PyObject *__pyx_r = 0;
8258 __Pyx_RefNannyDeclarations
8259 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
8260 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8261 __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8264 __Pyx_RefNannyFinishContext();
8268 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
8269 PyObject *__pyx_r = NULL;
8270 __Pyx_RefNannyDeclarations
8273 PyObject *__pyx_t_3 = NULL;
8274 int __pyx_lineno = 0;
8275 const char *__pyx_filename = NULL;
8276 int __pyx_clineno = 0;
8277 __Pyx_RefNannySetupContext(
"__iand__", 1);
8286 __Pyx_XDECREF(__pyx_r);
8287 __pyx_t_1 = __pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error)
8288 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error)
8289 __pyx_t_3 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_t_1 & __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
8290 __Pyx_GOTREF(__pyx_t_3);
8291 __pyx_r = __pyx_t_3;
8305 __Pyx_XDECREF(__pyx_t_3);
8306 __Pyx_AddTraceback(
"PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8309 __Pyx_XGIVEREF(__pyx_r);
8310 __Pyx_RefNannyFinishContext();
8323 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8324 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_27__or__,
"\n Set union: or.\n\n >>> print(index_set({1}) | index_set({2}))\n {1,2}\n >>> print(index_set({1,2}) | index_set({2}))\n {1,2}\n ");
8325 #if CYTHON_UPDATE_DESCRIPTOR_DOC 8326 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
8328 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8329 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8330 PyObject *__pyx_r = 0;
8331 __Pyx_RefNannyDeclarations
8332 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
8333 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8334 __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8337 __Pyx_RefNannyFinishContext();
8341 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8342 PyObject *__pyx_r = NULL;
8343 __Pyx_RefNannyDeclarations
8344 PyObject *__pyx_t_1 = NULL;
8347 PyObject *__pyx_t_4 = NULL;
8348 int __pyx_lineno = 0;
8349 const char *__pyx_filename = NULL;
8350 int __pyx_clineno = 0;
8351 __Pyx_RefNannySetupContext(
"__or__", 1);
8360 __Pyx_XDECREF(__pyx_r);
8361 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
8362 __Pyx_GOTREF(__pyx_t_1);
8363 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L1_error)
8364 __pyx_t_3 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L1_error)
8365 __pyx_t_4 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_t_2 | __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
8366 __Pyx_GOTREF(__pyx_t_4);
8367 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8368 __pyx_r = __pyx_t_4;
8382 __Pyx_XDECREF(__pyx_t_1);
8383 __Pyx_XDECREF(__pyx_t_4);
8384 __Pyx_AddTraceback(
"PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8387 __Pyx_XGIVEREF(__pyx_r);
8388 __Pyx_RefNannyFinishContext();
8401 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8402 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_29__ior__,
"\n Set union: or.\n\n >>> x = index_set({1}); x |= index_set({2}); print(x)\n {1,2}\n >>> x = index_set({1,2}); x |= index_set({2}); print(x)\n {1,2}\n ");
8403 #if CYTHON_UPDATE_DESCRIPTOR_DOC 8404 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
8406 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8407 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8408 PyObject *__pyx_r = 0;
8409 __Pyx_RefNannyDeclarations
8410 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
8411 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8412 __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8415 __Pyx_RefNannyFinishContext();
8419 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
8420 PyObject *__pyx_r = NULL;
8421 __Pyx_RefNannyDeclarations
8424 PyObject *__pyx_t_3 = NULL;
8425 int __pyx_lineno = 0;
8426 const char *__pyx_filename = NULL;
8427 int __pyx_clineno = 0;
8428 __Pyx_RefNannySetupContext(
"__ior__", 1);
8437 __Pyx_XDECREF(__pyx_r);
8438 __pyx_t_1 = __pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L1_error)
8439 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L1_error)
8440 __pyx_t_3 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_t_1 | __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
8441 __Pyx_GOTREF(__pyx_t_3);
8442 __pyx_r = __pyx_t_3;
8456 __Pyx_XDECREF(__pyx_t_3);
8457 __Pyx_AddTraceback(
"PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8460 __Pyx_XGIVEREF(__pyx_r);
8461 __Pyx_RefNannyFinishContext();
8474 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self,
8475 #
if CYTHON_METH_FASTCALL
8476 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8478 PyObject *__pyx_args, PyObject *__pyx_kwds
8481 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_31count,
"\n Cardinality: Number of indices included in set.\n\n >>> index_set({-1,1,2}).count()\n 3\n ");
8482 static PyMethodDef __pyx_mdef_8PyClical_9index_set_32count = {
"count", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_32count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_31count};
8483 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self,
8484 #
if CYTHON_METH_FASTCALL
8485 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8487 PyObject *__pyx_args, PyObject *__pyx_kwds
8490 #if !CYTHON_METH_FASTCALL 8491 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8493 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8494 PyObject *__pyx_r = 0;
8495 __Pyx_RefNannyDeclarations
8496 __Pyx_RefNannySetupContext(
"count (wrapper)", 0);
8497 #if !CYTHON_METH_FASTCALL 8498 #if CYTHON_ASSUME_SAFE_MACROS 8499 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8501 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8504 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8505 if (unlikely(__pyx_nargs > 0)) {
8506 __Pyx_RaiseArgtupleInvalid(
"count", 1, 0, 0, __pyx_nargs);
return NULL;}
8507 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"count", 0)))
return NULL;
8508 __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
8511 __Pyx_RefNannyFinishContext();
8515 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
8516 PyObject *__pyx_r = NULL;
8517 __Pyx_RefNannyDeclarations
8518 PyObject *__pyx_t_1 = NULL;
8519 int __pyx_lineno = 0;
8520 const char *__pyx_filename = NULL;
8521 int __pyx_clineno = 0;
8522 __Pyx_RefNannySetupContext(
"count", 1);
8531 __Pyx_XDECREF(__pyx_r);
8532 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
8533 __Pyx_GOTREF(__pyx_t_1);
8534 __pyx_r = __pyx_t_1;
8548 __Pyx_XDECREF(__pyx_t_1);
8549 __Pyx_AddTraceback(
"PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
8552 __Pyx_XGIVEREF(__pyx_r);
8553 __Pyx_RefNannyFinishContext();
8566 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self,
8567 #
if CYTHON_METH_FASTCALL
8568 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8570 PyObject *__pyx_args, PyObject *__pyx_kwds
8573 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_33count_neg,
"\n Number of negative indices included in set.\n\n >>> index_set({-1,1,2}).count_neg()\n 1\n ");
8574 static PyMethodDef __pyx_mdef_8PyClical_9index_set_34count_neg = {
"count_neg", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_34count_neg, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_33count_neg};
8575 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self,
8576 #
if CYTHON_METH_FASTCALL
8577 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8579 PyObject *__pyx_args, PyObject *__pyx_kwds
8582 #if !CYTHON_METH_FASTCALL 8583 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8585 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8586 PyObject *__pyx_r = 0;
8587 __Pyx_RefNannyDeclarations
8588 __Pyx_RefNannySetupContext(
"count_neg (wrapper)", 0);
8589 #if !CYTHON_METH_FASTCALL 8590 #if CYTHON_ASSUME_SAFE_MACROS 8591 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8593 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8596 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8597 if (unlikely(__pyx_nargs > 0)) {
8598 __Pyx_RaiseArgtupleInvalid(
"count_neg", 1, 0, 0, __pyx_nargs);
return NULL;}
8599 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"count_neg", 0)))
return NULL;
8600 __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
8603 __Pyx_RefNannyFinishContext();
8607 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
8608 PyObject *__pyx_r = NULL;
8609 __Pyx_RefNannyDeclarations
8610 PyObject *__pyx_t_1 = NULL;
8611 int __pyx_lineno = 0;
8612 const char *__pyx_filename = NULL;
8613 int __pyx_clineno = 0;
8614 __Pyx_RefNannySetupContext(
"count_neg", 1);
8623 __Pyx_XDECREF(__pyx_r);
8624 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
8625 __Pyx_GOTREF(__pyx_t_1);
8626 __pyx_r = __pyx_t_1;
8640 __Pyx_XDECREF(__pyx_t_1);
8641 __Pyx_AddTraceback(
"PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
8644 __Pyx_XGIVEREF(__pyx_r);
8645 __Pyx_RefNannyFinishContext();
8658 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self,
8659 #
if CYTHON_METH_FASTCALL
8660 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8662 PyObject *__pyx_args, PyObject *__pyx_kwds
8665 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_35count_pos,
"\n Number of positive indices included in set.\n\n >>> index_set({-1,1,2}).count_pos()\n 2\n ");
8666 static PyMethodDef __pyx_mdef_8PyClical_9index_set_36count_pos = {
"count_pos", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_36count_pos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_35count_pos};
8667 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self,
8668 #
if CYTHON_METH_FASTCALL
8669 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8671 PyObject *__pyx_args, PyObject *__pyx_kwds
8674 #if !CYTHON_METH_FASTCALL 8675 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8677 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8678 PyObject *__pyx_r = 0;
8679 __Pyx_RefNannyDeclarations
8680 __Pyx_RefNannySetupContext(
"count_pos (wrapper)", 0);
8681 #if !CYTHON_METH_FASTCALL 8682 #if CYTHON_ASSUME_SAFE_MACROS 8683 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8685 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8688 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8689 if (unlikely(__pyx_nargs > 0)) {
8690 __Pyx_RaiseArgtupleInvalid(
"count_pos", 1, 0, 0, __pyx_nargs);
return NULL;}
8691 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"count_pos", 0)))
return NULL;
8692 __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
8695 __Pyx_RefNannyFinishContext();
8699 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
8700 PyObject *__pyx_r = NULL;
8701 __Pyx_RefNannyDeclarations
8702 PyObject *__pyx_t_1 = NULL;
8703 int __pyx_lineno = 0;
8704 const char *__pyx_filename = NULL;
8705 int __pyx_clineno = 0;
8706 __Pyx_RefNannySetupContext(
"count_pos", 1);
8715 __Pyx_XDECREF(__pyx_r);
8716 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
8717 __Pyx_GOTREF(__pyx_t_1);
8718 __pyx_r = __pyx_t_1;
8732 __Pyx_XDECREF(__pyx_t_1);
8733 __Pyx_AddTraceback(
"PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
8736 __Pyx_XGIVEREF(__pyx_r);
8737 __Pyx_RefNannyFinishContext();
8750 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self,
8751 #
if CYTHON_METH_FASTCALL
8752 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8754 PyObject *__pyx_args, PyObject *__pyx_kwds
8757 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_37min,
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ");
8758 static PyMethodDef __pyx_mdef_8PyClical_9index_set_38min = {
"min", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_38min, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_37min};
8759 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self,
8760 #
if CYTHON_METH_FASTCALL
8761 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8763 PyObject *__pyx_args, PyObject *__pyx_kwds
8766 #if !CYTHON_METH_FASTCALL 8767 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8769 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8770 PyObject *__pyx_r = 0;
8771 __Pyx_RefNannyDeclarations
8772 __Pyx_RefNannySetupContext(
"min (wrapper)", 0);
8773 #if !CYTHON_METH_FASTCALL 8774 #if CYTHON_ASSUME_SAFE_MACROS 8775 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8777 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8780 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8781 if (unlikely(__pyx_nargs > 0)) {
8782 __Pyx_RaiseArgtupleInvalid(
"min", 1, 0, 0, __pyx_nargs);
return NULL;}
8783 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"min", 0)))
return NULL;
8784 __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
8787 __Pyx_RefNannyFinishContext();
8791 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
8792 PyObject *__pyx_r = NULL;
8793 __Pyx_RefNannyDeclarations
8794 PyObject *__pyx_t_1 = NULL;
8795 int __pyx_lineno = 0;
8796 const char *__pyx_filename = NULL;
8797 int __pyx_clineno = 0;
8798 __Pyx_RefNannySetupContext(
"min", 1);
8807 __Pyx_XDECREF(__pyx_r);
8808 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
8809 __Pyx_GOTREF(__pyx_t_1);
8810 __pyx_r = __pyx_t_1;
8824 __Pyx_XDECREF(__pyx_t_1);
8825 __Pyx_AddTraceback(
"PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
8828 __Pyx_XGIVEREF(__pyx_r);
8829 __Pyx_RefNannyFinishContext();
8842 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self,
8843 #
if CYTHON_METH_FASTCALL
8844 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8846 PyObject *__pyx_args, PyObject *__pyx_kwds
8849 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_39max,
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ");
8850 static PyMethodDef __pyx_mdef_8PyClical_9index_set_40max = {
"max", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_40max, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_39max};
8851 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self,
8852 #
if CYTHON_METH_FASTCALL
8853 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8855 PyObject *__pyx_args, PyObject *__pyx_kwds
8858 #if !CYTHON_METH_FASTCALL 8859 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8861 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8862 PyObject *__pyx_r = 0;
8863 __Pyx_RefNannyDeclarations
8864 __Pyx_RefNannySetupContext(
"max (wrapper)", 0);
8865 #if !CYTHON_METH_FASTCALL 8866 #if CYTHON_ASSUME_SAFE_MACROS 8867 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8869 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8872 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8873 if (unlikely(__pyx_nargs > 0)) {
8874 __Pyx_RaiseArgtupleInvalid(
"max", 1, 0, 0, __pyx_nargs);
return NULL;}
8875 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"max", 0)))
return NULL;
8876 __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
8879 __Pyx_RefNannyFinishContext();
8883 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
8884 PyObject *__pyx_r = NULL;
8885 __Pyx_RefNannyDeclarations
8886 PyObject *__pyx_t_1 = NULL;
8887 int __pyx_lineno = 0;
8888 const char *__pyx_filename = NULL;
8889 int __pyx_clineno = 0;
8890 __Pyx_RefNannySetupContext(
"max", 1);
8899 __Pyx_XDECREF(__pyx_r);
8900 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
8901 __Pyx_GOTREF(__pyx_t_1);
8902 __pyx_r = __pyx_t_1;
8916 __Pyx_XDECREF(__pyx_t_1);
8917 __Pyx_AddTraceback(
"PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
8920 __Pyx_XGIVEREF(__pyx_r);
8921 __Pyx_RefNannyFinishContext();
8934 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self,
8935 #
if CYTHON_METH_FASTCALL
8936 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8938 PyObject *__pyx_args, PyObject *__pyx_kwds
8941 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_41hash_fn,
"\n Hash function.\n ");
8942 static PyMethodDef __pyx_mdef_8PyClical_9index_set_42hash_fn = {
"hash_fn", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_42hash_fn, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_41hash_fn};
8943 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self,
8944 #
if CYTHON_METH_FASTCALL
8945 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8947 PyObject *__pyx_args, PyObject *__pyx_kwds
8950 #if !CYTHON_METH_FASTCALL 8951 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8953 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8954 PyObject *__pyx_r = 0;
8955 __Pyx_RefNannyDeclarations
8956 __Pyx_RefNannySetupContext(
"hash_fn (wrapper)", 0);
8957 #if !CYTHON_METH_FASTCALL 8958 #if CYTHON_ASSUME_SAFE_MACROS 8959 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8961 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8964 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8965 if (unlikely(__pyx_nargs > 0)) {
8966 __Pyx_RaiseArgtupleInvalid(
"hash_fn", 1, 0, 0, __pyx_nargs);
return NULL;}
8967 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"hash_fn", 0)))
return NULL;
8968 __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
8971 __Pyx_RefNannyFinishContext();
8975 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
8976 PyObject *__pyx_r = NULL;
8977 __Pyx_RefNannyDeclarations
8978 PyObject *__pyx_t_1 = NULL;
8979 int __pyx_lineno = 0;
8980 const char *__pyx_filename = NULL;
8981 int __pyx_clineno = 0;
8982 __Pyx_RefNannySetupContext(
"hash_fn", 1);
8991 __Pyx_XDECREF(__pyx_r);
8992 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
8993 __Pyx_GOTREF(__pyx_t_1);
8994 __pyx_r = __pyx_t_1;
9008 __Pyx_XDECREF(__pyx_t_1);
9009 __Pyx_AddTraceback(
"PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
9012 __Pyx_XGIVEREF(__pyx_r);
9013 __Pyx_RefNannyFinishContext();
9026 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self,
9027 #
if CYTHON_METH_FASTCALL
9028 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9030 PyObject *__pyx_args, PyObject *__pyx_kwds
9033 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_43sign_of_mult,
"\n Sign of geometric product of two Clifford basis elements.\n\n >>> s = index_set({1,2}); t=index_set({-1}); s.sign_of_mult(t)\n 1\n ");
9034 static PyMethodDef __pyx_mdef_8PyClical_9index_set_44sign_of_mult = {
"sign_of_mult", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_44sign_of_mult, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_43sign_of_mult};
9035 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self,
9036 #
if CYTHON_METH_FASTCALL
9037 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9039 PyObject *__pyx_args, PyObject *__pyx_kwds
9042 PyObject *__pyx_v_rhs = 0;
9043 #if !CYTHON_METH_FASTCALL 9044 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9046 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9047 PyObject* values[1] = {0};
9048 int __pyx_lineno = 0;
9049 const char *__pyx_filename = NULL;
9050 int __pyx_clineno = 0;
9051 PyObject *__pyx_r = 0;
9052 __Pyx_RefNannyDeclarations
9053 __Pyx_RefNannySetupContext(
"sign_of_mult (wrapper)", 0);
9054 #if !CYTHON_METH_FASTCALL 9055 #if CYTHON_ASSUME_SAFE_MACROS 9056 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9058 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9061 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9063 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rhs,0};
9066 switch (__pyx_nargs) {
9067 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9070 default:
goto __pyx_L5_argtuple_error;
9072 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
9073 switch (__pyx_nargs) {
9075 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rhs)) != 0)) {
9076 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
9079 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 366, __pyx_L3_error)
9080 else goto __pyx_L5_argtuple_error;
9082 if (unlikely(kw_args > 0)) {
9083 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9084 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"sign_of_mult") < 0)) __PYX_ERR(0, 366, __pyx_L3_error)
9086 }
else if (unlikely(__pyx_nargs != 1)) {
9087 goto __pyx_L5_argtuple_error;
9089 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9091 __pyx_v_rhs = values[0];
9094 __pyx_L5_argtuple_error:;
9095 __Pyx_RaiseArgtupleInvalid(
"sign_of_mult", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 366, __pyx_L3_error)
9097 goto __pyx_L4_argument_unpacking_done;
9100 Py_ssize_t __pyx_temp;
9101 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9102 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9105 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
9106 __Pyx_RefNannyFinishContext();
9108 __pyx_L4_argument_unpacking_done:;
9109 __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_rhs);
9113 Py_ssize_t __pyx_temp;
9114 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9115 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9118 __Pyx_RefNannyFinishContext();
9122 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
9123 PyObject *__pyx_r = NULL;
9124 __Pyx_RefNannyDeclarations
9126 PyObject *__pyx_t_2 = NULL;
9127 int __pyx_lineno = 0;
9128 const char *__pyx_filename = NULL;
9129 int __pyx_clineno = 0;
9130 __Pyx_RefNannySetupContext(
"sign_of_mult", 1);
9139 __Pyx_XDECREF(__pyx_r);
9140 __pyx_t_1 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error)
9141 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_mult(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
9142 __Pyx_GOTREF(__pyx_t_2);
9143 __pyx_r = __pyx_t_2;
9157 __Pyx_XDECREF(__pyx_t_2);
9158 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
9161 __Pyx_XGIVEREF(__pyx_r);
9162 __Pyx_RefNannyFinishContext();
9175 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self,
9176 #
if CYTHON_METH_FASTCALL
9177 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9179 PyObject *__pyx_args, PyObject *__pyx_kwds
9182 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_45sign_of_square,
"\n Sign of geometric square of a Clifford basis element.\n\n >>> s = index_set({1,2}); s.sign_of_square()\n -1\n ");
9183 static PyMethodDef __pyx_mdef_8PyClical_9index_set_46sign_of_square = {
"sign_of_square", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_46sign_of_square, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_45sign_of_square};
9184 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self,
9185 #
if CYTHON_METH_FASTCALL
9186 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9188 PyObject *__pyx_args, PyObject *__pyx_kwds
9191 #if !CYTHON_METH_FASTCALL 9192 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9194 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9195 PyObject *__pyx_r = 0;
9196 __Pyx_RefNannyDeclarations
9197 __Pyx_RefNannySetupContext(
"sign_of_square (wrapper)", 0);
9198 #if !CYTHON_METH_FASTCALL 9199 #if CYTHON_ASSUME_SAFE_MACROS 9200 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9202 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9205 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9206 if (unlikely(__pyx_nargs > 0)) {
9207 __Pyx_RaiseArgtupleInvalid(
"sign_of_square", 1, 0, 0, __pyx_nargs);
return NULL;}
9208 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"sign_of_square", 0)))
return NULL;
9209 __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
9212 __Pyx_RefNannyFinishContext();
9216 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
9217 PyObject *__pyx_r = NULL;
9218 __Pyx_RefNannyDeclarations
9219 PyObject *__pyx_t_1 = NULL;
9220 int __pyx_lineno = 0;
9221 const char *__pyx_filename = NULL;
9222 int __pyx_clineno = 0;
9223 __Pyx_RefNannySetupContext(
"sign_of_square", 1);
9232 __Pyx_XDECREF(__pyx_r);
9233 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
9234 __Pyx_GOTREF(__pyx_t_1);
9235 __pyx_r = __pyx_t_1;
9249 __Pyx_XDECREF(__pyx_t_1);
9250 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
9253 __Pyx_XGIVEREF(__pyx_r);
9254 __Pyx_RefNannyFinishContext();
9267 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self);
9268 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_47__repr__,
"\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__repr__()\n 'index_set({1,2})'\n >>> repr(index_set({1,2}))\n 'index_set({1,2})'\n ");
9269 #if CYTHON_UPDATE_DESCRIPTOR_DOC 9270 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
9272 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
9273 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9274 PyObject *__pyx_r = 0;
9275 __Pyx_RefNannyDeclarations
9276 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
9277 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
9278 __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
9281 __Pyx_RefNannyFinishContext();
9285 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
9286 PyObject *__pyx_r = NULL;
9287 __Pyx_RefNannyDeclarations
9289 PyObject *__pyx_t_2 = NULL;
9290 int __pyx_lineno = 0;
9291 const char *__pyx_filename = NULL;
9292 int __pyx_clineno = 0;
9293 __Pyx_RefNannySetupContext(
"__repr__", 1);
9302 __Pyx_XDECREF(__pyx_r);
9303 __pyx_t_1 = __pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 393, __pyx_L1_error)
9304 __pyx_t_2 = __Pyx_decode_cpp_string(
index_set_to_repr(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
9305 __Pyx_GOTREF(__pyx_t_2);
9306 __pyx_r = __pyx_t_2;
9320 __Pyx_XDECREF(__pyx_t_2);
9321 __Pyx_AddTraceback(
"PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9324 __Pyx_XGIVEREF(__pyx_r);
9325 __Pyx_RefNannyFinishContext();
9338 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self);
9339 PyDoc_STRVAR(__pyx_doc_8PyClical_9index_set_49__str__,
"\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__str__()\n '{1,2}'\n >>> str(index_set({1,2}))\n '{1,2}'\n ");
9340 #if CYTHON_UPDATE_DESCRIPTOR_DOC 9341 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
9343 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
9344 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9345 PyObject *__pyx_r = 0;
9346 __Pyx_RefNannyDeclarations
9347 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
9348 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
9349 __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
9352 __Pyx_RefNannyFinishContext();
9356 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
9357 PyObject *__pyx_r = NULL;
9358 __Pyx_RefNannyDeclarations
9360 PyObject *__pyx_t_2 = NULL;
9361 int __pyx_lineno = 0;
9362 const char *__pyx_filename = NULL;
9363 int __pyx_clineno = 0;
9364 __Pyx_RefNannySetupContext(
"__str__", 1);
9373 __Pyx_XDECREF(__pyx_r);
9374 __pyx_t_1 = __pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error)
9375 __pyx_t_2 = __Pyx_decode_cpp_string(
index_set_to_str(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
9376 __Pyx_GOTREF(__pyx_t_2);
9377 __pyx_r = __pyx_t_2;
9391 __Pyx_XDECREF(__pyx_t_2);
9392 __Pyx_AddTraceback(
"PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9395 __Pyx_XGIVEREF(__pyx_r);
9396 __Pyx_RefNannyFinishContext();
9407 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self,
9408 #
if CYTHON_METH_FASTCALL
9409 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9411 PyObject *__pyx_args, PyObject *__pyx_kwds
9414 static PyMethodDef __pyx_mdef_8PyClical_9index_set_52__reduce_cython__ = {
"__reduce_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
9415 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self,
9416 #
if CYTHON_METH_FASTCALL
9417 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9419 PyObject *__pyx_args, PyObject *__pyx_kwds
9422 #if !CYTHON_METH_FASTCALL 9423 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9425 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9426 PyObject *__pyx_r = 0;
9427 __Pyx_RefNannyDeclarations
9428 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
9429 #if !CYTHON_METH_FASTCALL 9430 #if CYTHON_ASSUME_SAFE_MACROS 9431 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9433 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9436 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9437 if (unlikely(__pyx_nargs > 0)) {
9438 __Pyx_RaiseArgtupleInvalid(
"__reduce_cython__", 1, 0, 0, __pyx_nargs);
return NULL;}
9439 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"__reduce_cython__", 0)))
return NULL;
9440 __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
9443 __Pyx_RefNannyFinishContext();
9447 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
9448 PyObject *__pyx_r = NULL;
9449 __Pyx_RefNannyDeclarations
9450 int __pyx_lineno = 0;
9451 const char *__pyx_filename = NULL;
9452 int __pyx_clineno = 0;
9453 __Pyx_RefNannySetupContext(
"__reduce_cython__", 1);
9461 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
9462 __PYX_ERR(1, 2, __pyx_L1_error)
9472 __Pyx_AddTraceback(
"PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9474 __Pyx_XGIVEREF(__pyx_r);
9475 __Pyx_RefNannyFinishContext();
9487 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self,
9488 #
if CYTHON_METH_FASTCALL
9489 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9491 PyObject *__pyx_args, PyObject *__pyx_kwds
9494 static PyMethodDef __pyx_mdef_8PyClical_9index_set_54__setstate_cython__ = {
"__setstate_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
9495 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self,
9496 #
if CYTHON_METH_FASTCALL
9497 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9499 PyObject *__pyx_args, PyObject *__pyx_kwds
9502 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
9503 #if !CYTHON_METH_FASTCALL 9504 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9506 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9507 PyObject* values[1] = {0};
9508 int __pyx_lineno = 0;
9509 const char *__pyx_filename = NULL;
9510 int __pyx_clineno = 0;
9511 PyObject *__pyx_r = 0;
9512 __Pyx_RefNannyDeclarations
9513 __Pyx_RefNannySetupContext(
"__setstate_cython__ (wrapper)", 0);
9514 #if !CYTHON_METH_FASTCALL 9515 #if CYTHON_ASSUME_SAFE_MACROS 9516 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9518 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9521 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9523 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
9526 switch (__pyx_nargs) {
9527 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9530 default:
goto __pyx_L5_argtuple_error;
9532 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
9533 switch (__pyx_nargs) {
9535 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
9536 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
9539 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
9540 else goto __pyx_L5_argtuple_error;
9542 if (unlikely(kw_args > 0)) {
9543 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9544 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
9546 }
else if (unlikely(__pyx_nargs != 1)) {
9547 goto __pyx_L5_argtuple_error;
9549 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9551 __pyx_v___pyx_state = values[0];
9554 __pyx_L5_argtuple_error:;
9555 __Pyx_RaiseArgtupleInvalid(
"__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
9557 goto __pyx_L4_argument_unpacking_done;
9560 Py_ssize_t __pyx_temp;
9561 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9562 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9565 __Pyx_AddTraceback(
"PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9566 __Pyx_RefNannyFinishContext();
9568 __pyx_L4_argument_unpacking_done:;
9569 __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v___pyx_state);
9573 Py_ssize_t __pyx_temp;
9574 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9575 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9578 __Pyx_RefNannyFinishContext();
9582 static PyObject *__pyx_pf_8PyClical_9index_set_53__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
9583 PyObject *__pyx_r = NULL;
9584 __Pyx_RefNannyDeclarations
9585 int __pyx_lineno = 0;
9586 const char *__pyx_filename = NULL;
9587 int __pyx_clineno = 0;
9588 __Pyx_RefNannySetupContext(
"__setstate_cython__", 1);
9595 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
9596 __PYX_ERR(1, 4, __pyx_L1_error)
9607 __Pyx_AddTraceback(
"PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9609 __Pyx_XGIVEREF(__pyx_r);
9610 __Pyx_RefNannyFinishContext();
9623 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
9624 PyDoc_STRVAR(__pyx_doc_8PyClical_index_set_hidden_doctests,
"\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print(index_set(1))\n {1}\n >>> print(index_set({1,2}))\n {1,2}\n >>> print(index_set(index_set({1,2})))\n {1,2}\n >>> print(index_set({1,2}))\n {1,2}\n >>> print(index_set({1,2,1}))\n {1,2}\n >>> print(index_set({1,2,1}))\n {1,2}\n >>> print(index_set(\"\"))\n {}\n >>> print(index_set(\"{\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print(index_set(\"{1\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print(index_set(\"{1,2,100}\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print(index_set({1,2,100}))\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid {1, 2, 100}.\n >>> print(index_set([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <class 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> ""index_set({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ");
9625 static PyMethodDef __pyx_mdef_8PyClical_1index_set_hidden_doctests = {
"index_set_hidden_doctests", (PyCFunction)__pyx_pw_8PyClical_1index_set_hidden_doctests, METH_NOARGS, __pyx_doc_8PyClical_index_set_hidden_doctests};
9626 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
9627 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9628 PyObject *__pyx_r = 0;
9629 __Pyx_RefNannyDeclarations
9630 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests (wrapper)", 0);
9631 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
9632 __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
9635 __Pyx_RefNannyFinishContext();
9639 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
9640 PyObject *__pyx_r = NULL;
9641 __Pyx_RefNannyDeclarations
9642 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests", 1);
9651 __Pyx_XDECREF(__pyx_r);
9652 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9665 __Pyx_XGIVEREF(__pyx_r);
9666 __Pyx_RefNannyFinishContext();
9678 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self,
9679 #
if CYTHON_METH_FASTCALL
9680 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9682 PyObject *__pyx_args, PyObject *__pyx_kwds
9685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9686 PyObject *__pyx_r = NULL;
9687 __Pyx_RefNannyDeclarations
9690 PyObject *__pyx_t_3 = NULL;
9691 int __pyx_lineno = 0;
9692 const char *__pyx_filename = NULL;
9693 int __pyx_clineno = 0;
9694 __Pyx_RefNannySetupContext(
"compare", 1);
9703 __Pyx_XDECREF(__pyx_r);
9704 __pyx_t_1 = __pyx_f_8PyClical_toIndexSet(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
9705 __pyx_t_2 = __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
9706 __pyx_t_3 = __Pyx_PyInt_From_int(
compare(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
9707 __Pyx_GOTREF(__pyx_t_3);
9708 __pyx_r = __pyx_t_3;
9722 __Pyx_XDECREF(__pyx_t_3);
9723 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
9726 __Pyx_XGIVEREF(__pyx_r);
9727 __Pyx_RefNannyFinishContext();
9732 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self,
9733 #
if CYTHON_METH_FASTCALL
9734 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9736 PyObject *__pyx_args, PyObject *__pyx_kwds
9739 PyDoc_STRVAR(__pyx_doc_8PyClical_2compare,
"\n \"lexicographic compare\" eg. {3,4,5} is less than {3,7,8};\n -1 if a<b, +1 if a>b, 0 if a==b.\n\n >>> compare(index_set({1,2}),index_set({-1,3}))\n -1\n >>> compare(index_set({-1,4}),index_set({-1,3}))\n 1\n ");
9740 static PyMethodDef __pyx_mdef_8PyClical_3compare = {
"compare", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_3compare, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_2compare};
9741 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self,
9742 #
if CYTHON_METH_FASTCALL
9743 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9745 PyObject *__pyx_args, PyObject *__pyx_kwds
9748 PyObject *__pyx_v_lhs = 0;
9749 PyObject *__pyx_v_rhs = 0;
9750 #if !CYTHON_METH_FASTCALL 9751 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9753 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9754 PyObject* values[2] = {0,0};
9755 int __pyx_lineno = 0;
9756 const char *__pyx_filename = NULL;
9757 int __pyx_clineno = 0;
9758 PyObject *__pyx_r = 0;
9759 __Pyx_RefNannyDeclarations
9760 __Pyx_RefNannySetupContext(
"compare (wrapper)", 0);
9761 #if !CYTHON_METH_FASTCALL 9762 #if CYTHON_ASSUME_SAFE_MACROS 9763 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9765 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9768 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9770 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
9773 switch (__pyx_nargs) {
9774 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
9776 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9779 default:
goto __pyx_L5_argtuple_error;
9781 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
9782 switch (__pyx_nargs) {
9784 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lhs)) != 0)) {
9785 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
9788 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L3_error)
9789 else goto __pyx_L5_argtuple_error;
9792 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rhs)) != 0)) {
9793 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
9796 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L3_error)
9798 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, 1); __PYX_ERR(0, 492, __pyx_L3_error)
9801 if (unlikely(kw_args > 0)) {
9802 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9803 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"compare") < 0)) __PYX_ERR(0, 492, __pyx_L3_error)
9805 }
else if (unlikely(__pyx_nargs != 2)) {
9806 goto __pyx_L5_argtuple_error;
9808 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9809 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
9811 __pyx_v_lhs = values[0];
9812 __pyx_v_rhs = values[1];
9815 __pyx_L5_argtuple_error:;
9816 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 492, __pyx_L3_error)
9818 goto __pyx_L4_argument_unpacking_done;
9821 Py_ssize_t __pyx_temp;
9822 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9823 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9826 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
9827 __Pyx_RefNannyFinishContext();
9829 __pyx_L4_argument_unpacking_done:;
9830 __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
9834 Py_ssize_t __pyx_temp;
9835 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9836 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9839 __Pyx_RefNannyFinishContext();
9843 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9844 PyObject *__pyx_r = NULL;
9845 __Pyx_RefNannyDeclarations
9846 PyObject *__pyx_t_1 = NULL;
9847 int __pyx_lineno = 0;
9848 const char *__pyx_filename = NULL;
9849 int __pyx_clineno = 0;
9850 __Pyx_RefNannySetupContext(
"compare", 1);
9851 __Pyx_XDECREF(__pyx_r);
9852 __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
9853 __Pyx_GOTREF(__pyx_t_1);
9854 __pyx_r = __pyx_t_1;
9860 __Pyx_XDECREF(__pyx_t_1);
9861 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
9864 __Pyx_XGIVEREF(__pyx_r);
9865 __Pyx_RefNannyFinishContext();
9877 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self,
9878 #
if CYTHON_METH_FASTCALL
9879 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9881 PyObject *__pyx_args, PyObject *__pyx_kwds
9884 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9885 PyObject *__pyx_r = NULL;
9886 __Pyx_RefNannyDeclarations
9888 PyObject *__pyx_t_2 = NULL;
9889 int __pyx_lineno = 0;
9890 const char *__pyx_filename = NULL;
9891 int __pyx_clineno = 0;
9892 __Pyx_RefNannySetupContext(
"min_neg", 1);
9901 __Pyx_XDECREF(__pyx_r);
9902 __pyx_t_1 = __pyx_f_8PyClical_toIndexSet(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 511, __pyx_L1_error)
9903 __pyx_t_2 = __Pyx_PyInt_From_int(
min_neg(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
9904 __Pyx_GOTREF(__pyx_t_2);
9905 __pyx_r = __pyx_t_2;
9919 __Pyx_XDECREF(__pyx_t_2);
9920 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
9923 __Pyx_XGIVEREF(__pyx_r);
9924 __Pyx_RefNannyFinishContext();
9929 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self,
9930 #
if CYTHON_METH_FASTCALL
9931 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9933 PyObject *__pyx_args, PyObject *__pyx_kwds
9936 PyDoc_STRVAR(__pyx_doc_8PyClical_4min_neg,
"\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ");
9937 static PyMethodDef __pyx_mdef_8PyClical_5min_neg = {
"min_neg", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_5min_neg, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_4min_neg};
9938 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self,
9939 #
if CYTHON_METH_FASTCALL
9940 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9942 PyObject *__pyx_args, PyObject *__pyx_kwds
9945 PyObject *__pyx_v_obj = 0;
9946 #if !CYTHON_METH_FASTCALL 9947 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9949 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9950 PyObject* values[1] = {0};
9951 int __pyx_lineno = 0;
9952 const char *__pyx_filename = NULL;
9953 int __pyx_clineno = 0;
9954 PyObject *__pyx_r = 0;
9955 __Pyx_RefNannyDeclarations
9956 __Pyx_RefNannySetupContext(
"min_neg (wrapper)", 0);
9957 #if !CYTHON_METH_FASTCALL 9958 #if CYTHON_ASSUME_SAFE_MACROS 9959 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9961 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9964 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9966 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
9969 switch (__pyx_nargs) {
9970 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9973 default:
goto __pyx_L5_argtuple_error;
9975 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
9976 switch (__pyx_nargs) {
9978 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
9979 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
9982 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L3_error)
9983 else goto __pyx_L5_argtuple_error;
9985 if (unlikely(kw_args > 0)) {
9986 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9987 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"min_neg") < 0)) __PYX_ERR(0, 504, __pyx_L3_error)
9989 }
else if (unlikely(__pyx_nargs != 1)) {
9990 goto __pyx_L5_argtuple_error;
9992 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9994 __pyx_v_obj = values[0];
9997 __pyx_L5_argtuple_error:;
9998 __Pyx_RaiseArgtupleInvalid(
"min_neg", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 504, __pyx_L3_error)
10000 goto __pyx_L4_argument_unpacking_done;
10003 Py_ssize_t __pyx_temp;
10004 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
10005 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
10008 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
10009 __Pyx_RefNannyFinishContext();
10011 __pyx_L4_argument_unpacking_done:;
10012 __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, __pyx_v_obj);
10016 Py_ssize_t __pyx_temp;
10017 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
10018 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
10021 __Pyx_RefNannyFinishContext();
10025 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10026 PyObject *__pyx_r = NULL;
10027 __Pyx_RefNannyDeclarations
10028 PyObject *__pyx_t_1 = NULL;
10029 int __pyx_lineno = 0;
10030 const char *__pyx_filename = NULL;
10031 int __pyx_clineno = 0;
10032 __Pyx_RefNannySetupContext(
"min_neg", 1);
10033 __Pyx_XDECREF(__pyx_r);
10034 __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
10035 __Pyx_GOTREF(__pyx_t_1);
10036 __pyx_r = __pyx_t_1;
10042 __Pyx_XDECREF(__pyx_t_1);
10043 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
10046 __Pyx_XGIVEREF(__pyx_r);
10047 __Pyx_RefNannyFinishContext();
10059 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self,
10060 #
if CYTHON_METH_FASTCALL
10061 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10063 PyObject *__pyx_args, PyObject *__pyx_kwds
10066 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10067 PyObject *__pyx_r = NULL;
10068 __Pyx_RefNannyDeclarations
10070 PyObject *__pyx_t_2 = NULL;
10071 int __pyx_lineno = 0;
10072 const char *__pyx_filename = NULL;
10073 int __pyx_clineno = 0;
10074 __Pyx_RefNannySetupContext(
"max_pos", 1);
10083 __Pyx_XDECREF(__pyx_r);
10084 __pyx_t_1 = __pyx_f_8PyClical_toIndexSet(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L1_error)
10085 __pyx_t_2 = __Pyx_PyInt_From_int(
max_pos(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
10086 __Pyx_GOTREF(__pyx_t_2);
10087 __pyx_r = __pyx_t_2;
10101 __Pyx_XDECREF(__pyx_t_2);
10102 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
10105 __Pyx_XGIVEREF(__pyx_r);
10106 __Pyx_RefNannyFinishContext();
10111 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self,
10112 #
if CYTHON_METH_FASTCALL
10113 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10115 PyObject *__pyx_args, PyObject *__pyx_kwds
10118 PyDoc_STRVAR(__pyx_doc_8PyClical_6max_pos,
"\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ");
10119 static PyMethodDef __pyx_mdef_8PyClical_7max_pos = {
"max_pos", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_7max_pos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_6max_pos};
10120 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self,
10121 #
if CYTHON_METH_FASTCALL
10122 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10124 PyObject *__pyx_args, PyObject *__pyx_kwds
10127 PyObject *__pyx_v_obj = 0;
10128 #if !CYTHON_METH_FASTCALL 10129 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
10131 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
10132 PyObject* values[1] = {0};
10133 int __pyx_lineno = 0;
10134 const char *__pyx_filename = NULL;
10135 int __pyx_clineno = 0;
10136 PyObject *__pyx_r = 0;
10137 __Pyx_RefNannyDeclarations
10138 __Pyx_RefNannySetupContext(
"max_pos (wrapper)", 0);
10139 #if !CYTHON_METH_FASTCALL 10140 #if CYTHON_ASSUME_SAFE_MACROS 10141 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
10143 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
10146 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
10148 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
10150 Py_ssize_t kw_args;
10151 switch (__pyx_nargs) {
10152 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
10153 CYTHON_FALLTHROUGH;
10155 default:
goto __pyx_L5_argtuple_error;
10157 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
10158 switch (__pyx_nargs) {
10160 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
10161 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
10164 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L3_error)
10165 else goto __pyx_L5_argtuple_error;
10167 if (unlikely(kw_args > 0)) {
10168 const Py_ssize_t kwd_pos_args = __pyx_nargs;
10169 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"max_pos") < 0)) __PYX_ERR(0, 513, __pyx_L3_error)
10171 }
else if (unlikely(__pyx_nargs != 1)) {
10172 goto __pyx_L5_argtuple_error;
10174 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
10176 __pyx_v_obj = values[0];
10178 goto __pyx_L6_skip;
10179 __pyx_L5_argtuple_error:;
10180 __Pyx_RaiseArgtupleInvalid(
"max_pos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 513, __pyx_L3_error)
10182 goto __pyx_L4_argument_unpacking_done;
10185 Py_ssize_t __pyx_temp;
10186 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
10187 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
10190 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
10191 __Pyx_RefNannyFinishContext();
10193 __pyx_L4_argument_unpacking_done:;
10194 __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, __pyx_v_obj);
10198 Py_ssize_t __pyx_temp;
10199 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
10200 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
10203 __Pyx_RefNannyFinishContext();
10207 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10208 PyObject *__pyx_r = NULL;
10209 __Pyx_RefNannyDeclarations
10210 PyObject *__pyx_t_1 = NULL;
10211 int __pyx_lineno = 0;
10212 const char *__pyx_filename = NULL;
10213 int __pyx_clineno = 0;
10214 __Pyx_RefNannySetupContext(
"max_pos", 1);
10215 __Pyx_XDECREF(__pyx_r);
10216 __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
10217 __Pyx_GOTREF(__pyx_t_1);
10218 __pyx_r = __pyx_t_1;
10224 __Pyx_XDECREF(__pyx_t_1);
10225 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
10228 __Pyx_XGIVEREF(__pyx_r);
10229 __Pyx_RefNannyFinishContext();
10241 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
10242 std::vector<scalar_t> __pyx_v_v;
10243 PyObject *__pyx_v_s = NULL;
10244 std::vector<scalar_t> __pyx_r;
10245 __Pyx_RefNannyDeclarations
10246 PyObject *__pyx_t_1 = NULL;
10247 Py_ssize_t __pyx_t_2;
10248 PyObject *(*__pyx_t_3)(PyObject *);
10249 PyObject *__pyx_t_4 = NULL;
10251 int __pyx_lineno = 0;
10252 const char *__pyx_filename = NULL;
10253 int __pyx_clineno = 0;
10254 __Pyx_RefNannySetupContext(
"list_to_vector", 1);
10263 if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
10264 __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1);
10268 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
10269 __Pyx_GOTREF(__pyx_t_1);
10270 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
10273 if (likely(!__pyx_t_3)) {
10274 if (likely(PyList_CheckExact(__pyx_t_1))) {
10276 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
10277 #if !CYTHON_ASSUME_SAFE_MACROS 10278 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 527, __pyx_L1_error)
10280 if (__pyx_t_2 >= __pyx_temp)
break;
10282 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 10283 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
if (unlikely((0 < 0))) __PYX_ERR(0, 527, __pyx_L1_error)
10285 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++;
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
10286 __Pyx_GOTREF(__pyx_t_4);
10290 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
10291 #if !CYTHON_ASSUME_SAFE_MACROS 10292 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 527, __pyx_L1_error)
10294 if (__pyx_t_2 >= __pyx_temp)
break;
10296 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 10297 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
if (unlikely((0 < 0))) __PYX_ERR(0, 527, __pyx_L1_error)
10299 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++;
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
10300 __Pyx_GOTREF(__pyx_t_4);
10304 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
10305 if (unlikely(!__pyx_t_4)) {
10306 PyObject* exc_type = PyErr_Occurred();
10308 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10309 else __PYX_ERR(0, 527, __pyx_L1_error)
10313 __Pyx_GOTREF(__pyx_t_4);
10315 __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
10325 __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s);
if (unlikely((__pyx_t_5 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L1_error)
10327 __pyx_v_v.push_back(((
scalar_t)__pyx_t_5));
10329 __Pyx_CppExn2PyErr();
10330 __PYX_ERR(0, 528, __pyx_L1_error)
10341 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10350 __pyx_r = __pyx_v_v;
10363 __Pyx_XDECREF(__pyx_t_1);
10364 __Pyx_XDECREF(__pyx_t_4);
10365 __Pyx_AddTraceback(
"PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename);
10366 __Pyx_pretend_to_initialize(&__pyx_r);
10368 __Pyx_XDECREF(__pyx_v_s);
10369 __Pyx_RefNannyFinishContext();
10381 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
10383 __Pyx_RefNannyDeclarations
10384 PyObject *__pyx_t_1 = NULL;
10385 int __pyx_lineno = 0;
10386 const char *__pyx_filename = NULL;
10387 int __pyx_clineno = 0;
10388 __Pyx_RefNannySetupContext(
"toClifford", 1);
10397 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
10398 __Pyx_GOTREF(__pyx_t_1);
10399 __pyx_r = (((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
10400 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10413 __Pyx_XDECREF(__pyx_t_1);
10414 __Pyx_AddTraceback(
"PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
10415 __Pyx_pretend_to_initialize(&__pyx_r);
10417 __Pyx_RefNannyFinishContext();
10429 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other) {
10430 PyObject *__pyx_r = NULL;
10431 __Pyx_RefNannyDeclarations
10432 __Pyx_RefNannySetupContext(
"wrap", 1);
10441 (__pyx_v_self->instance[0]) = __pyx_v_other;
10450 __Pyx_XDECREF(__pyx_r);
10451 __Pyx_INCREF((PyObject *)__pyx_v_self);
10452 __pyx_r = ((PyObject *)__pyx_v_self);
10465 __Pyx_XGIVEREF(__pyx_r);
10466 __Pyx_RefNannyFinishContext();
10478 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10488 __pyx_r = (__pyx_v_self->instance[0]);
10512 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self,
10513 #
if CYTHON_METH_FASTCALL
10514 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10516 PyObject *__pyx_args, PyObject *__pyx_kwds
10519 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch) {
10520 PyObject *__pyx_r = NULL;
10521 __Pyx_RefNannyDeclarations
10522 PyObject *__pyx_t_1 = NULL;
10523 PyObject *__pyx_t_2 = NULL;
10524 PyObject *__pyx_t_3 = NULL;
10525 PyObject *__pyx_t_4 = NULL;
10527 int __pyx_lineno = 0;
10528 const char *__pyx_filename = NULL;
10529 int __pyx_clineno = 0;
10530 __Pyx_RefNannySetupContext(
"copy", 1);
10532 if (unlikely(__pyx_skip_dispatch)) ;
10534 else if (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)))) {
10535 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS 10536 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
10537 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
10538 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
10540 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
10541 __Pyx_GOTREF(__pyx_t_1);
10542 if (!__Pyx_IsSameCFunction(__pyx_t_1, (
void*) __pyx_pw_8PyClical_8clifford_1copy)) {
10543 __Pyx_XDECREF(__pyx_r);
10544 __Pyx_INCREF(__pyx_t_1);
10545 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
10547 #if CYTHON_UNPACK_METHODS 10548 if (unlikely(PyMethod_Check(__pyx_t_3))) {
10549 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
10550 if (likely(__pyx_t_4)) {
10551 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
10552 __Pyx_INCREF(__pyx_t_4);
10553 __Pyx_INCREF(
function);
10554 __Pyx_DECREF_SET(__pyx_t_3,
function);
10560 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
10561 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
10562 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10563 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
10564 __Pyx_GOTREF(__pyx_t_2);
10565 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10567 __pyx_r = __pyx_t_2;
10569 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10572 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS 10573 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
10574 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
10575 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
10576 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
10579 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10580 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS 10592 __Pyx_XDECREF(__pyx_r);
10593 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
10594 __Pyx_GOTREF(__pyx_t_1);
10595 __pyx_r = __pyx_t_1;
10609 __Pyx_XDECREF(__pyx_t_1);
10610 __Pyx_XDECREF(__pyx_t_2);
10611 __Pyx_XDECREF(__pyx_t_3);
10612 __Pyx_XDECREF(__pyx_t_4);
10613 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
10616 __Pyx_XGIVEREF(__pyx_r);
10617 __Pyx_RefNannyFinishContext();
10622 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self,
10623 #
if CYTHON_METH_FASTCALL
10624 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10626 PyObject *__pyx_args, PyObject *__pyx_kwds
10629 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_copy,
"\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print(y)\n {2}\n ");
10630 static PyMethodDef __pyx_mdef_8PyClical_8clifford_1copy = {
"copy", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_1copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_copy};
10631 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self,
10632 #
if CYTHON_METH_FASTCALL
10633 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10635 PyObject *__pyx_args, PyObject *__pyx_kwds
10638 #if !CYTHON_METH_FASTCALL 10639 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
10641 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
10642 PyObject *__pyx_r = 0;
10643 __Pyx_RefNannyDeclarations
10644 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
10645 #if !CYTHON_METH_FASTCALL 10646 #if CYTHON_ASSUME_SAFE_MACROS 10647 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
10649 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
10652 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
10653 if (unlikely(__pyx_nargs > 0)) {
10654 __Pyx_RaiseArgtupleInvalid(
"copy", 1, 0, 0, __pyx_nargs);
return NULL;}
10655 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"copy", 0)))
return NULL;
10656 __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10659 __Pyx_RefNannyFinishContext();
10663 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10664 PyObject *__pyx_r = NULL;
10665 __Pyx_RefNannyDeclarations
10666 PyObject *__pyx_t_1 = NULL;
10667 int __pyx_lineno = 0;
10668 const char *__pyx_filename = NULL;
10669 int __pyx_clineno = 0;
10670 __Pyx_RefNannySetupContext(
"copy", 1);
10671 __Pyx_XDECREF(__pyx_r);
10672 __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
10673 __Pyx_GOTREF(__pyx_t_1);
10674 __pyx_r = __pyx_t_1;
10680 __Pyx_XDECREF(__pyx_t_1);
10681 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
10684 __Pyx_XGIVEREF(__pyx_r);
10685 __Pyx_RefNannyFinishContext();
10698 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
10699 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10700 PyObject *__pyx_v_other = 0;
10701 PyObject *__pyx_v_ixt = 0;
10702 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
10703 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
10704 PyObject* values[2] = {0,0};
10705 int __pyx_lineno = 0;
10706 const char *__pyx_filename = NULL;
10707 int __pyx_clineno = 0;
10709 __Pyx_RefNannyDeclarations
10710 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
10711 #if CYTHON_ASSUME_SAFE_MACROS 10712 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
10714 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return -1;
10716 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10718 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
10719 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_0));
10720 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
10722 Py_ssize_t kw_args;
10723 switch (__pyx_nargs) {
10724 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
10725 CYTHON_FALLTHROUGH;
10726 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
10727 CYTHON_FALLTHROUGH;
10729 default:
goto __pyx_L5_argtuple_error;
10731 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
10732 switch (__pyx_nargs) {
10735 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_other);
10736 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
10737 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L3_error)
10739 CYTHON_FALLTHROUGH;
10742 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ixt);
10743 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
10744 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L3_error)
10747 if (unlikely(kw_args > 0)) {
10748 const Py_ssize_t kwd_pos_args = __pyx_nargs;
10749 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"__cinit__") < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
10752 switch (__pyx_nargs) {
10753 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
10754 CYTHON_FALLTHROUGH;
10755 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
10756 CYTHON_FALLTHROUGH;
10758 default:
goto __pyx_L5_argtuple_error;
10761 __pyx_v_other = values[0];
10762 __pyx_v_ixt = values[1];
10764 goto __pyx_L6_skip;
10765 __pyx_L5_argtuple_error:;
10766 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 565, __pyx_L3_error)
10768 goto __pyx_L4_argument_unpacking_done;
10771 Py_ssize_t __pyx_temp;
10772 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
10773 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
10776 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10777 __Pyx_RefNannyFinishContext();
10779 __pyx_L4_argument_unpacking_done:;
10780 __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
10784 Py_ssize_t __pyx_temp;
10785 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
10786 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
10789 __Pyx_RefNannyFinishContext();
10793 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
10794 PyObject *__pyx_v_error_msg_prefix = NULL;
10795 PyObject *__pyx_v_bother = NULL;
10796 PyObject *__pyx_v_err = NULL;
10798 __Pyx_RefNannyDeclarations
10800 PyObject *__pyx_t_2 = NULL;
10801 PyObject *__pyx_t_3 = NULL;
10802 PyObject *__pyx_t_4 = NULL;
10806 PyObject *__pyx_t_8 = NULL;
10807 PyObject *__pyx_t_9 = NULL;
10809 PyObject *__pyx_t_11 = NULL;
10810 PyObject *__pyx_t_12 = NULL;
10811 PyObject *__pyx_t_13 = NULL;
10812 PyObject *__pyx_t_14 = NULL;
10815 PyObject *__pyx_t_17 = NULL;
10816 PyObject *__pyx_t_18 = NULL;
10817 PyObject *__pyx_t_19 = NULL;
10819 char const *__pyx_t_21;
10820 PyObject *__pyx_t_22 = NULL;
10821 PyObject *__pyx_t_23 = NULL;
10822 PyObject *__pyx_t_24 = NULL;
10823 std::vector<scalar_t> __pyx_t_25;
10824 int __pyx_lineno = 0;
10825 const char *__pyx_filename = NULL;
10826 int __pyx_clineno = 0;
10827 __Pyx_RefNannySetupContext(
"__cinit__", 1);
10836 __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_clifford_objec);
10837 __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_clifford_objec;
10846 __pyx_t_1 = (__pyx_v_ixt == Py_None);
10857 __Pyx_PyThreadState_declare
10858 __Pyx_PyThreadState_assign
10859 __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
10860 __Pyx_XGOTREF(__pyx_t_2);
10861 __Pyx_XGOTREF(__pyx_t_3);
10862 __Pyx_XGOTREF(__pyx_t_4);
10872 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
10882 __pyx_t_5 = __pyx_f_8PyClical_8clifford_unwrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_other));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L4_error)
10884 __pyx_t_6 =
new Clifford(__pyx_t_5);
10886 __Pyx_CppExn2PyErr();
10887 __PYX_ERR(0, 592, __pyx_L4_error)
10889 __pyx_v_self->instance = __pyx_t_6;
10908 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
10918 __pyx_t_7 = __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 594, __pyx_L4_error)
10922 __Pyx_CppExn2PyErr();
10923 __PYX_ERR(0, 594, __pyx_L4_error)
10925 __pyx_v_self->instance = __pyx_t_6;
10944 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_numbers);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L4_error)
10945 __Pyx_GOTREF(__pyx_t_8);
10946 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Real);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L4_error)
10947 __Pyx_GOTREF(__pyx_t_9);
10948 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10949 __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_9);
if (unlikely(__pyx_t_1 == ((
int)-1))) __PYX_ERR(0, 595, __pyx_L4_error)
10950 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10960 __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_other);
if (unlikely((__pyx_t_10 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L4_error)
10964 __Pyx_CppExn2PyErr();
10965 __PYX_ERR(0, 596, __pyx_L4_error)
10967 __pyx_v_self->instance = __pyx_t_6;
10986 __pyx_t_1 = PyUnicode_Check(__pyx_v_other);
10987 if (likely(__pyx_t_1)) {
10997 __Pyx_PyThreadState_declare
10998 __Pyx_PyThreadState_assign
10999 __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
11000 __Pyx_XGOTREF(__pyx_t_11);
11001 __Pyx_XGOTREF(__pyx_t_12);
11002 __Pyx_XGOTREF(__pyx_t_13);
11012 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_encode);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L11_error)
11013 __Pyx_GOTREF(__pyx_t_8);
11016 #if CYTHON_UNPACK_METHODS 11017 if (likely(PyMethod_Check(__pyx_t_8))) {
11018 __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
11019 if (likely(__pyx_t_14)) {
11020 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_8);
11021 __Pyx_INCREF(__pyx_t_14);
11022 __Pyx_INCREF(
function);
11023 __Pyx_DECREF_SET(__pyx_t_8,
function);
11029 PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_kp_u_UTF_8};
11030 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
11031 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
11032 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 599, __pyx_L11_error)
11033 __Pyx_GOTREF(__pyx_t_9);
11034 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11036 __pyx_v_bother = __pyx_t_9;
11046 __pyx_t_16 = __Pyx_PyObject_AsWritableString(__pyx_v_bother);
if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L11_error)
11048 __pyx_t_6 =
new Clifford(((
char *)__pyx_t_16));
11050 __Pyx_CppExn2PyErr();
11051 __PYX_ERR(0, 600, __pyx_L11_error)
11053 __pyx_v_self->instance = __pyx_t_6;
11063 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
11064 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
11065 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
11066 goto __pyx_L16_try_end;
11068 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
11069 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11070 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11079 __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
11081 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11082 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_14) < 0) __PYX_ERR(0, 601, __pyx_L13_except_error)
11083 __Pyx_XGOTREF(__pyx_t_9);
11084 __Pyx_XGOTREF(__pyx_t_8);
11085 __Pyx_XGOTREF(__pyx_t_14);
11094 __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid_string);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
11095 __Pyx_GOTREF(__pyx_t_17);
11096 __pyx_t_18 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L13_except_error)
11097 __Pyx_GOTREF(__pyx_t_18);
11098 __pyx_t_19 = PyNumber_Add(__pyx_t_17, __pyx_t_18);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 602, __pyx_L13_except_error)
11099 __Pyx_GOTREF(__pyx_t_19);
11100 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11101 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
11102 __pyx_t_18 = PyNumber_Add(__pyx_t_19, __pyx_kp_u_);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L13_except_error)
11103 __Pyx_GOTREF(__pyx_t_18);
11104 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
11105 __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_18);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 602, __pyx_L13_except_error)
11106 __Pyx_GOTREF(__pyx_t_19);
11107 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
11108 __Pyx_Raise(__pyx_t_19, 0, 0, 0);
11109 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
11110 __PYX_ERR(0, 602, __pyx_L13_except_error)
11112 goto __pyx_L13_except_error;
11121 __pyx_L13_except_error:;
11122 __Pyx_XGIVEREF(__pyx_t_11);
11123 __Pyx_XGIVEREF(__pyx_t_12);
11124 __Pyx_XGIVEREF(__pyx_t_13);
11125 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
11126 goto __pyx_L4_error;
11127 __pyx_L16_try_end:;
11148 __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 604, __pyx_L4_error)
11149 __Pyx_GOTREF(__pyx_t_14);
11150 __pyx_t_8 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_other)));
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
11151 __Pyx_GOTREF(__pyx_t_8);
11152 __pyx_t_9 = PyNumber_Add(__pyx_t_14, __pyx_t_8);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L4_error)
11153 __Pyx_GOTREF(__pyx_t_9);
11154 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11155 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11156 __pyx_t_8 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_kp_u_);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
11157 __Pyx_GOTREF(__pyx_t_8);
11158 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11159 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L4_error)
11160 __Pyx_GOTREF(__pyx_t_9);
11161 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11162 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
11163 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11164 __PYX_ERR(0, 604, __pyx_L4_error)
11176 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11177 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11178 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11179 goto __pyx_L9_try_end;
11181 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
11182 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
11183 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
11184 __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
11185 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11186 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11195 __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
11197 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11198 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_14) < 0) __PYX_ERR(0, 605, __pyx_L6_except_error)
11199 __Pyx_XGOTREF(__pyx_t_9);
11200 __Pyx_XGOTREF(__pyx_t_8);
11201 __Pyx_XGOTREF(__pyx_t_14);
11202 __Pyx_INCREF(__pyx_t_8);
11203 __pyx_v_err = __pyx_t_8;
11213 __pyx_t_19 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 606, __pyx_L24_error)
11214 __Pyx_GOTREF(__pyx_t_19);
11215 __pyx_t_18 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_other)));
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L24_error)
11216 __Pyx_GOTREF(__pyx_t_18);
11217 __pyx_t_17 = PyNumber_Add(__pyx_t_19, __pyx_t_18);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L24_error)
11218 __Pyx_GOTREF(__pyx_t_17);
11219 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
11220 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
11229 __pyx_t_18 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_17, __pyx_kp_u_value);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L24_error)
11230 __Pyx_GOTREF(__pyx_t_18);
11231 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11232 __pyx_t_17 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L24_error)
11233 __Pyx_GOTREF(__pyx_t_17);
11234 __pyx_t_19 = PyNumber_Add(__pyx_t_18, __pyx_t_17);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 607, __pyx_L24_error)
11235 __Pyx_GOTREF(__pyx_t_19);
11236 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
11237 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11238 __pyx_t_17 = PyNumber_Add(__pyx_t_19, __pyx_kp_u__3);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L24_error)
11239 __Pyx_GOTREF(__pyx_t_17);
11240 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
11249 __pyx_t_19 = PyNumber_Add(__pyx_t_17, __pyx_kp_u__4);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 608, __pyx_L24_error)
11250 __Pyx_GOTREF(__pyx_t_19);
11251 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11252 __pyx_t_17 = __Pyx_PyObject_Str(__pyx_v_err);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 608, __pyx_L24_error)
11253 __Pyx_GOTREF(__pyx_t_17);
11254 __pyx_t_18 = PyNumber_Add(__pyx_t_19, __pyx_t_17);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 608, __pyx_L24_error)
11255 __Pyx_GOTREF(__pyx_t_18);
11256 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
11257 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11266 __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_18);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L24_error)
11267 __Pyx_GOTREF(__pyx_t_17);
11268 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
11269 __Pyx_Raise(__pyx_t_17, 0, 0, 0);
11270 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11271 __PYX_ERR(0, 606, __pyx_L24_error)
11284 __Pyx_PyThreadState_declare
11285 __Pyx_PyThreadState_assign
11286 __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
11287 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
11288 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
11289 __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
11290 if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
11291 if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
11292 __Pyx_XGOTREF(__pyx_t_13);
11293 __Pyx_XGOTREF(__pyx_t_12);
11294 __Pyx_XGOTREF(__pyx_t_11);
11295 __Pyx_XGOTREF(__pyx_t_22);
11296 __Pyx_XGOTREF(__pyx_t_23);
11297 __Pyx_XGOTREF(__pyx_t_24);
11298 __pyx_t_15 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
11300 __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
11302 if (PY_MAJOR_VERSION >= 3) {
11303 __Pyx_XGIVEREF(__pyx_t_22);
11304 __Pyx_XGIVEREF(__pyx_t_23);
11305 __Pyx_XGIVEREF(__pyx_t_24);
11306 __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
11308 __Pyx_XGIVEREF(__pyx_t_13);
11309 __Pyx_XGIVEREF(__pyx_t_12);
11310 __Pyx_XGIVEREF(__pyx_t_11);
11311 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
11312 __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
11313 __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21;
11314 goto __pyx_L6_except_error;
11318 goto __pyx_L6_except_error;
11327 __pyx_L6_except_error:;
11328 __Pyx_XGIVEREF(__pyx_t_2);
11329 __Pyx_XGIVEREF(__pyx_t_3);
11330 __Pyx_XGIVEREF(__pyx_t_4);
11331 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
11332 goto __pyx_L1_error;
11353 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
11354 if (likely(__pyx_t_1)) {
11363 __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_numbers);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 610, __pyx_L1_error)
11364 __Pyx_GOTREF(__pyx_t_14);
11365 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_Real);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
11366 __Pyx_GOTREF(__pyx_t_8);
11367 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11368 __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8);
if (unlikely(__pyx_t_1 == ((
int)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
11369 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11379 __pyx_t_7 = __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
11380 __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_other);
if (unlikely((__pyx_t_10 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
11384 __Pyx_CppExn2PyErr();
11385 __PYX_ERR(0, 611, __pyx_L1_error)
11387 __pyx_v_self->instance = __pyx_t_6;
11406 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_collections);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 612, __pyx_L1_error)
11407 __Pyx_GOTREF(__pyx_t_8);
11408 __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_abc);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 612, __pyx_L1_error)
11409 __Pyx_GOTREF(__pyx_t_14);
11410 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11411 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_Sequence);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 612, __pyx_L1_error)
11412 __Pyx_GOTREF(__pyx_t_8);
11413 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11414 __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8);
if (unlikely(__pyx_t_1 == ((
int)-1))) __PYX_ERR(0, 612, __pyx_L1_error)
11415 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11416 if (likely(__pyx_t_1)) {
11425 __pyx_t_25 = __pyx_f_8PyClical_list_to_vector(__pyx_v_other);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error)
11426 __pyx_t_7 = __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error)
11428 __pyx_t_6 =
new Clifford(__pyx_t_25, __pyx_t_7);
11430 __Pyx_CppExn2PyErr();
11431 __PYX_ERR(0, 613, __pyx_L1_error)
11433 __pyx_v_self->instance = __pyx_t_6;
11453 __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__5);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
11454 __Pyx_GOTREF(__pyx_t_8);
11455 __pyx_t_14 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_other)));
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 615, __pyx_L1_error)
11456 __Pyx_GOTREF(__pyx_t_14);
11457 __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_14);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 615, __pyx_L1_error)
11458 __Pyx_GOTREF(__pyx_t_9);
11459 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11460 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11469 __pyx_t_14 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_kp_u__6);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 616, __pyx_L1_error)
11470 __Pyx_GOTREF(__pyx_t_14);
11471 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11472 __pyx_t_9 = PyObject_Repr(__pyx_v_ixt);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 616, __pyx_L1_error)
11473 __Pyx_GOTREF(__pyx_t_9);
11474 __pyx_t_8 = PyNumber_Add(__pyx_t_14, __pyx_t_9);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
11475 __Pyx_GOTREF(__pyx_t_8);
11476 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11477 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11478 __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_kp_u__7);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 616, __pyx_L1_error)
11479 __Pyx_GOTREF(__pyx_t_9);
11480 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11489 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
11490 __Pyx_GOTREF(__pyx_t_8);
11491 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11492 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
11493 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11494 __PYX_ERR(0, 615, __pyx_L1_error)
11516 __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__5);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
11517 __Pyx_GOTREF(__pyx_t_8);
11518 __pyx_t_9 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_other)));
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 618, __pyx_L1_error)
11519 __Pyx_GOTREF(__pyx_t_9);
11520 __pyx_t_14 = PyNumber_Add(__pyx_t_8, __pyx_t_9);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 618, __pyx_L1_error)
11521 __Pyx_GOTREF(__pyx_t_14);
11522 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11523 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11532 __pyx_t_9 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_14, __pyx_kp_u__6);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L1_error)
11533 __Pyx_GOTREF(__pyx_t_9);
11534 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11535 __pyx_t_14 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_ixt)));
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 619, __pyx_L1_error)
11536 __Pyx_GOTREF(__pyx_t_14);
11537 __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_t_14);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
11538 __Pyx_GOTREF(__pyx_t_8);
11539 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11540 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11541 __pyx_t_14 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_8, __pyx_kp_u__7);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 619, __pyx_L1_error)
11542 __Pyx_GOTREF(__pyx_t_14);
11543 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11552 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_14);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
11553 __Pyx_GOTREF(__pyx_t_8);
11554 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11555 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
11556 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11557 __PYX_ERR(0, 618, __pyx_L1_error)
11573 __Pyx_XDECREF(__pyx_t_8);
11574 __Pyx_XDECREF(__pyx_t_9);
11575 __Pyx_XDECREF(__pyx_t_14);
11576 __Pyx_XDECREF(__pyx_t_17);
11577 __Pyx_XDECREF(__pyx_t_18);
11578 __Pyx_XDECREF(__pyx_t_19);
11579 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11582 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
11583 __Pyx_XDECREF(__pyx_v_bother);
11584 __Pyx_XDECREF(__pyx_v_err);
11585 __Pyx_RefNannyFinishContext();
11598 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self);
11599 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
11600 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
11601 __Pyx_RefNannyDeclarations
11602 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
11603 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11604 __pyx_pf_8PyClical_8clifford_4__dealloc__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11607 __Pyx_RefNannyFinishContext();
11610 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11619 delete __pyx_v_self->instance;
11641 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x);
11642 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_6__contains__,
"\n Not applicable.\n\n >>> x=clifford(index_set({-3,4,7})); -3 in x\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ");
11643 #if CYTHON_UPDATE_DESCRIPTOR_DOC 11644 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
11646 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
11647 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
11649 __Pyx_RefNannyDeclarations
11650 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
11651 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11652 __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
11655 __Pyx_RefNannyFinishContext();
11659 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
11661 __Pyx_RefNannyDeclarations
11662 PyObject *__pyx_t_1 = NULL;
11663 int __pyx_lineno = 0;
11664 const char *__pyx_filename = NULL;
11665 int __pyx_clineno = 0;
11666 __Pyx_RefNannySetupContext(
"__contains__", 1);
11675 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
11676 __Pyx_GOTREF(__pyx_t_1);
11677 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11678 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11679 __PYX_ERR(0, 636, __pyx_L1_error)
11691 __Pyx_XDECREF(__pyx_t_1);
11692 __Pyx_AddTraceback(
"PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11694 __Pyx_RefNannyFinishContext();
11707 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self);
11708 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_8__iter__,
"\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})):print(a, end=\",\")\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ");
11709 #if CYTHON_UPDATE_DESCRIPTOR_DOC 11710 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
11712 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
11713 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
11714 PyObject *__pyx_r = 0;
11715 __Pyx_RefNannyDeclarations
11716 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
11717 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11718 __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11721 __Pyx_RefNannyFinishContext();
11725 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11726 PyObject *__pyx_r = NULL;
11727 __Pyx_RefNannyDeclarations
11728 PyObject *__pyx_t_1 = NULL;
11729 int __pyx_lineno = 0;
11730 const char *__pyx_filename = NULL;
11731 int __pyx_clineno = 0;
11732 __Pyx_RefNannySetupContext(
"__iter__", 1);
11741 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
11742 __Pyx_GOTREF(__pyx_t_1);
11743 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11744 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11745 __PYX_ERR(0, 647, __pyx_L1_error)
11757 __Pyx_XDECREF(__pyx_t_1);
11758 __Pyx_AddTraceback(
"PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11760 __Pyx_XGIVEREF(__pyx_r);
11761 __Pyx_RefNannyFinishContext();
11774 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self,
11775 #
if CYTHON_METH_FASTCALL
11776 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11778 PyObject *__pyx_args, PyObject *__pyx_kwds
11781 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_10reframe,
"\n Put self into a larger frame, containing the union of self.frame() and index set ixt.\n This can be used to make multiplication faster, by multiplying within a common frame.\n\n >>> clifford(\"2+3{1}\").reframe(index_set({1,2,3}))\n clifford(\"2+3{1}\")\n >>> s=index_set({1,2,3});t=index_set({-3,-2,-1});x=random_clifford(s); x.reframe(t).frame() == (s|t);\n True\n ");
11782 static PyMethodDef __pyx_mdef_8PyClical_8clifford_11reframe = {
"reframe", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_11reframe, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_10reframe};
11783 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self,
11784 #
if CYTHON_METH_FASTCALL
11785 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11787 PyObject *__pyx_args, PyObject *__pyx_kwds
11790 PyObject *__pyx_v_ixt = 0;
11791 #if !CYTHON_METH_FASTCALL 11792 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11794 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
11795 PyObject* values[1] = {0};
11796 int __pyx_lineno = 0;
11797 const char *__pyx_filename = NULL;
11798 int __pyx_clineno = 0;
11799 PyObject *__pyx_r = 0;
11800 __Pyx_RefNannyDeclarations
11801 __Pyx_RefNannySetupContext(
"reframe (wrapper)", 0);
11802 #if !CYTHON_METH_FASTCALL 11803 #if CYTHON_ASSUME_SAFE_MACROS 11804 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11806 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
11809 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11811 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,0};
11813 Py_ssize_t kw_args;
11814 switch (__pyx_nargs) {
11815 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
11816 CYTHON_FALLTHROUGH;
11818 default:
goto __pyx_L5_argtuple_error;
11820 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
11821 switch (__pyx_nargs) {
11823 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ixt)) != 0)) {
11824 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
11827 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L3_error)
11828 else goto __pyx_L5_argtuple_error;
11830 if (unlikely(kw_args > 0)) {
11831 const Py_ssize_t kwd_pos_args = __pyx_nargs;
11832 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"reframe") < 0)) __PYX_ERR(0, 649, __pyx_L3_error)
11834 }
else if (unlikely(__pyx_nargs != 1)) {
11835 goto __pyx_L5_argtuple_error;
11837 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
11839 __pyx_v_ixt = values[0];
11841 goto __pyx_L6_skip;
11842 __pyx_L5_argtuple_error:;
11843 __Pyx_RaiseArgtupleInvalid(
"reframe", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 649, __pyx_L3_error)
11845 goto __pyx_L4_argument_unpacking_done;
11848 Py_ssize_t __pyx_temp;
11849 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
11850 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
11853 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
11854 __Pyx_RefNannyFinishContext();
11856 __pyx_L4_argument_unpacking_done:;
11857 __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_ixt);
11861 Py_ssize_t __pyx_temp;
11862 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
11863 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
11866 __Pyx_RefNannyFinishContext();
11870 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
11871 PyObject *__pyx_v_error_msg_prefix = NULL;
11872 struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
11873 PyObject *__pyx_v_err = NULL;
11874 PyObject *__pyx_r = NULL;
11875 __Pyx_RefNannyDeclarations
11877 PyObject *__pyx_t_2 = NULL;
11878 PyObject *__pyx_t_3 = NULL;
11879 PyObject *__pyx_t_4 = NULL;
11880 PyObject *__pyx_t_5 = NULL;
11885 PyObject *__pyx_t_10 = NULL;
11886 PyObject *__pyx_t_11 = NULL;
11887 PyObject *__pyx_t_12 = NULL;
11888 PyObject *__pyx_t_13 = NULL;
11889 PyObject *__pyx_t_14 = NULL;
11891 char const *__pyx_t_16;
11892 PyObject *__pyx_t_17 = NULL;
11893 PyObject *__pyx_t_18 = NULL;
11894 PyObject *__pyx_t_19 = NULL;
11895 PyObject *__pyx_t_20 = NULL;
11896 PyObject *__pyx_t_21 = NULL;
11897 PyObject *__pyx_t_22 = NULL;
11898 int __pyx_lineno = 0;
11899 const char *__pyx_filename = NULL;
11900 int __pyx_clineno = 0;
11901 __Pyx_RefNannySetupContext(
"reframe", 1);
11910 __Pyx_INCREF(__pyx_kp_u_Cannot_reframe);
11911 __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_reframe;
11920 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
11921 if (likely(__pyx_t_1)) {
11931 __Pyx_PyThreadState_declare
11932 __Pyx_PyThreadState_assign
11933 __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
11934 __Pyx_XGOTREF(__pyx_t_2);
11935 __Pyx_XGOTREF(__pyx_t_3);
11936 __Pyx_XGOTREF(__pyx_t_4);
11946 __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 662, __pyx_L4_error)
11947 __Pyx_GOTREF(__pyx_t_5);
11948 __pyx_v_result = ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_5);
11958 __pyx_t_6 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L4_error)
11959 __pyx_t_7 = __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L4_error)
11961 __pyx_t_8 =
new Clifford(__pyx_t_6, __pyx_t_7);
11963 __Pyx_CppExn2PyErr();
11964 __PYX_ERR(0, 663, __pyx_L4_error)
11966 __pyx_v_result->instance = __pyx_t_8;
11976 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11977 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11978 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11979 goto __pyx_L9_try_end;
11981 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11990 __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
11992 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
11993 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 664, __pyx_L6_except_error)
11994 __Pyx_XGOTREF(__pyx_t_5);
11995 __Pyx_XGOTREF(__pyx_t_10);
11996 __Pyx_XGOTREF(__pyx_t_11);
11997 __Pyx_INCREF(__pyx_t_10);
11998 __pyx_v_err = __pyx_t_10;
12008 __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_from);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L15_error)
12009 __Pyx_GOTREF(__pyx_t_12);
12010 __pyx_t_13 = __Pyx_PyObject_Str(((PyObject *)__pyx_v_self));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
12011 __Pyx_GOTREF(__pyx_t_13);
12012 __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_13);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 665, __pyx_L15_error)
12013 __Pyx_GOTREF(__pyx_t_14);
12014 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12015 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
12016 __pyx_t_13 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_14, __pyx_kp_u_to_frame);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
12017 __Pyx_GOTREF(__pyx_t_13);
12018 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
12027 __pyx_t_14 = __Pyx_PyObject_Str(__pyx_v_ixt);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 666, __pyx_L15_error)
12028 __Pyx_GOTREF(__pyx_t_14);
12029 __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_t_14);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L15_error)
12030 __Pyx_GOTREF(__pyx_t_12);
12031 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
12032 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
12033 __pyx_t_14 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_12, __pyx_kp_u__3);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 666, __pyx_L15_error)
12034 __Pyx_GOTREF(__pyx_t_14);
12035 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12044 __pyx_t_12 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_14, __pyx_kp_u__4);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L15_error)
12045 __Pyx_GOTREF(__pyx_t_12);
12046 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
12047 __pyx_t_14 = __Pyx_PyObject_Str(__pyx_v_err);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 667, __pyx_L15_error)
12048 __Pyx_GOTREF(__pyx_t_14);
12049 __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_t_14);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 667, __pyx_L15_error)
12050 __Pyx_GOTREF(__pyx_t_13);
12051 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12052 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
12061 __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 665, __pyx_L15_error)
12062 __Pyx_GOTREF(__pyx_t_14);
12063 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
12064 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
12065 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
12066 __PYX_ERR(0, 665, __pyx_L15_error)
12079 __Pyx_PyThreadState_declare
12080 __Pyx_PyThreadState_assign
12081 __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
12082 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
12083 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
12084 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
12085 if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
12086 if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
12087 __Pyx_XGOTREF(__pyx_t_17);
12088 __Pyx_XGOTREF(__pyx_t_18);
12089 __Pyx_XGOTREF(__pyx_t_19);
12090 __Pyx_XGOTREF(__pyx_t_20);
12091 __Pyx_XGOTREF(__pyx_t_21);
12092 __Pyx_XGOTREF(__pyx_t_22);
12093 __pyx_t_9 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
12095 __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
12097 if (PY_MAJOR_VERSION >= 3) {
12098 __Pyx_XGIVEREF(__pyx_t_20);
12099 __Pyx_XGIVEREF(__pyx_t_21);
12100 __Pyx_XGIVEREF(__pyx_t_22);
12101 __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
12103 __Pyx_XGIVEREF(__pyx_t_17);
12104 __Pyx_XGIVEREF(__pyx_t_18);
12105 __Pyx_XGIVEREF(__pyx_t_19);
12106 __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
12107 __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
12108 __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
12109 goto __pyx_L6_except_error;
12113 goto __pyx_L6_except_error;
12122 __pyx_L6_except_error:;
12123 __Pyx_XGIVEREF(__pyx_t_2);
12124 __Pyx_XGIVEREF(__pyx_t_3);
12125 __Pyx_XGIVEREF(__pyx_t_4);
12126 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
12127 goto __pyx_L1_error;
12149 __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_using);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 669, __pyx_L1_error)
12150 __Pyx_GOTREF(__pyx_t_11);
12151 __pyx_t_10 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_ixt)));
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 669, __pyx_L1_error)
12152 __Pyx_GOTREF(__pyx_t_10);
12153 __pyx_t_5 = PyNumber_Add(__pyx_t_11, __pyx_t_10);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
12154 __Pyx_GOTREF(__pyx_t_5);
12155 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12156 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12157 __pyx_t_10 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_5, __pyx_kp_u__7);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 669, __pyx_L1_error)
12158 __Pyx_GOTREF(__pyx_t_10);
12159 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12160 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
12161 __Pyx_GOTREF(__pyx_t_5);
12162 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12163 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
12164 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12165 __PYX_ERR(0, 669, __pyx_L1_error)
12176 __Pyx_XDECREF(__pyx_r);
12177 __Pyx_INCREF((PyObject *)__pyx_v_result);
12178 __pyx_r = ((PyObject *)__pyx_v_result);
12191 __Pyx_XDECREF(__pyx_t_5);
12192 __Pyx_XDECREF(__pyx_t_10);
12193 __Pyx_XDECREF(__pyx_t_11);
12194 __Pyx_XDECREF(__pyx_t_12);
12195 __Pyx_XDECREF(__pyx_t_13);
12196 __Pyx_XDECREF(__pyx_t_14);
12197 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
12200 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
12201 __Pyx_XDECREF((PyObject *)__pyx_v_result);
12202 __Pyx_XDECREF(__pyx_v_err);
12203 __Pyx_XGIVEREF(__pyx_r);
12204 __Pyx_RefNannyFinishContext();
12217 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
12218 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
12219 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12220 PyObject *__pyx_r = 0;
12221 __Pyx_RefNannyDeclarations
12222 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
12223 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12224 __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
12227 __Pyx_RefNannyFinishContext();
12231 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
12232 PyObject *__pyx_r = NULL;
12233 __Pyx_RefNannyDeclarations
12236 PyObject *__pyx_t_3 = NULL;
12239 PyObject *__pyx_t_6 = NULL;
12240 PyObject *__pyx_t_7 = NULL;
12241 int __pyx_lineno = 0;
12242 const char *__pyx_filename = NULL;
12243 int __pyx_clineno = 0;
12244 __Pyx_RefNannySetupContext(
"__richcmp__", 1);
12253 __pyx_t_1 = (__pyx_v_op == 2);
12263 __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
12266 __pyx_t_1 = __pyx_t_2;
12267 goto __pyx_L5_bool_binop_done;
12269 __pyx_t_2 = (__pyx_v_rhs == Py_None);
12270 __pyx_t_1 = __pyx_t_2;
12271 __pyx_L5_bool_binop_done:;
12281 __Pyx_XDECREF(__pyx_r);
12282 __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
12283 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error)
12284 __Pyx_GOTREF(__pyx_t_3);
12285 __pyx_r = __pyx_t_3;
12306 __Pyx_XDECREF(__pyx_r);
12307 __pyx_t_4 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L1_error)
12308 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L1_error)
12309 __pyx_t_1 = (__pyx_t_4 == __pyx_t_5);
12310 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error)
12311 __Pyx_GOTREF(__pyx_t_3);
12312 __pyx_r = __pyx_t_3;
12333 __pyx_t_1 = (__pyx_v_op == 3);
12343 __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
12346 __pyx_t_1 = __pyx_t_2;
12347 goto __pyx_L8_bool_binop_done;
12349 __pyx_t_2 = (__pyx_v_rhs == Py_None);
12350 __pyx_t_1 = __pyx_t_2;
12351 __pyx_L8_bool_binop_done:;
12361 __Pyx_XDECREF(__pyx_r);
12362 __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
12363 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!(!__pyx_t_1))));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
12364 __Pyx_GOTREF(__pyx_t_3);
12365 __pyx_r = __pyx_t_3;
12386 __Pyx_XDECREF(__pyx_r);
12387 __pyx_t_5 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error)
12388 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error)
12389 __pyx_t_1 = (__pyx_t_5 != __pyx_t_4);
12390 __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error)
12391 __Pyx_GOTREF(__pyx_t_3);
12392 __pyx_r = __pyx_t_3;
12413 __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
12416 __pyx_t_1 = __pyx_t_2;
12417 goto __pyx_L10_bool_binop_done;
12419 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
12420 __pyx_t_1 = __pyx_t_2;
12421 __pyx_L10_bool_binop_done:;
12422 if (unlikely(__pyx_t_1)) {
12431 __pyx_t_3 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_lhs))));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error)
12432 __Pyx_GOTREF(__pyx_t_3);
12433 __pyx_t_6 = PyNumber_Add(__pyx_kp_u_This_comparison_operator_is_not, __pyx_t_3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
12434 __Pyx_GOTREF(__pyx_t_6);
12435 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12436 __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_6, __pyx_kp_u__6);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error)
12437 __Pyx_GOTREF(__pyx_t_3);
12438 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12439 __pyx_t_6 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_rhs)));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
12440 __Pyx_GOTREF(__pyx_t_6);
12441 __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_t_6);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L1_error)
12442 __Pyx_GOTREF(__pyx_t_7);
12443 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12444 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12445 __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_7, __pyx_kp_u_);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
12446 __Pyx_GOTREF(__pyx_t_6);
12447 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12456 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 702, __pyx_L1_error)
12457 __Pyx_GOTREF(__pyx_t_7);
12458 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12459 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
12460 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12461 __PYX_ERR(0, 702, __pyx_L1_error)
12480 __Pyx_XDECREF(__pyx_r);
12481 __Pyx_INCREF(__pyx_builtin_NotImplemented);
12482 __pyx_r = __pyx_builtin_NotImplemented;
12496 __Pyx_XDECREF(__pyx_t_3);
12497 __Pyx_XDECREF(__pyx_t_6);
12498 __Pyx_XDECREF(__pyx_t_7);
12499 __Pyx_AddTraceback(
"PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12502 __Pyx_XGIVEREF(__pyx_r);
12503 __Pyx_RefNannyFinishContext();
12516 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
12517 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_14__getitem__,
"\n Subscripting: map from index set to scalar coordinate.\n\n >>> clifford(\"{1}\")[index_set(1)]\n 1.0\n >>> clifford(\"{1}\")[index_set({1})]\n 1.0\n >>> clifford(\"{1}\")[index_set({1,2})]\n 0.0\n >>> clifford(\"2{1,2}\")[index_set({1,2})]\n 2.0\n ");
12518 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12519 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
12521 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
12522 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12523 PyObject *__pyx_r = 0;
12524 __Pyx_RefNannyDeclarations
12525 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
12526 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12527 __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
12530 __Pyx_RefNannyFinishContext();
12534 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
12535 PyObject *__pyx_r = NULL;
12536 __Pyx_RefNannyDeclarations
12538 PyObject *__pyx_t_2 = NULL;
12539 int __pyx_lineno = 0;
12540 const char *__pyx_filename = NULL;
12541 int __pyx_clineno = 0;
12542 __Pyx_RefNannySetupContext(
"__getitem__", 1);
12551 __Pyx_XDECREF(__pyx_r);
12552 __pyx_t_1 = __pyx_f_8PyClical_toIndexSet(__pyx_v_ixt);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error)
12553 __pyx_t_2 =
PyFloat_FromDouble(__pyx_v_self->instance->operator[](__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
12554 __Pyx_GOTREF(__pyx_t_2);
12555 __pyx_r = __pyx_t_2;
12569 __Pyx_XDECREF(__pyx_t_2);
12570 __Pyx_AddTraceback(
"PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12573 __Pyx_XGIVEREF(__pyx_r);
12574 __Pyx_RefNannyFinishContext();
12587 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self);
12588 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_16__neg__,
"\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ");
12589 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12590 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
12592 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
12593 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12594 PyObject *__pyx_r = 0;
12595 __Pyx_RefNannyDeclarations
12596 __Pyx_RefNannySetupContext(
"__neg__ (wrapper)", 0);
12597 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12598 __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
12601 __Pyx_RefNannyFinishContext();
12605 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
12606 PyObject *__pyx_r = NULL;
12607 __Pyx_RefNannyDeclarations
12608 PyObject *__pyx_t_1 = NULL;
12609 PyObject *__pyx_t_2 = NULL;
12610 int __pyx_lineno = 0;
12611 const char *__pyx_filename = NULL;
12612 int __pyx_clineno = 0;
12613 __Pyx_RefNannySetupContext(
"__neg__", 1);
12622 __Pyx_XDECREF(__pyx_r);
12623 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
12624 __Pyx_GOTREF(__pyx_t_1);
12625 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->operator-());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
12626 __Pyx_GOTREF(__pyx_t_2);
12627 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12628 __pyx_r = __pyx_t_2;
12642 __Pyx_XDECREF(__pyx_t_1);
12643 __Pyx_XDECREF(__pyx_t_2);
12644 __Pyx_AddTraceback(
"PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12647 __Pyx_XGIVEREF(__pyx_r);
12648 __Pyx_RefNannyFinishContext();
12661 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self);
12662 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_18__pos__,
"\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ");
12663 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12664 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
12666 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
12667 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12668 PyObject *__pyx_r = 0;
12669 __Pyx_RefNannyDeclarations
12670 __Pyx_RefNannySetupContext(
"__pos__ (wrapper)", 0);
12671 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12672 __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
12675 __Pyx_RefNannyFinishContext();
12679 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
12680 PyObject *__pyx_r = NULL;
12681 __Pyx_RefNannyDeclarations
12682 PyObject *__pyx_t_1 = NULL;
12683 int __pyx_lineno = 0;
12684 const char *__pyx_filename = NULL;
12685 int __pyx_clineno = 0;
12686 __Pyx_RefNannySetupContext(
"__pos__", 1);
12695 __Pyx_XDECREF(__pyx_r);
12696 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
12697 __Pyx_GOTREF(__pyx_t_1);
12698 __pyx_r = __pyx_t_1;
12712 __Pyx_XDECREF(__pyx_t_1);
12713 __Pyx_AddTraceback(
"PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12716 __Pyx_XGIVEREF(__pyx_r);
12717 __Pyx_RefNannyFinishContext();
12730 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
12731 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_20__add__,
"\n Geometric sum.\n\n >>> print(clifford(1) + clifford(\"{2}\"))\n 1+{2}\n >>> print(clifford(\"{1}\") + clifford(\"{2}\"))\n {1}+{2}\n ");
12732 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12733 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
12735 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
12736 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12737 PyObject *__pyx_r = 0;
12738 __Pyx_RefNannyDeclarations
12739 __Pyx_RefNannySetupContext(
"__add__ (wrapper)", 0);
12740 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12741 __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
12744 __Pyx_RefNannyFinishContext();
12748 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
12749 PyObject *__pyx_r = NULL;
12750 __Pyx_RefNannyDeclarations
12751 PyObject *__pyx_t_1 = NULL;
12754 PyObject *__pyx_t_4 = NULL;
12755 int __pyx_lineno = 0;
12756 const char *__pyx_filename = NULL;
12757 int __pyx_clineno = 0;
12758 __Pyx_RefNannySetupContext(
"__add__", 1);
12767 __Pyx_XDECREF(__pyx_r);
12768 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
12769 __Pyx_GOTREF(__pyx_t_1);
12770 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
12771 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
12772 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 + __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
12773 __Pyx_GOTREF(__pyx_t_4);
12774 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12775 __pyx_r = __pyx_t_4;
12789 __Pyx_XDECREF(__pyx_t_1);
12790 __Pyx_XDECREF(__pyx_t_4);
12791 __Pyx_AddTraceback(
"PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12794 __Pyx_XGIVEREF(__pyx_r);
12795 __Pyx_RefNannyFinishContext();
12808 static PyObject *__pyx_pw_8PyClical_8clifford_23__radd__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
12809 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_22__radd__,
"\n Geometric sum.\n\n >>> print(1 + clifford(\"{2}\"))\n 1+{2}\n ");
12810 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12811 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__radd__;
12813 static PyObject *__pyx_pw_8PyClical_8clifford_23__radd__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
12814 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12815 PyObject *__pyx_r = 0;
12816 __Pyx_RefNannyDeclarations
12817 __Pyx_RefNannySetupContext(
"__radd__ (wrapper)", 0);
12818 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12819 __pyx_r = __pyx_pf_8PyClical_8clifford_22__radd__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
12822 __Pyx_RefNannyFinishContext();
12826 static PyObject *__pyx_pf_8PyClical_8clifford_22__radd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
12827 PyObject *__pyx_r = NULL;
12828 __Pyx_RefNannyDeclarations
12829 PyObject *__pyx_t_1 = NULL;
12832 PyObject *__pyx_t_4 = NULL;
12833 int __pyx_lineno = 0;
12834 const char *__pyx_filename = NULL;
12835 int __pyx_clineno = 0;
12836 __Pyx_RefNannySetupContext(
"__radd__", 1);
12845 __Pyx_XDECREF(__pyx_r);
12846 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
12847 __Pyx_GOTREF(__pyx_t_1);
12848 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 758, __pyx_L1_error)
12849 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 758, __pyx_L1_error)
12850 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 + __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error)
12851 __Pyx_GOTREF(__pyx_t_4);
12852 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12853 __pyx_r = __pyx_t_4;
12867 __Pyx_XDECREF(__pyx_t_1);
12868 __Pyx_XDECREF(__pyx_t_4);
12869 __Pyx_AddTraceback(
"PyClical.clifford.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12872 __Pyx_XGIVEREF(__pyx_r);
12873 __Pyx_RefNannyFinishContext();
12886 static PyObject *__pyx_pw_8PyClical_8clifford_25__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
12887 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_24__iadd__,
"\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print(x)\n 1+{2}\n ");
12888 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12889 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__iadd__;
12891 static PyObject *__pyx_pw_8PyClical_8clifford_25__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
12892 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12893 PyObject *__pyx_r = 0;
12894 __Pyx_RefNannyDeclarations
12895 __Pyx_RefNannySetupContext(
"__iadd__ (wrapper)", 0);
12896 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12897 __pyx_r = __pyx_pf_8PyClical_8clifford_24__iadd__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
12900 __Pyx_RefNannyFinishContext();
12904 static PyObject *__pyx_pf_8PyClical_8clifford_24__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
12905 PyObject *__pyx_r = NULL;
12906 __Pyx_RefNannyDeclarations
12909 PyObject *__pyx_t_3 = NULL;
12910 int __pyx_lineno = 0;
12911 const char *__pyx_filename = NULL;
12912 int __pyx_clineno = 0;
12913 __Pyx_RefNannySetupContext(
"__iadd__", 1);
12922 __Pyx_XDECREF(__pyx_r);
12923 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error)
12924 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error)
12925 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 + __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
12926 __Pyx_GOTREF(__pyx_t_3);
12927 __pyx_r = __pyx_t_3;
12941 __Pyx_XDECREF(__pyx_t_3);
12942 __Pyx_AddTraceback(
"PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12945 __Pyx_XGIVEREF(__pyx_r);
12946 __Pyx_RefNannyFinishContext();
12959 static PyObject *__pyx_pw_8PyClical_8clifford_27__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
12960 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_26__sub__,
"\n Geometric difference.\n\n >>> print(clifford(1) - clifford(\"{2}\"))\n 1-{2}\n >>> print(clifford(\"{1}\") - clifford(\"{2}\"))\n {1}-{2}\n ");
12961 #if CYTHON_UPDATE_DESCRIPTOR_DOC 12962 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__sub__;
12964 static PyObject *__pyx_pw_8PyClical_8clifford_27__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
12965 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
12966 PyObject *__pyx_r = 0;
12967 __Pyx_RefNannyDeclarations
12968 __Pyx_RefNannySetupContext(
"__sub__ (wrapper)", 0);
12969 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
12970 __pyx_r = __pyx_pf_8PyClical_8clifford_26__sub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
12973 __Pyx_RefNannyFinishContext();
12977 static PyObject *__pyx_pf_8PyClical_8clifford_26__sub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
12978 PyObject *__pyx_r = NULL;
12979 __Pyx_RefNannyDeclarations
12980 PyObject *__pyx_t_1 = NULL;
12983 PyObject *__pyx_t_4 = NULL;
12984 int __pyx_lineno = 0;
12985 const char *__pyx_filename = NULL;
12986 int __pyx_clineno = 0;
12987 __Pyx_RefNannySetupContext(
"__sub__", 1);
12996 __Pyx_XDECREF(__pyx_r);
12997 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
12998 __Pyx_GOTREF(__pyx_t_1);
12999 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error)
13000 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error)
13001 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 - __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __pyx_L1_error)
13002 __Pyx_GOTREF(__pyx_t_4);
13003 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13004 __pyx_r = __pyx_t_4;
13018 __Pyx_XDECREF(__pyx_t_1);
13019 __Pyx_XDECREF(__pyx_t_4);
13020 __Pyx_AddTraceback(
"PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13023 __Pyx_XGIVEREF(__pyx_r);
13024 __Pyx_RefNannyFinishContext();
13037 static PyObject *__pyx_pw_8PyClical_8clifford_29__rsub__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
13038 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_28__rsub__,
"\n Geometric difference.\n\n >>> print(1 - clifford(\"{2}\"))\n 1-{2}\n ");
13039 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13040 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__rsub__;
13042 static PyObject *__pyx_pw_8PyClical_8clifford_29__rsub__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13043 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13044 PyObject *__pyx_r = 0;
13045 __Pyx_RefNannyDeclarations
13046 __Pyx_RefNannySetupContext(
"__rsub__ (wrapper)", 0);
13047 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13048 __pyx_r = __pyx_pf_8PyClical_8clifford_28__rsub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
13051 __Pyx_RefNannyFinishContext();
13055 static PyObject *__pyx_pf_8PyClical_8clifford_28__rsub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13056 PyObject *__pyx_r = NULL;
13057 __Pyx_RefNannyDeclarations
13058 PyObject *__pyx_t_1 = NULL;
13061 PyObject *__pyx_t_4 = NULL;
13062 int __pyx_lineno = 0;
13063 const char *__pyx_filename = NULL;
13064 int __pyx_clineno = 0;
13065 __Pyx_RefNannySetupContext(
"__rsub__", 1);
13074 __Pyx_XDECREF(__pyx_r);
13075 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
13076 __Pyx_GOTREF(__pyx_t_1);
13077 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 787, __pyx_L1_error)
13078 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 787, __pyx_L1_error)
13079 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 - __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
13080 __Pyx_GOTREF(__pyx_t_4);
13081 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13082 __pyx_r = __pyx_t_4;
13096 __Pyx_XDECREF(__pyx_t_1);
13097 __Pyx_XDECREF(__pyx_t_4);
13098 __Pyx_AddTraceback(
"PyClical.clifford.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13101 __Pyx_XGIVEREF(__pyx_r);
13102 __Pyx_RefNannyFinishContext();
13115 static PyObject *__pyx_pw_8PyClical_8clifford_31__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
13116 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_30__isub__,
"\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print(x)\n 1-{2}\n ");
13117 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13118 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__isub__;
13120 static PyObject *__pyx_pw_8PyClical_8clifford_31__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
13121 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13122 PyObject *__pyx_r = 0;
13123 __Pyx_RefNannyDeclarations
13124 __Pyx_RefNannySetupContext(
"__isub__ (wrapper)", 0);
13125 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13126 __pyx_r = __pyx_pf_8PyClical_8clifford_30__isub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
13129 __Pyx_RefNannyFinishContext();
13133 static PyObject *__pyx_pf_8PyClical_8clifford_30__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
13134 PyObject *__pyx_r = NULL;
13135 __Pyx_RefNannyDeclarations
13138 PyObject *__pyx_t_3 = NULL;
13139 int __pyx_lineno = 0;
13140 const char *__pyx_filename = NULL;
13141 int __pyx_clineno = 0;
13142 __Pyx_RefNannySetupContext(
"__isub__", 1);
13151 __Pyx_XDECREF(__pyx_r);
13152 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error)
13153 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error)
13154 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 - __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 796, __pyx_L1_error)
13155 __Pyx_GOTREF(__pyx_t_3);
13156 __pyx_r = __pyx_t_3;
13170 __Pyx_XDECREF(__pyx_t_3);
13171 __Pyx_AddTraceback(
"PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13174 __Pyx_XGIVEREF(__pyx_r);
13175 __Pyx_RefNannyFinishContext();
13188 static PyObject *__pyx_pw_8PyClical_8clifford_33__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
13189 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_32__mul__,
"\n Geometric product.\n\n >>> print(clifford(\"{1}\") * clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) * clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") * clifford(\"{1,2}\"))\n {2}\n ");
13190 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13191 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mul__;
13193 static PyObject *__pyx_pw_8PyClical_8clifford_33__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13194 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13195 PyObject *__pyx_r = 0;
13196 __Pyx_RefNannyDeclarations
13197 __Pyx_RefNannySetupContext(
"__mul__ (wrapper)", 0);
13198 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13199 __pyx_r = __pyx_pf_8PyClical_8clifford_32__mul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
13202 __Pyx_RefNannyFinishContext();
13206 static PyObject *__pyx_pf_8PyClical_8clifford_32__mul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13207 PyObject *__pyx_r = NULL;
13208 __Pyx_RefNannyDeclarations
13209 PyObject *__pyx_t_1 = NULL;
13212 PyObject *__pyx_t_4 = NULL;
13213 int __pyx_lineno = 0;
13214 const char *__pyx_filename = NULL;
13215 int __pyx_clineno = 0;
13216 __Pyx_RefNannySetupContext(
"__mul__", 1);
13225 __Pyx_XDECREF(__pyx_r);
13226 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error)
13227 __Pyx_GOTREF(__pyx_t_1);
13228 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
13229 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
13230 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 * __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 809, __pyx_L1_error)
13231 __Pyx_GOTREF(__pyx_t_4);
13232 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13233 __pyx_r = __pyx_t_4;
13247 __Pyx_XDECREF(__pyx_t_1);
13248 __Pyx_XDECREF(__pyx_t_4);
13249 __Pyx_AddTraceback(
"PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13252 __Pyx_XGIVEREF(__pyx_r);
13253 __Pyx_RefNannyFinishContext();
13266 static PyObject *__pyx_pw_8PyClical_8clifford_35__rmul__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
13267 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_34__rmul__,
"\n Geometric product.\n\n >>> print(2 * clifford(\"{2}\"))\n 2{2}\n ");
13268 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13269 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__rmul__;
13271 static PyObject *__pyx_pw_8PyClical_8clifford_35__rmul__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13272 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13273 PyObject *__pyx_r = 0;
13274 __Pyx_RefNannyDeclarations
13275 __Pyx_RefNannySetupContext(
"__rmul__ (wrapper)", 0);
13276 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13277 __pyx_r = __pyx_pf_8PyClical_8clifford_34__rmul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
13280 __Pyx_RefNannyFinishContext();
13284 static PyObject *__pyx_pf_8PyClical_8clifford_34__rmul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13285 PyObject *__pyx_r = NULL;
13286 __Pyx_RefNannyDeclarations
13287 PyObject *__pyx_t_1 = NULL;
13290 PyObject *__pyx_t_4 = NULL;
13291 int __pyx_lineno = 0;
13292 const char *__pyx_filename = NULL;
13293 int __pyx_clineno = 0;
13294 __Pyx_RefNannySetupContext(
"__rmul__", 1);
13303 __Pyx_XDECREF(__pyx_r);
13304 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
13305 __Pyx_GOTREF(__pyx_t_1);
13306 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L1_error)
13307 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L1_error)
13308 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 * __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
13309 __Pyx_GOTREF(__pyx_t_4);
13310 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13311 __pyx_r = __pyx_t_4;
13325 __Pyx_XDECREF(__pyx_t_1);
13326 __Pyx_XDECREF(__pyx_t_4);
13327 __Pyx_AddTraceback(
"PyClical.clifford.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13330 __Pyx_XGIVEREF(__pyx_r);
13331 __Pyx_RefNannyFinishContext();
13344 static PyObject *__pyx_pw_8PyClical_8clifford_37__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
13345 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_36__imul__,
"\n Geometric product.\n\n >>> x = clifford(2); x *= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{1,2}\"); print(x)\n {2}\n ");
13346 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13347 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__imul__;
13349 static PyObject *__pyx_pw_8PyClical_8clifford_37__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
13350 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13351 PyObject *__pyx_r = 0;
13352 __Pyx_RefNannyDeclarations
13353 __Pyx_RefNannySetupContext(
"__imul__ (wrapper)", 0);
13354 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13355 __pyx_r = __pyx_pf_8PyClical_8clifford_36__imul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
13358 __Pyx_RefNannyFinishContext();
13362 static PyObject *__pyx_pf_8PyClical_8clifford_36__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
13363 PyObject *__pyx_r = NULL;
13364 __Pyx_RefNannyDeclarations
13367 PyObject *__pyx_t_3 = NULL;
13368 int __pyx_lineno = 0;
13369 const char *__pyx_filename = NULL;
13370 int __pyx_clineno = 0;
13371 __Pyx_RefNannySetupContext(
"__imul__", 1);
13380 __Pyx_XDECREF(__pyx_r);
13381 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error)
13382 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error)
13383 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 * __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error)
13384 __Pyx_GOTREF(__pyx_t_3);
13385 __pyx_r = __pyx_t_3;
13399 __Pyx_XDECREF(__pyx_t_3);
13400 __Pyx_AddTraceback(
"PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13403 __Pyx_XGIVEREF(__pyx_r);
13404 __Pyx_RefNannyFinishContext();
13417 static PyObject *__pyx_pw_8PyClical_8clifford_39__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
13418 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_38__mod__,
"\n Contraction.\n\n >>> print(clifford(\"{1}\") % clifford(\"{2}\"))\n 0\n >>> print(clifford(2) % clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") % clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") % clifford(\"{1,2}\"))\n {2}\n ");
13419 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13420 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__mod__;
13422 static PyObject *__pyx_pw_8PyClical_8clifford_39__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13423 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13424 PyObject *__pyx_r = 0;
13425 __Pyx_RefNannyDeclarations
13426 __Pyx_RefNannySetupContext(
"__mod__ (wrapper)", 0);
13427 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13428 __pyx_r = __pyx_pf_8PyClical_8clifford_38__mod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
13431 __Pyx_RefNannyFinishContext();
13435 static PyObject *__pyx_pf_8PyClical_8clifford_38__mod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13436 PyObject *__pyx_r = NULL;
13437 __Pyx_RefNannyDeclarations
13438 PyObject *__pyx_t_1 = NULL;
13441 PyObject *__pyx_t_4 = NULL;
13442 int __pyx_lineno = 0;
13443 const char *__pyx_filename = NULL;
13444 int __pyx_clineno = 0;
13445 __Pyx_RefNannySetupContext(
"__mod__", 1);
13454 __Pyx_XDECREF(__pyx_r);
13455 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
13456 __Pyx_GOTREF(__pyx_t_1);
13457 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
13458 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
13459 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 % __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
13460 __Pyx_GOTREF(__pyx_t_4);
13461 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13462 __pyx_r = __pyx_t_4;
13476 __Pyx_XDECREF(__pyx_t_1);
13477 __Pyx_XDECREF(__pyx_t_4);
13478 __Pyx_AddTraceback(
"PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13481 __Pyx_XGIVEREF(__pyx_r);
13482 __Pyx_RefNannyFinishContext();
13495 static PyObject *__pyx_pw_8PyClical_8clifford_41__rmod__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
13496 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_40__rmod__,
"\n Contraction.\n\n >>> print(2 % clifford(\"{2}\"))\n 2{2}\n ");
13497 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13498 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__rmod__;
13500 static PyObject *__pyx_pw_8PyClical_8clifford_41__rmod__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13501 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13502 PyObject *__pyx_r = 0;
13503 __Pyx_RefNannyDeclarations
13504 __Pyx_RefNannySetupContext(
"__rmod__ (wrapper)", 0);
13505 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13506 __pyx_r = __pyx_pf_8PyClical_8clifford_40__rmod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
13509 __Pyx_RefNannyFinishContext();
13513 static PyObject *__pyx_pf_8PyClical_8clifford_40__rmod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13514 PyObject *__pyx_r = NULL;
13515 __Pyx_RefNannyDeclarations
13516 PyObject *__pyx_t_1 = NULL;
13519 PyObject *__pyx_t_4 = NULL;
13520 int __pyx_lineno = 0;
13521 const char *__pyx_filename = NULL;
13522 int __pyx_clineno = 0;
13523 __Pyx_RefNannySetupContext(
"__rmod__", 1);
13532 __Pyx_XDECREF(__pyx_r);
13533 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
13534 __Pyx_GOTREF(__pyx_t_1);
13535 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 855, __pyx_L1_error)
13536 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 855, __pyx_L1_error)
13537 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 % __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
13538 __Pyx_GOTREF(__pyx_t_4);
13539 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13540 __pyx_r = __pyx_t_4;
13554 __Pyx_XDECREF(__pyx_t_1);
13555 __Pyx_XDECREF(__pyx_t_4);
13556 __Pyx_AddTraceback(
"PyClical.clifford.__rmod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13559 __Pyx_XGIVEREF(__pyx_r);
13560 __Pyx_RefNannyFinishContext();
13573 static PyObject *__pyx_pw_8PyClical_8clifford_43__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
13574 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_42__imod__,
"\n Contraction.\n\n >>> x = clifford(\"{1}\"); x %= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(2); x %= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1,2}\"); print(x)\n {2}\n ");
13575 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13576 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__imod__;
13578 static PyObject *__pyx_pw_8PyClical_8clifford_43__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
13579 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13580 PyObject *__pyx_r = 0;
13581 __Pyx_RefNannyDeclarations
13582 __Pyx_RefNannySetupContext(
"__imod__ (wrapper)", 0);
13583 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13584 __pyx_r = __pyx_pf_8PyClical_8clifford_42__imod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
13587 __Pyx_RefNannyFinishContext();
13591 static PyObject *__pyx_pf_8PyClical_8clifford_42__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
13592 PyObject *__pyx_r = NULL;
13593 __Pyx_RefNannyDeclarations
13596 PyObject *__pyx_t_3 = NULL;
13597 int __pyx_lineno = 0;
13598 const char *__pyx_filename = NULL;
13599 int __pyx_clineno = 0;
13600 __Pyx_RefNannySetupContext(
"__imod__", 1);
13609 __Pyx_XDECREF(__pyx_r);
13610 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L1_error)
13611 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L1_error)
13612 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 % __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
13613 __Pyx_GOTREF(__pyx_t_3);
13614 __pyx_r = __pyx_t_3;
13628 __Pyx_XDECREF(__pyx_t_3);
13629 __Pyx_AddTraceback(
"PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13632 __Pyx_XGIVEREF(__pyx_r);
13633 __Pyx_RefNannyFinishContext();
13646 static PyObject *__pyx_pw_8PyClical_8clifford_45__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
13647 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_44__and__,
"\n Inner product.\n\n >>> print(clifford(\"{1}\") & clifford(\"{2}\"))\n 0\n >>> print(clifford(2) & clifford(\"{2}\"))\n 0\n >>> print(clifford(\"{1}\") & clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") & clifford(\"{1,2}\"))\n {2}\n ");
13648 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13649 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__and__;
13651 static PyObject *__pyx_pw_8PyClical_8clifford_45__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13652 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13653 PyObject *__pyx_r = 0;
13654 __Pyx_RefNannyDeclarations
13655 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
13656 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13657 __pyx_r = __pyx_pf_8PyClical_8clifford_44__and__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
13660 __Pyx_RefNannyFinishContext();
13664 static PyObject *__pyx_pf_8PyClical_8clifford_44__and__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13665 PyObject *__pyx_r = NULL;
13666 __Pyx_RefNannyDeclarations
13667 PyObject *__pyx_t_1 = NULL;
13670 PyObject *__pyx_t_4 = NULL;
13671 int __pyx_lineno = 0;
13672 const char *__pyx_filename = NULL;
13673 int __pyx_clineno = 0;
13674 __Pyx_RefNannySetupContext(
"__and__", 1);
13683 __Pyx_XDECREF(__pyx_r);
13684 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
13685 __Pyx_GOTREF(__pyx_t_1);
13686 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L1_error)
13687 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L1_error)
13688 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 & __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
13689 __Pyx_GOTREF(__pyx_t_4);
13690 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13691 __pyx_r = __pyx_t_4;
13705 __Pyx_XDECREF(__pyx_t_1);
13706 __Pyx_XDECREF(__pyx_t_4);
13707 __Pyx_AddTraceback(
"PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13710 __Pyx_XGIVEREF(__pyx_r);
13711 __Pyx_RefNannyFinishContext();
13724 static PyObject *__pyx_pw_8PyClical_8clifford_47__rand__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
13725 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_46__rand__,
"\n Inner product.\n\n >>> print(2 & clifford(\"{2}\"))\n 0\n ");
13726 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13727 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__rand__;
13729 static PyObject *__pyx_pw_8PyClical_8clifford_47__rand__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13730 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13731 PyObject *__pyx_r = 0;
13732 __Pyx_RefNannyDeclarations
13733 __Pyx_RefNannySetupContext(
"__rand__ (wrapper)", 0);
13734 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13735 __pyx_r = __pyx_pf_8PyClical_8clifford_46__rand__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
13738 __Pyx_RefNannyFinishContext();
13742 static PyObject *__pyx_pf_8PyClical_8clifford_46__rand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13743 PyObject *__pyx_r = NULL;
13744 __Pyx_RefNannyDeclarations
13745 PyObject *__pyx_t_1 = NULL;
13748 PyObject *__pyx_t_4 = NULL;
13749 int __pyx_lineno = 0;
13750 const char *__pyx_filename = NULL;
13751 int __pyx_clineno = 0;
13752 __Pyx_RefNannySetupContext(
"__rand__", 1);
13761 __Pyx_XDECREF(__pyx_r);
13762 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
13763 __Pyx_GOTREF(__pyx_t_1);
13764 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 894, __pyx_L1_error)
13765 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 894, __pyx_L1_error)
13766 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 & __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error)
13767 __Pyx_GOTREF(__pyx_t_4);
13768 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13769 __pyx_r = __pyx_t_4;
13783 __Pyx_XDECREF(__pyx_t_1);
13784 __Pyx_XDECREF(__pyx_t_4);
13785 __Pyx_AddTraceback(
"PyClical.clifford.__rand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13788 __Pyx_XGIVEREF(__pyx_r);
13789 __Pyx_RefNannyFinishContext();
13802 static PyObject *__pyx_pw_8PyClical_8clifford_49__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
13803 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_48__iand__,
"\n Inner product.\n\n >>> x = clifford(\"{1}\"); x &= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(2); x &= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1,2}\"); print(x)\n {2}\n ");
13804 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13805 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_48__iand__;
13807 static PyObject *__pyx_pw_8PyClical_8clifford_49__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
13808 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13809 PyObject *__pyx_r = 0;
13810 __Pyx_RefNannyDeclarations
13811 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
13812 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13813 __pyx_r = __pyx_pf_8PyClical_8clifford_48__iand__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
13816 __Pyx_RefNannyFinishContext();
13820 static PyObject *__pyx_pf_8PyClical_8clifford_48__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
13821 PyObject *__pyx_r = NULL;
13822 __Pyx_RefNannyDeclarations
13825 PyObject *__pyx_t_3 = NULL;
13826 int __pyx_lineno = 0;
13827 const char *__pyx_filename = NULL;
13828 int __pyx_clineno = 0;
13829 __Pyx_RefNannySetupContext(
"__iand__", 1);
13838 __Pyx_XDECREF(__pyx_r);
13839 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 909, __pyx_L1_error)
13840 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 909, __pyx_L1_error)
13841 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 & __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error)
13842 __Pyx_GOTREF(__pyx_t_3);
13843 __pyx_r = __pyx_t_3;
13857 __Pyx_XDECREF(__pyx_t_3);
13858 __Pyx_AddTraceback(
"PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13861 __Pyx_XGIVEREF(__pyx_r);
13862 __Pyx_RefNannyFinishContext();
13875 static PyObject *__pyx_pw_8PyClical_8clifford_51__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
13876 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_50__xor__,
"\n Outer product.\n\n >>> print(clifford(\"{1}\") ^ clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) ^ clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") ^ clifford(\"{1}\"))\n 0\n >>> print(clifford(\"{1}\") ^ clifford(\"{1,2}\"))\n 0\n ");
13877 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13878 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__xor__;
13880 static PyObject *__pyx_pw_8PyClical_8clifford_51__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13881 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13882 PyObject *__pyx_r = 0;
13883 __Pyx_RefNannyDeclarations
13884 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
13885 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13886 __pyx_r = __pyx_pf_8PyClical_8clifford_50__xor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
13889 __Pyx_RefNannyFinishContext();
13893 static PyObject *__pyx_pf_8PyClical_8clifford_50__xor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
13894 PyObject *__pyx_r = NULL;
13895 __Pyx_RefNannyDeclarations
13896 PyObject *__pyx_t_1 = NULL;
13899 PyObject *__pyx_t_4 = NULL;
13900 int __pyx_lineno = 0;
13901 const char *__pyx_filename = NULL;
13902 int __pyx_clineno = 0;
13903 __Pyx_RefNannySetupContext(
"__xor__", 1);
13912 __Pyx_XDECREF(__pyx_r);
13913 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
13914 __Pyx_GOTREF(__pyx_t_1);
13915 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
13916 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
13917 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 ^ __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
13918 __Pyx_GOTREF(__pyx_t_4);
13919 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13920 __pyx_r = __pyx_t_4;
13934 __Pyx_XDECREF(__pyx_t_1);
13935 __Pyx_XDECREF(__pyx_t_4);
13936 __Pyx_AddTraceback(
"PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13939 __Pyx_XGIVEREF(__pyx_r);
13940 __Pyx_RefNannyFinishContext();
13953 static PyObject *__pyx_pw_8PyClical_8clifford_53__rxor__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
13954 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_52__rxor__,
"\n Outer product.\n\n >>> print(2 ^ clifford(\"{2}\"))\n 2{2}\n ");
13955 #if CYTHON_UPDATE_DESCRIPTOR_DOC 13956 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__rxor__;
13958 static PyObject *__pyx_pw_8PyClical_8clifford_53__rxor__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13959 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13960 PyObject *__pyx_r = 0;
13961 __Pyx_RefNannyDeclarations
13962 __Pyx_RefNannySetupContext(
"__rxor__ (wrapper)", 0);
13963 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
13964 __pyx_r = __pyx_pf_8PyClical_8clifford_52__rxor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
13967 __Pyx_RefNannyFinishContext();
13971 static PyObject *__pyx_pf_8PyClical_8clifford_52__rxor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
13972 PyObject *__pyx_r = NULL;
13973 __Pyx_RefNannyDeclarations
13974 PyObject *__pyx_t_1 = NULL;
13977 PyObject *__pyx_t_4 = NULL;
13978 int __pyx_lineno = 0;
13979 const char *__pyx_filename = NULL;
13980 int __pyx_clineno = 0;
13981 __Pyx_RefNannySetupContext(
"__rxor__", 1);
13990 __Pyx_XDECREF(__pyx_r);
13991 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
13992 __Pyx_GOTREF(__pyx_t_1);
13993 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L1_error)
13994 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L1_error)
13995 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 ^ __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 933, __pyx_L1_error)
13996 __Pyx_GOTREF(__pyx_t_4);
13997 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13998 __pyx_r = __pyx_t_4;
14012 __Pyx_XDECREF(__pyx_t_1);
14013 __Pyx_XDECREF(__pyx_t_4);
14014 __Pyx_AddTraceback(
"PyClical.clifford.__rxor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14017 __Pyx_XGIVEREF(__pyx_r);
14018 __Pyx_RefNannyFinishContext();
14031 static PyObject *__pyx_pw_8PyClical_8clifford_55__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
14032 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_54__ixor__,
"\n Outer product.\n\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(2); x ^= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1}\"); print(x)\n 0\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1,2}\"); print(x)\n 0\n ");
14033 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14034 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__ixor__;
14036 static PyObject *__pyx_pw_8PyClical_8clifford_55__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
14037 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14038 PyObject *__pyx_r = 0;
14039 __Pyx_RefNannyDeclarations
14040 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
14041 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14042 __pyx_r = __pyx_pf_8PyClical_8clifford_54__ixor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
14045 __Pyx_RefNannyFinishContext();
14049 static PyObject *__pyx_pf_8PyClical_8clifford_54__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
14050 PyObject *__pyx_r = NULL;
14051 __Pyx_RefNannyDeclarations
14054 PyObject *__pyx_t_3 = NULL;
14055 int __pyx_lineno = 0;
14056 const char *__pyx_filename = NULL;
14057 int __pyx_clineno = 0;
14058 __Pyx_RefNannySetupContext(
"__ixor__", 1);
14067 __Pyx_XDECREF(__pyx_r);
14068 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L1_error)
14069 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L1_error)
14070 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 ^ __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
14071 __Pyx_GOTREF(__pyx_t_3);
14072 __pyx_r = __pyx_t_3;
14086 __Pyx_XDECREF(__pyx_t_3);
14087 __Pyx_AddTraceback(
"PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14090 __Pyx_XGIVEREF(__pyx_r);
14091 __Pyx_RefNannyFinishContext();
14104 static PyObject *__pyx_pw_8PyClical_8clifford_57__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
14105 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_56__truediv__,
"\n Geometric quotient.\n\n >>> print(clifford(\"{1}\") / clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) / clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") / clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") / clifford(\"{1,2}\"))\n -{2}\n ");
14106 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14107 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_56__truediv__;
14109 static PyObject *__pyx_pw_8PyClical_8clifford_57__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
14110 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14111 PyObject *__pyx_r = 0;
14112 __Pyx_RefNannyDeclarations
14113 __Pyx_RefNannySetupContext(
"__truediv__ (wrapper)", 0);
14114 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14115 __pyx_r = __pyx_pf_8PyClical_8clifford_56__truediv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
14118 __Pyx_RefNannyFinishContext();
14122 static PyObject *__pyx_pf_8PyClical_8clifford_56__truediv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
14123 PyObject *__pyx_r = NULL;
14124 __Pyx_RefNannyDeclarations
14125 PyObject *__pyx_t_1 = NULL;
14128 PyObject *__pyx_t_4 = NULL;
14129 int __pyx_lineno = 0;
14130 const char *__pyx_filename = NULL;
14131 int __pyx_clineno = 0;
14132 __Pyx_RefNannySetupContext(
"__truediv__", 1);
14141 __Pyx_XDECREF(__pyx_r);
14142 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
14143 __Pyx_GOTREF(__pyx_t_1);
14144 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L1_error)
14145 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L1_error)
14146 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 / __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
14147 __Pyx_GOTREF(__pyx_t_4);
14148 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14149 __pyx_r = __pyx_t_4;
14163 __Pyx_XDECREF(__pyx_t_1);
14164 __Pyx_XDECREF(__pyx_t_4);
14165 __Pyx_AddTraceback(
"PyClical.clifford.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14168 __Pyx_XGIVEREF(__pyx_r);
14169 __Pyx_RefNannyFinishContext();
14182 static PyObject *__pyx_pw_8PyClical_8clifford_59__rtruediv__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs);
14183 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_58__rtruediv__,
"\n Geometric quotient.\n\n >>> print(2 / clifford(\"{2}\"))\n 2{2}\n ");
14184 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14185 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_58__rtruediv__;
14187 static PyObject *__pyx_pw_8PyClical_8clifford_59__rtruediv__(PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
14188 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14189 PyObject *__pyx_r = 0;
14190 __Pyx_RefNannyDeclarations
14191 __Pyx_RefNannySetupContext(
"__rtruediv__ (wrapper)", 0);
14192 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14193 __pyx_r = __pyx_pf_8PyClical_8clifford_58__rtruediv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_rhs), ((PyObject *)__pyx_v_lhs));
14196 __Pyx_RefNannyFinishContext();
14200 static PyObject *__pyx_pf_8PyClical_8clifford_58__rtruediv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_rhs, PyObject *__pyx_v_lhs) {
14201 PyObject *__pyx_r = NULL;
14202 __Pyx_RefNannyDeclarations
14203 PyObject *__pyx_t_1 = NULL;
14206 PyObject *__pyx_t_4 = NULL;
14207 int __pyx_lineno = 0;
14208 const char *__pyx_filename = NULL;
14209 int __pyx_clineno = 0;
14210 __Pyx_RefNannySetupContext(
"__rtruediv__", 1);
14219 __Pyx_XDECREF(__pyx_r);
14220 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
14221 __Pyx_GOTREF(__pyx_t_1);
14222 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 972, __pyx_L1_error)
14223 __pyx_t_3 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_rhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 972, __pyx_L1_error)
14224 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 / __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error)
14225 __Pyx_GOTREF(__pyx_t_4);
14226 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14227 __pyx_r = __pyx_t_4;
14241 __Pyx_XDECREF(__pyx_t_1);
14242 __Pyx_XDECREF(__pyx_t_4);
14243 __Pyx_AddTraceback(
"PyClical.clifford.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14246 __Pyx_XGIVEREF(__pyx_r);
14247 __Pyx_RefNannyFinishContext();
14260 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 14261 static PyObject *__pyx_pw_8PyClical_8clifford_61__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
14262 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_60__idiv__,
"\n Geometric quotient.\n\n >>> x = clifford(\"{1}\"); x /= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(2); x /= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1,2}\"); print(x)\n -{2}\n ");
14263 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14264 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__idiv__;
14266 static PyObject *__pyx_pw_8PyClical_8clifford_61__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
14267 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14268 PyObject *__pyx_r = 0;
14269 __Pyx_RefNannyDeclarations
14270 __Pyx_RefNannySetupContext(
"__idiv__ (wrapper)", 0);
14271 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14272 __pyx_r = __pyx_pf_8PyClical_8clifford_60__idiv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
14275 __Pyx_RefNannyFinishContext();
14280 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 14281 static PyObject *__pyx_pf_8PyClical_8clifford_60__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
14282 PyObject *__pyx_r = NULL;
14283 __Pyx_RefNannyDeclarations
14286 PyObject *__pyx_t_3 = NULL;
14287 int __pyx_lineno = 0;
14288 const char *__pyx_filename = NULL;
14289 int __pyx_clineno = 0;
14290 __Pyx_RefNannySetupContext(
"__idiv__", 1);
14299 __Pyx_XDECREF(__pyx_r);
14300 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L1_error)
14301 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L1_error)
14302 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 / __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
14303 __Pyx_GOTREF(__pyx_t_3);
14304 __pyx_r = __pyx_t_3;
14318 __Pyx_XDECREF(__pyx_t_3);
14319 __Pyx_AddTraceback(
"PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14322 __Pyx_XGIVEREF(__pyx_r);
14323 __Pyx_RefNannyFinishContext();
14337 static PyObject *__pyx_pw_8PyClical_8clifford_63inv(PyObject *__pyx_v_self,
14338 #
if CYTHON_METH_FASTCALL
14339 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14341 PyObject *__pyx_args, PyObject *__pyx_kwds
14344 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_62inv,
"\n Geometric multiplicative inverse.\n\n >>> x = clifford(\"{1}\"); print(x.inv())\n {1}\n >>> x = clifford(2); print(x.inv())\n 0.5\n >>> x = clifford(\"{1,2}\"); print(x.inv())\n -{1,2}\n ");
14345 static PyMethodDef __pyx_mdef_8PyClical_8clifford_63inv = {
"inv", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_63inv, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_62inv};
14346 static PyObject *__pyx_pw_8PyClical_8clifford_63inv(PyObject *__pyx_v_self,
14347 #
if CYTHON_METH_FASTCALL
14348 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14350 PyObject *__pyx_args, PyObject *__pyx_kwds
14353 #if !CYTHON_METH_FASTCALL 14354 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
14356 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14357 PyObject *__pyx_r = 0;
14358 __Pyx_RefNannyDeclarations
14359 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
14360 #if !CYTHON_METH_FASTCALL 14361 #if CYTHON_ASSUME_SAFE_MACROS 14362 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
14364 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
14367 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
14368 if (unlikely(__pyx_nargs > 0)) {
14369 __Pyx_RaiseArgtupleInvalid(
"inv", 1, 0, 0, __pyx_nargs);
return NULL;}
14370 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"inv", 0)))
return NULL;
14371 __pyx_r = __pyx_pf_8PyClical_8clifford_62inv(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
14374 __Pyx_RefNannyFinishContext();
14378 static PyObject *__pyx_pf_8PyClical_8clifford_62inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
14379 PyObject *__pyx_r = NULL;
14380 __Pyx_RefNannyDeclarations
14381 PyObject *__pyx_t_1 = NULL;
14382 PyObject *__pyx_t_2 = NULL;
14383 int __pyx_lineno = 0;
14384 const char *__pyx_filename = NULL;
14385 int __pyx_clineno = 0;
14386 __Pyx_RefNannySetupContext(
"inv", 1);
14395 __Pyx_XDECREF(__pyx_r);
14396 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error)
14397 __Pyx_GOTREF(__pyx_t_1);
14398 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->inv());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
14399 __Pyx_GOTREF(__pyx_t_2);
14400 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14401 __pyx_r = __pyx_t_2;
14415 __Pyx_XDECREF(__pyx_t_1);
14416 __Pyx_XDECREF(__pyx_t_2);
14417 __Pyx_AddTraceback(
"PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
14420 __Pyx_XGIVEREF(__pyx_r);
14421 __Pyx_RefNannyFinishContext();
14434 static PyObject *__pyx_pw_8PyClical_8clifford_65__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
14435 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_64__or__,
"\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print(y|x)\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print(y|exp(x))\n -{1}\n ");
14436 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14437 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_64__or__;
14439 static PyObject *__pyx_pw_8PyClical_8clifford_65__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
14440 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14441 PyObject *__pyx_r = 0;
14442 __Pyx_RefNannyDeclarations
14443 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
14444 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14445 __pyx_r = __pyx_pf_8PyClical_8clifford_64__or__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
14448 __Pyx_RefNannyFinishContext();
14452 static PyObject *__pyx_pf_8PyClical_8clifford_64__or__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
14453 PyObject *__pyx_r = NULL;
14454 __Pyx_RefNannyDeclarations
14455 PyObject *__pyx_t_1 = NULL;
14458 PyObject *__pyx_t_4 = NULL;
14459 int __pyx_lineno = 0;
14460 const char *__pyx_filename = NULL;
14461 int __pyx_clineno = 0;
14462 __Pyx_RefNannySetupContext(
"__or__", 1);
14471 __Pyx_XDECREF(__pyx_r);
14472 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
14473 __Pyx_GOTREF(__pyx_t_1);
14474 __pyx_t_2 = __pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L1_error)
14475 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L1_error)
14476 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_t_2 | __pyx_t_3));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
14477 __Pyx_GOTREF(__pyx_t_4);
14478 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14479 __pyx_r = __pyx_t_4;
14493 __Pyx_XDECREF(__pyx_t_1);
14494 __Pyx_XDECREF(__pyx_t_4);
14495 __Pyx_AddTraceback(
"PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14498 __Pyx_XGIVEREF(__pyx_r);
14499 __Pyx_RefNannyFinishContext();
14512 static PyObject *__pyx_pw_8PyClical_8clifford_67__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
14513 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_66__ior__,
"\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=x; print(y)\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=exp(x); print(y)\n -{1}\n ");
14514 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14515 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_66__ior__;
14517 static PyObject *__pyx_pw_8PyClical_8clifford_67__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
14518 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14519 PyObject *__pyx_r = 0;
14520 __Pyx_RefNannyDeclarations
14521 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
14522 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14523 __pyx_r = __pyx_pf_8PyClical_8clifford_66__ior__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
14526 __Pyx_RefNannyFinishContext();
14530 static PyObject *__pyx_pf_8PyClical_8clifford_66__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
14531 PyObject *__pyx_r = NULL;
14532 __Pyx_RefNannyDeclarations
14535 PyObject *__pyx_t_3 = NULL;
14536 int __pyx_lineno = 0;
14537 const char *__pyx_filename = NULL;
14538 int __pyx_clineno = 0;
14539 __Pyx_RefNannySetupContext(
"__ior__", 1);
14548 __Pyx_XDECREF(__pyx_r);
14549 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)
14550 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)
14551 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_t_1 | __pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
14552 __Pyx_GOTREF(__pyx_t_3);
14553 __pyx_r = __pyx_t_3;
14567 __Pyx_XDECREF(__pyx_t_3);
14568 __Pyx_AddTraceback(
"PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14571 __Pyx_XGIVEREF(__pyx_r);
14572 __Pyx_RefNannyFinishContext();
14585 static PyObject *__pyx_pw_8PyClical_8clifford_69__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy);
14586 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_68__pow__,
"\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print(x ** 2)\n 1\n >>> x=clifford(\"2\"); print(x ** 2)\n 4\n >>> x=clifford(\"2+{1}\"); print(x ** 0)\n 1\n >>> x=clifford(\"2+{1}\"); print(x ** 1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x ** 2)\n 5+4{1}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * (i ** i))\n 1\n ");
14587 #if CYTHON_UPDATE_DESCRIPTOR_DOC 14588 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_68__pow__;
14590 static PyObject *__pyx_pw_8PyClical_8clifford_69__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
14591 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14592 PyObject *__pyx_r = 0;
14593 __Pyx_RefNannyDeclarations
14594 __Pyx_RefNannySetupContext(
"__pow__ (wrapper)", 0);
14595 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14596 __pyx_r = __pyx_pf_8PyClical_8clifford_68__pow__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
14599 __Pyx_RefNannyFinishContext();
14603 static PyObject *__pyx_pf_8PyClical_8clifford_68__pow__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
14604 PyObject *__pyx_r = NULL;
14605 __Pyx_RefNannyDeclarations
14606 PyObject *__pyx_t_1 = NULL;
14607 int __pyx_lineno = 0;
14608 const char *__pyx_filename = NULL;
14609 int __pyx_clineno = 0;
14610 __Pyx_RefNannySetupContext(
"__pow__", 1);
14619 __Pyx_XDECREF(__pyx_r);
14620 __pyx_t_1 = __pyx_f_8PyClical_pow(((PyObject *)__pyx_v_self), __pyx_v_m, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
14621 __Pyx_GOTREF(__pyx_t_1);
14622 __pyx_r = __pyx_t_1;
14636 __Pyx_XDECREF(__pyx_t_1);
14637 __Pyx_AddTraceback(
"PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14640 __Pyx_XGIVEREF(__pyx_r);
14641 __Pyx_RefNannyFinishContext();
14654 static PyObject *__pyx_pw_8PyClical_8clifford_71pow(PyObject *__pyx_v_self,
14655 #
if CYTHON_METH_FASTCALL
14656 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14658 PyObject *__pyx_args, PyObject *__pyx_kwds
14661 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_70pow,
"\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print(x.pow(2))\n 1\n >>> x=clifford(\"2\"); print(x.pow(2))\n 4\n >>> x=clifford(\"2+{1}\"); print(x.pow(0))\n 1\n >>> x=clifford(\"2+{1}\"); print(x.pow(1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x.pow(2))\n 5+4{1}\n >>> print(clifford(\"1+{1}+{1,2}\").pow(3))\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * i.pow(i))\n 1\n ");
14662 static PyMethodDef __pyx_mdef_8PyClical_8clifford_71pow = {
"pow", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_71pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70pow};
14663 static PyObject *__pyx_pw_8PyClical_8clifford_71pow(PyObject *__pyx_v_self,
14664 #
if CYTHON_METH_FASTCALL
14665 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14667 PyObject *__pyx_args, PyObject *__pyx_kwds
14670 PyObject *__pyx_v_m = 0;
14671 #if !CYTHON_METH_FASTCALL 14672 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
14674 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14675 PyObject* values[1] = {0};
14676 int __pyx_lineno = 0;
14677 const char *__pyx_filename = NULL;
14678 int __pyx_clineno = 0;
14679 PyObject *__pyx_r = 0;
14680 __Pyx_RefNannyDeclarations
14681 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
14682 #if !CYTHON_METH_FASTCALL 14683 #if CYTHON_ASSUME_SAFE_MACROS 14684 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
14686 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
14689 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
14691 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
14693 Py_ssize_t kw_args;
14694 switch (__pyx_nargs) {
14695 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
14696 CYTHON_FALLTHROUGH;
14698 default:
goto __pyx_L5_argtuple_error;
14700 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
14701 switch (__pyx_nargs) {
14703 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) {
14704 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
14707 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1043, __pyx_L3_error)
14708 else goto __pyx_L5_argtuple_error;
14710 if (unlikely(kw_args > 0)) {
14711 const Py_ssize_t kwd_pos_args = __pyx_nargs;
14712 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"pow") < 0)) __PYX_ERR(0, 1043, __pyx_L3_error)
14714 }
else if (unlikely(__pyx_nargs != 1)) {
14715 goto __pyx_L5_argtuple_error;
14717 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
14719 __pyx_v_m = values[0];
14721 goto __pyx_L6_skip;
14722 __pyx_L5_argtuple_error:;
14723 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1043, __pyx_L3_error)
14725 goto __pyx_L4_argument_unpacking_done;
14728 Py_ssize_t __pyx_temp;
14729 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14730 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
14733 __Pyx_AddTraceback(
"PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14734 __Pyx_RefNannyFinishContext();
14736 __pyx_L4_argument_unpacking_done:;
14737 __pyx_r = __pyx_pf_8PyClical_8clifford_70pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_m);
14741 Py_ssize_t __pyx_temp;
14742 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14743 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
14746 __Pyx_RefNannyFinishContext();
14750 static PyObject *__pyx_pf_8PyClical_8clifford_70pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
14751 PyObject *__pyx_r = NULL;
14752 __Pyx_RefNannyDeclarations
14753 PyObject *__pyx_t_1 = NULL;
14754 PyObject *__pyx_t_2 = NULL;
14757 int __pyx_lineno = 0;
14758 const char *__pyx_filename = NULL;
14759 int __pyx_clineno = 0;
14760 __Pyx_RefNannySetupContext(
"pow", 1);
14769 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
14770 __Pyx_GOTREF(__pyx_t_1);
14771 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error)
14772 __Pyx_GOTREF(__pyx_t_2);
14773 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14774 __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2);
if (unlikely(__pyx_t_3 == ((
int)-1))) __PYX_ERR(0, 1062, __pyx_L1_error)
14775 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14785 __Pyx_XDECREF(__pyx_r);
14786 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error)
14787 __Pyx_GOTREF(__pyx_t_2);
14788 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_m);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1063, __pyx_L1_error)
14789 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __pyx_v_self->instance->pow(__pyx_t_4));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error)
14790 __Pyx_GOTREF(__pyx_t_1);
14791 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14792 __pyx_r = __pyx_t_1;
14813 __Pyx_XDECREF(__pyx_r);
14814 __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
14815 __Pyx_GOTREF(__pyx_t_1);
14816 __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
14817 __Pyx_GOTREF(__pyx_t_2);
14818 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14819 __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
14820 __Pyx_GOTREF(__pyx_t_1);
14821 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14822 __pyx_r = __pyx_t_1;
14837 __Pyx_XDECREF(__pyx_t_1);
14838 __Pyx_XDECREF(__pyx_t_2);
14839 __Pyx_AddTraceback(
"PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14842 __Pyx_XGIVEREF(__pyx_r);
14843 __Pyx_RefNannyFinishContext();
14856 static PyObject *__pyx_pw_8PyClical_8clifford_73outer_pow(PyObject *__pyx_v_self,
14857 #
if CYTHON_METH_FASTCALL
14858 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14860 PyObject *__pyx_args, PyObject *__pyx_kwds
14863 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_72outer_pow,
"\n Outer product power.\n\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(0))\n 1\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(2))\n 4+4{1}\n >>> print(clifford(\"1+{1}+{1,2}\").outer_pow(3))\n 1+3{1}+3{1,2}\n\n ");
14864 static PyMethodDef __pyx_mdef_8PyClical_8clifford_73outer_pow = {
"outer_pow", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_73outer_pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_72outer_pow};
14865 static PyObject *__pyx_pw_8PyClical_8clifford_73outer_pow(PyObject *__pyx_v_self,
14866 #
if CYTHON_METH_FASTCALL
14867 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14869 PyObject *__pyx_args, PyObject *__pyx_kwds
14872 PyObject *__pyx_v_m = 0;
14873 #if !CYTHON_METH_FASTCALL 14874 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
14876 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14877 PyObject* values[1] = {0};
14878 int __pyx_lineno = 0;
14879 const char *__pyx_filename = NULL;
14880 int __pyx_clineno = 0;
14881 PyObject *__pyx_r = 0;
14882 __Pyx_RefNannyDeclarations
14883 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
14884 #if !CYTHON_METH_FASTCALL 14885 #if CYTHON_ASSUME_SAFE_MACROS 14886 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
14888 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
14891 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
14893 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
14895 Py_ssize_t kw_args;
14896 switch (__pyx_nargs) {
14897 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
14898 CYTHON_FALLTHROUGH;
14900 default:
goto __pyx_L5_argtuple_error;
14902 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
14903 switch (__pyx_nargs) {
14905 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) {
14906 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
14909 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1067, __pyx_L3_error)
14910 else goto __pyx_L5_argtuple_error;
14912 if (unlikely(kw_args > 0)) {
14913 const Py_ssize_t kwd_pos_args = __pyx_nargs;
14914 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"outer_pow") < 0)) __PYX_ERR(0, 1067, __pyx_L3_error)
14916 }
else if (unlikely(__pyx_nargs != 1)) {
14917 goto __pyx_L5_argtuple_error;
14919 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
14921 __pyx_v_m = values[0];
14923 goto __pyx_L6_skip;
14924 __pyx_L5_argtuple_error:;
14925 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1067, __pyx_L3_error)
14927 goto __pyx_L4_argument_unpacking_done;
14930 Py_ssize_t __pyx_temp;
14931 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14932 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
14935 __Pyx_AddTraceback(
"PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14936 __Pyx_RefNannyFinishContext();
14938 __pyx_L4_argument_unpacking_done:;
14939 __pyx_r = __pyx_pf_8PyClical_8clifford_72outer_pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_m);
14943 Py_ssize_t __pyx_temp;
14944 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14945 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
14948 __Pyx_RefNannyFinishContext();
14952 static PyObject *__pyx_pf_8PyClical_8clifford_72outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
14953 PyObject *__pyx_r = NULL;
14954 __Pyx_RefNannyDeclarations
14955 PyObject *__pyx_t_1 = NULL;
14957 PyObject *__pyx_t_3 = NULL;
14958 int __pyx_lineno = 0;
14959 const char *__pyx_filename = NULL;
14960 int __pyx_clineno = 0;
14961 __Pyx_RefNannySetupContext(
"outer_pow", 1);
14970 __Pyx_XDECREF(__pyx_r);
14971 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
14972 __Pyx_GOTREF(__pyx_t_1);
14973 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m);
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error)
14974 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->outer_pow(__pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
14975 __Pyx_GOTREF(__pyx_t_3);
14976 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14977 __pyx_r = __pyx_t_3;
14991 __Pyx_XDECREF(__pyx_t_1);
14992 __Pyx_XDECREF(__pyx_t_3);
14993 __Pyx_AddTraceback(
"PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14996 __Pyx_XGIVEREF(__pyx_r);
14997 __Pyx_RefNannyFinishContext();
15010 static PyObject *__pyx_pw_8PyClical_8clifford_75__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15011 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_74__call__,
"\n Pure grade-vector part.\n\n >>> print(clifford(\"{1}\")(1))\n {1}\n >>> print(clifford(\"{1}\")(0))\n 0\n >>> print(clifford(\"1+{1}+{1,2}\")(0))\n 1\n >>> print(clifford(\"1+{1}+{1,2}\")(1))\n {1}\n >>> print(clifford(\"1+{1}+{1,2}\")(2))\n {1,2}\n >>> print(clifford(\"1+{1}+{1,2}\")(3))\n 0\n ");
15012 #if CYTHON_UPDATE_DESCRIPTOR_DOC 15013 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_74__call__;
15015 static PyObject *__pyx_pw_8PyClical_8clifford_75__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15016 PyObject *__pyx_v_grade = 0;
15017 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15018 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
15019 PyObject* values[1] = {0};
15020 int __pyx_lineno = 0;
15021 const char *__pyx_filename = NULL;
15022 int __pyx_clineno = 0;
15023 PyObject *__pyx_r = 0;
15024 __Pyx_RefNannyDeclarations
15025 __Pyx_RefNannySetupContext(
"__call__ (wrapper)", 0);
15026 #if CYTHON_ASSUME_SAFE_MACROS 15027 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15029 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15031 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
15033 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
15035 Py_ssize_t kw_args;
15036 switch (__pyx_nargs) {
15037 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
15038 CYTHON_FALLTHROUGH;
15040 default:
goto __pyx_L5_argtuple_error;
15042 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
15043 switch (__pyx_nargs) {
15045 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_grade)) != 0)) {
15046 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
15049 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L3_error)
15050 else goto __pyx_L5_argtuple_error;
15052 if (unlikely(kw_args > 0)) {
15053 const Py_ssize_t kwd_pos_args = __pyx_nargs;
15054 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"__call__") < 0)) __PYX_ERR(0, 1083, __pyx_L3_error)
15056 }
else if (unlikely(__pyx_nargs != 1)) {
15057 goto __pyx_L5_argtuple_error;
15059 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
15061 __pyx_v_grade = values[0];
15063 goto __pyx_L6_skip;
15064 __pyx_L5_argtuple_error:;
15065 __Pyx_RaiseArgtupleInvalid(
"__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1083, __pyx_L3_error)
15067 goto __pyx_L4_argument_unpacking_done;
15070 Py_ssize_t __pyx_temp;
15071 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
15072 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
15075 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15076 __Pyx_RefNannyFinishContext();
15078 __pyx_L4_argument_unpacking_done:;
15079 __pyx_r = __pyx_pf_8PyClical_8clifford_74__call__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
15083 Py_ssize_t __pyx_temp;
15084 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
15085 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
15088 __Pyx_RefNannyFinishContext();
15092 static PyObject *__pyx_pf_8PyClical_8clifford_74__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
15093 PyObject *__pyx_r = NULL;
15094 __Pyx_RefNannyDeclarations
15095 PyObject *__pyx_t_1 = NULL;
15097 PyObject *__pyx_t_3 = NULL;
15098 int __pyx_lineno = 0;
15099 const char *__pyx_filename = NULL;
15100 int __pyx_clineno = 0;
15101 __Pyx_RefNannySetupContext(
"__call__", 1);
15110 __Pyx_XDECREF(__pyx_r);
15111 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
15112 __Pyx_GOTREF(__pyx_t_1);
15113 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade);
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
15114 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->operator()(__pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
15115 __Pyx_GOTREF(__pyx_t_3);
15116 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15117 __pyx_r = __pyx_t_3;
15131 __Pyx_XDECREF(__pyx_t_1);
15132 __Pyx_XDECREF(__pyx_t_3);
15133 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15136 __Pyx_XGIVEREF(__pyx_r);
15137 __Pyx_RefNannyFinishContext();
15150 static PyObject *__pyx_pw_8PyClical_8clifford_77scalar(PyObject *__pyx_v_self,
15151 #
if CYTHON_METH_FASTCALL
15152 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15154 PyObject *__pyx_args, PyObject *__pyx_kwds
15157 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_76scalar,
"\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ");
15158 static PyMethodDef __pyx_mdef_8PyClical_8clifford_77scalar = {
"scalar", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_77scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_76scalar};
15159 static PyObject *__pyx_pw_8PyClical_8clifford_77scalar(PyObject *__pyx_v_self,
15160 #
if CYTHON_METH_FASTCALL
15161 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15163 PyObject *__pyx_args, PyObject *__pyx_kwds
15166 #if !CYTHON_METH_FASTCALL 15167 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15169 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
15170 PyObject *__pyx_r = 0;
15171 __Pyx_RefNannyDeclarations
15172 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
15173 #if !CYTHON_METH_FASTCALL 15174 #if CYTHON_ASSUME_SAFE_MACROS 15175 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15177 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15180 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15181 if (unlikely(__pyx_nargs > 0)) {
15182 __Pyx_RaiseArgtupleInvalid(
"scalar", 1, 0, 0, __pyx_nargs);
return NULL;}
15183 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"scalar", 0)))
return NULL;
15184 __pyx_r = __pyx_pf_8PyClical_8clifford_76scalar(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
15187 __Pyx_RefNannyFinishContext();
15191 static PyObject *__pyx_pf_8PyClical_8clifford_76scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
15192 PyObject *__pyx_r = NULL;
15193 __Pyx_RefNannyDeclarations
15194 PyObject *__pyx_t_1 = NULL;
15195 int __pyx_lineno = 0;
15196 const char *__pyx_filename = NULL;
15197 int __pyx_clineno = 0;
15198 __Pyx_RefNannySetupContext(
"scalar", 1);
15207 __Pyx_XDECREF(__pyx_r);
15208 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->scalar());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
15209 __Pyx_GOTREF(__pyx_t_1);
15210 __pyx_r = __pyx_t_1;
15224 __Pyx_XDECREF(__pyx_t_1);
15225 __Pyx_AddTraceback(
"PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
15228 __Pyx_XGIVEREF(__pyx_r);
15229 __Pyx_RefNannyFinishContext();
15242 static PyObject *__pyx_pw_8PyClical_8clifford_79pure(PyObject *__pyx_v_self,
15243 #
if CYTHON_METH_FASTCALL
15244 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15246 PyObject *__pyx_args, PyObject *__pyx_kwds
15249 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_78pure,
"\n Pure part.\n\n >>> print(clifford(\"1+{1}+{1,2}\").pure())\n {1}+{1,2}\n >>> print(clifford(\"{1,2}\").pure())\n {1,2}\n ");
15250 static PyMethodDef __pyx_mdef_8PyClical_8clifford_79pure = {
"pure", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_79pure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_78pure};
15251 static PyObject *__pyx_pw_8PyClical_8clifford_79pure(PyObject *__pyx_v_self,
15252 #
if CYTHON_METH_FASTCALL
15253 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15255 PyObject *__pyx_args, PyObject *__pyx_kwds
15258 #if !CYTHON_METH_FASTCALL 15259 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15261 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
15262 PyObject *__pyx_r = 0;
15263 __Pyx_RefNannyDeclarations
15264 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
15265 #if !CYTHON_METH_FASTCALL 15266 #if CYTHON_ASSUME_SAFE_MACROS 15267 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15269 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15272 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15273 if (unlikely(__pyx_nargs > 0)) {
15274 __Pyx_RaiseArgtupleInvalid(
"pure", 1, 0, 0, __pyx_nargs);
return NULL;}
15275 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"pure", 0)))
return NULL;
15276 __pyx_r = __pyx_pf_8PyClical_8clifford_78pure(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
15279 __Pyx_RefNannyFinishContext();
15283 static PyObject *__pyx_pf_8PyClical_8clifford_78pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
15284 PyObject *__pyx_r = NULL;
15285 __Pyx_RefNannyDeclarations
15286 PyObject *__pyx_t_1 = NULL;
15287 PyObject *__pyx_t_2 = NULL;
15288 int __pyx_lineno = 0;
15289 const char *__pyx_filename = NULL;
15290 int __pyx_clineno = 0;
15291 __Pyx_RefNannySetupContext(
"pure", 1);
15300 __Pyx_XDECREF(__pyx_r);
15301 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
15302 __Pyx_GOTREF(__pyx_t_1);
15303 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->pure());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
15304 __Pyx_GOTREF(__pyx_t_2);
15305 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15306 __pyx_r = __pyx_t_2;
15320 __Pyx_XDECREF(__pyx_t_1);
15321 __Pyx_XDECREF(__pyx_t_2);
15322 __Pyx_AddTraceback(
"PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
15325 __Pyx_XGIVEREF(__pyx_r);
15326 __Pyx_RefNannyFinishContext();
15339 static PyObject *__pyx_pw_8PyClical_8clifford_81even(PyObject *__pyx_v_self,
15340 #
if CYTHON_METH_FASTCALL
15341 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15343 PyObject *__pyx_args, PyObject *__pyx_kwds
15346 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_80even,
"\n Even part of multivector, sum of even grade terms.\n\n >>> print(clifford(\"1+{1}+{1,2}\").even())\n 1+{1,2}\n ");
15347 static PyMethodDef __pyx_mdef_8PyClical_8clifford_81even = {
"even", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_81even, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_80even};
15348 static PyObject *__pyx_pw_8PyClical_8clifford_81even(PyObject *__pyx_v_self,
15349 #
if CYTHON_METH_FASTCALL
15350 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15352 PyObject *__pyx_args, PyObject *__pyx_kwds
15355 #if !CYTHON_METH_FASTCALL 15356 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15358 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
15359 PyObject *__pyx_r = 0;
15360 __Pyx_RefNannyDeclarations
15361 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
15362 #if !CYTHON_METH_FASTCALL 15363 #if CYTHON_ASSUME_SAFE_MACROS 15364 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15366 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15369 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15370 if (unlikely(__pyx_nargs > 0)) {
15371 __Pyx_RaiseArgtupleInvalid(
"even", 1, 0, 0, __pyx_nargs);
return NULL;}
15372 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"even", 0)))
return NULL;
15373 __pyx_r = __pyx_pf_8PyClical_8clifford_80even(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
15376 __Pyx_RefNannyFinishContext();
15380 static PyObject *__pyx_pf_8PyClical_8clifford_80even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
15381 PyObject *__pyx_r = NULL;
15382 __Pyx_RefNannyDeclarations
15383 PyObject *__pyx_t_1 = NULL;
15384 PyObject *__pyx_t_2 = NULL;
15385 int __pyx_lineno = 0;
15386 const char *__pyx_filename = NULL;
15387 int __pyx_clineno = 0;
15388 __Pyx_RefNannySetupContext(
"even", 1);
15397 __Pyx_XDECREF(__pyx_r);
15398 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
15399 __Pyx_GOTREF(__pyx_t_1);
15400 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->even());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
15401 __Pyx_GOTREF(__pyx_t_2);
15402 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15403 __pyx_r = __pyx_t_2;
15417 __Pyx_XDECREF(__pyx_t_1);
15418 __Pyx_XDECREF(__pyx_t_2);
15419 __Pyx_AddTraceback(
"PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
15422 __Pyx_XGIVEREF(__pyx_r);
15423 __Pyx_RefNannyFinishContext();
15436 static PyObject *__pyx_pw_8PyClical_8clifford_83odd(PyObject *__pyx_v_self,
15437 #
if CYTHON_METH_FASTCALL
15438 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15440 PyObject *__pyx_args, PyObject *__pyx_kwds
15443 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_82odd,
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(clifford(\"1+{1}+{1,2}\").odd())\n {1}\n ");
15444 static PyMethodDef __pyx_mdef_8PyClical_8clifford_83odd = {
"odd", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_83odd, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_82odd};
15445 static PyObject *__pyx_pw_8PyClical_8clifford_83odd(PyObject *__pyx_v_self,
15446 #
if CYTHON_METH_FASTCALL
15447 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15449 PyObject *__pyx_args, PyObject *__pyx_kwds
15452 #if !CYTHON_METH_FASTCALL 15453 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15455 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
15456 PyObject *__pyx_r = 0;
15457 __Pyx_RefNannyDeclarations
15458 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
15459 #if !CYTHON_METH_FASTCALL 15460 #if CYTHON_ASSUME_SAFE_MACROS 15461 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15463 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15466 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15467 if (unlikely(__pyx_nargs > 0)) {
15468 __Pyx_RaiseArgtupleInvalid(
"odd", 1, 0, 0, __pyx_nargs);
return NULL;}
15469 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"odd", 0)))
return NULL;
15470 __pyx_r = __pyx_pf_8PyClical_8clifford_82odd(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
15473 __Pyx_RefNannyFinishContext();
15477 static PyObject *__pyx_pf_8PyClical_8clifford_82odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
15478 PyObject *__pyx_r = NULL;
15479 __Pyx_RefNannyDeclarations
15480 PyObject *__pyx_t_1 = NULL;
15481 PyObject *__pyx_t_2 = NULL;
15482 int __pyx_lineno = 0;
15483 const char *__pyx_filename = NULL;
15484 int __pyx_clineno = 0;
15485 __Pyx_RefNannySetupContext(
"odd", 1);
15494 __Pyx_XDECREF(__pyx_r);
15495 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error)
15496 __Pyx_GOTREF(__pyx_t_1);
15497 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->odd());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error)
15498 __Pyx_GOTREF(__pyx_t_2);
15499 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15500 __pyx_r = __pyx_t_2;
15514 __Pyx_XDECREF(__pyx_t_1);
15515 __Pyx_XDECREF(__pyx_t_2);
15516 __Pyx_AddTraceback(
"PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
15519 __Pyx_XGIVEREF(__pyx_r);
15520 __Pyx_RefNannyFinishContext();
15533 static PyObject *__pyx_pw_8PyClical_8clifford_85vector_part(PyObject *__pyx_v_self,
15534 #
if CYTHON_METH_FASTCALL
15535 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15537 PyObject *__pyx_args, PyObject *__pyx_kwds
15540 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_84vector_part,
"\n Vector part of multivector, as a Python list, with respect to frm.\n\n >>> print(clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part())\n [2.0, 3.0]\n >>> print(clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part(index_set({-1,1,2})))\n [0.0, 2.0, 3.0]\n ");
15541 static PyMethodDef __pyx_mdef_8PyClical_8clifford_85vector_part = {
"vector_part", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_85vector_part, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_84vector_part};
15542 static PyObject *__pyx_pw_8PyClical_8clifford_85vector_part(PyObject *__pyx_v_self,
15543 #
if CYTHON_METH_FASTCALL
15544 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15546 PyObject *__pyx_args, PyObject *__pyx_kwds
15549 PyObject *__pyx_v_frm = 0;
15550 #if !CYTHON_METH_FASTCALL 15551 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15553 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
15554 PyObject* values[1] = {0};
15555 int __pyx_lineno = 0;
15556 const char *__pyx_filename = NULL;
15557 int __pyx_clineno = 0;
15558 PyObject *__pyx_r = 0;
15559 __Pyx_RefNannyDeclarations
15560 __Pyx_RefNannySetupContext(
"vector_part (wrapper)", 0);
15561 #if !CYTHON_METH_FASTCALL 15562 #if CYTHON_ASSUME_SAFE_MACROS 15563 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15565 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
15568 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15570 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
15571 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
15573 Py_ssize_t kw_args;
15574 switch (__pyx_nargs) {
15575 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
15576 CYTHON_FALLTHROUGH;
15578 default:
goto __pyx_L5_argtuple_error;
15580 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
15581 switch (__pyx_nargs) {
15584 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frm);
15585 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
15586 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1142, __pyx_L3_error)
15589 if (unlikely(kw_args > 0)) {
15590 const Py_ssize_t kwd_pos_args = __pyx_nargs;
15591 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"vector_part") < 0)) __PYX_ERR(0, 1142, __pyx_L3_error)
15594 switch (__pyx_nargs) {
15595 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
15596 CYTHON_FALLTHROUGH;
15598 default:
goto __pyx_L5_argtuple_error;
15601 __pyx_v_frm = values[0];
15603 goto __pyx_L6_skip;
15604 __pyx_L5_argtuple_error:;
15605 __Pyx_RaiseArgtupleInvalid(
"vector_part", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1142, __pyx_L3_error)
15607 goto __pyx_L4_argument_unpacking_done;
15610 Py_ssize_t __pyx_temp;
15611 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
15612 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
15615 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
15616 __Pyx_RefNannyFinishContext();
15618 __pyx_L4_argument_unpacking_done:;
15619 __pyx_r = __pyx_pf_8PyClical_8clifford_84vector_part(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
15623 Py_ssize_t __pyx_temp;
15624 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
15625 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
15628 __Pyx_RefNannyFinishContext();
15632 static PyObject *__pyx_pf_8PyClical_8clifford_84vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
15633 PyObject *__pyx_v_error_msg_prefix = NULL;
15634 std::vector<scalar_t> __pyx_v_vec;
15637 PyObject *__pyx_v_lst = NULL;
15638 PyObject *__pyx_v_err = NULL;
15639 PyObject *__pyx_r = NULL;
15640 __Pyx_RefNannyDeclarations
15641 PyObject *__pyx_t_1 = NULL;
15642 PyObject *__pyx_t_2 = NULL;
15643 PyObject *__pyx_t_3 = NULL;
15645 std::vector<scalar_t> __pyx_t_5;
15647 PyObject *__pyx_t_7 = NULL;
15651 PyObject *__pyx_t_11 = NULL;
15652 PyObject *__pyx_t_12 = NULL;
15653 PyObject *__pyx_t_13 = NULL;
15654 PyObject *__pyx_t_14 = NULL;
15655 PyObject *__pyx_t_15 = NULL;
15656 char const *__pyx_t_16;
15657 PyObject *__pyx_t_17 = NULL;
15658 PyObject *__pyx_t_18 = NULL;
15659 PyObject *__pyx_t_19 = NULL;
15660 PyObject *__pyx_t_20 = NULL;
15661 PyObject *__pyx_t_21 = NULL;
15662 PyObject *__pyx_t_22 = NULL;
15663 int __pyx_lineno = 0;
15664 const char *__pyx_filename = NULL;
15665 int __pyx_clineno = 0;
15666 __Pyx_RefNannySetupContext(
"vector_part", 1);
15675 __Pyx_INCREF(__pyx_kp_u_Cannot_take_vector_part_of);
15676 __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_take_vector_part_of;
15686 __Pyx_PyThreadState_declare
15687 __Pyx_PyThreadState_assign
15688 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15689 __Pyx_XGOTREF(__pyx_t_1);
15690 __Pyx_XGOTREF(__pyx_t_2);
15691 __Pyx_XGOTREF(__pyx_t_3);
15701 __pyx_t_4 = (__pyx_v_frm == Py_None);
15711 __pyx_t_5 = __pyx_v_self->instance->vector_part();
15712 __pyx_v_vec = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
15732 __pyx_t_6 = __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm));
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1159, __pyx_L3_error)
15734 __pyx_t_5 = __pyx_v_self->instance->vector_part(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6));
15736 __Pyx_CppExn2PyErr();
15737 __PYX_ERR(0, 1159, __pyx_L3_error)
15739 __pyx_v_vec = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
15750 __pyx_v_n = __pyx_v_vec.size();
15759 __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n));
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1161, __pyx_L3_error)
15760 __Pyx_GOTREF(__pyx_t_7);
15761 { Py_ssize_t __pyx_temp;
15762 for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
15763 __Pyx_INCREF(__pyx_float_0_0);
15764 __Pyx_GIVEREF(__pyx_float_0_0);
15765 if (__Pyx_PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0)) __PYX_ERR(0, 1161, __pyx_L3_error);
15768 __pyx_v_lst = ((PyObject*)__pyx_t_7);
15778 __pyx_t_8 = __pyx_v_n;
15779 __pyx_t_9 = __pyx_t_8;
15780 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
15781 __pyx_v_i = __pyx_t_10;
15790 __pyx_t_7 =
PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i]));
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L3_error)
15791 __Pyx_GOTREF(__pyx_t_7);
15792 if (unlikely((__Pyx_SetItemInt(__pyx_v_lst, __pyx_v_i, __pyx_t_7,
int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0))) __PYX_ERR(0, 1163, __pyx_L3_error)
15793 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15803 __Pyx_XDECREF(__pyx_r);
15804 __Pyx_INCREF(__pyx_v_lst);
15805 __pyx_r = __pyx_v_lst;
15806 goto __pyx_L7_try_return;
15817 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15826 __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
15828 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
15829 if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1165, __pyx_L5_except_error)
15830 __Pyx_XGOTREF(__pyx_t_7);
15831 __Pyx_XGOTREF(__pyx_t_11);
15832 __Pyx_XGOTREF(__pyx_t_12);
15833 __Pyx_INCREF(__pyx_t_11);
15834 __pyx_v_err = __pyx_t_11;
15844 __pyx_t_13 = __Pyx_PyObject_Str(((PyObject *)__pyx_v_self));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1166, __pyx_L17_error)
15845 __Pyx_GOTREF(__pyx_t_13);
15846 __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_t_13);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1166, __pyx_L17_error)
15847 __Pyx_GOTREF(__pyx_t_14);
15848 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
15849 __pyx_t_13 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_14, __pyx_kp_u_using_invalid);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1166, __pyx_L17_error)
15850 __Pyx_GOTREF(__pyx_t_13);
15851 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15860 __pyx_t_14 = PyObject_Repr(__pyx_v_frm);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1167, __pyx_L17_error)
15861 __Pyx_GOTREF(__pyx_t_14);
15862 __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1167, __pyx_L17_error)
15863 __Pyx_GOTREF(__pyx_t_15);
15864 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
15865 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15866 __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_u_as_frame);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1167, __pyx_L17_error)
15867 __Pyx_GOTREF(__pyx_t_14);
15868 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15877 __pyx_t_15 = __Pyx_PyObject_Str(__pyx_v_err);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1168, __pyx_L17_error)
15878 __Pyx_GOTREF(__pyx_t_15);
15879 __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1168, __pyx_L17_error)
15880 __Pyx_GOTREF(__pyx_t_13);
15881 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15882 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15891 __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1166, __pyx_L17_error)
15892 __Pyx_GOTREF(__pyx_t_15);
15893 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
15894 __Pyx_Raise(__pyx_t_15, 0, 0, 0);
15895 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15896 __PYX_ERR(0, 1166, __pyx_L17_error)
15909 __Pyx_PyThreadState_declare
15910 __Pyx_PyThreadState_assign
15911 __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
15912 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
15913 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
15914 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
15915 if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
15916 if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
15917 __Pyx_XGOTREF(__pyx_t_17);
15918 __Pyx_XGOTREF(__pyx_t_18);
15919 __Pyx_XGOTREF(__pyx_t_19);
15920 __Pyx_XGOTREF(__pyx_t_20);
15921 __Pyx_XGOTREF(__pyx_t_21);
15922 __Pyx_XGOTREF(__pyx_t_22);
15923 __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
15925 __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
15927 if (PY_MAJOR_VERSION >= 3) {
15928 __Pyx_XGIVEREF(__pyx_t_20);
15929 __Pyx_XGIVEREF(__pyx_t_21);
15930 __Pyx_XGIVEREF(__pyx_t_22);
15931 __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
15933 __Pyx_XGIVEREF(__pyx_t_17);
15934 __Pyx_XGIVEREF(__pyx_t_18);
15935 __Pyx_XGIVEREF(__pyx_t_19);
15936 __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
15937 __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
15938 __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_16;
15939 goto __pyx_L5_except_error;
15943 goto __pyx_L5_except_error;
15952 __pyx_L5_except_error:;
15953 __Pyx_XGIVEREF(__pyx_t_1);
15954 __Pyx_XGIVEREF(__pyx_t_2);
15955 __Pyx_XGIVEREF(__pyx_t_3);
15956 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15957 goto __pyx_L1_error;
15958 __pyx_L7_try_return:;
15959 __Pyx_XGIVEREF(__pyx_t_1);
15960 __Pyx_XGIVEREF(__pyx_t_2);
15961 __Pyx_XGIVEREF(__pyx_t_3);
15962 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15976 __Pyx_XDECREF(__pyx_t_7);
15977 __Pyx_XDECREF(__pyx_t_11);
15978 __Pyx_XDECREF(__pyx_t_12);
15979 __Pyx_XDECREF(__pyx_t_13);
15980 __Pyx_XDECREF(__pyx_t_14);
15981 __Pyx_XDECREF(__pyx_t_15);
15982 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
15985 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
15986 __Pyx_XDECREF(__pyx_v_lst);
15987 __Pyx_XDECREF(__pyx_v_err);
15988 __Pyx_XGIVEREF(__pyx_r);
15989 __Pyx_RefNannyFinishContext();
16002 static PyObject *__pyx_pw_8PyClical_8clifford_87involute(PyObject *__pyx_v_self,
16003 #
if CYTHON_METH_FASTCALL
16004 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16006 PyObject *__pyx_args, PyObject *__pyx_kwds
16009 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_86involute,
"\n Main involution, each {i} is replaced by -{i} in each term,\n eg. clifford(\"{1}\") -> -clifford(\"{1}\").\n\n >>> print(clifford(\"{1}\").involute())\n -{1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).involute())\n -{1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).involute())\n {1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").involute())\n 1-{1}+{1,2}\n ");
16010 static PyMethodDef __pyx_mdef_8PyClical_8clifford_87involute = {
"involute", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_87involute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_86involute};
16011 static PyObject *__pyx_pw_8PyClical_8clifford_87involute(PyObject *__pyx_v_self,
16012 #
if CYTHON_METH_FASTCALL
16013 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16015 PyObject *__pyx_args, PyObject *__pyx_kwds
16018 #if !CYTHON_METH_FASTCALL 16019 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16021 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16022 PyObject *__pyx_r = 0;
16023 __Pyx_RefNannyDeclarations
16024 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
16025 #if !CYTHON_METH_FASTCALL 16026 #if CYTHON_ASSUME_SAFE_MACROS 16027 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16029 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16032 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16033 if (unlikely(__pyx_nargs > 0)) {
16034 __Pyx_RaiseArgtupleInvalid(
"involute", 1, 0, 0, __pyx_nargs);
return NULL;}
16035 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"involute", 0)))
return NULL;
16036 __pyx_r = __pyx_pf_8PyClical_8clifford_86involute(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16039 __Pyx_RefNannyFinishContext();
16043 static PyObject *__pyx_pf_8PyClical_8clifford_86involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16044 PyObject *__pyx_r = NULL;
16045 __Pyx_RefNannyDeclarations
16046 PyObject *__pyx_t_1 = NULL;
16047 PyObject *__pyx_t_2 = NULL;
16048 int __pyx_lineno = 0;
16049 const char *__pyx_filename = NULL;
16050 int __pyx_clineno = 0;
16051 __Pyx_RefNannySetupContext(
"involute", 1);
16060 __Pyx_XDECREF(__pyx_r);
16061 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
16062 __Pyx_GOTREF(__pyx_t_1);
16063 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->involute());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error)
16064 __Pyx_GOTREF(__pyx_t_2);
16065 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16066 __pyx_r = __pyx_t_2;
16080 __Pyx_XDECREF(__pyx_t_1);
16081 __Pyx_XDECREF(__pyx_t_2);
16082 __Pyx_AddTraceback(
"PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
16085 __Pyx_XGIVEREF(__pyx_r);
16086 __Pyx_RefNannyFinishContext();
16099 static PyObject *__pyx_pw_8PyClical_8clifford_89reverse(PyObject *__pyx_v_self,
16100 #
if CYTHON_METH_FASTCALL
16101 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16103 PyObject *__pyx_args, PyObject *__pyx_kwds
16106 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_88reverse,
"\n Reversion, eg. clifford(\"{1}\")*clifford(\"{2}\") -> clifford(\"{2}\")*clifford(\"{1}\").\n\n >>> print(clifford(\"{1}\").reverse())\n {1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).reverse())\n {1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).reverse())\n -{1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").reverse())\n 1+{1}-{1,2}\n ");
16107 static PyMethodDef __pyx_mdef_8PyClical_8clifford_89reverse = {
"reverse", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_89reverse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_88reverse};
16108 static PyObject *__pyx_pw_8PyClical_8clifford_89reverse(PyObject *__pyx_v_self,
16109 #
if CYTHON_METH_FASTCALL
16110 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16112 PyObject *__pyx_args, PyObject *__pyx_kwds
16115 #if !CYTHON_METH_FASTCALL 16116 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16118 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16119 PyObject *__pyx_r = 0;
16120 __Pyx_RefNannyDeclarations
16121 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
16122 #if !CYTHON_METH_FASTCALL 16123 #if CYTHON_ASSUME_SAFE_MACROS 16124 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16126 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16129 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16130 if (unlikely(__pyx_nargs > 0)) {
16131 __Pyx_RaiseArgtupleInvalid(
"reverse", 1, 0, 0, __pyx_nargs);
return NULL;}
16132 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"reverse", 0)))
return NULL;
16133 __pyx_r = __pyx_pf_8PyClical_8clifford_88reverse(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16136 __Pyx_RefNannyFinishContext();
16140 static PyObject *__pyx_pf_8PyClical_8clifford_88reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16141 PyObject *__pyx_r = NULL;
16142 __Pyx_RefNannyDeclarations
16143 PyObject *__pyx_t_1 = NULL;
16144 PyObject *__pyx_t_2 = NULL;
16145 int __pyx_lineno = 0;
16146 const char *__pyx_filename = NULL;
16147 int __pyx_clineno = 0;
16148 __Pyx_RefNannySetupContext(
"reverse", 1);
16157 __Pyx_XDECREF(__pyx_r);
16158 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error)
16159 __Pyx_GOTREF(__pyx_t_1);
16160 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->reverse());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1199, __pyx_L1_error)
16161 __Pyx_GOTREF(__pyx_t_2);
16162 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16163 __pyx_r = __pyx_t_2;
16177 __Pyx_XDECREF(__pyx_t_1);
16178 __Pyx_XDECREF(__pyx_t_2);
16179 __Pyx_AddTraceback(
"PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
16182 __Pyx_XGIVEREF(__pyx_r);
16183 __Pyx_RefNannyFinishContext();
16196 static PyObject *__pyx_pw_8PyClical_8clifford_91conj(PyObject *__pyx_v_self,
16197 #
if CYTHON_METH_FASTCALL
16198 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16200 PyObject *__pyx_args, PyObject *__pyx_kwds
16203 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_90conj,
"\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print((clifford(\"{1}\")).conj())\n -{1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).conj())\n {1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).conj())\n -{1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").conj())\n 1-{1}-{1,2}\n ");
16204 static PyMethodDef __pyx_mdef_8PyClical_8clifford_91conj = {
"conj", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_91conj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_90conj};
16205 static PyObject *__pyx_pw_8PyClical_8clifford_91conj(PyObject *__pyx_v_self,
16206 #
if CYTHON_METH_FASTCALL
16207 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16209 PyObject *__pyx_args, PyObject *__pyx_kwds
16212 #if !CYTHON_METH_FASTCALL 16213 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16215 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16216 PyObject *__pyx_r = 0;
16217 __Pyx_RefNannyDeclarations
16218 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
16219 #if !CYTHON_METH_FASTCALL 16220 #if CYTHON_ASSUME_SAFE_MACROS 16221 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16223 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16226 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16227 if (unlikely(__pyx_nargs > 0)) {
16228 __Pyx_RaiseArgtupleInvalid(
"conj", 1, 0, 0, __pyx_nargs);
return NULL;}
16229 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"conj", 0)))
return NULL;
16230 __pyx_r = __pyx_pf_8PyClical_8clifford_90conj(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16233 __Pyx_RefNannyFinishContext();
16237 static PyObject *__pyx_pf_8PyClical_8clifford_90conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16238 PyObject *__pyx_r = NULL;
16239 __Pyx_RefNannyDeclarations
16240 PyObject *__pyx_t_1 = NULL;
16241 PyObject *__pyx_t_2 = NULL;
16242 int __pyx_lineno = 0;
16243 const char *__pyx_filename = NULL;
16244 int __pyx_clineno = 0;
16245 __Pyx_RefNannySetupContext(
"conj", 1);
16254 __Pyx_XDECREF(__pyx_r);
16255 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
16256 __Pyx_GOTREF(__pyx_t_1);
16257 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->conj());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1214, __pyx_L1_error)
16258 __Pyx_GOTREF(__pyx_t_2);
16259 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16260 __pyx_r = __pyx_t_2;
16274 __Pyx_XDECREF(__pyx_t_1);
16275 __Pyx_XDECREF(__pyx_t_2);
16276 __Pyx_AddTraceback(
"PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
16279 __Pyx_XGIVEREF(__pyx_r);
16280 __Pyx_RefNannyFinishContext();
16293 static PyObject *__pyx_pw_8PyClical_8clifford_93quad(PyObject *__pyx_v_self,
16294 #
if CYTHON_METH_FASTCALL
16295 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16297 PyObject *__pyx_args, PyObject *__pyx_kwds
16300 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_92quad,
"\n Quadratic form == (rev(x)*x)(0).\n\n >>> print(clifford(\"1+{1}+{1,2}\").quad())\n 3.0\n >>> print(clifford(\"1+{-1}+{1,2}+{1,2,3}\").quad())\n 2.0\n ");
16301 static PyMethodDef __pyx_mdef_8PyClical_8clifford_93quad = {
"quad", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_93quad, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_92quad};
16302 static PyObject *__pyx_pw_8PyClical_8clifford_93quad(PyObject *__pyx_v_self,
16303 #
if CYTHON_METH_FASTCALL
16304 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16306 PyObject *__pyx_args, PyObject *__pyx_kwds
16309 #if !CYTHON_METH_FASTCALL 16310 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16312 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16313 PyObject *__pyx_r = 0;
16314 __Pyx_RefNannyDeclarations
16315 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
16316 #if !CYTHON_METH_FASTCALL 16317 #if CYTHON_ASSUME_SAFE_MACROS 16318 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16320 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16323 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16324 if (unlikely(__pyx_nargs > 0)) {
16325 __Pyx_RaiseArgtupleInvalid(
"quad", 1, 0, 0, __pyx_nargs);
return NULL;}
16326 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"quad", 0)))
return NULL;
16327 __pyx_r = __pyx_pf_8PyClical_8clifford_92quad(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16330 __Pyx_RefNannyFinishContext();
16334 static PyObject *__pyx_pf_8PyClical_8clifford_92quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16335 PyObject *__pyx_r = NULL;
16336 __Pyx_RefNannyDeclarations
16337 PyObject *__pyx_t_1 = NULL;
16338 int __pyx_lineno = 0;
16339 const char *__pyx_filename = NULL;
16340 int __pyx_clineno = 0;
16341 __Pyx_RefNannySetupContext(
"quad", 1);
16350 __Pyx_XDECREF(__pyx_r);
16351 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->quad());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L1_error)
16352 __Pyx_GOTREF(__pyx_t_1);
16353 __pyx_r = __pyx_t_1;
16367 __Pyx_XDECREF(__pyx_t_1);
16368 __Pyx_AddTraceback(
"PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
16371 __Pyx_XGIVEREF(__pyx_r);
16372 __Pyx_RefNannyFinishContext();
16385 static PyObject *__pyx_pw_8PyClical_8clifford_95norm(PyObject *__pyx_v_self,
16386 #
if CYTHON_METH_FASTCALL
16387 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16389 PyObject *__pyx_args, PyObject *__pyx_kwds
16392 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_94norm,
"\n Norm == sum of squares of coordinates.\n\n >>> clifford(\"1+{1}+{1,2}\").norm()\n 3.0\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").norm()\n 4.0\n ");
16393 static PyMethodDef __pyx_mdef_8PyClical_8clifford_95norm = {
"norm", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_95norm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_94norm};
16394 static PyObject *__pyx_pw_8PyClical_8clifford_95norm(PyObject *__pyx_v_self,
16395 #
if CYTHON_METH_FASTCALL
16396 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16398 PyObject *__pyx_args, PyObject *__pyx_kwds
16401 #if !CYTHON_METH_FASTCALL 16402 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16404 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16405 PyObject *__pyx_r = 0;
16406 __Pyx_RefNannyDeclarations
16407 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
16408 #if !CYTHON_METH_FASTCALL 16409 #if CYTHON_ASSUME_SAFE_MACROS 16410 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16412 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16415 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16416 if (unlikely(__pyx_nargs > 0)) {
16417 __Pyx_RaiseArgtupleInvalid(
"norm", 1, 0, 0, __pyx_nargs);
return NULL;}
16418 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"norm", 0)))
return NULL;
16419 __pyx_r = __pyx_pf_8PyClical_8clifford_94norm(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16422 __Pyx_RefNannyFinishContext();
16426 static PyObject *__pyx_pf_8PyClical_8clifford_94norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16427 PyObject *__pyx_r = NULL;
16428 __Pyx_RefNannyDeclarations
16429 PyObject *__pyx_t_1 = NULL;
16430 int __pyx_lineno = 0;
16431 const char *__pyx_filename = NULL;
16432 int __pyx_clineno = 0;
16433 __Pyx_RefNannySetupContext(
"norm", 1);
16442 __Pyx_XDECREF(__pyx_r);
16443 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->norm());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error)
16444 __Pyx_GOTREF(__pyx_t_1);
16445 __pyx_r = __pyx_t_1;
16459 __Pyx_XDECREF(__pyx_t_1);
16460 __Pyx_AddTraceback(
"PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
16463 __Pyx_XGIVEREF(__pyx_r);
16464 __Pyx_RefNannyFinishContext();
16477 static PyObject *__pyx_pw_8PyClical_8clifford_97abs(PyObject *__pyx_v_self,
16478 #
if CYTHON_METH_FASTCALL
16479 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16481 PyObject *__pyx_args, PyObject *__pyx_kwds
16484 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_96abs,
"\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ");
16485 static PyMethodDef __pyx_mdef_8PyClical_8clifford_97abs = {
"abs", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_97abs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_96abs};
16486 static PyObject *__pyx_pw_8PyClical_8clifford_97abs(PyObject *__pyx_v_self,
16487 #
if CYTHON_METH_FASTCALL
16488 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16490 PyObject *__pyx_args, PyObject *__pyx_kwds
16493 #if !CYTHON_METH_FASTCALL 16494 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16496 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16497 PyObject *__pyx_r = 0;
16498 __Pyx_RefNannyDeclarations
16499 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
16500 #if !CYTHON_METH_FASTCALL 16501 #if CYTHON_ASSUME_SAFE_MACROS 16502 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16504 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16507 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16508 if (unlikely(__pyx_nargs > 0)) {
16509 __Pyx_RaiseArgtupleInvalid(
"abs", 1, 0, 0, __pyx_nargs);
return NULL;}
16510 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"abs", 0)))
return NULL;
16511 __pyx_r = __pyx_pf_8PyClical_8clifford_96abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16514 __Pyx_RefNannyFinishContext();
16518 static PyObject *__pyx_pf_8PyClical_8clifford_96abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16519 PyObject *__pyx_r = NULL;
16520 __Pyx_RefNannyDeclarations
16522 PyObject *__pyx_t_2 = NULL;
16523 int __pyx_lineno = 0;
16524 const char *__pyx_filename = NULL;
16525 int __pyx_clineno = 0;
16526 __Pyx_RefNannySetupContext(
"abs", 1);
16535 __Pyx_XDECREF(__pyx_r);
16536 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1245, __pyx_L1_error)
16537 __pyx_t_2 =
PyFloat_FromDouble(
abs(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
16538 __Pyx_GOTREF(__pyx_t_2);
16539 __pyx_r = __pyx_t_2;
16553 __Pyx_XDECREF(__pyx_t_2);
16554 __Pyx_AddTraceback(
"PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
16557 __Pyx_XGIVEREF(__pyx_r);
16558 __Pyx_RefNannyFinishContext();
16571 static PyObject *__pyx_pw_8PyClical_8clifford_99max_abs(PyObject *__pyx_v_self,
16572 #
if CYTHON_METH_FASTCALL
16573 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16575 PyObject *__pyx_args, PyObject *__pyx_kwds
16578 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_98max_abs,
"\n Maximum of absolute values of components of multivector: multivector infinity norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").max_abs()\n 1.0\n >>> clifford(\"3+2{1}+{1,2}\").max_abs()\n 3.0\n ");
16579 static PyMethodDef __pyx_mdef_8PyClical_8clifford_99max_abs = {
"max_abs", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_99max_abs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_98max_abs};
16580 static PyObject *__pyx_pw_8PyClical_8clifford_99max_abs(PyObject *__pyx_v_self,
16581 #
if CYTHON_METH_FASTCALL
16582 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16584 PyObject *__pyx_args, PyObject *__pyx_kwds
16587 #if !CYTHON_METH_FASTCALL 16588 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16590 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16591 PyObject *__pyx_r = 0;
16592 __Pyx_RefNannyDeclarations
16593 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
16594 #if !CYTHON_METH_FASTCALL 16595 #if CYTHON_ASSUME_SAFE_MACROS 16596 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16598 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16601 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16602 if (unlikely(__pyx_nargs > 0)) {
16603 __Pyx_RaiseArgtupleInvalid(
"max_abs", 1, 0, 0, __pyx_nargs);
return NULL;}
16604 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"max_abs", 0)))
return NULL;
16605 __pyx_r = __pyx_pf_8PyClical_8clifford_98max_abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16608 __Pyx_RefNannyFinishContext();
16612 static PyObject *__pyx_pf_8PyClical_8clifford_98max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16613 PyObject *__pyx_r = NULL;
16614 __Pyx_RefNannyDeclarations
16615 PyObject *__pyx_t_1 = NULL;
16616 int __pyx_lineno = 0;
16617 const char *__pyx_filename = NULL;
16618 int __pyx_clineno = 0;
16619 __Pyx_RefNannySetupContext(
"max_abs", 1);
16628 __Pyx_XDECREF(__pyx_r);
16629 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->max_abs());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
16630 __Pyx_GOTREF(__pyx_t_1);
16631 __pyx_r = __pyx_t_1;
16645 __Pyx_XDECREF(__pyx_t_1);
16646 __Pyx_AddTraceback(
"PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
16649 __Pyx_XGIVEREF(__pyx_r);
16650 __Pyx_RefNannyFinishContext();
16663 static PyObject *__pyx_pw_8PyClical_8clifford_101truncated(PyObject *__pyx_v_self,
16664 #
if CYTHON_METH_FASTCALL
16665 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16667 PyObject *__pyx_args, PyObject *__pyx_kwds
16670 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_100truncated,
"\n Remove all terms of self with relative size smaller than limit.\n\n >>> clifford(\"1e8+{1}+1e-8{1,2}\").truncated(1.0e-6)\n clifford(\"100000000\")\n >>> clifford(\"1e4+{1}+1e-4{1,2}\").truncated(1.0e-6)\n clifford(\"10000+{1}\")\n ");
16671 static PyMethodDef __pyx_mdef_8PyClical_8clifford_101truncated = {
"truncated", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_101truncated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_100truncated};
16672 static PyObject *__pyx_pw_8PyClical_8clifford_101truncated(PyObject *__pyx_v_self,
16673 #
if CYTHON_METH_FASTCALL
16674 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16676 PyObject *__pyx_args, PyObject *__pyx_kwds
16679 PyObject *__pyx_v_limit = 0;
16680 #if !CYTHON_METH_FASTCALL 16681 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16683 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16684 PyObject* values[1] = {0};
16685 int __pyx_lineno = 0;
16686 const char *__pyx_filename = NULL;
16687 int __pyx_clineno = 0;
16688 PyObject *__pyx_r = 0;
16689 __Pyx_RefNannyDeclarations
16690 __Pyx_RefNannySetupContext(
"truncated (wrapper)", 0);
16691 #if !CYTHON_METH_FASTCALL 16692 #if CYTHON_ASSUME_SAFE_MACROS 16693 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16695 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16698 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16700 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_limit,0};
16702 Py_ssize_t kw_args;
16703 switch (__pyx_nargs) {
16704 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
16705 CYTHON_FALLTHROUGH;
16707 default:
goto __pyx_L5_argtuple_error;
16709 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
16710 switch (__pyx_nargs) {
16712 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_limit)) != 0)) {
16713 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
16716 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error)
16717 else goto __pyx_L5_argtuple_error;
16719 if (unlikely(kw_args > 0)) {
16720 const Py_ssize_t kwd_pos_args = __pyx_nargs;
16721 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"truncated") < 0)) __PYX_ERR(0, 1258, __pyx_L3_error)
16723 }
else if (unlikely(__pyx_nargs != 1)) {
16724 goto __pyx_L5_argtuple_error;
16726 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
16728 __pyx_v_limit = values[0];
16730 goto __pyx_L6_skip;
16731 __pyx_L5_argtuple_error:;
16732 __Pyx_RaiseArgtupleInvalid(
"truncated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1258, __pyx_L3_error)
16734 goto __pyx_L4_argument_unpacking_done;
16737 Py_ssize_t __pyx_temp;
16738 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
16739 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
16742 __Pyx_AddTraceback(
"PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
16743 __Pyx_RefNannyFinishContext();
16745 __pyx_L4_argument_unpacking_done:;
16746 __pyx_r = __pyx_pf_8PyClical_8clifford_100truncated(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_limit);
16750 Py_ssize_t __pyx_temp;
16751 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
16752 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
16755 __Pyx_RefNannyFinishContext();
16759 static PyObject *__pyx_pf_8PyClical_8clifford_100truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
16760 PyObject *__pyx_r = NULL;
16761 __Pyx_RefNannyDeclarations
16762 PyObject *__pyx_t_1 = NULL;
16764 PyObject *__pyx_t_3 = NULL;
16765 int __pyx_lineno = 0;
16766 const char *__pyx_filename = NULL;
16767 int __pyx_clineno = 0;
16768 __Pyx_RefNannySetupContext(
"truncated", 1);
16777 __Pyx_XDECREF(__pyx_r);
16778 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
16779 __Pyx_GOTREF(__pyx_t_1);
16780 __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit);
if (unlikely((__pyx_t_2 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error)
16781 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->truncated(__pyx_t_2));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
16782 __Pyx_GOTREF(__pyx_t_3);
16783 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16784 __pyx_r = __pyx_t_3;
16798 __Pyx_XDECREF(__pyx_t_1);
16799 __Pyx_XDECREF(__pyx_t_3);
16800 __Pyx_AddTraceback(
"PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
16803 __Pyx_XGIVEREF(__pyx_r);
16804 __Pyx_RefNannyFinishContext();
16817 static PyObject *__pyx_pw_8PyClical_8clifford_103isinf(PyObject *__pyx_v_self,
16818 #
if CYTHON_METH_FASTCALL
16819 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16821 PyObject *__pyx_args, PyObject *__pyx_kwds
16824 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_102isinf,
"\n Check if a multivector contains any infinite values.\n\n >>> clifford().isinf()\n False\n ");
16825 static PyMethodDef __pyx_mdef_8PyClical_8clifford_103isinf = {
"isinf", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_103isinf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_102isinf};
16826 static PyObject *__pyx_pw_8PyClical_8clifford_103isinf(PyObject *__pyx_v_self,
16827 #
if CYTHON_METH_FASTCALL
16828 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16830 PyObject *__pyx_args, PyObject *__pyx_kwds
16833 #if !CYTHON_METH_FASTCALL 16834 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16836 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16837 PyObject *__pyx_r = 0;
16838 __Pyx_RefNannyDeclarations
16839 __Pyx_RefNannySetupContext(
"isinf (wrapper)", 0);
16840 #if !CYTHON_METH_FASTCALL 16841 #if CYTHON_ASSUME_SAFE_MACROS 16842 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16844 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16847 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16848 if (unlikely(__pyx_nargs > 0)) {
16849 __Pyx_RaiseArgtupleInvalid(
"isinf", 1, 0, 0, __pyx_nargs);
return NULL;}
16850 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"isinf", 0)))
return NULL;
16851 __pyx_r = __pyx_pf_8PyClical_8clifford_102isinf(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16854 __Pyx_RefNannyFinishContext();
16858 static PyObject *__pyx_pf_8PyClical_8clifford_102isinf(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16859 PyObject *__pyx_r = NULL;
16860 __Pyx_RefNannyDeclarations
16861 PyObject *__pyx_t_1 = NULL;
16862 int __pyx_lineno = 0;
16863 const char *__pyx_filename = NULL;
16864 int __pyx_clineno = 0;
16865 __Pyx_RefNannySetupContext(
"isinf", 1);
16874 __Pyx_XDECREF(__pyx_r);
16875 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
16876 __Pyx_GOTREF(__pyx_t_1);
16877 __pyx_r = __pyx_t_1;
16891 __Pyx_XDECREF(__pyx_t_1);
16892 __Pyx_AddTraceback(
"PyClical.clifford.isinf", __pyx_clineno, __pyx_lineno, __pyx_filename);
16895 __Pyx_XGIVEREF(__pyx_r);
16896 __Pyx_RefNannyFinishContext();
16909 static PyObject *__pyx_pw_8PyClical_8clifford_105isnan(PyObject *__pyx_v_self,
16910 #
if CYTHON_METH_FASTCALL
16911 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16913 PyObject *__pyx_args, PyObject *__pyx_kwds
16916 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_104isnan,
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ");
16917 static PyMethodDef __pyx_mdef_8PyClical_8clifford_105isnan = {
"isnan", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_105isnan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_104isnan};
16918 static PyObject *__pyx_pw_8PyClical_8clifford_105isnan(PyObject *__pyx_v_self,
16919 #
if CYTHON_METH_FASTCALL
16920 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
16922 PyObject *__pyx_args, PyObject *__pyx_kwds
16925 #if !CYTHON_METH_FASTCALL 16926 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
16928 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
16929 PyObject *__pyx_r = 0;
16930 __Pyx_RefNannyDeclarations
16931 __Pyx_RefNannySetupContext(
"isnan (wrapper)", 0);
16932 #if !CYTHON_METH_FASTCALL 16933 #if CYTHON_ASSUME_SAFE_MACROS 16934 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
16936 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
16939 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
16940 if (unlikely(__pyx_nargs > 0)) {
16941 __Pyx_RaiseArgtupleInvalid(
"isnan", 1, 0, 0, __pyx_nargs);
return NULL;}
16942 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"isnan", 0)))
return NULL;
16943 __pyx_r = __pyx_pf_8PyClical_8clifford_104isnan(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
16946 __Pyx_RefNannyFinishContext();
16950 static PyObject *__pyx_pf_8PyClical_8clifford_104isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
16951 PyObject *__pyx_r = NULL;
16952 __Pyx_RefNannyDeclarations
16953 PyObject *__pyx_t_1 = NULL;
16954 int __pyx_lineno = 0;
16955 const char *__pyx_filename = NULL;
16956 int __pyx_clineno = 0;
16957 __Pyx_RefNannySetupContext(
"isnan", 1);
16966 __Pyx_XDECREF(__pyx_r);
16967 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan());
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
16968 __Pyx_GOTREF(__pyx_t_1);
16969 __pyx_r = __pyx_t_1;
16983 __Pyx_XDECREF(__pyx_t_1);
16984 __Pyx_AddTraceback(
"PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16987 __Pyx_XGIVEREF(__pyx_r);
16988 __Pyx_RefNannyFinishContext();
17001 static PyObject *__pyx_pw_8PyClical_8clifford_107frame(PyObject *__pyx_v_self,
17002 #
if CYTHON_METH_FASTCALL
17003 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17005 PyObject *__pyx_args, PyObject *__pyx_kwds
17008 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_106frame,
"\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print(clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame())\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <class 'PyClical.index_set'>\n ");
17009 static PyMethodDef __pyx_mdef_8PyClical_8clifford_107frame = {
"frame", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_107frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_106frame};
17010 static PyObject *__pyx_pw_8PyClical_8clifford_107frame(PyObject *__pyx_v_self,
17011 #
if CYTHON_METH_FASTCALL
17012 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17014 PyObject *__pyx_args, PyObject *__pyx_kwds
17017 #if !CYTHON_METH_FASTCALL 17018 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
17020 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17021 PyObject *__pyx_r = 0;
17022 __Pyx_RefNannyDeclarations
17023 __Pyx_RefNannySetupContext(
"frame (wrapper)", 0);
17024 #if !CYTHON_METH_FASTCALL 17025 #if CYTHON_ASSUME_SAFE_MACROS 17026 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
17028 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
17031 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
17032 if (unlikely(__pyx_nargs > 0)) {
17033 __Pyx_RaiseArgtupleInvalid(
"frame", 1, 0, 0, __pyx_nargs);
return NULL;}
17034 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"frame", 0)))
return NULL;
17035 __pyx_r = __pyx_pf_8PyClical_8clifford_106frame(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
17038 __Pyx_RefNannyFinishContext();
17042 static PyObject *__pyx_pf_8PyClical_8clifford_106frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
17043 PyObject *__pyx_r = NULL;
17044 __Pyx_RefNannyDeclarations
17045 PyObject *__pyx_t_1 = NULL;
17046 PyObject *__pyx_t_2 = NULL;
17047 int __pyx_lineno = 0;
17048 const char *__pyx_filename = NULL;
17049 int __pyx_clineno = 0;
17050 __Pyx_RefNannySetupContext(
"frame", 1);
17059 __Pyx_XDECREF(__pyx_r);
17060 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
17061 __Pyx_GOTREF(__pyx_t_1);
17062 __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), __pyx_v_self->instance->frame());
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error)
17063 __Pyx_GOTREF(__pyx_t_2);
17064 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17065 __pyx_r = __pyx_t_2;
17079 __Pyx_XDECREF(__pyx_t_1);
17080 __Pyx_XDECREF(__pyx_t_2);
17081 __Pyx_AddTraceback(
"PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
17084 __Pyx_XGIVEREF(__pyx_r);
17085 __Pyx_RefNannyFinishContext();
17098 static PyObject *__pyx_pw_8PyClical_8clifford_109__repr__(PyObject *__pyx_v_self);
17099 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_108__repr__,
"\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__repr__()\n 'clifford(\"1+3{-1}+2{1,2}+4{-2,7}\")'\n ");
17100 #if CYTHON_UPDATE_DESCRIPTOR_DOC 17101 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_108__repr__;
17103 static PyObject *__pyx_pw_8PyClical_8clifford_109__repr__(PyObject *__pyx_v_self) {
17104 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17105 PyObject *__pyx_r = 0;
17106 __Pyx_RefNannyDeclarations
17107 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
17108 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
17109 __pyx_r = __pyx_pf_8PyClical_8clifford_108__repr__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
17112 __Pyx_RefNannyFinishContext();
17116 static PyObject *__pyx_pf_8PyClical_8clifford_108__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
17117 PyObject *__pyx_r = NULL;
17118 __Pyx_RefNannyDeclarations
17120 PyObject *__pyx_t_2 = NULL;
17121 int __pyx_lineno = 0;
17122 const char *__pyx_filename = NULL;
17123 int __pyx_clineno = 0;
17124 __Pyx_RefNannySetupContext(
"__repr__", 1);
17133 __Pyx_XDECREF(__pyx_r);
17134 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L1_error)
17135 __pyx_t_2 = __Pyx_decode_cpp_string(
clifford_to_repr(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error)
17136 __Pyx_GOTREF(__pyx_t_2);
17137 __pyx_r = __pyx_t_2;
17151 __Pyx_XDECREF(__pyx_t_2);
17152 __Pyx_AddTraceback(
"PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
17155 __Pyx_XGIVEREF(__pyx_r);
17156 __Pyx_RefNannyFinishContext();
17169 static PyObject *__pyx_pw_8PyClical_8clifford_111__str__(PyObject *__pyx_v_self);
17170 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_110__str__,
"\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__str__()\n '1+3{-1}+2{1,2}+4{-2,7}'\n ");
17171 #if CYTHON_UPDATE_DESCRIPTOR_DOC 17172 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_110__str__;
17174 static PyObject *__pyx_pw_8PyClical_8clifford_111__str__(PyObject *__pyx_v_self) {
17175 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17176 PyObject *__pyx_r = 0;
17177 __Pyx_RefNannyDeclarations
17178 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
17179 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
17180 __pyx_r = __pyx_pf_8PyClical_8clifford_110__str__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
17183 __Pyx_RefNannyFinishContext();
17187 static PyObject *__pyx_pf_8PyClical_8clifford_110__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
17188 PyObject *__pyx_r = NULL;
17189 __Pyx_RefNannyDeclarations
17191 PyObject *__pyx_t_2 = NULL;
17192 int __pyx_lineno = 0;
17193 const char *__pyx_filename = NULL;
17194 int __pyx_clineno = 0;
17195 __Pyx_RefNannySetupContext(
"__str__", 1);
17204 __Pyx_XDECREF(__pyx_r);
17205 __pyx_t_1 = __pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
17206 __pyx_t_2 = __Pyx_decode_cpp_string(
clifford_to_str(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
17207 __Pyx_GOTREF(__pyx_t_2);
17208 __pyx_r = __pyx_t_2;
17222 __Pyx_XDECREF(__pyx_t_2);
17223 __Pyx_AddTraceback(
"PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
17226 __Pyx_XGIVEREF(__pyx_r);
17227 __Pyx_RefNannyFinishContext();
17238 static PyObject *__pyx_pw_8PyClical_8clifford_113__reduce_cython__(PyObject *__pyx_v_self,
17239 #
if CYTHON_METH_FASTCALL
17240 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17242 PyObject *__pyx_args, PyObject *__pyx_kwds
17245 static PyMethodDef __pyx_mdef_8PyClical_8clifford_113__reduce_cython__ = {
"__reduce_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_113__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
17246 static PyObject *__pyx_pw_8PyClical_8clifford_113__reduce_cython__(PyObject *__pyx_v_self,
17247 #
if CYTHON_METH_FASTCALL
17248 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17250 PyObject *__pyx_args, PyObject *__pyx_kwds
17253 #if !CYTHON_METH_FASTCALL 17254 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
17256 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17257 PyObject *__pyx_r = 0;
17258 __Pyx_RefNannyDeclarations
17259 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
17260 #if !CYTHON_METH_FASTCALL 17261 #if CYTHON_ASSUME_SAFE_MACROS 17262 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
17264 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
17267 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
17268 if (unlikely(__pyx_nargs > 0)) {
17269 __Pyx_RaiseArgtupleInvalid(
"__reduce_cython__", 1, 0, 0, __pyx_nargs);
return NULL;}
17270 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"__reduce_cython__", 0)))
return NULL;
17271 __pyx_r = __pyx_pf_8PyClical_8clifford_112__reduce_cython__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
17274 __Pyx_RefNannyFinishContext();
17278 static PyObject *__pyx_pf_8PyClical_8clifford_112__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
17279 PyObject *__pyx_r = NULL;
17280 __Pyx_RefNannyDeclarations
17281 int __pyx_lineno = 0;
17282 const char *__pyx_filename = NULL;
17283 int __pyx_clineno = 0;
17284 __Pyx_RefNannySetupContext(
"__reduce_cython__", 1);
17292 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
17293 __PYX_ERR(1, 2, __pyx_L1_error)
17303 __Pyx_AddTraceback(
"PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
17305 __Pyx_XGIVEREF(__pyx_r);
17306 __Pyx_RefNannyFinishContext();
17318 static PyObject *__pyx_pw_8PyClical_8clifford_115__setstate_cython__(PyObject *__pyx_v_self,
17319 #
if CYTHON_METH_FASTCALL
17320 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17322 PyObject *__pyx_args, PyObject *__pyx_kwds
17325 static PyMethodDef __pyx_mdef_8PyClical_8clifford_115__setstate_cython__ = {
"__setstate_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_115__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
17326 static PyObject *__pyx_pw_8PyClical_8clifford_115__setstate_cython__(PyObject *__pyx_v_self,
17327 #
if CYTHON_METH_FASTCALL
17328 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17330 PyObject *__pyx_args, PyObject *__pyx_kwds
17333 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
17334 #if !CYTHON_METH_FASTCALL 17335 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
17337 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17338 PyObject* values[1] = {0};
17339 int __pyx_lineno = 0;
17340 const char *__pyx_filename = NULL;
17341 int __pyx_clineno = 0;
17342 PyObject *__pyx_r = 0;
17343 __Pyx_RefNannyDeclarations
17344 __Pyx_RefNannySetupContext(
"__setstate_cython__ (wrapper)", 0);
17345 #if !CYTHON_METH_FASTCALL 17346 #if CYTHON_ASSUME_SAFE_MACROS 17347 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
17349 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
17352 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
17354 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
17356 Py_ssize_t kw_args;
17357 switch (__pyx_nargs) {
17358 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
17359 CYTHON_FALLTHROUGH;
17361 default:
goto __pyx_L5_argtuple_error;
17363 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
17364 switch (__pyx_nargs) {
17366 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
17367 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
17370 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
17371 else goto __pyx_L5_argtuple_error;
17373 if (unlikely(kw_args > 0)) {
17374 const Py_ssize_t kwd_pos_args = __pyx_nargs;
17375 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
17377 }
else if (unlikely(__pyx_nargs != 1)) {
17378 goto __pyx_L5_argtuple_error;
17380 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
17382 __pyx_v___pyx_state = values[0];
17384 goto __pyx_L6_skip;
17385 __pyx_L5_argtuple_error:;
17386 __Pyx_RaiseArgtupleInvalid(
"__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
17388 goto __pyx_L4_argument_unpacking_done;
17391 Py_ssize_t __pyx_temp;
17392 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17393 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
17396 __Pyx_AddTraceback(
"PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
17397 __Pyx_RefNannyFinishContext();
17399 __pyx_L4_argument_unpacking_done:;
17400 __pyx_r = __pyx_pf_8PyClical_8clifford_114__setstate_cython__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v___pyx_state);
17404 Py_ssize_t __pyx_temp;
17405 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17406 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
17409 __Pyx_RefNannyFinishContext();
17413 static PyObject *__pyx_pf_8PyClical_8clifford_114__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
17414 PyObject *__pyx_r = NULL;
17415 __Pyx_RefNannyDeclarations
17416 int __pyx_lineno = 0;
17417 const char *__pyx_filename = NULL;
17418 int __pyx_clineno = 0;
17419 __Pyx_RefNannySetupContext(
"__setstate_cython__", 1);
17426 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
17427 __PYX_ERR(1, 4, __pyx_L1_error)
17438 __Pyx_AddTraceback(
"PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
17440 __Pyx_XGIVEREF(__pyx_r);
17441 __Pyx_RefNannyFinishContext();
17454 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
17455 PyDoc_STRVAR(__pyx_doc_8PyClical_8clifford_hidden_doctests,
"\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print(clifford(2))\n 2\n >>> print(clifford(2.0))\n 2\n >>> print(clifford(1.0e-1))\n 0.1\n >>> print(clifford(\"2\"))\n 2\n >>> print(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print(clifford(clifford(\"2{1,2,3}\")))\n 2{1,2,3}\n >>> print(clifford(\"-{1}\"))\n -{1}\n >>> print(clifford(2,index_set({1,2})))\n 2{1,2}\n >>> print(clifford([2,3],index_set({1,2})))\n 2{1}+3{2}\n >>> print(clifford([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'list'>.\n >>> print(clifford(None))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'NoneType'>.\n >>> print(clifford(None,[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'NoneType'>, <class 'list'>).\n >>> print(clifford([1,2],[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'list'>, <class 'list'>).\n >>> print(clifford(\"\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print(clifford(\"{\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print(clifford(\"{1\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print(clifford(\"+\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print(clifford(\"-\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object fro""m invalid string '-'.\n >>> print(clifford(\"{1}+\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ");
17456 static PyMethodDef __pyx_mdef_8PyClical_9clifford_hidden_doctests = {
"clifford_hidden_doctests", (PyCFunction)__pyx_pw_8PyClical_9clifford_hidden_doctests, METH_NOARGS, __pyx_doc_8PyClical_8clifford_hidden_doctests};
17457 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
17458 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17459 PyObject *__pyx_r = 0;
17460 __Pyx_RefNannyDeclarations
17461 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests (wrapper)", 0);
17462 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
17463 __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
17466 __Pyx_RefNannyFinishContext();
17470 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
17471 PyObject *__pyx_r = NULL;
17472 __Pyx_RefNannyDeclarations
17473 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests", 1);
17482 __Pyx_XDECREF(__pyx_r);
17483 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17496 __Pyx_XGIVEREF(__pyx_r);
17497 __Pyx_RefNannyFinishContext();
17509 static PyObject *__pyx_pw_8PyClical_11error_squared_tol(PyObject *__pyx_self,
17510 #
if CYTHON_METH_FASTCALL
17511 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17513 PyObject *__pyx_args, PyObject *__pyx_kwds
17516 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared_tol(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17517 PyObject *__pyx_r = NULL;
17518 __Pyx_RefNannyDeclarations
17520 PyObject *__pyx_t_2 = NULL;
17521 int __pyx_lineno = 0;
17522 const char *__pyx_filename = NULL;
17523 int __pyx_clineno = 0;
17524 __Pyx_RefNannySetupContext(
"error_squared_tol", 1);
17533 __Pyx_XDECREF(__pyx_r);
17534 __pyx_t_1 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1407, __pyx_L1_error)
17536 __Pyx_GOTREF(__pyx_t_2);
17537 __pyx_r = __pyx_t_2;
17551 __Pyx_XDECREF(__pyx_t_2);
17552 __Pyx_AddTraceback(
"PyClical.error_squared_tol", __pyx_clineno, __pyx_lineno, __pyx_filename);
17555 __Pyx_XGIVEREF(__pyx_r);
17556 __Pyx_RefNannyFinishContext();
17561 static PyObject *__pyx_pw_8PyClical_11error_squared_tol(PyObject *__pyx_self,
17562 #
if CYTHON_METH_FASTCALL
17563 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17565 PyObject *__pyx_args, PyObject *__pyx_kwds
17568 PyDoc_STRVAR(__pyx_doc_8PyClical_10error_squared_tol,
"\n Quadratic norm error tolerance relative to a specific multivector.\n\n >>> print(error_squared_tol(clifford(\"{1}\")) * 3.0 - error_squared_tol(clifford(\"1{1}-2{2}+3{3}\")))\n 0.0\n ");
17569 static PyMethodDef __pyx_mdef_8PyClical_11error_squared_tol = {
"error_squared_tol", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_11error_squared_tol, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_10error_squared_tol};
17570 static PyObject *__pyx_pw_8PyClical_11error_squared_tol(PyObject *__pyx_self,
17571 #
if CYTHON_METH_FASTCALL
17572 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17574 PyObject *__pyx_args, PyObject *__pyx_kwds
17577 PyObject *__pyx_v_obj = 0;
17578 #if !CYTHON_METH_FASTCALL 17579 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
17581 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17582 PyObject* values[1] = {0};
17583 int __pyx_lineno = 0;
17584 const char *__pyx_filename = NULL;
17585 int __pyx_clineno = 0;
17586 PyObject *__pyx_r = 0;
17587 __Pyx_RefNannyDeclarations
17588 __Pyx_RefNannySetupContext(
"error_squared_tol (wrapper)", 0);
17589 #if !CYTHON_METH_FASTCALL 17590 #if CYTHON_ASSUME_SAFE_MACROS 17591 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
17593 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
17596 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
17598 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
17600 Py_ssize_t kw_args;
17601 switch (__pyx_nargs) {
17602 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
17603 CYTHON_FALLTHROUGH;
17605 default:
goto __pyx_L5_argtuple_error;
17607 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
17608 switch (__pyx_nargs) {
17610 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
17611 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
17614 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1400, __pyx_L3_error)
17615 else goto __pyx_L5_argtuple_error;
17617 if (unlikely(kw_args > 0)) {
17618 const Py_ssize_t kwd_pos_args = __pyx_nargs;
17619 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"error_squared_tol") < 0)) __PYX_ERR(0, 1400, __pyx_L3_error)
17621 }
else if (unlikely(__pyx_nargs != 1)) {
17622 goto __pyx_L5_argtuple_error;
17624 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
17626 __pyx_v_obj = values[0];
17628 goto __pyx_L6_skip;
17629 __pyx_L5_argtuple_error:;
17630 __Pyx_RaiseArgtupleInvalid(
"error_squared_tol", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1400, __pyx_L3_error)
17632 goto __pyx_L4_argument_unpacking_done;
17635 Py_ssize_t __pyx_temp;
17636 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17637 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
17640 __Pyx_AddTraceback(
"PyClical.error_squared_tol", __pyx_clineno, __pyx_lineno, __pyx_filename);
17641 __Pyx_RefNannyFinishContext();
17643 __pyx_L4_argument_unpacking_done:;
17644 __pyx_r = __pyx_pf_8PyClical_10error_squared_tol(__pyx_self, __pyx_v_obj);
17648 Py_ssize_t __pyx_temp;
17649 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17650 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
17653 __Pyx_RefNannyFinishContext();
17657 static PyObject *__pyx_pf_8PyClical_10error_squared_tol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17658 PyObject *__pyx_r = NULL;
17659 __Pyx_RefNannyDeclarations
17660 PyObject *__pyx_t_1 = NULL;
17661 int __pyx_lineno = 0;
17662 const char *__pyx_filename = NULL;
17663 int __pyx_clineno = 0;
17664 __Pyx_RefNannySetupContext(
"error_squared_tol", 1);
17665 __Pyx_XDECREF(__pyx_r);
17666 __pyx_t_1 = __pyx_f_8PyClical_error_squared_tol(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
17667 __Pyx_GOTREF(__pyx_t_1);
17668 __pyx_r = __pyx_t_1;
17674 __Pyx_XDECREF(__pyx_t_1);
17675 __Pyx_AddTraceback(
"PyClical.error_squared_tol", __pyx_clineno, __pyx_lineno, __pyx_filename);
17678 __Pyx_XGIVEREF(__pyx_r);
17679 __Pyx_RefNannyFinishContext();
17691 static PyObject *__pyx_pw_8PyClical_13error_squared(PyObject *__pyx_self,
17692 #
if CYTHON_METH_FASTCALL
17693 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17695 PyObject *__pyx_args, PyObject *__pyx_kwds
17698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17699 PyObject *__pyx_r = NULL;
17700 __Pyx_RefNannyDeclarations
17704 PyObject *__pyx_t_4 = NULL;
17705 int __pyx_lineno = 0;
17706 const char *__pyx_filename = NULL;
17707 int __pyx_clineno = 0;
17708 __Pyx_RefNannySetupContext(
"error_squared", 1);
17717 __Pyx_XDECREF(__pyx_r);
17718 __pyx_t_1 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error)
17719 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error)
17720 __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_threshold);
if (unlikely((__pyx_t_3 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error)
17721 __pyx_t_4 =
PyFloat_FromDouble(
error_squared(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2), ((
scalar_t)__pyx_t_3)));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error)
17722 __Pyx_GOTREF(__pyx_t_4);
17723 __pyx_r = __pyx_t_4;
17737 __Pyx_XDECREF(__pyx_t_4);
17738 __Pyx_AddTraceback(
"PyClical.error_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
17741 __Pyx_XGIVEREF(__pyx_r);
17742 __Pyx_RefNannyFinishContext();
17747 static PyObject *__pyx_pw_8PyClical_13error_squared(PyObject *__pyx_self,
17748 #
if CYTHON_METH_FASTCALL
17749 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17751 PyObject *__pyx_args, PyObject *__pyx_kwds
17754 PyDoc_STRVAR(__pyx_doc_8PyClical_12error_squared,
"\n Relative or absolute error using the quadratic norm.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(error_squared(clifford(\"{1}\"), clifford(\"1{1}\"), err2))\n 0.0\n >>> print(error_squared(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\"), err2))\n 25.0\n ");
17755 static PyMethodDef __pyx_mdef_8PyClical_13error_squared = {
"error_squared", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_13error_squared, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_12error_squared};
17756 static PyObject *__pyx_pw_8PyClical_13error_squared(PyObject *__pyx_self,
17757 #
if CYTHON_METH_FASTCALL
17758 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17760 PyObject *__pyx_args, PyObject *__pyx_kwds
17763 PyObject *__pyx_v_lhs = 0;
17764 PyObject *__pyx_v_rhs = 0;
17765 PyObject *__pyx_v_threshold = 0;
17766 #if !CYTHON_METH_FASTCALL 17767 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
17769 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17770 PyObject* values[3] = {0,0,0};
17771 int __pyx_lineno = 0;
17772 const char *__pyx_filename = NULL;
17773 int __pyx_clineno = 0;
17774 PyObject *__pyx_r = 0;
17775 __Pyx_RefNannyDeclarations
17776 __Pyx_RefNannySetupContext(
"error_squared (wrapper)", 0);
17777 #if !CYTHON_METH_FASTCALL 17778 #if CYTHON_ASSUME_SAFE_MACROS 17779 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
17781 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
17784 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
17786 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_threshold,0};
17788 Py_ssize_t kw_args;
17789 switch (__pyx_nargs) {
17790 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
17791 CYTHON_FALLTHROUGH;
17792 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
17793 CYTHON_FALLTHROUGH;
17794 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
17795 CYTHON_FALLTHROUGH;
17797 default:
goto __pyx_L5_argtuple_error;
17799 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
17800 switch (__pyx_nargs) {
17802 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lhs)) != 0)) {
17803 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
17806 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
17807 else goto __pyx_L5_argtuple_error;
17808 CYTHON_FALLTHROUGH;
17810 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rhs)) != 0)) {
17811 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
17814 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
17816 __Pyx_RaiseArgtupleInvalid(
"error_squared", 1, 3, 3, 1); __PYX_ERR(0, 1409, __pyx_L3_error)
17818 CYTHON_FALLTHROUGH;
17820 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threshold)) != 0)) {
17821 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
17824 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
17826 __Pyx_RaiseArgtupleInvalid(
"error_squared", 1, 3, 3, 2); __PYX_ERR(0, 1409, __pyx_L3_error)
17829 if (unlikely(kw_args > 0)) {
17830 const Py_ssize_t kwd_pos_args = __pyx_nargs;
17831 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"error_squared") < 0)) __PYX_ERR(0, 1409, __pyx_L3_error)
17833 }
else if (unlikely(__pyx_nargs != 3)) {
17834 goto __pyx_L5_argtuple_error;
17836 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
17837 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
17838 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
17840 __pyx_v_lhs = values[0];
17841 __pyx_v_rhs = values[1];
17842 __pyx_v_threshold = values[2];
17844 goto __pyx_L6_skip;
17845 __pyx_L5_argtuple_error:;
17846 __Pyx_RaiseArgtupleInvalid(
"error_squared", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1409, __pyx_L3_error)
17848 goto __pyx_L4_argument_unpacking_done;
17851 Py_ssize_t __pyx_temp;
17852 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17853 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
17856 __Pyx_AddTraceback(
"PyClical.error_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
17857 __Pyx_RefNannyFinishContext();
17859 __pyx_L4_argument_unpacking_done:;
17860 __pyx_r = __pyx_pf_8PyClical_12error_squared(__pyx_self, __pyx_v_lhs, __pyx_v_rhs, __pyx_v_threshold);
17864 Py_ssize_t __pyx_temp;
17865 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17866 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
17869 __Pyx_RefNannyFinishContext();
17873 static PyObject *__pyx_pf_8PyClical_12error_squared(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold) {
17874 PyObject *__pyx_r = NULL;
17875 __Pyx_RefNannyDeclarations
17876 PyObject *__pyx_t_1 = NULL;
17877 int __pyx_lineno = 0;
17878 const char *__pyx_filename = NULL;
17879 int __pyx_clineno = 0;
17880 __Pyx_RefNannySetupContext(
"error_squared", 1);
17881 __Pyx_XDECREF(__pyx_r);
17882 __pyx_t_1 = __pyx_f_8PyClical_error_squared(__pyx_v_lhs, __pyx_v_rhs, __pyx_v_threshold, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
17883 __Pyx_GOTREF(__pyx_t_1);
17884 __pyx_r = __pyx_t_1;
17890 __Pyx_XDECREF(__pyx_t_1);
17891 __Pyx_AddTraceback(
"PyClical.error_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
17894 __Pyx_XGIVEREF(__pyx_r);
17895 __Pyx_RefNannyFinishContext();
17907 static PyObject *__pyx_pw_8PyClical_15approx_equal(PyObject *__pyx_self,
17908 #
if CYTHON_METH_FASTCALL
17909 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17911 PyObject *__pyx_args, PyObject *__pyx_kwds
17914 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_approx_equal(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_approx_equal *__pyx_optional_args) {
17915 PyObject *__pyx_v_threshold = ((PyObject *)Py_None);
17916 PyObject *__pyx_v_tol = ((PyObject *)Py_None);
17917 PyObject *__pyx_r = NULL;
17918 __Pyx_RefNannyDeclarations
17919 PyObject *__pyx_t_1 = NULL;
17921 PyObject *__pyx_t_3 = NULL;
17926 int __pyx_lineno = 0;
17927 const char *__pyx_filename = NULL;
17928 int __pyx_clineno = 0;
17929 __Pyx_RefNannySetupContext(
"approx_equal", 0);
17930 if (__pyx_optional_args) {
17931 if (__pyx_optional_args->__pyx_n > 0) {
17932 __pyx_v_threshold = __pyx_optional_args->threshold;
17933 if (__pyx_optional_args->__pyx_n > 1) {
17934 __pyx_v_tol = __pyx_optional_args->tol;
17938 __Pyx_INCREF(__pyx_v_threshold);
17939 __Pyx_INCREF(__pyx_v_tol);
17948 __pyx_t_2 = (__pyx_v_threshold == Py_None);
17950 __pyx_t_3 = __pyx_f_8PyClical_error_squared_tol(__pyx_v_rhs, 0);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1437, __pyx_L1_error)
17951 __Pyx_GOTREF(__pyx_t_3);
17952 __pyx_t_1 = __pyx_t_3;
17955 __Pyx_INCREF(__pyx_v_threshold);
17956 __pyx_t_1 = __pyx_v_threshold;
17958 __Pyx_DECREF_SET(__pyx_v_threshold, __pyx_t_1);
17968 __pyx_t_2 = (__pyx_v_tol == Py_None);
17970 __pyx_t_3 = __pyx_f_8PyClical_error_squared_tol(__pyx_v_rhs, 0);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error)
17971 __Pyx_GOTREF(__pyx_t_3);
17972 __pyx_t_1 = __pyx_t_3;
17975 __Pyx_INCREF(__pyx_v_tol);
17976 __pyx_t_1 = __pyx_v_tol;
17978 __Pyx_DECREF_SET(__pyx_v_tol, __pyx_t_1);
17988 __Pyx_XDECREF(__pyx_r);
17989 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_lhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L1_error)
17990 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_rhs);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L1_error)
17991 __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_threshold);
if (unlikely((__pyx_t_6 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L1_error)
17992 __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_tol);
if (unlikely((__pyx_t_7 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L1_error)
17993 __pyx_t_1 = __Pyx_PyBool_FromLong(
approx_equal(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5), ((
scalar_t)__pyx_t_6), ((
scalar_t)__pyx_t_7)));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
17994 __Pyx_GOTREF(__pyx_t_1);
17995 __pyx_r = __pyx_t_1;
18009 __Pyx_XDECREF(__pyx_t_1);
18010 __Pyx_XDECREF(__pyx_t_3);
18011 __Pyx_AddTraceback(
"PyClical.approx_equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
18014 __Pyx_XDECREF(__pyx_v_threshold);
18015 __Pyx_XDECREF(__pyx_v_tol);
18016 __Pyx_XGIVEREF(__pyx_r);
18017 __Pyx_RefNannyFinishContext();
18022 static PyObject *__pyx_pw_8PyClical_15approx_equal(PyObject *__pyx_self,
18023 #
if CYTHON_METH_FASTCALL
18024 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18026 PyObject *__pyx_args, PyObject *__pyx_kwds
18029 PyDoc_STRVAR(__pyx_doc_8PyClical_14approx_equal,
"\n Test for approximate equality of multivectors.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(approx_equal(clifford(\"{1}\"), clifford(\"1{1}\")))\n True\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\")))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+0.001\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+1.0e-30\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n True\n ");
18030 static PyMethodDef __pyx_mdef_8PyClical_15approx_equal = {
"approx_equal", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_15approx_equal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_14approx_equal};
18031 static PyObject *__pyx_pw_8PyClical_15approx_equal(PyObject *__pyx_self,
18032 #
if CYTHON_METH_FASTCALL
18033 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18035 PyObject *__pyx_args, PyObject *__pyx_kwds
18038 PyObject *__pyx_v_lhs = 0;
18039 PyObject *__pyx_v_rhs = 0;
18040 PyObject *__pyx_v_threshold = 0;
18041 PyObject *__pyx_v_tol = 0;
18042 #if !CYTHON_METH_FASTCALL 18043 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18045 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
18046 PyObject* values[4] = {0,0,0,0};
18047 int __pyx_lineno = 0;
18048 const char *__pyx_filename = NULL;
18049 int __pyx_clineno = 0;
18050 PyObject *__pyx_r = 0;
18051 __Pyx_RefNannyDeclarations
18052 __Pyx_RefNannySetupContext(
"approx_equal (wrapper)", 0);
18053 #if !CYTHON_METH_FASTCALL 18054 #if CYTHON_ASSUME_SAFE_MACROS 18055 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18057 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
18060 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18062 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_threshold,&__pyx_n_s_tol,0};
18063 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
18064 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
18066 Py_ssize_t kw_args;
18067 switch (__pyx_nargs) {
18068 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
18069 CYTHON_FALLTHROUGH;
18070 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
18071 CYTHON_FALLTHROUGH;
18072 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
18073 CYTHON_FALLTHROUGH;
18074 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18075 CYTHON_FALLTHROUGH;
18077 default:
goto __pyx_L5_argtuple_error;
18079 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
18080 switch (__pyx_nargs) {
18082 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lhs)) != 0)) {
18083 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
18086 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L3_error)
18087 else goto __pyx_L5_argtuple_error;
18088 CYTHON_FALLTHROUGH;
18090 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rhs)) != 0)) {
18091 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
18094 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L3_error)
18096 __Pyx_RaiseArgtupleInvalid(
"approx_equal", 0, 2, 4, 1); __PYX_ERR(0, 1422, __pyx_L3_error)
18098 CYTHON_FALLTHROUGH;
18101 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threshold);
18102 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
18103 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L3_error)
18105 CYTHON_FALLTHROUGH;
18108 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tol);
18109 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
18110 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L3_error)
18113 if (unlikely(kw_args > 0)) {
18114 const Py_ssize_t kwd_pos_args = __pyx_nargs;
18115 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"approx_equal") < 0)) __PYX_ERR(0, 1422, __pyx_L3_error)
18118 switch (__pyx_nargs) {
18119 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
18120 CYTHON_FALLTHROUGH;
18121 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
18122 CYTHON_FALLTHROUGH;
18123 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
18124 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18126 default:
goto __pyx_L5_argtuple_error;
18129 __pyx_v_lhs = values[0];
18130 __pyx_v_rhs = values[1];
18131 __pyx_v_threshold = values[2];
18132 __pyx_v_tol = values[3];
18134 goto __pyx_L6_skip;
18135 __pyx_L5_argtuple_error:;
18136 __Pyx_RaiseArgtupleInvalid(
"approx_equal", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1422, __pyx_L3_error)
18138 goto __pyx_L4_argument_unpacking_done;
18141 Py_ssize_t __pyx_temp;
18142 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18143 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18146 __Pyx_AddTraceback(
"PyClical.approx_equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
18147 __Pyx_RefNannyFinishContext();
18149 __pyx_L4_argument_unpacking_done:;
18150 __pyx_r = __pyx_pf_8PyClical_14approx_equal(__pyx_self, __pyx_v_lhs, __pyx_v_rhs, __pyx_v_threshold, __pyx_v_tol);
18154 Py_ssize_t __pyx_temp;
18155 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18156 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18159 __Pyx_RefNannyFinishContext();
18163 static PyObject *__pyx_pf_8PyClical_14approx_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold, PyObject *__pyx_v_tol) {
18164 PyObject *__pyx_r = NULL;
18165 __Pyx_RefNannyDeclarations
18166 PyObject *__pyx_t_1 = NULL;
18167 struct __pyx_opt_args_8PyClical_approx_equal __pyx_t_2;
18168 int __pyx_lineno = 0;
18169 const char *__pyx_filename = NULL;
18170 int __pyx_clineno = 0;
18171 __Pyx_RefNannySetupContext(
"approx_equal", 1);
18172 __Pyx_XDECREF(__pyx_r);
18173 __pyx_t_2.__pyx_n = 2;
18174 __pyx_t_2.threshold = __pyx_v_threshold;
18175 __pyx_t_2.tol = __pyx_v_tol;
18176 __pyx_t_1 = __pyx_f_8PyClical_approx_equal(__pyx_v_lhs, __pyx_v_rhs, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
18177 __Pyx_GOTREF(__pyx_t_1);
18178 __pyx_r = __pyx_t_1;
18184 __Pyx_XDECREF(__pyx_t_1);
18185 __Pyx_AddTraceback(
"PyClical.approx_equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
18188 __Pyx_XGIVEREF(__pyx_r);
18189 __Pyx_RefNannyFinishContext();
18201 static PyObject *__pyx_pw_8PyClical_17inv(PyObject *__pyx_self,
18202 #
if CYTHON_METH_FASTCALL
18203 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18205 PyObject *__pyx_args, PyObject *__pyx_kwds
18208 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
18209 PyObject *__pyx_r = NULL;
18210 __Pyx_RefNannyDeclarations
18211 PyObject *__pyx_t_1 = NULL;
18212 PyObject *__pyx_t_2 = NULL;
18213 PyObject *__pyx_t_3 = NULL;
18215 int __pyx_lineno = 0;
18216 const char *__pyx_filename = NULL;
18217 int __pyx_clineno = 0;
18218 __Pyx_RefNannySetupContext(
"inv", 1);
18227 __Pyx_XDECREF(__pyx_r);
18228 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1454, __pyx_L1_error)
18229 __Pyx_GOTREF(__pyx_t_2);
18230 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inv);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L1_error)
18231 __Pyx_GOTREF(__pyx_t_3);
18232 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18235 #if CYTHON_UNPACK_METHODS 18236 if (likely(PyMethod_Check(__pyx_t_3))) {
18237 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
18238 if (likely(__pyx_t_2)) {
18239 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
18240 __Pyx_INCREF(__pyx_t_2);
18241 __Pyx_INCREF(
function);
18242 __Pyx_DECREF_SET(__pyx_t_3,
function);
18248 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
18249 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
18250 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18251 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
18252 __Pyx_GOTREF(__pyx_t_1);
18253 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18255 __pyx_r = __pyx_t_1;
18269 __Pyx_XDECREF(__pyx_t_1);
18270 __Pyx_XDECREF(__pyx_t_2);
18271 __Pyx_XDECREF(__pyx_t_3);
18272 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
18275 __Pyx_XGIVEREF(__pyx_r);
18276 __Pyx_RefNannyFinishContext();
18281 static PyObject *__pyx_pw_8PyClical_17inv(PyObject *__pyx_self,
18282 #
if CYTHON_METH_FASTCALL
18283 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18285 PyObject *__pyx_args, PyObject *__pyx_kwds
18288 PyDoc_STRVAR(__pyx_doc_8PyClical_16inv,
"\n Geometric multiplicative inverse.\n\n >>> print(inv(clifford(\"{1}\")))\n {1}\n >>> print(inv(clifford(\"{-1}\")))\n -{-1}\n >>> print(inv(clifford(\"{-2,-1}\")))\n -{-2,-1}\n >>> print(inv(clifford(\"{-1}+{1}\")))\n nan\n ");
18289 static PyMethodDef __pyx_mdef_8PyClical_17inv = {
"inv", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_17inv, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_16inv};
18290 static PyObject *__pyx_pw_8PyClical_17inv(PyObject *__pyx_self,
18291 #
if CYTHON_METH_FASTCALL
18292 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18294 PyObject *__pyx_args, PyObject *__pyx_kwds
18297 PyObject *__pyx_v_obj = 0;
18298 #if !CYTHON_METH_FASTCALL 18299 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18301 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
18302 PyObject* values[1] = {0};
18303 int __pyx_lineno = 0;
18304 const char *__pyx_filename = NULL;
18305 int __pyx_clineno = 0;
18306 PyObject *__pyx_r = 0;
18307 __Pyx_RefNannyDeclarations
18308 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
18309 #if !CYTHON_METH_FASTCALL 18310 #if CYTHON_ASSUME_SAFE_MACROS 18311 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18313 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
18316 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18318 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
18320 Py_ssize_t kw_args;
18321 switch (__pyx_nargs) {
18322 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18323 CYTHON_FALLTHROUGH;
18325 default:
goto __pyx_L5_argtuple_error;
18327 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
18328 switch (__pyx_nargs) {
18330 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
18331 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
18334 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1441, __pyx_L3_error)
18335 else goto __pyx_L5_argtuple_error;
18337 if (unlikely(kw_args > 0)) {
18338 const Py_ssize_t kwd_pos_args = __pyx_nargs;
18339 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"inv") < 0)) __PYX_ERR(0, 1441, __pyx_L3_error)
18341 }
else if (unlikely(__pyx_nargs != 1)) {
18342 goto __pyx_L5_argtuple_error;
18344 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18346 __pyx_v_obj = values[0];
18348 goto __pyx_L6_skip;
18349 __pyx_L5_argtuple_error:;
18350 __Pyx_RaiseArgtupleInvalid(
"inv", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1441, __pyx_L3_error)
18352 goto __pyx_L4_argument_unpacking_done;
18355 Py_ssize_t __pyx_temp;
18356 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18357 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18360 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
18361 __Pyx_RefNannyFinishContext();
18363 __pyx_L4_argument_unpacking_done:;
18364 __pyx_r = __pyx_pf_8PyClical_16inv(__pyx_self, __pyx_v_obj);
18368 Py_ssize_t __pyx_temp;
18369 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18370 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18373 __Pyx_RefNannyFinishContext();
18377 static PyObject *__pyx_pf_8PyClical_16inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18378 PyObject *__pyx_r = NULL;
18379 __Pyx_RefNannyDeclarations
18380 PyObject *__pyx_t_1 = NULL;
18381 int __pyx_lineno = 0;
18382 const char *__pyx_filename = NULL;
18383 int __pyx_clineno = 0;
18384 __Pyx_RefNannySetupContext(
"inv", 1);
18385 __Pyx_XDECREF(__pyx_r);
18386 __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error)
18387 __Pyx_GOTREF(__pyx_t_1);
18388 __pyx_r = __pyx_t_1;
18394 __Pyx_XDECREF(__pyx_t_1);
18395 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
18398 __Pyx_XGIVEREF(__pyx_r);
18399 __Pyx_RefNannyFinishContext();
18411 static PyObject *__pyx_pw_8PyClical_19scalar(PyObject *__pyx_self,
18412 #
if CYTHON_METH_FASTCALL
18413 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18415 PyObject *__pyx_args, PyObject *__pyx_kwds
18418 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
18419 PyObject *__pyx_r = NULL;
18420 __Pyx_RefNannyDeclarations
18421 PyObject *__pyx_t_1 = NULL;
18422 PyObject *__pyx_t_2 = NULL;
18423 PyObject *__pyx_t_3 = NULL;
18425 int __pyx_lineno = 0;
18426 const char *__pyx_filename = NULL;
18427 int __pyx_clineno = 0;
18428 __Pyx_RefNannySetupContext(
"scalar", 1);
18437 __Pyx_XDECREF(__pyx_r);
18438 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
18439 __Pyx_GOTREF(__pyx_t_2);
18440 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error)
18441 __Pyx_GOTREF(__pyx_t_3);
18442 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18445 #if CYTHON_UNPACK_METHODS 18446 if (likely(PyMethod_Check(__pyx_t_3))) {
18447 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
18448 if (likely(__pyx_t_2)) {
18449 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
18450 __Pyx_INCREF(__pyx_t_2);
18451 __Pyx_INCREF(
function);
18452 __Pyx_DECREF_SET(__pyx_t_3,
function);
18458 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
18459 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
18460 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18461 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
18462 __Pyx_GOTREF(__pyx_t_1);
18463 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18465 __pyx_r = __pyx_t_1;
18479 __Pyx_XDECREF(__pyx_t_1);
18480 __Pyx_XDECREF(__pyx_t_2);
18481 __Pyx_XDECREF(__pyx_t_3);
18482 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
18485 __Pyx_XGIVEREF(__pyx_r);
18486 __Pyx_RefNannyFinishContext();
18491 static PyObject *__pyx_pw_8PyClical_19scalar(PyObject *__pyx_self,
18492 #
if CYTHON_METH_FASTCALL
18493 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18495 PyObject *__pyx_args, PyObject *__pyx_kwds
18498 PyDoc_STRVAR(__pyx_doc_8PyClical_18scalar,
"\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ");
18499 static PyMethodDef __pyx_mdef_8PyClical_19scalar = {
"scalar", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_19scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_18scalar};
18500 static PyObject *__pyx_pw_8PyClical_19scalar(PyObject *__pyx_self,
18501 #
if CYTHON_METH_FASTCALL
18502 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18504 PyObject *__pyx_args, PyObject *__pyx_kwds
18507 PyObject *__pyx_v_obj = 0;
18508 #if !CYTHON_METH_FASTCALL 18509 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18511 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
18512 PyObject* values[1] = {0};
18513 int __pyx_lineno = 0;
18514 const char *__pyx_filename = NULL;
18515 int __pyx_clineno = 0;
18516 PyObject *__pyx_r = 0;
18517 __Pyx_RefNannyDeclarations
18518 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
18519 #if !CYTHON_METH_FASTCALL 18520 #if CYTHON_ASSUME_SAFE_MACROS 18521 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18523 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
18526 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18528 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
18530 Py_ssize_t kw_args;
18531 switch (__pyx_nargs) {
18532 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18533 CYTHON_FALLTHROUGH;
18535 default:
goto __pyx_L5_argtuple_error;
18537 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
18538 switch (__pyx_nargs) {
18540 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
18541 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
18544 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1456, __pyx_L3_error)
18545 else goto __pyx_L5_argtuple_error;
18547 if (unlikely(kw_args > 0)) {
18548 const Py_ssize_t kwd_pos_args = __pyx_nargs;
18549 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"scalar") < 0)) __PYX_ERR(0, 1456, __pyx_L3_error)
18551 }
else if (unlikely(__pyx_nargs != 1)) {
18552 goto __pyx_L5_argtuple_error;
18554 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18556 __pyx_v_obj = values[0];
18558 goto __pyx_L6_skip;
18559 __pyx_L5_argtuple_error:;
18560 __Pyx_RaiseArgtupleInvalid(
"scalar", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1456, __pyx_L3_error)
18562 goto __pyx_L4_argument_unpacking_done;
18565 Py_ssize_t __pyx_temp;
18566 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18567 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18570 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
18571 __Pyx_RefNannyFinishContext();
18573 __pyx_L4_argument_unpacking_done:;
18574 __pyx_r = __pyx_pf_8PyClical_18scalar(__pyx_self, __pyx_v_obj);
18578 Py_ssize_t __pyx_temp;
18579 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18580 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18583 __Pyx_RefNannyFinishContext();
18587 static PyObject *__pyx_pf_8PyClical_18scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18588 PyObject *__pyx_r = NULL;
18589 __Pyx_RefNannyDeclarations
18590 PyObject *__pyx_t_1 = NULL;
18591 int __pyx_lineno = 0;
18592 const char *__pyx_filename = NULL;
18593 int __pyx_clineno = 0;
18594 __Pyx_RefNannySetupContext(
"scalar", 1);
18595 __Pyx_XDECREF(__pyx_r);
18596 __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
18597 __Pyx_GOTREF(__pyx_t_1);
18598 __pyx_r = __pyx_t_1;
18604 __Pyx_XDECREF(__pyx_t_1);
18605 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
18608 __Pyx_XGIVEREF(__pyx_r);
18609 __Pyx_RefNannyFinishContext();
18621 static PyObject *__pyx_pw_8PyClical_21real(PyObject *__pyx_self,
18622 #
if CYTHON_METH_FASTCALL
18623 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18625 PyObject *__pyx_args, PyObject *__pyx_kwds
18628 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
18629 PyObject *__pyx_r = NULL;
18630 __Pyx_RefNannyDeclarations
18631 PyObject *__pyx_t_1 = NULL;
18632 PyObject *__pyx_t_2 = NULL;
18633 PyObject *__pyx_t_3 = NULL;
18635 int __pyx_lineno = 0;
18636 const char *__pyx_filename = NULL;
18637 int __pyx_clineno = 0;
18638 __Pyx_RefNannySetupContext(
"real", 1);
18647 __Pyx_XDECREF(__pyx_r);
18648 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error)
18649 __Pyx_GOTREF(__pyx_t_2);
18650 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
18651 __Pyx_GOTREF(__pyx_t_3);
18652 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18655 #if CYTHON_UNPACK_METHODS 18656 if (likely(PyMethod_Check(__pyx_t_3))) {
18657 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
18658 if (likely(__pyx_t_2)) {
18659 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
18660 __Pyx_INCREF(__pyx_t_2);
18661 __Pyx_INCREF(
function);
18662 __Pyx_DECREF_SET(__pyx_t_3,
function);
18668 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
18669 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
18670 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18671 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __pyx_L1_error)
18672 __Pyx_GOTREF(__pyx_t_1);
18673 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18675 __pyx_r = __pyx_t_1;
18689 __Pyx_XDECREF(__pyx_t_1);
18690 __Pyx_XDECREF(__pyx_t_2);
18691 __Pyx_XDECREF(__pyx_t_3);
18692 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
18695 __Pyx_XGIVEREF(__pyx_r);
18696 __Pyx_RefNannyFinishContext();
18701 static PyObject *__pyx_pw_8PyClical_21real(PyObject *__pyx_self,
18702 #
if CYTHON_METH_FASTCALL
18703 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18705 PyObject *__pyx_args, PyObject *__pyx_kwds
18708 PyDoc_STRVAR(__pyx_doc_8PyClical_20real,
"\n Real part: synonym for scalar part.\n\n >>> real(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> real(clifford(\"{1,2}\"))\n 0.0\n ");
18709 static PyMethodDef __pyx_mdef_8PyClical_21real = {
"real", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_21real, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_20real};
18710 static PyObject *__pyx_pw_8PyClical_21real(PyObject *__pyx_self,
18711 #
if CYTHON_METH_FASTCALL
18712 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18714 PyObject *__pyx_args, PyObject *__pyx_kwds
18717 PyObject *__pyx_v_obj = 0;
18718 #if !CYTHON_METH_FASTCALL 18719 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18721 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
18722 PyObject* values[1] = {0};
18723 int __pyx_lineno = 0;
18724 const char *__pyx_filename = NULL;
18725 int __pyx_clineno = 0;
18726 PyObject *__pyx_r = 0;
18727 __Pyx_RefNannyDeclarations
18728 __Pyx_RefNannySetupContext(
"real (wrapper)", 0);
18729 #if !CYTHON_METH_FASTCALL 18730 #if CYTHON_ASSUME_SAFE_MACROS 18731 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18733 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
18736 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18738 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
18740 Py_ssize_t kw_args;
18741 switch (__pyx_nargs) {
18742 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18743 CYTHON_FALLTHROUGH;
18745 default:
goto __pyx_L5_argtuple_error;
18747 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
18748 switch (__pyx_nargs) {
18750 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
18751 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
18754 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L3_error)
18755 else goto __pyx_L5_argtuple_error;
18757 if (unlikely(kw_args > 0)) {
18758 const Py_ssize_t kwd_pos_args = __pyx_nargs;
18759 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"real") < 0)) __PYX_ERR(0, 1467, __pyx_L3_error)
18761 }
else if (unlikely(__pyx_nargs != 1)) {
18762 goto __pyx_L5_argtuple_error;
18764 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18766 __pyx_v_obj = values[0];
18768 goto __pyx_L6_skip;
18769 __pyx_L5_argtuple_error:;
18770 __Pyx_RaiseArgtupleInvalid(
"real", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1467, __pyx_L3_error)
18772 goto __pyx_L4_argument_unpacking_done;
18775 Py_ssize_t __pyx_temp;
18776 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18777 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18780 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
18781 __Pyx_RefNannyFinishContext();
18783 __pyx_L4_argument_unpacking_done:;
18784 __pyx_r = __pyx_pf_8PyClical_20real(__pyx_self, __pyx_v_obj);
18788 Py_ssize_t __pyx_temp;
18789 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18790 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18793 __Pyx_RefNannyFinishContext();
18797 static PyObject *__pyx_pf_8PyClical_20real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18798 PyObject *__pyx_r = NULL;
18799 __Pyx_RefNannyDeclarations
18800 PyObject *__pyx_t_1 = NULL;
18801 int __pyx_lineno = 0;
18802 const char *__pyx_filename = NULL;
18803 int __pyx_clineno = 0;
18804 __Pyx_RefNannySetupContext(
"real", 1);
18805 __Pyx_XDECREF(__pyx_r);
18806 __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
18807 __Pyx_GOTREF(__pyx_t_1);
18808 __pyx_r = __pyx_t_1;
18814 __Pyx_XDECREF(__pyx_t_1);
18815 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
18818 __Pyx_XGIVEREF(__pyx_r);
18819 __Pyx_RefNannyFinishContext();
18831 static PyObject *__pyx_pw_8PyClical_23imag(PyObject *__pyx_self,
18832 #
if CYTHON_METH_FASTCALL
18833 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18835 PyObject *__pyx_args, PyObject *__pyx_kwds
18838 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
18839 PyObject *__pyx_r = NULL;
18840 __Pyx_RefNannyDeclarations
18841 __Pyx_RefNannySetupContext(
"imag", 1);
18850 __Pyx_XDECREF(__pyx_r);
18851 __Pyx_INCREF(__pyx_float_0_0);
18852 __pyx_r = __pyx_float_0_0;
18865 __Pyx_XGIVEREF(__pyx_r);
18866 __Pyx_RefNannyFinishContext();
18871 static PyObject *__pyx_pw_8PyClical_23imag(PyObject *__pyx_self,
18872 #
if CYTHON_METH_FASTCALL
18873 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18875 PyObject *__pyx_args, PyObject *__pyx_kwds
18878 PyDoc_STRVAR(__pyx_doc_8PyClical_22imag,
"\n Imaginary part: deprecated (always 0).\n\n >>> imag(clifford(\"1+{1}+{1,2}\"))\n 0.0\n >>> imag(clifford(\"{1,2}\"))\n 0.0\n ");
18879 static PyMethodDef __pyx_mdef_8PyClical_23imag = {
"imag", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_23imag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_22imag};
18880 static PyObject *__pyx_pw_8PyClical_23imag(PyObject *__pyx_self,
18881 #
if CYTHON_METH_FASTCALL
18882 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18884 PyObject *__pyx_args, PyObject *__pyx_kwds
18887 PyObject *__pyx_v_obj = 0;
18888 #if !CYTHON_METH_FASTCALL 18889 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18891 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
18892 PyObject* values[1] = {0};
18893 int __pyx_lineno = 0;
18894 const char *__pyx_filename = NULL;
18895 int __pyx_clineno = 0;
18896 PyObject *__pyx_r = 0;
18897 __Pyx_RefNannyDeclarations
18898 __Pyx_RefNannySetupContext(
"imag (wrapper)", 0);
18899 #if !CYTHON_METH_FASTCALL 18900 #if CYTHON_ASSUME_SAFE_MACROS 18901 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18903 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
18906 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18908 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
18910 Py_ssize_t kw_args;
18911 switch (__pyx_nargs) {
18912 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18913 CYTHON_FALLTHROUGH;
18915 default:
goto __pyx_L5_argtuple_error;
18917 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
18918 switch (__pyx_nargs) {
18920 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
18921 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
18924 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L3_error)
18925 else goto __pyx_L5_argtuple_error;
18927 if (unlikely(kw_args > 0)) {
18928 const Py_ssize_t kwd_pos_args = __pyx_nargs;
18929 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"imag") < 0)) __PYX_ERR(0, 1478, __pyx_L3_error)
18931 }
else if (unlikely(__pyx_nargs != 1)) {
18932 goto __pyx_L5_argtuple_error;
18934 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18936 __pyx_v_obj = values[0];
18938 goto __pyx_L6_skip;
18939 __pyx_L5_argtuple_error:;
18940 __Pyx_RaiseArgtupleInvalid(
"imag", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1478, __pyx_L3_error)
18942 goto __pyx_L4_argument_unpacking_done;
18945 Py_ssize_t __pyx_temp;
18946 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18947 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18950 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
18951 __Pyx_RefNannyFinishContext();
18953 __pyx_L4_argument_unpacking_done:;
18954 __pyx_r = __pyx_pf_8PyClical_22imag(__pyx_self, __pyx_v_obj);
18958 Py_ssize_t __pyx_temp;
18959 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18960 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18963 __Pyx_RefNannyFinishContext();
18967 static PyObject *__pyx_pf_8PyClical_22imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18968 PyObject *__pyx_r = NULL;
18969 __Pyx_RefNannyDeclarations
18970 PyObject *__pyx_t_1 = NULL;
18971 int __pyx_lineno = 0;
18972 const char *__pyx_filename = NULL;
18973 int __pyx_clineno = 0;
18974 __Pyx_RefNannySetupContext(
"imag", 1);
18975 __Pyx_XDECREF(__pyx_r);
18976 __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error)
18977 __Pyx_GOTREF(__pyx_t_1);
18978 __pyx_r = __pyx_t_1;
18984 __Pyx_XDECREF(__pyx_t_1);
18985 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
18988 __Pyx_XGIVEREF(__pyx_r);
18989 __Pyx_RefNannyFinishContext();
19001 static PyObject *__pyx_pw_8PyClical_25pure(PyObject *__pyx_self,
19002 #
if CYTHON_METH_FASTCALL
19003 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19005 PyObject *__pyx_args, PyObject *__pyx_kwds
19008 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
19009 PyObject *__pyx_r = NULL;
19010 __Pyx_RefNannyDeclarations
19011 PyObject *__pyx_t_1 = NULL;
19012 PyObject *__pyx_t_2 = NULL;
19013 PyObject *__pyx_t_3 = NULL;
19015 int __pyx_lineno = 0;
19016 const char *__pyx_filename = NULL;
19017 int __pyx_clineno = 0;
19018 __Pyx_RefNannySetupContext(
"pure", 1);
19027 __Pyx_XDECREF(__pyx_r);
19028 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
19029 __Pyx_GOTREF(__pyx_t_2);
19030 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pure);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
19031 __Pyx_GOTREF(__pyx_t_3);
19032 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19035 #if CYTHON_UNPACK_METHODS 19036 if (likely(PyMethod_Check(__pyx_t_3))) {
19037 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
19038 if (likely(__pyx_t_2)) {
19039 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
19040 __Pyx_INCREF(__pyx_t_2);
19041 __Pyx_INCREF(
function);
19042 __Pyx_DECREF_SET(__pyx_t_3,
function);
19048 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
19049 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
19050 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19051 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
19052 __Pyx_GOTREF(__pyx_t_1);
19053 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19055 __pyx_r = __pyx_t_1;
19069 __Pyx_XDECREF(__pyx_t_1);
19070 __Pyx_XDECREF(__pyx_t_2);
19071 __Pyx_XDECREF(__pyx_t_3);
19072 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
19075 __Pyx_XGIVEREF(__pyx_r);
19076 __Pyx_RefNannyFinishContext();
19081 static PyObject *__pyx_pw_8PyClical_25pure(PyObject *__pyx_self,
19082 #
if CYTHON_METH_FASTCALL
19083 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19085 PyObject *__pyx_args, PyObject *__pyx_kwds
19088 PyDoc_STRVAR(__pyx_doc_8PyClical_24pure,
"\n Pure part\n\n >>> print(pure(clifford(\"1+{1}+{1,2}\")))\n {1}+{1,2}\n >>> print(pure(clifford(\"{1,2}\")))\n {1,2}\n ");
19089 static PyMethodDef __pyx_mdef_8PyClical_25pure = {
"pure", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_25pure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_24pure};
19090 static PyObject *__pyx_pw_8PyClical_25pure(PyObject *__pyx_self,
19091 #
if CYTHON_METH_FASTCALL
19092 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19094 PyObject *__pyx_args, PyObject *__pyx_kwds
19097 PyObject *__pyx_v_obj = 0;
19098 #if !CYTHON_METH_FASTCALL 19099 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
19101 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
19102 PyObject* values[1] = {0};
19103 int __pyx_lineno = 0;
19104 const char *__pyx_filename = NULL;
19105 int __pyx_clineno = 0;
19106 PyObject *__pyx_r = 0;
19107 __Pyx_RefNannyDeclarations
19108 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
19109 #if !CYTHON_METH_FASTCALL 19110 #if CYTHON_ASSUME_SAFE_MACROS 19111 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
19113 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
19116 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
19118 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
19120 Py_ssize_t kw_args;
19121 switch (__pyx_nargs) {
19122 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19123 CYTHON_FALLTHROUGH;
19125 default:
goto __pyx_L5_argtuple_error;
19127 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
19128 switch (__pyx_nargs) {
19130 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
19131 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
19134 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L3_error)
19135 else goto __pyx_L5_argtuple_error;
19137 if (unlikely(kw_args > 0)) {
19138 const Py_ssize_t kwd_pos_args = __pyx_nargs;
19139 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"pure") < 0)) __PYX_ERR(0, 1489, __pyx_L3_error)
19141 }
else if (unlikely(__pyx_nargs != 1)) {
19142 goto __pyx_L5_argtuple_error;
19144 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19146 __pyx_v_obj = values[0];
19148 goto __pyx_L6_skip;
19149 __pyx_L5_argtuple_error:;
19150 __Pyx_RaiseArgtupleInvalid(
"pure", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1489, __pyx_L3_error)
19152 goto __pyx_L4_argument_unpacking_done;
19155 Py_ssize_t __pyx_temp;
19156 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19157 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19160 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
19161 __Pyx_RefNannyFinishContext();
19163 __pyx_L4_argument_unpacking_done:;
19164 __pyx_r = __pyx_pf_8PyClical_24pure(__pyx_self, __pyx_v_obj);
19168 Py_ssize_t __pyx_temp;
19169 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19170 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19173 __Pyx_RefNannyFinishContext();
19177 static PyObject *__pyx_pf_8PyClical_24pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19178 PyObject *__pyx_r = NULL;
19179 __Pyx_RefNannyDeclarations
19180 PyObject *__pyx_t_1 = NULL;
19181 int __pyx_lineno = 0;
19182 const char *__pyx_filename = NULL;
19183 int __pyx_clineno = 0;
19184 __Pyx_RefNannySetupContext(
"pure", 1);
19185 __Pyx_XDECREF(__pyx_r);
19186 __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error)
19187 __Pyx_GOTREF(__pyx_t_1);
19188 __pyx_r = __pyx_t_1;
19194 __Pyx_XDECREF(__pyx_t_1);
19195 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
19198 __Pyx_XGIVEREF(__pyx_r);
19199 __Pyx_RefNannyFinishContext();
19211 static PyObject *__pyx_pw_8PyClical_27even(PyObject *__pyx_self,
19212 #
if CYTHON_METH_FASTCALL
19213 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19215 PyObject *__pyx_args, PyObject *__pyx_kwds
19218 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
19219 PyObject *__pyx_r = NULL;
19220 __Pyx_RefNannyDeclarations
19221 PyObject *__pyx_t_1 = NULL;
19222 PyObject *__pyx_t_2 = NULL;
19223 PyObject *__pyx_t_3 = NULL;
19225 int __pyx_lineno = 0;
19226 const char *__pyx_filename = NULL;
19227 int __pyx_clineno = 0;
19228 __Pyx_RefNannySetupContext(
"even", 1);
19237 __Pyx_XDECREF(__pyx_r);
19238 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
19239 __Pyx_GOTREF(__pyx_t_2);
19240 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_even);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error)
19241 __Pyx_GOTREF(__pyx_t_3);
19242 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19245 #if CYTHON_UNPACK_METHODS 19246 if (likely(PyMethod_Check(__pyx_t_3))) {
19247 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
19248 if (likely(__pyx_t_2)) {
19249 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
19250 __Pyx_INCREF(__pyx_t_2);
19251 __Pyx_INCREF(
function);
19252 __Pyx_DECREF_SET(__pyx_t_3,
function);
19258 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
19259 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
19260 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19261 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error)
19262 __Pyx_GOTREF(__pyx_t_1);
19263 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19265 __pyx_r = __pyx_t_1;
19279 __Pyx_XDECREF(__pyx_t_1);
19280 __Pyx_XDECREF(__pyx_t_2);
19281 __Pyx_XDECREF(__pyx_t_3);
19282 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
19285 __Pyx_XGIVEREF(__pyx_r);
19286 __Pyx_RefNannyFinishContext();
19291 static PyObject *__pyx_pw_8PyClical_27even(PyObject *__pyx_self,
19292 #
if CYTHON_METH_FASTCALL
19293 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19295 PyObject *__pyx_args, PyObject *__pyx_kwds
19298 PyDoc_STRVAR(__pyx_doc_8PyClical_26even,
"\n Even part of multivector, sum of even grade terms.\n\n >>> print(even(clifford(\"1+{1}+{1,2}\")))\n 1+{1,2}\n ");
19299 static PyMethodDef __pyx_mdef_8PyClical_27even = {
"even", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_27even, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_26even};
19300 static PyObject *__pyx_pw_8PyClical_27even(PyObject *__pyx_self,
19301 #
if CYTHON_METH_FASTCALL
19302 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19304 PyObject *__pyx_args, PyObject *__pyx_kwds
19307 PyObject *__pyx_v_obj = 0;
19308 #if !CYTHON_METH_FASTCALL 19309 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
19311 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
19312 PyObject* values[1] = {0};
19313 int __pyx_lineno = 0;
19314 const char *__pyx_filename = NULL;
19315 int __pyx_clineno = 0;
19316 PyObject *__pyx_r = 0;
19317 __Pyx_RefNannyDeclarations
19318 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
19319 #if !CYTHON_METH_FASTCALL 19320 #if CYTHON_ASSUME_SAFE_MACROS 19321 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
19323 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
19326 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
19328 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
19330 Py_ssize_t kw_args;
19331 switch (__pyx_nargs) {
19332 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19333 CYTHON_FALLTHROUGH;
19335 default:
goto __pyx_L5_argtuple_error;
19337 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
19338 switch (__pyx_nargs) {
19340 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
19341 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
19344 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L3_error)
19345 else goto __pyx_L5_argtuple_error;
19347 if (unlikely(kw_args > 0)) {
19348 const Py_ssize_t kwd_pos_args = __pyx_nargs;
19349 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"even") < 0)) __PYX_ERR(0, 1500, __pyx_L3_error)
19351 }
else if (unlikely(__pyx_nargs != 1)) {
19352 goto __pyx_L5_argtuple_error;
19354 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19356 __pyx_v_obj = values[0];
19358 goto __pyx_L6_skip;
19359 __pyx_L5_argtuple_error:;
19360 __Pyx_RaiseArgtupleInvalid(
"even", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1500, __pyx_L3_error)
19362 goto __pyx_L4_argument_unpacking_done;
19365 Py_ssize_t __pyx_temp;
19366 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19367 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19370 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
19371 __Pyx_RefNannyFinishContext();
19373 __pyx_L4_argument_unpacking_done:;
19374 __pyx_r = __pyx_pf_8PyClical_26even(__pyx_self, __pyx_v_obj);
19378 Py_ssize_t __pyx_temp;
19379 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19380 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19383 __Pyx_RefNannyFinishContext();
19387 static PyObject *__pyx_pf_8PyClical_26even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19388 PyObject *__pyx_r = NULL;
19389 __Pyx_RefNannyDeclarations
19390 PyObject *__pyx_t_1 = NULL;
19391 int __pyx_lineno = 0;
19392 const char *__pyx_filename = NULL;
19393 int __pyx_clineno = 0;
19394 __Pyx_RefNannySetupContext(
"even", 1);
19395 __Pyx_XDECREF(__pyx_r);
19396 __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
19397 __Pyx_GOTREF(__pyx_t_1);
19398 __pyx_r = __pyx_t_1;
19404 __Pyx_XDECREF(__pyx_t_1);
19405 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
19408 __Pyx_XGIVEREF(__pyx_r);
19409 __Pyx_RefNannyFinishContext();
19421 static PyObject *__pyx_pw_8PyClical_29odd(PyObject *__pyx_self,
19422 #
if CYTHON_METH_FASTCALL
19423 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19425 PyObject *__pyx_args, PyObject *__pyx_kwds
19428 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
19429 PyObject *__pyx_r = NULL;
19430 __Pyx_RefNannyDeclarations
19431 PyObject *__pyx_t_1 = NULL;
19432 PyObject *__pyx_t_2 = NULL;
19433 PyObject *__pyx_t_3 = NULL;
19435 int __pyx_lineno = 0;
19436 const char *__pyx_filename = NULL;
19437 int __pyx_clineno = 0;
19438 __Pyx_RefNannySetupContext(
"odd", 1);
19447 __Pyx_XDECREF(__pyx_r);
19448 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error)
19449 __Pyx_GOTREF(__pyx_t_2);
19450 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_odd);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error)
19451 __Pyx_GOTREF(__pyx_t_3);
19452 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19455 #if CYTHON_UNPACK_METHODS 19456 if (likely(PyMethod_Check(__pyx_t_3))) {
19457 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
19458 if (likely(__pyx_t_2)) {
19459 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
19460 __Pyx_INCREF(__pyx_t_2);
19461 __Pyx_INCREF(
function);
19462 __Pyx_DECREF_SET(__pyx_t_3,
function);
19468 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
19469 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
19470 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19471 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error)
19472 __Pyx_GOTREF(__pyx_t_1);
19473 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19475 __pyx_r = __pyx_t_1;
19489 __Pyx_XDECREF(__pyx_t_1);
19490 __Pyx_XDECREF(__pyx_t_2);
19491 __Pyx_XDECREF(__pyx_t_3);
19492 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
19495 __Pyx_XGIVEREF(__pyx_r);
19496 __Pyx_RefNannyFinishContext();
19501 static PyObject *__pyx_pw_8PyClical_29odd(PyObject *__pyx_self,
19502 #
if CYTHON_METH_FASTCALL
19503 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19505 PyObject *__pyx_args, PyObject *__pyx_kwds
19508 PyDoc_STRVAR(__pyx_doc_8PyClical_28odd,
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(odd(clifford(\"1+{1}+{1,2}\")))\n {1}\n ");
19509 static PyMethodDef __pyx_mdef_8PyClical_29odd = {
"odd", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_29odd, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_28odd};
19510 static PyObject *__pyx_pw_8PyClical_29odd(PyObject *__pyx_self,
19511 #
if CYTHON_METH_FASTCALL
19512 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19514 PyObject *__pyx_args, PyObject *__pyx_kwds
19517 PyObject *__pyx_v_obj = 0;
19518 #if !CYTHON_METH_FASTCALL 19519 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
19521 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
19522 PyObject* values[1] = {0};
19523 int __pyx_lineno = 0;
19524 const char *__pyx_filename = NULL;
19525 int __pyx_clineno = 0;
19526 PyObject *__pyx_r = 0;
19527 __Pyx_RefNannyDeclarations
19528 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
19529 #if !CYTHON_METH_FASTCALL 19530 #if CYTHON_ASSUME_SAFE_MACROS 19531 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
19533 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
19536 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
19538 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
19540 Py_ssize_t kw_args;
19541 switch (__pyx_nargs) {
19542 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19543 CYTHON_FALLTHROUGH;
19545 default:
goto __pyx_L5_argtuple_error;
19547 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
19548 switch (__pyx_nargs) {
19550 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
19551 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
19554 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1509, __pyx_L3_error)
19555 else goto __pyx_L5_argtuple_error;
19557 if (unlikely(kw_args > 0)) {
19558 const Py_ssize_t kwd_pos_args = __pyx_nargs;
19559 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"odd") < 0)) __PYX_ERR(0, 1509, __pyx_L3_error)
19561 }
else if (unlikely(__pyx_nargs != 1)) {
19562 goto __pyx_L5_argtuple_error;
19564 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19566 __pyx_v_obj = values[0];
19568 goto __pyx_L6_skip;
19569 __pyx_L5_argtuple_error:;
19570 __Pyx_RaiseArgtupleInvalid(
"odd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1509, __pyx_L3_error)
19572 goto __pyx_L4_argument_unpacking_done;
19575 Py_ssize_t __pyx_temp;
19576 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19577 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19580 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
19581 __Pyx_RefNannyFinishContext();
19583 __pyx_L4_argument_unpacking_done:;
19584 __pyx_r = __pyx_pf_8PyClical_28odd(__pyx_self, __pyx_v_obj);
19588 Py_ssize_t __pyx_temp;
19589 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19590 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19593 __Pyx_RefNannyFinishContext();
19597 static PyObject *__pyx_pf_8PyClical_28odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19598 PyObject *__pyx_r = NULL;
19599 __Pyx_RefNannyDeclarations
19600 PyObject *__pyx_t_1 = NULL;
19601 int __pyx_lineno = 0;
19602 const char *__pyx_filename = NULL;
19603 int __pyx_clineno = 0;
19604 __Pyx_RefNannySetupContext(
"odd", 1);
19605 __Pyx_XDECREF(__pyx_r);
19606 __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
19607 __Pyx_GOTREF(__pyx_t_1);
19608 __pyx_r = __pyx_t_1;
19614 __Pyx_XDECREF(__pyx_t_1);
19615 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
19618 __Pyx_XGIVEREF(__pyx_r);
19619 __Pyx_RefNannyFinishContext();
19631 static PyObject *__pyx_pw_8PyClical_31involute(PyObject *__pyx_self,
19632 #
if CYTHON_METH_FASTCALL
19633 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19635 PyObject *__pyx_args, PyObject *__pyx_kwds
19638 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
19639 PyObject *__pyx_r = NULL;
19640 __Pyx_RefNannyDeclarations
19641 PyObject *__pyx_t_1 = NULL;
19642 PyObject *__pyx_t_2 = NULL;
19643 PyObject *__pyx_t_3 = NULL;
19645 int __pyx_lineno = 0;
19646 const char *__pyx_filename = NULL;
19647 int __pyx_clineno = 0;
19648 __Pyx_RefNannySetupContext(
"involute", 1);
19657 __Pyx_XDECREF(__pyx_r);
19658 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
19659 __Pyx_GOTREF(__pyx_t_2);
19660 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_involute);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error)
19661 __Pyx_GOTREF(__pyx_t_3);
19662 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19665 #if CYTHON_UNPACK_METHODS 19666 if (likely(PyMethod_Check(__pyx_t_3))) {
19667 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
19668 if (likely(__pyx_t_2)) {
19669 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
19670 __Pyx_INCREF(__pyx_t_2);
19671 __Pyx_INCREF(
function);
19672 __Pyx_DECREF_SET(__pyx_t_3,
function);
19678 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
19679 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
19680 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19681 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
19682 __Pyx_GOTREF(__pyx_t_1);
19683 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19685 __pyx_r = __pyx_t_1;
19699 __Pyx_XDECREF(__pyx_t_1);
19700 __Pyx_XDECREF(__pyx_t_2);
19701 __Pyx_XDECREF(__pyx_t_3);
19702 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
19705 __Pyx_XGIVEREF(__pyx_r);
19706 __Pyx_RefNannyFinishContext();
19711 static PyObject *__pyx_pw_8PyClical_31involute(PyObject *__pyx_self,
19712 #
if CYTHON_METH_FASTCALL
19713 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19715 PyObject *__pyx_args, PyObject *__pyx_kwds
19718 PyDoc_STRVAR(__pyx_doc_8PyClical_30involute,
"\n Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})\n\n >>> print(involute(clifford(\"{1}\")))\n -{1}\n >>> print(involute(clifford(\"{2}\") * clifford(\"{1}\")))\n -{1,2}\n >>> print(involute(clifford(\"{1}\") * clifford(\"{2}\")))\n {1,2}\n >>> print(involute(clifford(\"1+{1}+{1,2}\")))\n 1-{1}+{1,2}\n ");
19719 static PyMethodDef __pyx_mdef_8PyClical_31involute = {
"involute", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_31involute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_30involute};
19720 static PyObject *__pyx_pw_8PyClical_31involute(PyObject *__pyx_self,
19721 #
if CYTHON_METH_FASTCALL
19722 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19724 PyObject *__pyx_args, PyObject *__pyx_kwds
19727 PyObject *__pyx_v_obj = 0;
19728 #if !CYTHON_METH_FASTCALL 19729 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
19731 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
19732 PyObject* values[1] = {0};
19733 int __pyx_lineno = 0;
19734 const char *__pyx_filename = NULL;
19735 int __pyx_clineno = 0;
19736 PyObject *__pyx_r = 0;
19737 __Pyx_RefNannyDeclarations
19738 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
19739 #if !CYTHON_METH_FASTCALL 19740 #if CYTHON_ASSUME_SAFE_MACROS 19741 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
19743 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
19746 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
19748 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
19750 Py_ssize_t kw_args;
19751 switch (__pyx_nargs) {
19752 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19753 CYTHON_FALLTHROUGH;
19755 default:
goto __pyx_L5_argtuple_error;
19757 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
19758 switch (__pyx_nargs) {
19760 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
19761 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
19764 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1518, __pyx_L3_error)
19765 else goto __pyx_L5_argtuple_error;
19767 if (unlikely(kw_args > 0)) {
19768 const Py_ssize_t kwd_pos_args = __pyx_nargs;
19769 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"involute") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
19771 }
else if (unlikely(__pyx_nargs != 1)) {
19772 goto __pyx_L5_argtuple_error;
19774 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19776 __pyx_v_obj = values[0];
19778 goto __pyx_L6_skip;
19779 __pyx_L5_argtuple_error:;
19780 __Pyx_RaiseArgtupleInvalid(
"involute", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1518, __pyx_L3_error)
19782 goto __pyx_L4_argument_unpacking_done;
19785 Py_ssize_t __pyx_temp;
19786 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19787 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19790 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
19791 __Pyx_RefNannyFinishContext();
19793 __pyx_L4_argument_unpacking_done:;
19794 __pyx_r = __pyx_pf_8PyClical_30involute(__pyx_self, __pyx_v_obj);
19798 Py_ssize_t __pyx_temp;
19799 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19800 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
19803 __Pyx_RefNannyFinishContext();
19807 static PyObject *__pyx_pf_8PyClical_30involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19808 PyObject *__pyx_r = NULL;
19809 __Pyx_RefNannyDeclarations
19810 PyObject *__pyx_t_1 = NULL;
19811 int __pyx_lineno = 0;
19812 const char *__pyx_filename = NULL;
19813 int __pyx_clineno = 0;
19814 __Pyx_RefNannySetupContext(
"involute", 1);
19815 __Pyx_XDECREF(__pyx_r);
19816 __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_error)
19817 __Pyx_GOTREF(__pyx_t_1);
19818 __pyx_r = __pyx_t_1;
19824 __Pyx_XDECREF(__pyx_t_1);
19825 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
19828 __Pyx_XGIVEREF(__pyx_r);
19829 __Pyx_RefNannyFinishContext();
19841 static PyObject *__pyx_pw_8PyClical_33reverse(PyObject *__pyx_self,
19842 #
if CYTHON_METH_FASTCALL
19843 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19845 PyObject *__pyx_args, PyObject *__pyx_kwds
19848 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
19849 PyObject *__pyx_r = NULL;
19850 __Pyx_RefNannyDeclarations
19851 PyObject *__pyx_t_1 = NULL;
19852 PyObject *__pyx_t_2 = NULL;
19853 PyObject *__pyx_t_3 = NULL;
19855 int __pyx_lineno = 0;
19856 const char *__pyx_filename = NULL;
19857 int __pyx_clineno = 0;
19858 __Pyx_RefNannySetupContext(
"reverse", 1);
19867 __Pyx_XDECREF(__pyx_r);
19868 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1546, __pyx_L1_error)
19869 __Pyx_GOTREF(__pyx_t_2);
19870 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L1_error)
19871 __Pyx_GOTREF(__pyx_t_3);
19872 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19875 #if CYTHON_UNPACK_METHODS 19876 if (likely(PyMethod_Check(__pyx_t_3))) {
19877 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
19878 if (likely(__pyx_t_2)) {
19879 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
19880 __Pyx_INCREF(__pyx_t_2);
19881 __Pyx_INCREF(
function);
19882 __Pyx_DECREF_SET(__pyx_t_3,
function);
19888 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
19889 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
19890 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19891 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
19892 __Pyx_GOTREF(__pyx_t_1);
19893 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19895 __pyx_r = __pyx_t_1;
19909 __Pyx_XDECREF(__pyx_t_1);
19910 __Pyx_XDECREF(__pyx_t_2);
19911 __Pyx_XDECREF(__pyx_t_3);
19912 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
19915 __Pyx_XGIVEREF(__pyx_r);
19916 __Pyx_RefNannyFinishContext();
19921 static PyObject *__pyx_pw_8PyClical_33reverse(PyObject *__pyx_self,
19922 #
if CYTHON_METH_FASTCALL
19923 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19925 PyObject *__pyx_args, PyObject *__pyx_kwds
19928 PyDoc_STRVAR(__pyx_doc_8PyClical_32reverse,
"\n Reversion, eg. {1}*{2} -> {2}*{1}\n\n >>> print(reverse(clifford(\"{1}\")))\n {1}\n >>> print(reverse(clifford(\"{2}\") * clifford(\"{1}\")))\n {1,2}\n >>> print(reverse(clifford(\"{1}\") * clifford(\"{2}\")))\n -{1,2}\n >>> print(reverse(clifford(\"1+{1}+{1,2}\")))\n 1+{1}-{1,2}\n ");
19929 static PyMethodDef __pyx_mdef_8PyClical_33reverse = {
"reverse", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_33reverse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_32reverse};
19930 static PyObject *__pyx_pw_8PyClical_33reverse(PyObject *__pyx_self,
19931 #
if CYTHON_METH_FASTCALL
19932 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
19934 PyObject *__pyx_args, PyObject *__pyx_kwds
19937 PyObject *__pyx_v_obj = 0;
19938 #if !CYTHON_METH_FASTCALL 19939 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
19941 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
19942 PyObject* values[1] = {0};
19943 int __pyx_lineno = 0;
19944 const char *__pyx_filename = NULL;
19945 int __pyx_clineno = 0;
19946 PyObject *__pyx_r = 0;
19947 __Pyx_RefNannyDeclarations
19948 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
19949 #if !CYTHON_METH_FASTCALL 19950 #if CYTHON_ASSUME_SAFE_MACROS 19951 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
19953 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
19956 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
19958 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
19960 Py_ssize_t kw_args;
19961 switch (__pyx_nargs) {
19962 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19963 CYTHON_FALLTHROUGH;
19965 default:
goto __pyx_L5_argtuple_error;
19967 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
19968 switch (__pyx_nargs) {
19970 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
19971 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
19974 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1533, __pyx_L3_error)
19975 else goto __pyx_L5_argtuple_error;
19977 if (unlikely(kw_args > 0)) {
19978 const Py_ssize_t kwd_pos_args = __pyx_nargs;
19979 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"reverse") < 0)) __PYX_ERR(0, 1533, __pyx_L3_error)
19981 }
else if (unlikely(__pyx_nargs != 1)) {
19982 goto __pyx_L5_argtuple_error;
19984 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
19986 __pyx_v_obj = values[0];
19988 goto __pyx_L6_skip;
19989 __pyx_L5_argtuple_error:;
19990 __Pyx_RaiseArgtupleInvalid(
"reverse", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1533, __pyx_L3_error)
19992 goto __pyx_L4_argument_unpacking_done;
19995 Py_ssize_t __pyx_temp;
19996 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
19997 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20000 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
20001 __Pyx_RefNannyFinishContext();
20003 __pyx_L4_argument_unpacking_done:;
20004 __pyx_r = __pyx_pf_8PyClical_32reverse(__pyx_self, __pyx_v_obj);
20008 Py_ssize_t __pyx_temp;
20009 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20010 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20013 __Pyx_RefNannyFinishContext();
20017 static PyObject *__pyx_pf_8PyClical_32reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
20018 PyObject *__pyx_r = NULL;
20019 __Pyx_RefNannyDeclarations
20020 PyObject *__pyx_t_1 = NULL;
20021 int __pyx_lineno = 0;
20022 const char *__pyx_filename = NULL;
20023 int __pyx_clineno = 0;
20024 __Pyx_RefNannySetupContext(
"reverse", 1);
20025 __Pyx_XDECREF(__pyx_r);
20026 __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1533, __pyx_L1_error)
20027 __Pyx_GOTREF(__pyx_t_1);
20028 __pyx_r = __pyx_t_1;
20034 __Pyx_XDECREF(__pyx_t_1);
20035 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
20038 __Pyx_XGIVEREF(__pyx_r);
20039 __Pyx_RefNannyFinishContext();
20051 static PyObject *__pyx_pw_8PyClical_35conj(PyObject *__pyx_self,
20052 #
if CYTHON_METH_FASTCALL
20053 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20055 PyObject *__pyx_args, PyObject *__pyx_kwds
20058 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
20059 PyObject *__pyx_r = NULL;
20060 __Pyx_RefNannyDeclarations
20061 PyObject *__pyx_t_1 = NULL;
20062 PyObject *__pyx_t_2 = NULL;
20063 PyObject *__pyx_t_3 = NULL;
20065 int __pyx_lineno = 0;
20066 const char *__pyx_filename = NULL;
20067 int __pyx_clineno = 0;
20068 __Pyx_RefNannySetupContext(
"conj", 1);
20077 __Pyx_XDECREF(__pyx_r);
20078 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error)
20079 __Pyx_GOTREF(__pyx_t_2);
20080 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conj);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error)
20081 __Pyx_GOTREF(__pyx_t_3);
20082 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20085 #if CYTHON_UNPACK_METHODS 20086 if (likely(PyMethod_Check(__pyx_t_3))) {
20087 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
20088 if (likely(__pyx_t_2)) {
20089 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
20090 __Pyx_INCREF(__pyx_t_2);
20091 __Pyx_INCREF(
function);
20092 __Pyx_DECREF_SET(__pyx_t_3,
function);
20098 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
20099 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
20100 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20101 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1561, __pyx_L1_error)
20102 __Pyx_GOTREF(__pyx_t_1);
20103 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20105 __pyx_r = __pyx_t_1;
20119 __Pyx_XDECREF(__pyx_t_1);
20120 __Pyx_XDECREF(__pyx_t_2);
20121 __Pyx_XDECREF(__pyx_t_3);
20122 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
20125 __Pyx_XGIVEREF(__pyx_r);
20126 __Pyx_RefNannyFinishContext();
20131 static PyObject *__pyx_pw_8PyClical_35conj(PyObject *__pyx_self,
20132 #
if CYTHON_METH_FASTCALL
20133 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20135 PyObject *__pyx_args, PyObject *__pyx_kwds
20138 PyDoc_STRVAR(__pyx_doc_8PyClical_34conj,
"\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print(conj(clifford(\"{1}\")))\n -{1}\n >>> print(conj(clifford(\"{2}\") * clifford(\"{1}\")))\n {1,2}\n >>> print(conj(clifford(\"{1}\") * clifford(\"{2}\")))\n -{1,2}\n >>> print(conj(clifford(\"1+{1}+{1,2}\")))\n 1-{1}-{1,2}\n ");
20139 static PyMethodDef __pyx_mdef_8PyClical_35conj = {
"conj", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_35conj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_34conj};
20140 static PyObject *__pyx_pw_8PyClical_35conj(PyObject *__pyx_self,
20141 #
if CYTHON_METH_FASTCALL
20142 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20144 PyObject *__pyx_args, PyObject *__pyx_kwds
20147 PyObject *__pyx_v_obj = 0;
20148 #if !CYTHON_METH_FASTCALL 20149 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20151 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
20152 PyObject* values[1] = {0};
20153 int __pyx_lineno = 0;
20154 const char *__pyx_filename = NULL;
20155 int __pyx_clineno = 0;
20156 PyObject *__pyx_r = 0;
20157 __Pyx_RefNannyDeclarations
20158 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
20159 #if !CYTHON_METH_FASTCALL 20160 #if CYTHON_ASSUME_SAFE_MACROS 20161 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20163 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
20166 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20168 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
20170 Py_ssize_t kw_args;
20171 switch (__pyx_nargs) {
20172 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20173 CYTHON_FALLTHROUGH;
20175 default:
goto __pyx_L5_argtuple_error;
20177 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20178 switch (__pyx_nargs) {
20180 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
20181 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20184 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L3_error)
20185 else goto __pyx_L5_argtuple_error;
20187 if (unlikely(kw_args > 0)) {
20188 const Py_ssize_t kwd_pos_args = __pyx_nargs;
20189 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"conj") < 0)) __PYX_ERR(0, 1548, __pyx_L3_error)
20191 }
else if (unlikely(__pyx_nargs != 1)) {
20192 goto __pyx_L5_argtuple_error;
20194 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20196 __pyx_v_obj = values[0];
20198 goto __pyx_L6_skip;
20199 __pyx_L5_argtuple_error:;
20200 __Pyx_RaiseArgtupleInvalid(
"conj", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1548, __pyx_L3_error)
20202 goto __pyx_L4_argument_unpacking_done;
20205 Py_ssize_t __pyx_temp;
20206 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20207 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20210 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
20211 __Pyx_RefNannyFinishContext();
20213 __pyx_L4_argument_unpacking_done:;
20214 __pyx_r = __pyx_pf_8PyClical_34conj(__pyx_self, __pyx_v_obj);
20218 Py_ssize_t __pyx_temp;
20219 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20220 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20223 __Pyx_RefNannyFinishContext();
20227 static PyObject *__pyx_pf_8PyClical_34conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
20228 PyObject *__pyx_r = NULL;
20229 __Pyx_RefNannyDeclarations
20230 PyObject *__pyx_t_1 = NULL;
20231 int __pyx_lineno = 0;
20232 const char *__pyx_filename = NULL;
20233 int __pyx_clineno = 0;
20234 __Pyx_RefNannySetupContext(
"conj", 1);
20235 __Pyx_XDECREF(__pyx_r);
20236 __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
20237 __Pyx_GOTREF(__pyx_t_1);
20238 __pyx_r = __pyx_t_1;
20244 __Pyx_XDECREF(__pyx_t_1);
20245 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
20248 __Pyx_XGIVEREF(__pyx_r);
20249 __Pyx_RefNannyFinishContext();
20261 static PyObject *__pyx_pw_8PyClical_37quad(PyObject *__pyx_self,
20262 #
if CYTHON_METH_FASTCALL
20263 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20265 PyObject *__pyx_args, PyObject *__pyx_kwds
20268 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
20269 PyObject *__pyx_r = NULL;
20270 __Pyx_RefNannyDeclarations
20271 PyObject *__pyx_t_1 = NULL;
20272 PyObject *__pyx_t_2 = NULL;
20273 PyObject *__pyx_t_3 = NULL;
20275 int __pyx_lineno = 0;
20276 const char *__pyx_filename = NULL;
20277 int __pyx_clineno = 0;
20278 __Pyx_RefNannySetupContext(
"quad", 1);
20287 __Pyx_XDECREF(__pyx_r);
20288 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error)
20289 __Pyx_GOTREF(__pyx_t_2);
20290 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_quad);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
20291 __Pyx_GOTREF(__pyx_t_3);
20292 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20295 #if CYTHON_UNPACK_METHODS 20296 if (likely(PyMethod_Check(__pyx_t_3))) {
20297 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
20298 if (likely(__pyx_t_2)) {
20299 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
20300 __Pyx_INCREF(__pyx_t_2);
20301 __Pyx_INCREF(
function);
20302 __Pyx_DECREF_SET(__pyx_t_3,
function);
20308 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
20309 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
20310 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20311 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __pyx_L1_error)
20312 __Pyx_GOTREF(__pyx_t_1);
20313 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20315 __pyx_r = __pyx_t_1;
20329 __Pyx_XDECREF(__pyx_t_1);
20330 __Pyx_XDECREF(__pyx_t_2);
20331 __Pyx_XDECREF(__pyx_t_3);
20332 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
20335 __Pyx_XGIVEREF(__pyx_r);
20336 __Pyx_RefNannyFinishContext();
20341 static PyObject *__pyx_pw_8PyClical_37quad(PyObject *__pyx_self,
20342 #
if CYTHON_METH_FASTCALL
20343 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20345 PyObject *__pyx_args, PyObject *__pyx_kwds
20348 PyDoc_STRVAR(__pyx_doc_8PyClical_36quad,
"\n Quadratic form == (rev(x)*x)(0).\n\n >>> print(quad(clifford(\"1+{1}+{1,2}\")))\n 3.0\n >>> print(quad(clifford(\"1+{-1}+{1,2}+{1,2,3}\")))\n 2.0\n ");
20349 static PyMethodDef __pyx_mdef_8PyClical_37quad = {
"quad", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_37quad, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_36quad};
20350 static PyObject *__pyx_pw_8PyClical_37quad(PyObject *__pyx_self,
20351 #
if CYTHON_METH_FASTCALL
20352 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20354 PyObject *__pyx_args, PyObject *__pyx_kwds
20357 PyObject *__pyx_v_obj = 0;
20358 #if !CYTHON_METH_FASTCALL 20359 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20361 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
20362 PyObject* values[1] = {0};
20363 int __pyx_lineno = 0;
20364 const char *__pyx_filename = NULL;
20365 int __pyx_clineno = 0;
20366 PyObject *__pyx_r = 0;
20367 __Pyx_RefNannyDeclarations
20368 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
20369 #if !CYTHON_METH_FASTCALL 20370 #if CYTHON_ASSUME_SAFE_MACROS 20371 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20373 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
20376 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20378 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
20380 Py_ssize_t kw_args;
20381 switch (__pyx_nargs) {
20382 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20383 CYTHON_FALLTHROUGH;
20385 default:
goto __pyx_L5_argtuple_error;
20387 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20388 switch (__pyx_nargs) {
20390 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
20391 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20394 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1563, __pyx_L3_error)
20395 else goto __pyx_L5_argtuple_error;
20397 if (unlikely(kw_args > 0)) {
20398 const Py_ssize_t kwd_pos_args = __pyx_nargs;
20399 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"quad") < 0)) __PYX_ERR(0, 1563, __pyx_L3_error)
20401 }
else if (unlikely(__pyx_nargs != 1)) {
20402 goto __pyx_L5_argtuple_error;
20404 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20406 __pyx_v_obj = values[0];
20408 goto __pyx_L6_skip;
20409 __pyx_L5_argtuple_error:;
20410 __Pyx_RaiseArgtupleInvalid(
"quad", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1563, __pyx_L3_error)
20412 goto __pyx_L4_argument_unpacking_done;
20415 Py_ssize_t __pyx_temp;
20416 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20417 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20420 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
20421 __Pyx_RefNannyFinishContext();
20423 __pyx_L4_argument_unpacking_done:;
20424 __pyx_r = __pyx_pf_8PyClical_36quad(__pyx_self, __pyx_v_obj);
20428 Py_ssize_t __pyx_temp;
20429 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20430 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20433 __Pyx_RefNannyFinishContext();
20437 static PyObject *__pyx_pf_8PyClical_36quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
20438 PyObject *__pyx_r = NULL;
20439 __Pyx_RefNannyDeclarations
20440 PyObject *__pyx_t_1 = NULL;
20441 int __pyx_lineno = 0;
20442 const char *__pyx_filename = NULL;
20443 int __pyx_clineno = 0;
20444 __Pyx_RefNannySetupContext(
"quad", 1);
20445 __Pyx_XDECREF(__pyx_r);
20446 __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error)
20447 __Pyx_GOTREF(__pyx_t_1);
20448 __pyx_r = __pyx_t_1;
20454 __Pyx_XDECREF(__pyx_t_1);
20455 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
20458 __Pyx_XGIVEREF(__pyx_r);
20459 __Pyx_RefNannyFinishContext();
20471 static PyObject *__pyx_pw_8PyClical_39norm(PyObject *__pyx_self,
20472 #
if CYTHON_METH_FASTCALL
20473 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20475 PyObject *__pyx_args, PyObject *__pyx_kwds
20478 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
20479 PyObject *__pyx_r = NULL;
20480 __Pyx_RefNannyDeclarations
20481 PyObject *__pyx_t_1 = NULL;
20482 PyObject *__pyx_t_2 = NULL;
20483 PyObject *__pyx_t_3 = NULL;
20485 int __pyx_lineno = 0;
20486 const char *__pyx_filename = NULL;
20487 int __pyx_clineno = 0;
20488 __Pyx_RefNannySetupContext(
"norm", 1);
20497 __Pyx_XDECREF(__pyx_r);
20498 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error)
20499 __Pyx_GOTREF(__pyx_t_2);
20500 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error)
20501 __Pyx_GOTREF(__pyx_t_3);
20502 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20505 #if CYTHON_UNPACK_METHODS 20506 if (likely(PyMethod_Check(__pyx_t_3))) {
20507 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
20508 if (likely(__pyx_t_2)) {
20509 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
20510 __Pyx_INCREF(__pyx_t_2);
20511 __Pyx_INCREF(
function);
20512 __Pyx_DECREF_SET(__pyx_t_3,
function);
20518 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
20519 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
20520 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20521 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error)
20522 __Pyx_GOTREF(__pyx_t_1);
20523 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20525 __pyx_r = __pyx_t_1;
20539 __Pyx_XDECREF(__pyx_t_1);
20540 __Pyx_XDECREF(__pyx_t_2);
20541 __Pyx_XDECREF(__pyx_t_3);
20542 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
20545 __Pyx_XGIVEREF(__pyx_r);
20546 __Pyx_RefNannyFinishContext();
20551 static PyObject *__pyx_pw_8PyClical_39norm(PyObject *__pyx_self,
20552 #
if CYTHON_METH_FASTCALL
20553 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20555 PyObject *__pyx_args, PyObject *__pyx_kwds
20558 PyDoc_STRVAR(__pyx_doc_8PyClical_38norm,
"\n norm == sum of squares of coordinates.\n\n >>> norm(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> norm(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 4.0\n ");
20559 static PyMethodDef __pyx_mdef_8PyClical_39norm = {
"norm", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_39norm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_38norm};
20560 static PyObject *__pyx_pw_8PyClical_39norm(PyObject *__pyx_self,
20561 #
if CYTHON_METH_FASTCALL
20562 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20564 PyObject *__pyx_args, PyObject *__pyx_kwds
20567 PyObject *__pyx_v_obj = 0;
20568 #if !CYTHON_METH_FASTCALL 20569 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20571 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
20572 PyObject* values[1] = {0};
20573 int __pyx_lineno = 0;
20574 const char *__pyx_filename = NULL;
20575 int __pyx_clineno = 0;
20576 PyObject *__pyx_r = 0;
20577 __Pyx_RefNannyDeclarations
20578 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
20579 #if !CYTHON_METH_FASTCALL 20580 #if CYTHON_ASSUME_SAFE_MACROS 20581 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20583 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
20586 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20588 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
20590 Py_ssize_t kw_args;
20591 switch (__pyx_nargs) {
20592 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20593 CYTHON_FALLTHROUGH;
20595 default:
goto __pyx_L5_argtuple_error;
20597 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20598 switch (__pyx_nargs) {
20600 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
20601 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20604 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1574, __pyx_L3_error)
20605 else goto __pyx_L5_argtuple_error;
20607 if (unlikely(kw_args > 0)) {
20608 const Py_ssize_t kwd_pos_args = __pyx_nargs;
20609 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"norm") < 0)) __PYX_ERR(0, 1574, __pyx_L3_error)
20611 }
else if (unlikely(__pyx_nargs != 1)) {
20612 goto __pyx_L5_argtuple_error;
20614 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20616 __pyx_v_obj = values[0];
20618 goto __pyx_L6_skip;
20619 __pyx_L5_argtuple_error:;
20620 __Pyx_RaiseArgtupleInvalid(
"norm", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1574, __pyx_L3_error)
20622 goto __pyx_L4_argument_unpacking_done;
20625 Py_ssize_t __pyx_temp;
20626 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20627 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20630 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
20631 __Pyx_RefNannyFinishContext();
20633 __pyx_L4_argument_unpacking_done:;
20634 __pyx_r = __pyx_pf_8PyClical_38norm(__pyx_self, __pyx_v_obj);
20638 Py_ssize_t __pyx_temp;
20639 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20640 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20643 __Pyx_RefNannyFinishContext();
20647 static PyObject *__pyx_pf_8PyClical_38norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
20648 PyObject *__pyx_r = NULL;
20649 __Pyx_RefNannyDeclarations
20650 PyObject *__pyx_t_1 = NULL;
20651 int __pyx_lineno = 0;
20652 const char *__pyx_filename = NULL;
20653 int __pyx_clineno = 0;
20654 __Pyx_RefNannySetupContext(
"norm", 1);
20655 __Pyx_XDECREF(__pyx_r);
20656 __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
20657 __Pyx_GOTREF(__pyx_t_1);
20658 __pyx_r = __pyx_t_1;
20664 __Pyx_XDECREF(__pyx_t_1);
20665 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
20668 __Pyx_XGIVEREF(__pyx_r);
20669 __Pyx_RefNannyFinishContext();
20681 static PyObject *__pyx_pw_8PyClical_41abs(PyObject *__pyx_self,
20682 #
if CYTHON_METH_FASTCALL
20683 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20685 PyObject *__pyx_args, PyObject *__pyx_kwds
20688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
20689 PyObject *__pyx_r = NULL;
20690 __Pyx_RefNannyDeclarations
20692 PyObject *__pyx_t_2 = NULL;
20693 int __pyx_lineno = 0;
20694 const char *__pyx_filename = NULL;
20695 int __pyx_clineno = 0;
20696 __Pyx_RefNannySetupContext(
"abs", 1);
20705 __Pyx_XDECREF(__pyx_r);
20706 __pyx_t_1 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1592, __pyx_L1_error)
20707 __pyx_t_2 =
PyFloat_FromDouble(
abs(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error)
20708 __Pyx_GOTREF(__pyx_t_2);
20709 __pyx_r = __pyx_t_2;
20723 __Pyx_XDECREF(__pyx_t_2);
20724 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
20727 __Pyx_XGIVEREF(__pyx_r);
20728 __Pyx_RefNannyFinishContext();
20733 static PyObject *__pyx_pw_8PyClical_41abs(PyObject *__pyx_self,
20734 #
if CYTHON_METH_FASTCALL
20735 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20737 PyObject *__pyx_args, PyObject *__pyx_kwds
20740 PyDoc_STRVAR(__pyx_doc_8PyClical_40abs,
"\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ");
20741 static PyMethodDef __pyx_mdef_8PyClical_41abs = {
"abs", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_41abs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_40abs};
20742 static PyObject *__pyx_pw_8PyClical_41abs(PyObject *__pyx_self,
20743 #
if CYTHON_METH_FASTCALL
20744 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20746 PyObject *__pyx_args, PyObject *__pyx_kwds
20749 PyObject *__pyx_v_obj = 0;
20750 #if !CYTHON_METH_FASTCALL 20751 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20753 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
20754 PyObject* values[1] = {0};
20755 int __pyx_lineno = 0;
20756 const char *__pyx_filename = NULL;
20757 int __pyx_clineno = 0;
20758 PyObject *__pyx_r = 0;
20759 __Pyx_RefNannyDeclarations
20760 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
20761 #if !CYTHON_METH_FASTCALL 20762 #if CYTHON_ASSUME_SAFE_MACROS 20763 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20765 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
20768 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20770 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
20772 Py_ssize_t kw_args;
20773 switch (__pyx_nargs) {
20774 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20775 CYTHON_FALLTHROUGH;
20777 default:
goto __pyx_L5_argtuple_error;
20779 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20780 switch (__pyx_nargs) {
20782 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
20783 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20786 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L3_error)
20787 else goto __pyx_L5_argtuple_error;
20789 if (unlikely(kw_args > 0)) {
20790 const Py_ssize_t kwd_pos_args = __pyx_nargs;
20791 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"abs") < 0)) __PYX_ERR(0, 1585, __pyx_L3_error)
20793 }
else if (unlikely(__pyx_nargs != 1)) {
20794 goto __pyx_L5_argtuple_error;
20796 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20798 __pyx_v_obj = values[0];
20800 goto __pyx_L6_skip;
20801 __pyx_L5_argtuple_error:;
20802 __Pyx_RaiseArgtupleInvalid(
"abs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1585, __pyx_L3_error)
20804 goto __pyx_L4_argument_unpacking_done;
20807 Py_ssize_t __pyx_temp;
20808 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20809 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20812 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
20813 __Pyx_RefNannyFinishContext();
20815 __pyx_L4_argument_unpacking_done:;
20816 __pyx_r = __pyx_pf_8PyClical_40abs(__pyx_self, __pyx_v_obj);
20820 Py_ssize_t __pyx_temp;
20821 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20822 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20825 __Pyx_RefNannyFinishContext();
20829 static PyObject *__pyx_pf_8PyClical_40abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
20830 PyObject *__pyx_r = NULL;
20831 __Pyx_RefNannyDeclarations
20832 PyObject *__pyx_t_1 = NULL;
20833 int __pyx_lineno = 0;
20834 const char *__pyx_filename = NULL;
20835 int __pyx_clineno = 0;
20836 __Pyx_RefNannySetupContext(
"abs", 1);
20837 __Pyx_XDECREF(__pyx_r);
20838 __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error)
20839 __Pyx_GOTREF(__pyx_t_1);
20840 __pyx_r = __pyx_t_1;
20846 __Pyx_XDECREF(__pyx_t_1);
20847 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
20850 __Pyx_XGIVEREF(__pyx_r);
20851 __Pyx_RefNannyFinishContext();
20863 static PyObject *__pyx_pw_8PyClical_43max_abs(PyObject *__pyx_self,
20864 #
if CYTHON_METH_FASTCALL
20865 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20867 PyObject *__pyx_args, PyObject *__pyx_kwds
20870 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
20871 PyObject *__pyx_r = NULL;
20872 __Pyx_RefNannyDeclarations
20874 PyObject *__pyx_t_2 = NULL;
20875 int __pyx_lineno = 0;
20876 const char *__pyx_filename = NULL;
20877 int __pyx_clineno = 0;
20878 __Pyx_RefNannySetupContext(
"max_abs", 1);
20887 __Pyx_XDECREF(__pyx_r);
20888 __pyx_t_1 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1604, __pyx_L1_error)
20889 __pyx_t_2 =
PyFloat_FromDouble(
max_abs(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error)
20890 __Pyx_GOTREF(__pyx_t_2);
20891 __pyx_r = __pyx_t_2;
20905 __Pyx_XDECREF(__pyx_t_2);
20906 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
20909 __Pyx_XGIVEREF(__pyx_r);
20910 __Pyx_RefNannyFinishContext();
20915 static PyObject *__pyx_pw_8PyClical_43max_abs(PyObject *__pyx_self,
20916 #
if CYTHON_METH_FASTCALL
20917 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20919 PyObject *__pyx_args, PyObject *__pyx_kwds
20922 PyDoc_STRVAR(__pyx_doc_8PyClical_42max_abs,
"\n Maximum absolute value of coordinates multivector: multivector infinity-norm.\n\n >>> max_abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 1.0\n >>> max_abs(clifford(\"3+2{1}+{1,2}\"))\n 3.0\n\n ");
20923 static PyMethodDef __pyx_mdef_8PyClical_43max_abs = {
"max_abs", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_43max_abs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_42max_abs};
20924 static PyObject *__pyx_pw_8PyClical_43max_abs(PyObject *__pyx_self,
20925 #
if CYTHON_METH_FASTCALL
20926 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20928 PyObject *__pyx_args, PyObject *__pyx_kwds
20931 PyObject *__pyx_v_obj = 0;
20932 #if !CYTHON_METH_FASTCALL 20933 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20935 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
20936 PyObject* values[1] = {0};
20937 int __pyx_lineno = 0;
20938 const char *__pyx_filename = NULL;
20939 int __pyx_clineno = 0;
20940 PyObject *__pyx_r = 0;
20941 __Pyx_RefNannyDeclarations
20942 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
20943 #if !CYTHON_METH_FASTCALL 20944 #if CYTHON_ASSUME_SAFE_MACROS 20945 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20947 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
20950 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20952 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
20954 Py_ssize_t kw_args;
20955 switch (__pyx_nargs) {
20956 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20957 CYTHON_FALLTHROUGH;
20959 default:
goto __pyx_L5_argtuple_error;
20961 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20962 switch (__pyx_nargs) {
20964 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
20965 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20968 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1594, __pyx_L3_error)
20969 else goto __pyx_L5_argtuple_error;
20971 if (unlikely(kw_args > 0)) {
20972 const Py_ssize_t kwd_pos_args = __pyx_nargs;
20973 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"max_abs") < 0)) __PYX_ERR(0, 1594, __pyx_L3_error)
20975 }
else if (unlikely(__pyx_nargs != 1)) {
20976 goto __pyx_L5_argtuple_error;
20978 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20980 __pyx_v_obj = values[0];
20982 goto __pyx_L6_skip;
20983 __pyx_L5_argtuple_error:;
20984 __Pyx_RaiseArgtupleInvalid(
"max_abs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1594, __pyx_L3_error)
20986 goto __pyx_L4_argument_unpacking_done;
20989 Py_ssize_t __pyx_temp;
20990 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
20991 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20994 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
20995 __Pyx_RefNannyFinishContext();
20997 __pyx_L4_argument_unpacking_done:;
20998 __pyx_r = __pyx_pf_8PyClical_42max_abs(__pyx_self, __pyx_v_obj);
21002 Py_ssize_t __pyx_temp;
21003 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21004 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21007 __Pyx_RefNannyFinishContext();
21011 static PyObject *__pyx_pf_8PyClical_42max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
21012 PyObject *__pyx_r = NULL;
21013 __Pyx_RefNannyDeclarations
21014 PyObject *__pyx_t_1 = NULL;
21015 int __pyx_lineno = 0;
21016 const char *__pyx_filename = NULL;
21017 int __pyx_clineno = 0;
21018 __Pyx_RefNannySetupContext(
"max_abs", 1);
21019 __Pyx_XDECREF(__pyx_r);
21020 __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __pyx_L1_error)
21021 __Pyx_GOTREF(__pyx_t_1);
21022 __pyx_r = __pyx_t_1;
21028 __Pyx_XDECREF(__pyx_t_1);
21029 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
21032 __Pyx_XGIVEREF(__pyx_r);
21033 __Pyx_RefNannyFinishContext();
21045 static PyObject *__pyx_pw_8PyClical_45pow(PyObject *__pyx_self,
21046 #
if CYTHON_METH_FASTCALL
21047 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21049 PyObject *__pyx_args, PyObject *__pyx_kwds
21052 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
21053 PyObject *__pyx_r = NULL;
21054 __Pyx_RefNannyDeclarations
21055 PyObject *__pyx_t_1 = NULL;
21056 PyObject *__pyx_t_2 = NULL;
21057 PyObject *__pyx_t_3 = NULL;
21058 PyObject *__pyx_t_4 = NULL;
21059 PyObject *__pyx_t_5 = NULL;
21060 PyObject *__pyx_t_6 = NULL;
21062 PyObject *__pyx_t_8 = NULL;
21063 PyObject *__pyx_t_9 = NULL;
21064 PyObject *__pyx_t_10 = NULL;
21065 int __pyx_lineno = 0;
21066 const char *__pyx_filename = NULL;
21067 int __pyx_clineno = 0;
21068 __Pyx_RefNannySetupContext(
"pow", 1);
21078 __Pyx_PyThreadState_declare
21079 __Pyx_PyThreadState_assign
21080 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
21081 __Pyx_XGOTREF(__pyx_t_1);
21082 __Pyx_XGOTREF(__pyx_t_2);
21083 __Pyx_XGOTREF(__pyx_t_3);
21093 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1626, __pyx_L3_error)
21094 __Pyx_GOTREF(__pyx_t_5);
21095 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1626, __pyx_L3_error)
21096 __Pyx_GOTREF(__pyx_t_6);
21097 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21100 #if CYTHON_UNPACK_METHODS 21101 if (unlikely(PyMethod_Check(__pyx_t_6))) {
21102 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
21103 if (likely(__pyx_t_5)) {
21104 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
21105 __Pyx_INCREF(__pyx_t_5);
21106 __Pyx_INCREF(
function);
21107 __Pyx_DECREF_SET(__pyx_t_6,
function);
21113 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
21114 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
21115 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21116 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L3_error)
21117 __Pyx_GOTREF(__pyx_t_4);
21118 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21120 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21130 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21131 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21132 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21133 goto __pyx_L8_try_end;
21135 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21136 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21137 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21147 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21148 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1627, __pyx_L5_except_error)
21149 __Pyx_XGOTREF(__pyx_t_4);
21150 __Pyx_XGOTREF(__pyx_t_6);
21151 __Pyx_XGOTREF(__pyx_t_5);
21160 __Pyx_XDECREF(__pyx_r);
21161 __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1628, __pyx_L5_except_error)
21162 __Pyx_GOTREF(__pyx_t_9);
21163 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pow);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1628, __pyx_L5_except_error)
21164 __Pyx_GOTREF(__pyx_t_10);
21165 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21168 #if CYTHON_UNPACK_METHODS 21169 if (likely(PyMethod_Check(__pyx_t_10))) {
21170 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
21171 if (likely(__pyx_t_9)) {
21172 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
21173 __Pyx_INCREF(__pyx_t_9);
21174 __Pyx_INCREF(
function);
21175 __Pyx_DECREF_SET(__pyx_t_10,
function);
21181 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_m};
21182 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
21183 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
21184 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1628, __pyx_L5_except_error)
21185 __Pyx_GOTREF(__pyx_t_8);
21186 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21188 __pyx_r = __pyx_t_8;
21190 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21191 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21192 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21193 goto __pyx_L6_except_return;
21203 __pyx_L5_except_error:;
21204 __Pyx_XGIVEREF(__pyx_t_1);
21205 __Pyx_XGIVEREF(__pyx_t_2);
21206 __Pyx_XGIVEREF(__pyx_t_3);
21207 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21208 goto __pyx_L1_error;
21209 __pyx_L6_except_return:;
21210 __Pyx_XGIVEREF(__pyx_t_1);
21211 __Pyx_XGIVEREF(__pyx_t_2);
21212 __Pyx_XGIVEREF(__pyx_t_3);
21213 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21227 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21230 __Pyx_XDECREF(__pyx_t_4);
21231 __Pyx_XDECREF(__pyx_t_5);
21232 __Pyx_XDECREF(__pyx_t_6);
21233 __Pyx_XDECREF(__pyx_t_8);
21234 __Pyx_XDECREF(__pyx_t_9);
21235 __Pyx_XDECREF(__pyx_t_10);
21236 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21239 __Pyx_XGIVEREF(__pyx_r);
21240 __Pyx_RefNannyFinishContext();
21245 static PyObject *__pyx_pw_8PyClical_45pow(PyObject *__pyx_self,
21246 #
if CYTHON_METH_FASTCALL
21247 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21249 PyObject *__pyx_args, PyObject *__pyx_kwds
21252 PyDoc_STRVAR(__pyx_doc_8PyClical_44pow,
"\n Integer power of multivector: obj to the m.\n\n >>> x=clifford(\"{1}\"); print(pow(x,2))\n 1\n >>> x=clifford(\"2\"); print(pow(x,2))\n 4\n >>> x=clifford(\"2+{1}\"); print(pow(x,0))\n 1\n >>> x=clifford(\"2+{1}\"); print(pow(x,1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(pow(x,2))\n 5+4{1}\n >>> print(pow(clifford(\"1+{1}+{1,2}\"),3))\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * pow(i, i))\n 1\n ");
21253 static PyMethodDef __pyx_mdef_8PyClical_45pow = {
"pow", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_45pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_44pow};
21254 static PyObject *__pyx_pw_8PyClical_45pow(PyObject *__pyx_self,
21255 #
if CYTHON_METH_FASTCALL
21256 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21258 PyObject *__pyx_args, PyObject *__pyx_kwds
21261 PyObject *__pyx_v_obj = 0;
21262 PyObject *__pyx_v_m = 0;
21263 #if !CYTHON_METH_FASTCALL 21264 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
21266 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
21267 PyObject* values[2] = {0,0};
21268 int __pyx_lineno = 0;
21269 const char *__pyx_filename = NULL;
21270 int __pyx_clineno = 0;
21271 PyObject *__pyx_r = 0;
21272 __Pyx_RefNannyDeclarations
21273 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
21274 #if !CYTHON_METH_FASTCALL 21275 #if CYTHON_ASSUME_SAFE_MACROS 21276 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
21278 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
21281 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
21283 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
21285 Py_ssize_t kw_args;
21286 switch (__pyx_nargs) {
21287 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
21288 CYTHON_FALLTHROUGH;
21289 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
21290 CYTHON_FALLTHROUGH;
21292 default:
goto __pyx_L5_argtuple_error;
21294 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
21295 switch (__pyx_nargs) {
21297 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
21298 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
21301 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L3_error)
21302 else goto __pyx_L5_argtuple_error;
21303 CYTHON_FALLTHROUGH;
21305 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) {
21306 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
21309 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L3_error)
21311 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, 1); __PYX_ERR(0, 1606, __pyx_L3_error)
21314 if (unlikely(kw_args > 0)) {
21315 const Py_ssize_t kwd_pos_args = __pyx_nargs;
21316 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"pow") < 0)) __PYX_ERR(0, 1606, __pyx_L3_error)
21318 }
else if (unlikely(__pyx_nargs != 2)) {
21319 goto __pyx_L5_argtuple_error;
21321 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
21322 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
21324 __pyx_v_obj = values[0];
21325 __pyx_v_m = values[1];
21327 goto __pyx_L6_skip;
21328 __pyx_L5_argtuple_error:;
21329 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1606, __pyx_L3_error)
21331 goto __pyx_L4_argument_unpacking_done;
21334 Py_ssize_t __pyx_temp;
21335 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21336 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21339 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21340 __Pyx_RefNannyFinishContext();
21342 __pyx_L4_argument_unpacking_done:;
21343 __pyx_r = __pyx_pf_8PyClical_44pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
21347 Py_ssize_t __pyx_temp;
21348 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21349 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21352 __Pyx_RefNannyFinishContext();
21356 static PyObject *__pyx_pf_8PyClical_44pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
21357 PyObject *__pyx_r = NULL;
21358 __Pyx_RefNannyDeclarations
21359 PyObject *__pyx_t_1 = NULL;
21360 int __pyx_lineno = 0;
21361 const char *__pyx_filename = NULL;
21362 int __pyx_clineno = 0;
21363 __Pyx_RefNannySetupContext(
"pow", 1);
21364 __Pyx_XDECREF(__pyx_r);
21365 __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1606, __pyx_L1_error)
21366 __Pyx_GOTREF(__pyx_t_1);
21367 __pyx_r = __pyx_t_1;
21373 __Pyx_XDECREF(__pyx_t_1);
21374 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21377 __Pyx_XGIVEREF(__pyx_r);
21378 __Pyx_RefNannyFinishContext();
21390 static PyObject *__pyx_pw_8PyClical_47outer_pow(PyObject *__pyx_self,
21391 #
if CYTHON_METH_FASTCALL
21392 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21394 PyObject *__pyx_args, PyObject *__pyx_kwds
21397 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
21398 PyObject *__pyx_r = NULL;
21399 __Pyx_RefNannyDeclarations
21400 PyObject *__pyx_t_1 = NULL;
21401 PyObject *__pyx_t_2 = NULL;
21402 PyObject *__pyx_t_3 = NULL;
21404 int __pyx_lineno = 0;
21405 const char *__pyx_filename = NULL;
21406 int __pyx_clineno = 0;
21407 __Pyx_RefNannySetupContext(
"outer_pow", 1);
21416 __Pyx_XDECREF(__pyx_r);
21417 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1637, __pyx_L1_error)
21418 __Pyx_GOTREF(__pyx_t_2);
21419 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outer_pow);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
21420 __Pyx_GOTREF(__pyx_t_3);
21421 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21424 #if CYTHON_UNPACK_METHODS 21425 if (likely(PyMethod_Check(__pyx_t_3))) {
21426 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
21427 if (likely(__pyx_t_2)) {
21428 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
21429 __Pyx_INCREF(__pyx_t_2);
21430 __Pyx_INCREF(
function);
21431 __Pyx_DECREF_SET(__pyx_t_3,
function);
21437 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_m};
21438 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21439 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21440 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1637, __pyx_L1_error)
21441 __Pyx_GOTREF(__pyx_t_1);
21442 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21444 __pyx_r = __pyx_t_1;
21458 __Pyx_XDECREF(__pyx_t_1);
21459 __Pyx_XDECREF(__pyx_t_2);
21460 __Pyx_XDECREF(__pyx_t_3);
21461 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21464 __Pyx_XGIVEREF(__pyx_r);
21465 __Pyx_RefNannyFinishContext();
21470 static PyObject *__pyx_pw_8PyClical_47outer_pow(PyObject *__pyx_self,
21471 #
if CYTHON_METH_FASTCALL
21472 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21474 PyObject *__pyx_args, PyObject *__pyx_kwds
21477 PyDoc_STRVAR(__pyx_doc_8PyClical_46outer_pow,
"\n Outer product power of multivector.\n\n >>> print(outer_pow(clifford(\"1+{1}+{1,2}\"),3))\n 1+3{1}+3{1,2}\n ");
21478 static PyMethodDef __pyx_mdef_8PyClical_47outer_pow = {
"outer_pow", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_47outer_pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_46outer_pow};
21479 static PyObject *__pyx_pw_8PyClical_47outer_pow(PyObject *__pyx_self,
21480 #
if CYTHON_METH_FASTCALL
21481 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21483 PyObject *__pyx_args, PyObject *__pyx_kwds
21486 PyObject *__pyx_v_obj = 0;
21487 PyObject *__pyx_v_m = 0;
21488 #if !CYTHON_METH_FASTCALL 21489 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
21491 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
21492 PyObject* values[2] = {0,0};
21493 int __pyx_lineno = 0;
21494 const char *__pyx_filename = NULL;
21495 int __pyx_clineno = 0;
21496 PyObject *__pyx_r = 0;
21497 __Pyx_RefNannyDeclarations
21498 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
21499 #if !CYTHON_METH_FASTCALL 21500 #if CYTHON_ASSUME_SAFE_MACROS 21501 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
21503 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
21506 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
21508 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
21510 Py_ssize_t kw_args;
21511 switch (__pyx_nargs) {
21512 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
21513 CYTHON_FALLTHROUGH;
21514 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
21515 CYTHON_FALLTHROUGH;
21517 default:
goto __pyx_L5_argtuple_error;
21519 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
21520 switch (__pyx_nargs) {
21522 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
21523 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
21526 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L3_error)
21527 else goto __pyx_L5_argtuple_error;
21528 CYTHON_FALLTHROUGH;
21530 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) {
21531 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
21534 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L3_error)
21536 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1630, __pyx_L3_error)
21539 if (unlikely(kw_args > 0)) {
21540 const Py_ssize_t kwd_pos_args = __pyx_nargs;
21541 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"outer_pow") < 0)) __PYX_ERR(0, 1630, __pyx_L3_error)
21543 }
else if (unlikely(__pyx_nargs != 2)) {
21544 goto __pyx_L5_argtuple_error;
21546 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
21547 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
21549 __pyx_v_obj = values[0];
21550 __pyx_v_m = values[1];
21552 goto __pyx_L6_skip;
21553 __pyx_L5_argtuple_error:;
21554 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1630, __pyx_L3_error)
21556 goto __pyx_L4_argument_unpacking_done;
21559 Py_ssize_t __pyx_temp;
21560 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21561 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21564 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21565 __Pyx_RefNannyFinishContext();
21567 __pyx_L4_argument_unpacking_done:;
21568 __pyx_r = __pyx_pf_8PyClical_46outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
21572 Py_ssize_t __pyx_temp;
21573 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21574 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21577 __Pyx_RefNannyFinishContext();
21581 static PyObject *__pyx_pf_8PyClical_46outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
21582 PyObject *__pyx_r = NULL;
21583 __Pyx_RefNannyDeclarations
21584 PyObject *__pyx_t_1 = NULL;
21585 int __pyx_lineno = 0;
21586 const char *__pyx_filename = NULL;
21587 int __pyx_clineno = 0;
21588 __Pyx_RefNannySetupContext(
"outer_pow", 1);
21589 __Pyx_XDECREF(__pyx_r);
21590 __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1630, __pyx_L1_error)
21591 __Pyx_GOTREF(__pyx_t_1);
21592 __pyx_r = __pyx_t_1;
21598 __Pyx_XDECREF(__pyx_t_1);
21599 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
21602 __Pyx_XGIVEREF(__pyx_r);
21603 __Pyx_RefNannyFinishContext();
21615 static PyObject *__pyx_pw_8PyClical_49complexifier(PyObject *__pyx_self,
21616 #
if CYTHON_METH_FASTCALL
21617 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21619 PyObject *__pyx_args, PyObject *__pyx_kwds
21622 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
21623 PyObject *__pyx_r = NULL;
21624 __Pyx_RefNannyDeclarations
21625 PyObject *__pyx_t_1 = NULL;
21627 PyObject *__pyx_t_3 = NULL;
21628 int __pyx_lineno = 0;
21629 const char *__pyx_filename = NULL;
21630 int __pyx_clineno = 0;
21631 __Pyx_RefNannySetupContext(
"complexifier", 1);
21640 __Pyx_XDECREF(__pyx_r);
21641 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L1_error)
21642 __Pyx_GOTREF(__pyx_t_1);
21643 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1652, __pyx_L1_error)
21644 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
complexifier(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1652, __pyx_L1_error)
21645 __Pyx_GOTREF(__pyx_t_3);
21646 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21647 __pyx_r = __pyx_t_3;
21661 __Pyx_XDECREF(__pyx_t_1);
21662 __Pyx_XDECREF(__pyx_t_3);
21663 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
21666 __Pyx_XGIVEREF(__pyx_r);
21667 __Pyx_RefNannyFinishContext();
21672 static PyObject *__pyx_pw_8PyClical_49complexifier(PyObject *__pyx_self,
21673 #
if CYTHON_METH_FASTCALL
21674 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21676 PyObject *__pyx_args, PyObject *__pyx_kwds
21679 PyDoc_STRVAR(__pyx_doc_8PyClical_48complexifier,
"\n Square root of -1 which commutes with all members of the frame of the given multivector.\n\n >>> print(complexifier(clifford(index_set({1}))))\n {1,2,3}\n >>> print(complexifier(clifford(index_set({-1}))))\n {-1}\n >>> print(complexifier(index_set({1})))\n {1,2,3}\n >>> print(complexifier(index_set({-1})))\n {-1}\n ");
21680 static PyMethodDef __pyx_mdef_8PyClical_49complexifier = {
"complexifier", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_49complexifier, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_48complexifier};
21681 static PyObject *__pyx_pw_8PyClical_49complexifier(PyObject *__pyx_self,
21682 #
if CYTHON_METH_FASTCALL
21683 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21685 PyObject *__pyx_args, PyObject *__pyx_kwds
21688 PyObject *__pyx_v_obj = 0;
21689 #if !CYTHON_METH_FASTCALL 21690 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
21692 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
21693 PyObject* values[1] = {0};
21694 int __pyx_lineno = 0;
21695 const char *__pyx_filename = NULL;
21696 int __pyx_clineno = 0;
21697 PyObject *__pyx_r = 0;
21698 __Pyx_RefNannyDeclarations
21699 __Pyx_RefNannySetupContext(
"complexifier (wrapper)", 0);
21700 #if !CYTHON_METH_FASTCALL 21701 #if CYTHON_ASSUME_SAFE_MACROS 21702 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
21704 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
21707 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
21709 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
21711 Py_ssize_t kw_args;
21712 switch (__pyx_nargs) {
21713 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
21714 CYTHON_FALLTHROUGH;
21716 default:
goto __pyx_L5_argtuple_error;
21718 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
21719 switch (__pyx_nargs) {
21721 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
21722 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
21725 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1639, __pyx_L3_error)
21726 else goto __pyx_L5_argtuple_error;
21728 if (unlikely(kw_args > 0)) {
21729 const Py_ssize_t kwd_pos_args = __pyx_nargs;
21730 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"complexifier") < 0)) __PYX_ERR(0, 1639, __pyx_L3_error)
21732 }
else if (unlikely(__pyx_nargs != 1)) {
21733 goto __pyx_L5_argtuple_error;
21735 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
21737 __pyx_v_obj = values[0];
21739 goto __pyx_L6_skip;
21740 __pyx_L5_argtuple_error:;
21741 __Pyx_RaiseArgtupleInvalid(
"complexifier", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1639, __pyx_L3_error)
21743 goto __pyx_L4_argument_unpacking_done;
21746 Py_ssize_t __pyx_temp;
21747 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21748 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21751 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
21752 __Pyx_RefNannyFinishContext();
21754 __pyx_L4_argument_unpacking_done:;
21755 __pyx_r = __pyx_pf_8PyClical_48complexifier(__pyx_self, __pyx_v_obj);
21759 Py_ssize_t __pyx_temp;
21760 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
21761 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21764 __Pyx_RefNannyFinishContext();
21768 static PyObject *__pyx_pf_8PyClical_48complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
21769 PyObject *__pyx_r = NULL;
21770 __Pyx_RefNannyDeclarations
21771 PyObject *__pyx_t_1 = NULL;
21772 int __pyx_lineno = 0;
21773 const char *__pyx_filename = NULL;
21774 int __pyx_clineno = 0;
21775 __Pyx_RefNannySetupContext(
"complexifier", 1);
21776 __Pyx_XDECREF(__pyx_r);
21777 __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
21778 __Pyx_GOTREF(__pyx_t_1);
21779 __pyx_r = __pyx_t_1;
21785 __Pyx_XDECREF(__pyx_t_1);
21786 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
21789 __Pyx_XGIVEREF(__pyx_r);
21790 __Pyx_RefNannyFinishContext();
21802 static PyObject *__pyx_pw_8PyClical_51sqrt(PyObject *__pyx_self,
21803 #
if CYTHON_METH_FASTCALL
21804 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
21806 PyObject *__pyx_args, PyObject *__pyx_kwds
21809 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args) {
21810 PyObject *__pyx_v_i = ((PyObject *)Py_None);
21811 PyObject *__pyx_r = NULL;
21812 __Pyx_RefNannyDeclarations
21814 PyObject *__pyx_t_2 = NULL;
21818 PyObject *__pyx_t_6 = NULL;
21819 PyObject *__pyx_t_7 = NULL;
21820 PyObject *__pyx_t_8 = NULL;
21821 PyObject *__pyx_t_9 = NULL;
21822 PyObject *__pyx_t_10 = NULL;
21824 PyObject *__pyx_t_12 = NULL;
21825 PyObject *__pyx_t_13 = NULL;
21826 int __pyx_lineno = 0;
21827 const char *__pyx_filename = NULL;
21828 int __pyx_clineno = 0;
21829 __Pyx_RefNannySetupContext(
"sqrt", 1);
21830 if (__pyx_optional_args) {
21831 if (__pyx_optional_args->__pyx_n > 0) {
21832 __pyx_v_i = __pyx_optional_args->i;
21843 __pyx_t_1 = (__pyx_v_i != Py_None);
21853 __Pyx_XDECREF(__pyx_r);
21854 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1670, __pyx_L1_error)
21855 __Pyx_GOTREF(__pyx_t_2);
21856 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1670, __pyx_L1_error)
21857 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1670, __pyx_L1_error)
21859 __pyx_t_5 =
sqrt(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
21861 __Pyx_CppExn2PyErr();
21862 __PYX_ERR(0, 1670, __pyx_L1_error)
21864 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1670, __pyx_L1_error)
21865 __Pyx_GOTREF(__pyx_t_6);
21866 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21867 __pyx_r = __pyx_t_6;
21889 __Pyx_PyThreadState_declare
21890 __Pyx_PyThreadState_assign
21891 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
21892 __Pyx_XGOTREF(__pyx_t_7);
21893 __Pyx_XGOTREF(__pyx_t_8);
21894 __Pyx_XGOTREF(__pyx_t_9);
21904 __Pyx_XDECREF(__pyx_r);
21905 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L4_error)
21906 __Pyx_GOTREF(__pyx_t_2);
21907 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sqrt);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1673, __pyx_L4_error)
21908 __Pyx_GOTREF(__pyx_t_10);
21909 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21912 #if CYTHON_UNPACK_METHODS 21913 if (unlikely(PyMethod_Check(__pyx_t_10))) {
21914 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
21915 if (likely(__pyx_t_2)) {
21916 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
21917 __Pyx_INCREF(__pyx_t_2);
21918 __Pyx_INCREF(
function);
21919 __Pyx_DECREF_SET(__pyx_t_10,
function);
21925 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
21926 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
21927 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21928 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L4_error)
21929 __Pyx_GOTREF(__pyx_t_6);
21930 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21932 __pyx_r = __pyx_t_6;
21934 goto __pyx_L8_try_return;
21945 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
21946 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21947 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21957 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
21958 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1674, __pyx_L6_except_error)
21959 __Pyx_XGOTREF(__pyx_t_6);
21960 __Pyx_XGOTREF(__pyx_t_10);
21961 __Pyx_XGOTREF(__pyx_t_2);
21970 __Pyx_XDECREF(__pyx_r);
21971 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1675, __pyx_L6_except_error)
21972 __Pyx_GOTREF(__pyx_t_12);
21973 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1675, __pyx_L6_except_error)
21974 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
sqrt(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1675, __pyx_L6_except_error)
21975 __Pyx_GOTREF(__pyx_t_13);
21976 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
21977 __pyx_r = __pyx_t_13;
21979 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21980 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21981 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21982 goto __pyx_L7_except_return;
21992 __pyx_L6_except_error:;
21993 __Pyx_XGIVEREF(__pyx_t_7);
21994 __Pyx_XGIVEREF(__pyx_t_8);
21995 __Pyx_XGIVEREF(__pyx_t_9);
21996 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
21997 goto __pyx_L1_error;
21998 __pyx_L8_try_return:;
21999 __Pyx_XGIVEREF(__pyx_t_7);
22000 __Pyx_XGIVEREF(__pyx_t_8);
22001 __Pyx_XGIVEREF(__pyx_t_9);
22002 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
22004 __pyx_L7_except_return:;
22005 __Pyx_XGIVEREF(__pyx_t_7);
22006 __Pyx_XGIVEREF(__pyx_t_8);
22007 __Pyx_XGIVEREF(__pyx_t_9);
22008 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
22023 __Pyx_XDECREF(__pyx_t_2);
22024 __Pyx_XDECREF(__pyx_t_6);
22025 __Pyx_XDECREF(__pyx_t_10);
22026 __Pyx_XDECREF(__pyx_t_12);
22027 __Pyx_XDECREF(__pyx_t_13);
22028 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
22031 __Pyx_XGIVEREF(__pyx_r);
22032 __Pyx_RefNannyFinishContext();
22037 static PyObject *__pyx_pw_8PyClical_51sqrt(PyObject *__pyx_self,
22038 #
if CYTHON_METH_FASTCALL
22039 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22041 PyObject *__pyx_args, PyObject *__pyx_kwds
22044 PyDoc_STRVAR(__pyx_doc_8PyClical_50sqrt,
"\n Square root of multivector with optional complexifier.\n\n >>> print(sqrt(-1))\n {-1}\n >>> print(sqrt(clifford(\"2{-1}\")))\n 1+{-1}\n >>> j=sqrt(-1,complexifier(index_set({1}))); print(j); print(j*j)\n {1,2,3}\n -1\n >>> j=sqrt(-1,\"{1,2,3}\"); print(j); print(j*j)\n {1,2,3}\n -1\n ");
22045 static PyMethodDef __pyx_mdef_8PyClical_51sqrt = {
"sqrt", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_51sqrt, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_50sqrt};
22046 static PyObject *__pyx_pw_8PyClical_51sqrt(PyObject *__pyx_self,
22047 #
if CYTHON_METH_FASTCALL
22048 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22050 PyObject *__pyx_args, PyObject *__pyx_kwds
22053 PyObject *__pyx_v_obj = 0;
22054 PyObject *__pyx_v_i = 0;
22055 #if !CYTHON_METH_FASTCALL 22056 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
22058 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
22059 PyObject* values[2] = {0,0};
22060 int __pyx_lineno = 0;
22061 const char *__pyx_filename = NULL;
22062 int __pyx_clineno = 0;
22063 PyObject *__pyx_r = 0;
22064 __Pyx_RefNannyDeclarations
22065 __Pyx_RefNannySetupContext(
"sqrt (wrapper)", 0);
22066 #if !CYTHON_METH_FASTCALL 22067 #if CYTHON_ASSUME_SAFE_MACROS 22068 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
22070 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
22073 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
22075 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
22076 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
22078 Py_ssize_t kw_args;
22079 switch (__pyx_nargs) {
22080 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
22081 CYTHON_FALLTHROUGH;
22082 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
22083 CYTHON_FALLTHROUGH;
22085 default:
goto __pyx_L5_argtuple_error;
22087 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
22088 switch (__pyx_nargs) {
22090 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
22091 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
22094 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L3_error)
22095 else goto __pyx_L5_argtuple_error;
22096 CYTHON_FALLTHROUGH;
22099 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
22100 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
22101 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L3_error)
22104 if (unlikely(kw_args > 0)) {
22105 const Py_ssize_t kwd_pos_args = __pyx_nargs;
22106 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"sqrt") < 0)) __PYX_ERR(0, 1654, __pyx_L3_error)
22109 switch (__pyx_nargs) {
22110 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
22111 CYTHON_FALLTHROUGH;
22112 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
22114 default:
goto __pyx_L5_argtuple_error;
22117 __pyx_v_obj = values[0];
22118 __pyx_v_i = values[1];
22120 goto __pyx_L6_skip;
22121 __pyx_L5_argtuple_error:;
22122 __Pyx_RaiseArgtupleInvalid(
"sqrt", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1654, __pyx_L3_error)
22124 goto __pyx_L4_argument_unpacking_done;
22127 Py_ssize_t __pyx_temp;
22128 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
22129 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
22132 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
22133 __Pyx_RefNannyFinishContext();
22135 __pyx_L4_argument_unpacking_done:;
22136 __pyx_r = __pyx_pf_8PyClical_50sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
22140 Py_ssize_t __pyx_temp;
22141 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
22142 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
22145 __Pyx_RefNannyFinishContext();
22149 static PyObject *__pyx_pf_8PyClical_50sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
22150 PyObject *__pyx_r = NULL;
22151 __Pyx_RefNannyDeclarations
22152 PyObject *__pyx_t_1 = NULL;
22153 struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
22154 int __pyx_lineno = 0;
22155 const char *__pyx_filename = NULL;
22156 int __pyx_clineno = 0;
22157 __Pyx_RefNannySetupContext(
"sqrt", 1);
22158 __Pyx_XDECREF(__pyx_r);
22159 __pyx_t_2.__pyx_n = 1;
22160 __pyx_t_2.i = __pyx_v_i;
22161 __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1654, __pyx_L1_error)
22162 __Pyx_GOTREF(__pyx_t_1);
22163 __pyx_r = __pyx_t_1;
22169 __Pyx_XDECREF(__pyx_t_1);
22170 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
22173 __Pyx_XGIVEREF(__pyx_r);
22174 __Pyx_RefNannyFinishContext();
22186 static PyObject *__pyx_pw_8PyClical_53exp(PyObject *__pyx_self,
22187 #
if CYTHON_METH_FASTCALL
22188 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22190 PyObject *__pyx_args, PyObject *__pyx_kwds
22193 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
22194 PyObject *__pyx_r = NULL;
22195 __Pyx_RefNannyDeclarations
22196 PyObject *__pyx_t_1 = NULL;
22197 PyObject *__pyx_t_2 = NULL;
22198 PyObject *__pyx_t_3 = NULL;
22199 PyObject *__pyx_t_4 = NULL;
22200 PyObject *__pyx_t_5 = NULL;
22201 PyObject *__pyx_t_6 = NULL;
22203 PyObject *__pyx_t_8 = NULL;
22205 PyObject *__pyx_t_10 = NULL;
22206 int __pyx_lineno = 0;
22207 const char *__pyx_filename = NULL;
22208 int __pyx_clineno = 0;
22209 __Pyx_RefNannySetupContext(
"exp", 1);
22219 __Pyx_PyThreadState_declare
22220 __Pyx_PyThreadState_assign
22221 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
22222 __Pyx_XGOTREF(__pyx_t_1);
22223 __Pyx_XGOTREF(__pyx_t_2);
22224 __Pyx_XGOTREF(__pyx_t_3);
22234 __Pyx_XDECREF(__pyx_r);
22235 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L3_error)
22236 __Pyx_GOTREF(__pyx_t_5);
22237 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1687, __pyx_L3_error)
22238 __Pyx_GOTREF(__pyx_t_6);
22239 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22242 #if CYTHON_UNPACK_METHODS 22243 if (unlikely(PyMethod_Check(__pyx_t_6))) {
22244 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
22245 if (likely(__pyx_t_5)) {
22246 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
22247 __Pyx_INCREF(__pyx_t_5);
22248 __Pyx_INCREF(
function);
22249 __Pyx_DECREF_SET(__pyx_t_6,
function);
22255 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_obj};
22256 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
22257 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
22258 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L3_error)
22259 __Pyx_GOTREF(__pyx_t_4);
22260 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22262 __pyx_r = __pyx_t_4;
22264 goto __pyx_L7_try_return;
22275 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22276 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
22277 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
22287 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
22288 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1688, __pyx_L5_except_error)
22289 __Pyx_XGOTREF(__pyx_t_4);
22290 __Pyx_XGOTREF(__pyx_t_6);
22291 __Pyx_XGOTREF(__pyx_t_5);
22300 __Pyx_XDECREF(__pyx_r);
22301 __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1689, __pyx_L5_except_error)
22302 __Pyx_GOTREF(__pyx_t_8);
22303 __pyx_t_9 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1689, __pyx_L5_except_error)
22304 __pyx_t_10 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_8),
exp(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9)));
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1689, __pyx_L5_except_error)
22305 __Pyx_GOTREF(__pyx_t_10);
22306 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22307 __pyx_r = __pyx_t_10;
22309 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22310 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22311 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22312 goto __pyx_L6_except_return;
22322 __pyx_L5_except_error:;
22323 __Pyx_XGIVEREF(__pyx_t_1);
22324 __Pyx_XGIVEREF(__pyx_t_2);
22325 __Pyx_XGIVEREF(__pyx_t_3);
22326 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
22327 goto __pyx_L1_error;
22328 __pyx_L7_try_return:;
22329 __Pyx_XGIVEREF(__pyx_t_1);
22330 __Pyx_XGIVEREF(__pyx_t_2);
22331 __Pyx_XGIVEREF(__pyx_t_3);
22332 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
22334 __pyx_L6_except_return:;
22335 __Pyx_XGIVEREF(__pyx_t_1);
22336 __Pyx_XGIVEREF(__pyx_t_2);
22337 __Pyx_XGIVEREF(__pyx_t_3);
22338 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
22352 __Pyx_XDECREF(__pyx_t_4);
22353 __Pyx_XDECREF(__pyx_t_5);
22354 __Pyx_XDECREF(__pyx_t_6);
22355 __Pyx_XDECREF(__pyx_t_8);
22356 __Pyx_XDECREF(__pyx_t_10);
22357 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
22360 __Pyx_XGIVEREF(__pyx_r);
22361 __Pyx_RefNannyFinishContext();
22366 static PyObject *__pyx_pw_8PyClical_53exp(PyObject *__pyx_self,
22367 #
if CYTHON_METH_FASTCALL
22368 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22370 PyObject *__pyx_args, PyObject *__pyx_kwds
22373 PyDoc_STRVAR(__pyx_doc_8PyClical_52exp,
"\n Exponential of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(exp(x))\n 0.7071+0.7071{1,2}\n >>> x=clifford(\"{1,2}\") * pi/2; print(exp(x))\n {1,2}\n ");
22374 static PyMethodDef __pyx_mdef_8PyClical_53exp = {
"exp", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_53exp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_52exp};
22375 static PyObject *__pyx_pw_8PyClical_53exp(PyObject *__pyx_self,
22376 #
if CYTHON_METH_FASTCALL
22377 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22379 PyObject *__pyx_args, PyObject *__pyx_kwds
22382 PyObject *__pyx_v_obj = 0;
22383 #if !CYTHON_METH_FASTCALL 22384 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
22386 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
22387 PyObject* values[1] = {0};
22388 int __pyx_lineno = 0;
22389 const char *__pyx_filename = NULL;
22390 int __pyx_clineno = 0;
22391 PyObject *__pyx_r = 0;
22392 __Pyx_RefNannyDeclarations
22393 __Pyx_RefNannySetupContext(
"exp (wrapper)", 0);
22394 #if !CYTHON_METH_FASTCALL 22395 #if CYTHON_ASSUME_SAFE_MACROS 22396 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
22398 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
22401 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
22403 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
22405 Py_ssize_t kw_args;
22406 switch (__pyx_nargs) {
22407 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
22408 CYTHON_FALLTHROUGH;
22410 default:
goto __pyx_L5_argtuple_error;
22412 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
22413 switch (__pyx_nargs) {
22415 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
22416 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
22419 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1677, __pyx_L3_error)
22420 else goto __pyx_L5_argtuple_error;
22422 if (unlikely(kw_args > 0)) {
22423 const Py_ssize_t kwd_pos_args = __pyx_nargs;
22424 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"exp") < 0)) __PYX_ERR(0, 1677, __pyx_L3_error)
22426 }
else if (unlikely(__pyx_nargs != 1)) {
22427 goto __pyx_L5_argtuple_error;
22429 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
22431 __pyx_v_obj = values[0];
22433 goto __pyx_L6_skip;
22434 __pyx_L5_argtuple_error:;
22435 __Pyx_RaiseArgtupleInvalid(
"exp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1677, __pyx_L3_error)
22437 goto __pyx_L4_argument_unpacking_done;
22440 Py_ssize_t __pyx_temp;
22441 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
22442 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
22445 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
22446 __Pyx_RefNannyFinishContext();
22448 __pyx_L4_argument_unpacking_done:;
22449 __pyx_r = __pyx_pf_8PyClical_52exp(__pyx_self, __pyx_v_obj);
22453 Py_ssize_t __pyx_temp;
22454 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
22455 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
22458 __Pyx_RefNannyFinishContext();
22462 static PyObject *__pyx_pf_8PyClical_52exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
22463 PyObject *__pyx_r = NULL;
22464 __Pyx_RefNannyDeclarations
22465 PyObject *__pyx_t_1 = NULL;
22466 int __pyx_lineno = 0;
22467 const char *__pyx_filename = NULL;
22468 int __pyx_clineno = 0;
22469 __Pyx_RefNannySetupContext(
"exp", 1);
22470 __Pyx_XDECREF(__pyx_r);
22471 __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
22472 __Pyx_GOTREF(__pyx_t_1);
22473 __pyx_r = __pyx_t_1;
22479 __Pyx_XDECREF(__pyx_t_1);
22480 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
22483 __Pyx_XGIVEREF(__pyx_r);
22484 __Pyx_RefNannyFinishContext();
22496 static PyObject *__pyx_pw_8PyClical_55log(PyObject *__pyx_self,
22497 #
if CYTHON_METH_FASTCALL
22498 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22500 PyObject *__pyx_args, PyObject *__pyx_kwds
22503 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_log *__pyx_optional_args) {
22504 PyObject *__pyx_v_i = ((PyObject *)Py_None);
22505 PyObject *__pyx_r = NULL;
22506 __Pyx_RefNannyDeclarations
22508 PyObject *__pyx_t_2 = NULL;
22512 PyObject *__pyx_t_6 = NULL;
22513 PyObject *__pyx_t_7 = NULL;
22514 PyObject *__pyx_t_8 = NULL;
22515 PyObject *__pyx_t_9 = NULL;
22516 PyObject *__pyx_t_10 = NULL;
22518 PyObject *__pyx_t_12 = NULL;
22519 PyObject *__pyx_t_13 = NULL;
22520 int __pyx_lineno = 0;
22521 const char *__pyx_filename = NULL;
22522 int __pyx_clineno = 0;
22523 __Pyx_RefNannySetupContext(
"log", 1);
22524 if (__pyx_optional_args) {
22525 if (__pyx_optional_args->__pyx_n > 0) {
22526 __pyx_v_i = __pyx_optional_args->i;
22537 __pyx_t_1 = (__pyx_v_i != Py_None);
22547 __Pyx_XDECREF(__pyx_r);
22548 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error)
22549 __Pyx_GOTREF(__pyx_t_2);
22550 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L1_error)
22551 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L1_error)
22553 __pyx_t_5 =
log(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
22555 __Pyx_CppExn2PyErr();
22556 __PYX_ERR(0, 1707, __pyx_L1_error)
22558 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1707, __pyx_L1_error)
22559 __Pyx_GOTREF(__pyx_t_6);
22560 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22561 __pyx_r = __pyx_t_6;
22583 __Pyx_PyThreadState_declare
22584 __Pyx_PyThreadState_assign
22585 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
22586 __Pyx_XGOTREF(__pyx_t_7);
22587 __Pyx_XGOTREF(__pyx_t_8);
22588 __Pyx_XGOTREF(__pyx_t_9);
22598 __Pyx_XDECREF(__pyx_r);
22599 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L4_error)
22600 __Pyx_GOTREF(__pyx_t_2);
22601 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_log);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1710, __pyx_L4_error)
22602 __Pyx_GOTREF(__pyx_t_10);
22603 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22606 #if CYTHON_UNPACK_METHODS 22607 if (unlikely(PyMethod_Check(__pyx_t_10))) {
22608 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
22609 if (likely(__pyx_t_2)) {
22610 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
22611 __Pyx_INCREF(__pyx_t_2);
22612 __Pyx_INCREF(
function);
22613 __Pyx_DECREF_SET(__pyx_t_10,
function);
22619 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
22620 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
22621 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
22622 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1710, __pyx_L4_error)
22623 __Pyx_GOTREF(__pyx_t_6);
22624 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22626 __pyx_r = __pyx_t_6;
22628 goto __pyx_L8_try_return;
22639 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
22640 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
22641 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
22651 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
22652 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1711, __pyx_L6_except_error)
22653 __Pyx_XGOTREF(__pyx_t_6);
22654 __Pyx_XGOTREF(__pyx_t_10);
22655 __Pyx_XGOTREF(__pyx_t_2);
22664 __Pyx_XDECREF(__pyx_r);
22665 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1712, __pyx_L6_except_error)
22666 __Pyx_GOTREF(__pyx_t_12);
22667 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1712, __pyx_L6_except_error)
22668 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
log(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1712, __pyx_L6_except_error)
22669 __Pyx_GOTREF(__pyx_t_13);
22670 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22671 __pyx_r = __pyx_t_13;
22673 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22674 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22675 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22676 goto __pyx_L7_except_return;
22686 __pyx_L6_except_error:;
22687 __Pyx_XGIVEREF(__pyx_t_7);
22688 __Pyx_XGIVEREF(__pyx_t_8);
22689 __Pyx_XGIVEREF(__pyx_t_9);
22690 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
22691 goto __pyx_L1_error;
22692 __pyx_L8_try_return:;
22693 __Pyx_XGIVEREF(__pyx_t_7);
22694 __Pyx_XGIVEREF(__pyx_t_8);
22695 __Pyx_XGIVEREF(__pyx_t_9);
22696 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
22698 __pyx_L7_except_return:;
22699 __Pyx_XGIVEREF(__pyx_t_7);
22700 __Pyx_XGIVEREF(__pyx_t_8);
22701 __Pyx_XGIVEREF(__pyx_t_9);
22702 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
22717 __Pyx_XDECREF(__pyx_t_2);
22718 __Pyx_XDECREF(__pyx_t_6);
22719 __Pyx_XDECREF(__pyx_t_10);
22720 __Pyx_XDECREF(__pyx_t_12);
22721 __Pyx_XDECREF(__pyx_t_13);
22722 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
22725 __Pyx_XGIVEREF(__pyx_r);
22726 __Pyx_RefNannyFinishContext();
22731 static PyObject *__pyx_pw_8PyClical_55log(PyObject *__pyx_self,
22732 #
if CYTHON_METH_FASTCALL
22733 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22735 PyObject *__pyx_args, PyObject *__pyx_kwds
22738 PyDoc_STRVAR(__pyx_doc_8PyClical_54log,
"\n Natural logarithm of multivector with optional complexifier.\n\n >>> x=clifford(\"{-1}\"); print((log(x,\"{-1}\") * 2/pi))\n {-1}\n >>> x=clifford(\"{1,2}\"); print((log(x,\"{1,2,3}\") * 2/pi))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print((log(x) * 2/pi))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print((log(x,\"{1,2}\") * 2/pi))\n Traceback (most recent call last):\n ...\n RuntimeError: check_complex(val, i): i is not a valid complexifier for val\n ");
22739 static PyMethodDef __pyx_mdef_8PyClical_55log = {
"log", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_55log, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_54log};
22740 static PyObject *__pyx_pw_8PyClical_55log(PyObject *__pyx_self,
22741 #
if CYTHON_METH_FASTCALL
22742 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22744 PyObject *__pyx_args, PyObject *__pyx_kwds
22747 PyObject *__pyx_v_obj = 0;
22748 PyObject *__pyx_v_i = 0;
22749 #if !CYTHON_METH_FASTCALL 22750 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
22752 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
22753 PyObject* values[2] = {0,0};
22754 int __pyx_lineno = 0;
22755 const char *__pyx_filename = NULL;
22756 int __pyx_clineno = 0;
22757 PyObject *__pyx_r = 0;
22758 __Pyx_RefNannyDeclarations
22759 __Pyx_RefNannySetupContext(
"log (wrapper)", 0);
22760 #if !CYTHON_METH_FASTCALL 22761 #if CYTHON_ASSUME_SAFE_MACROS 22762 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
22764 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
22767 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
22769 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
22770 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
22772 Py_ssize_t kw_args;
22773 switch (__pyx_nargs) {
22774 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
22775 CYTHON_FALLTHROUGH;
22776 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
22777 CYTHON_FALLTHROUGH;
22779 default:
goto __pyx_L5_argtuple_error;
22781 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
22782 switch (__pyx_nargs) {
22784 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
22785 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
22788 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L3_error)
22789 else goto __pyx_L5_argtuple_error;
22790 CYTHON_FALLTHROUGH;
22793 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
22794 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
22795 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L3_error)
22798 if (unlikely(kw_args > 0)) {
22799 const Py_ssize_t kwd_pos_args = __pyx_nargs;
22800 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"log") < 0)) __PYX_ERR(0, 1691, __pyx_L3_error)
22803 switch (__pyx_nargs) {
22804 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
22805 CYTHON_FALLTHROUGH;
22806 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
22808 default:
goto __pyx_L5_argtuple_error;
22811 __pyx_v_obj = values[0];
22812 __pyx_v_i = values[1];
22814 goto __pyx_L6_skip;
22815 __pyx_L5_argtuple_error:;
22816 __Pyx_RaiseArgtupleInvalid(
"log", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1691, __pyx_L3_error)
22818 goto __pyx_L4_argument_unpacking_done;
22821 Py_ssize_t __pyx_temp;
22822 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
22823 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
22826 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
22827 __Pyx_RefNannyFinishContext();
22829 __pyx_L4_argument_unpacking_done:;
22830 __pyx_r = __pyx_pf_8PyClical_54log(__pyx_self, __pyx_v_obj, __pyx_v_i);
22834 Py_ssize_t __pyx_temp;
22835 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
22836 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
22839 __Pyx_RefNannyFinishContext();
22843 static PyObject *__pyx_pf_8PyClical_54log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
22844 PyObject *__pyx_r = NULL;
22845 __Pyx_RefNannyDeclarations
22846 PyObject *__pyx_t_1 = NULL;
22847 struct __pyx_opt_args_8PyClical_log __pyx_t_2;
22848 int __pyx_lineno = 0;
22849 const char *__pyx_filename = NULL;
22850 int __pyx_clineno = 0;
22851 __Pyx_RefNannySetupContext(
"log", 1);
22852 __Pyx_XDECREF(__pyx_r);
22853 __pyx_t_2.__pyx_n = 1;
22854 __pyx_t_2.i = __pyx_v_i;
22855 __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error)
22856 __Pyx_GOTREF(__pyx_t_1);
22857 __pyx_r = __pyx_t_1;
22863 __Pyx_XDECREF(__pyx_t_1);
22864 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
22867 __Pyx_XGIVEREF(__pyx_r);
22868 __Pyx_RefNannyFinishContext();
22880 static PyObject *__pyx_pw_8PyClical_57cos(PyObject *__pyx_self,
22881 #
if CYTHON_METH_FASTCALL
22882 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
22884 PyObject *__pyx_args, PyObject *__pyx_kwds
22887 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args) {
22888 PyObject *__pyx_v_i = ((PyObject *)Py_None);
22889 PyObject *__pyx_r = NULL;
22890 __Pyx_RefNannyDeclarations
22892 PyObject *__pyx_t_2 = NULL;
22896 PyObject *__pyx_t_6 = NULL;
22897 PyObject *__pyx_t_7 = NULL;
22898 PyObject *__pyx_t_8 = NULL;
22899 PyObject *__pyx_t_9 = NULL;
22900 PyObject *__pyx_t_10 = NULL;
22902 PyObject *__pyx_t_12 = NULL;
22903 PyObject *__pyx_t_13 = NULL;
22904 int __pyx_lineno = 0;
22905 const char *__pyx_filename = NULL;
22906 int __pyx_clineno = 0;
22907 __Pyx_RefNannySetupContext(
"cos", 1);
22908 if (__pyx_optional_args) {
22909 if (__pyx_optional_args->__pyx_n > 0) {
22910 __pyx_v_i = __pyx_optional_args->i;
22921 __pyx_t_1 = (__pyx_v_i != Py_None);
22931 __Pyx_XDECREF(__pyx_r);
22932 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
22933 __Pyx_GOTREF(__pyx_t_2);
22934 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1724, __pyx_L1_error)
22935 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1724, __pyx_L1_error)
22937 __pyx_t_5 =
cos(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
22939 __Pyx_CppExn2PyErr();
22940 __PYX_ERR(0, 1724, __pyx_L1_error)
22942 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1724, __pyx_L1_error)
22943 __Pyx_GOTREF(__pyx_t_6);
22944 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22945 __pyx_r = __pyx_t_6;
22967 __Pyx_PyThreadState_declare
22968 __Pyx_PyThreadState_assign
22969 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
22970 __Pyx_XGOTREF(__pyx_t_7);
22971 __Pyx_XGOTREF(__pyx_t_8);
22972 __Pyx_XGOTREF(__pyx_t_9);
22982 __Pyx_XDECREF(__pyx_r);
22983 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L4_error)
22984 __Pyx_GOTREF(__pyx_t_2);
22985 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cos);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1727, __pyx_L4_error)
22986 __Pyx_GOTREF(__pyx_t_10);
22987 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22990 #if CYTHON_UNPACK_METHODS 22991 if (unlikely(PyMethod_Check(__pyx_t_10))) {
22992 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
22993 if (likely(__pyx_t_2)) {
22994 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
22995 __Pyx_INCREF(__pyx_t_2);
22996 __Pyx_INCREF(
function);
22997 __Pyx_DECREF_SET(__pyx_t_10,
function);
23003 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
23004 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
23005 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
23006 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1727, __pyx_L4_error)
23007 __Pyx_GOTREF(__pyx_t_6);
23008 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23010 __pyx_r = __pyx_t_6;
23012 goto __pyx_L8_try_return;
23023 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
23024 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
23025 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
23035 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23036 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1728, __pyx_L6_except_error)
23037 __Pyx_XGOTREF(__pyx_t_6);
23038 __Pyx_XGOTREF(__pyx_t_10);
23039 __Pyx_XGOTREF(__pyx_t_2);
23048 __Pyx_XDECREF(__pyx_r);
23049 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1729, __pyx_L6_except_error)
23050 __Pyx_GOTREF(__pyx_t_12);
23051 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1729, __pyx_L6_except_error)
23052 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
cos(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1729, __pyx_L6_except_error)
23053 __Pyx_GOTREF(__pyx_t_13);
23054 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23055 __pyx_r = __pyx_t_13;
23057 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23058 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23059 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23060 goto __pyx_L7_except_return;
23070 __pyx_L6_except_error:;
23071 __Pyx_XGIVEREF(__pyx_t_7);
23072 __Pyx_XGIVEREF(__pyx_t_8);
23073 __Pyx_XGIVEREF(__pyx_t_9);
23074 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23075 goto __pyx_L1_error;
23076 __pyx_L8_try_return:;
23077 __Pyx_XGIVEREF(__pyx_t_7);
23078 __Pyx_XGIVEREF(__pyx_t_8);
23079 __Pyx_XGIVEREF(__pyx_t_9);
23080 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23082 __pyx_L7_except_return:;
23083 __Pyx_XGIVEREF(__pyx_t_7);
23084 __Pyx_XGIVEREF(__pyx_t_8);
23085 __Pyx_XGIVEREF(__pyx_t_9);
23086 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23101 __Pyx_XDECREF(__pyx_t_2);
23102 __Pyx_XDECREF(__pyx_t_6);
23103 __Pyx_XDECREF(__pyx_t_10);
23104 __Pyx_XDECREF(__pyx_t_12);
23105 __Pyx_XDECREF(__pyx_t_13);
23106 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23109 __Pyx_XGIVEREF(__pyx_r);
23110 __Pyx_RefNannyFinishContext();
23115 static PyObject *__pyx_pw_8PyClical_57cos(PyObject *__pyx_self,
23116 #
if CYTHON_METH_FASTCALL
23117 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23119 PyObject *__pyx_args, PyObject *__pyx_kwds
23122 PyDoc_STRVAR(__pyx_doc_8PyClical_56cos,
"\n Cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{1,2,3}\"))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x)))\n {1,2}\n ");
23123 static PyMethodDef __pyx_mdef_8PyClical_57cos = {
"cos", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_57cos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_56cos};
23124 static PyObject *__pyx_pw_8PyClical_57cos(PyObject *__pyx_self,
23125 #
if CYTHON_METH_FASTCALL
23126 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23128 PyObject *__pyx_args, PyObject *__pyx_kwds
23131 PyObject *__pyx_v_obj = 0;
23132 PyObject *__pyx_v_i = 0;
23133 #if !CYTHON_METH_FASTCALL 23134 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23136 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
23137 PyObject* values[2] = {0,0};
23138 int __pyx_lineno = 0;
23139 const char *__pyx_filename = NULL;
23140 int __pyx_clineno = 0;
23141 PyObject *__pyx_r = 0;
23142 __Pyx_RefNannyDeclarations
23143 __Pyx_RefNannySetupContext(
"cos (wrapper)", 0);
23144 #if !CYTHON_METH_FASTCALL 23145 #if CYTHON_ASSUME_SAFE_MACROS 23146 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23148 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
23151 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
23153 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
23154 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
23156 Py_ssize_t kw_args;
23157 switch (__pyx_nargs) {
23158 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
23159 CYTHON_FALLTHROUGH;
23160 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
23161 CYTHON_FALLTHROUGH;
23163 default:
goto __pyx_L5_argtuple_error;
23165 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
23166 switch (__pyx_nargs) {
23168 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
23169 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
23172 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1714, __pyx_L3_error)
23173 else goto __pyx_L5_argtuple_error;
23174 CYTHON_FALLTHROUGH;
23177 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
23178 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
23179 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1714, __pyx_L3_error)
23182 if (unlikely(kw_args > 0)) {
23183 const Py_ssize_t kwd_pos_args = __pyx_nargs;
23184 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"cos") < 0)) __PYX_ERR(0, 1714, __pyx_L3_error)
23187 switch (__pyx_nargs) {
23188 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
23189 CYTHON_FALLTHROUGH;
23190 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
23192 default:
goto __pyx_L5_argtuple_error;
23195 __pyx_v_obj = values[0];
23196 __pyx_v_i = values[1];
23198 goto __pyx_L6_skip;
23199 __pyx_L5_argtuple_error:;
23200 __Pyx_RaiseArgtupleInvalid(
"cos", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1714, __pyx_L3_error)
23202 goto __pyx_L4_argument_unpacking_done;
23205 Py_ssize_t __pyx_temp;
23206 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
23207 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
23210 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23211 __Pyx_RefNannyFinishContext();
23213 __pyx_L4_argument_unpacking_done:;
23214 __pyx_r = __pyx_pf_8PyClical_56cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
23218 Py_ssize_t __pyx_temp;
23219 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
23220 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
23223 __Pyx_RefNannyFinishContext();
23227 static PyObject *__pyx_pf_8PyClical_56cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
23228 PyObject *__pyx_r = NULL;
23229 __Pyx_RefNannyDeclarations
23230 PyObject *__pyx_t_1 = NULL;
23231 struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
23232 int __pyx_lineno = 0;
23233 const char *__pyx_filename = NULL;
23234 int __pyx_clineno = 0;
23235 __Pyx_RefNannySetupContext(
"cos", 1);
23236 __Pyx_XDECREF(__pyx_r);
23237 __pyx_t_2.__pyx_n = 1;
23238 __pyx_t_2.i = __pyx_v_i;
23239 __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
23240 __Pyx_GOTREF(__pyx_t_1);
23241 __pyx_r = __pyx_t_1;
23247 __Pyx_XDECREF(__pyx_t_1);
23248 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23251 __Pyx_XGIVEREF(__pyx_r);
23252 __Pyx_RefNannyFinishContext();
23264 static PyObject *__pyx_pw_8PyClical_59acos(PyObject *__pyx_self,
23265 #
if CYTHON_METH_FASTCALL
23266 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23268 PyObject *__pyx_args, PyObject *__pyx_kwds
23271 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args) {
23272 PyObject *__pyx_v_i = ((PyObject *)Py_None);
23273 PyObject *__pyx_r = NULL;
23274 __Pyx_RefNannyDeclarations
23276 PyObject *__pyx_t_2 = NULL;
23280 PyObject *__pyx_t_6 = NULL;
23281 PyObject *__pyx_t_7 = NULL;
23282 PyObject *__pyx_t_8 = NULL;
23283 PyObject *__pyx_t_9 = NULL;
23284 PyObject *__pyx_t_10 = NULL;
23286 PyObject *__pyx_t_12 = NULL;
23287 PyObject *__pyx_t_13 = NULL;
23288 int __pyx_lineno = 0;
23289 const char *__pyx_filename = NULL;
23290 int __pyx_clineno = 0;
23291 __Pyx_RefNannySetupContext(
"acos", 1);
23292 if (__pyx_optional_args) {
23293 if (__pyx_optional_args->__pyx_n > 0) {
23294 __pyx_v_i = __pyx_optional_args->i;
23305 __pyx_t_1 = (__pyx_v_i != Py_None);
23315 __Pyx_XDECREF(__pyx_r);
23316 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L1_error)
23317 __Pyx_GOTREF(__pyx_t_2);
23318 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1745, __pyx_L1_error)
23319 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1745, __pyx_L1_error)
23321 __pyx_t_5 =
acos(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
23323 __Pyx_CppExn2PyErr();
23324 __PYX_ERR(0, 1745, __pyx_L1_error)
23326 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1745, __pyx_L1_error)
23327 __Pyx_GOTREF(__pyx_t_6);
23328 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23329 __pyx_r = __pyx_t_6;
23351 __Pyx_PyThreadState_declare
23352 __Pyx_PyThreadState_assign
23353 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
23354 __Pyx_XGOTREF(__pyx_t_7);
23355 __Pyx_XGOTREF(__pyx_t_8);
23356 __Pyx_XGOTREF(__pyx_t_9);
23366 __Pyx_XDECREF(__pyx_r);
23367 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1748, __pyx_L4_error)
23368 __Pyx_GOTREF(__pyx_t_2);
23369 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_acos);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1748, __pyx_L4_error)
23370 __Pyx_GOTREF(__pyx_t_10);
23371 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23374 #if CYTHON_UNPACK_METHODS 23375 if (unlikely(PyMethod_Check(__pyx_t_10))) {
23376 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
23377 if (likely(__pyx_t_2)) {
23378 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
23379 __Pyx_INCREF(__pyx_t_2);
23380 __Pyx_INCREF(
function);
23381 __Pyx_DECREF_SET(__pyx_t_10,
function);
23387 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
23388 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
23389 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
23390 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1748, __pyx_L4_error)
23391 __Pyx_GOTREF(__pyx_t_6);
23392 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23394 __pyx_r = __pyx_t_6;
23396 goto __pyx_L8_try_return;
23407 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
23408 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
23409 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
23419 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23420 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
23421 __Pyx_XGOTREF(__pyx_t_6);
23422 __Pyx_XGOTREF(__pyx_t_10);
23423 __Pyx_XGOTREF(__pyx_t_2);
23432 __Pyx_XDECREF(__pyx_r);
23433 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
23434 __Pyx_GOTREF(__pyx_t_12);
23435 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1750, __pyx_L6_except_error)
23436 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
acos(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
23437 __Pyx_GOTREF(__pyx_t_13);
23438 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23439 __pyx_r = __pyx_t_13;
23441 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23442 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23443 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23444 goto __pyx_L7_except_return;
23454 __pyx_L6_except_error:;
23455 __Pyx_XGIVEREF(__pyx_t_7);
23456 __Pyx_XGIVEREF(__pyx_t_8);
23457 __Pyx_XGIVEREF(__pyx_t_9);
23458 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23459 goto __pyx_L1_error;
23460 __pyx_L8_try_return:;
23461 __Pyx_XGIVEREF(__pyx_t_7);
23462 __Pyx_XGIVEREF(__pyx_t_8);
23463 __Pyx_XGIVEREF(__pyx_t_9);
23464 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23466 __pyx_L7_except_return:;
23467 __Pyx_XGIVEREF(__pyx_t_7);
23468 __Pyx_XGIVEREF(__pyx_t_8);
23469 __Pyx_XGIVEREF(__pyx_t_9);
23470 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23485 __Pyx_XDECREF(__pyx_t_2);
23486 __Pyx_XDECREF(__pyx_t_6);
23487 __Pyx_XDECREF(__pyx_t_10);
23488 __Pyx_XDECREF(__pyx_t_12);
23489 __Pyx_XDECREF(__pyx_t_13);
23490 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23493 __Pyx_XGIVEREF(__pyx_r);
23494 __Pyx_RefNannyFinishContext();
23499 static PyObject *__pyx_pw_8PyClical_59acos(PyObject *__pyx_self,
23500 #
if CYTHON_METH_FASTCALL
23501 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23503 PyObject *__pyx_args, PyObject *__pyx_kwds
23506 PyDoc_STRVAR(__pyx_doc_8PyClical_58acos,
"\n Inverse cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{1,2,3}\"))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{-1,1,2,3,4}\"))\n {1,2}\n >>> print(acos(0) / pi)\n 0.5\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x)))\n {1,2}\n ");
23507 static PyMethodDef __pyx_mdef_8PyClical_59acos = {
"acos", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_59acos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_58acos};
23508 static PyObject *__pyx_pw_8PyClical_59acos(PyObject *__pyx_self,
23509 #
if CYTHON_METH_FASTCALL
23510 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23512 PyObject *__pyx_args, PyObject *__pyx_kwds
23515 PyObject *__pyx_v_obj = 0;
23516 PyObject *__pyx_v_i = 0;
23517 #if !CYTHON_METH_FASTCALL 23518 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23520 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
23521 PyObject* values[2] = {0,0};
23522 int __pyx_lineno = 0;
23523 const char *__pyx_filename = NULL;
23524 int __pyx_clineno = 0;
23525 PyObject *__pyx_r = 0;
23526 __Pyx_RefNannyDeclarations
23527 __Pyx_RefNannySetupContext(
"acos (wrapper)", 0);
23528 #if !CYTHON_METH_FASTCALL 23529 #if CYTHON_ASSUME_SAFE_MACROS 23530 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23532 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
23535 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
23537 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
23538 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
23540 Py_ssize_t kw_args;
23541 switch (__pyx_nargs) {
23542 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
23543 CYTHON_FALLTHROUGH;
23544 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
23545 CYTHON_FALLTHROUGH;
23547 default:
goto __pyx_L5_argtuple_error;
23549 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
23550 switch (__pyx_nargs) {
23552 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
23553 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
23556 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1731, __pyx_L3_error)
23557 else goto __pyx_L5_argtuple_error;
23558 CYTHON_FALLTHROUGH;
23561 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
23562 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
23563 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1731, __pyx_L3_error)
23566 if (unlikely(kw_args > 0)) {
23567 const Py_ssize_t kwd_pos_args = __pyx_nargs;
23568 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"acos") < 0)) __PYX_ERR(0, 1731, __pyx_L3_error)
23571 switch (__pyx_nargs) {
23572 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
23573 CYTHON_FALLTHROUGH;
23574 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
23576 default:
goto __pyx_L5_argtuple_error;
23579 __pyx_v_obj = values[0];
23580 __pyx_v_i = values[1];
23582 goto __pyx_L6_skip;
23583 __pyx_L5_argtuple_error:;
23584 __Pyx_RaiseArgtupleInvalid(
"acos", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1731, __pyx_L3_error)
23586 goto __pyx_L4_argument_unpacking_done;
23589 Py_ssize_t __pyx_temp;
23590 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
23591 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
23594 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23595 __Pyx_RefNannyFinishContext();
23597 __pyx_L4_argument_unpacking_done:;
23598 __pyx_r = __pyx_pf_8PyClical_58acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
23602 Py_ssize_t __pyx_temp;
23603 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
23604 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
23607 __Pyx_RefNannyFinishContext();
23611 static PyObject *__pyx_pf_8PyClical_58acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
23612 PyObject *__pyx_r = NULL;
23613 __Pyx_RefNannyDeclarations
23614 PyObject *__pyx_t_1 = NULL;
23615 struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
23616 int __pyx_lineno = 0;
23617 const char *__pyx_filename = NULL;
23618 int __pyx_clineno = 0;
23619 __Pyx_RefNannySetupContext(
"acos", 1);
23620 __Pyx_XDECREF(__pyx_r);
23621 __pyx_t_2.__pyx_n = 1;
23622 __pyx_t_2.i = __pyx_v_i;
23623 __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
23624 __Pyx_GOTREF(__pyx_t_1);
23625 __pyx_r = __pyx_t_1;
23631 __Pyx_XDECREF(__pyx_t_1);
23632 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
23635 __Pyx_XGIVEREF(__pyx_r);
23636 __Pyx_RefNannyFinishContext();
23648 static PyObject *__pyx_pw_8PyClical_61cosh(PyObject *__pyx_self,
23649 #
if CYTHON_METH_FASTCALL
23650 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23652 PyObject *__pyx_args, PyObject *__pyx_kwds
23655 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
23656 PyObject *__pyx_r = NULL;
23657 __Pyx_RefNannyDeclarations
23658 PyObject *__pyx_t_1 = NULL;
23659 PyObject *__pyx_t_2 = NULL;
23660 PyObject *__pyx_t_3 = NULL;
23661 PyObject *__pyx_t_4 = NULL;
23662 PyObject *__pyx_t_5 = NULL;
23663 PyObject *__pyx_t_6 = NULL;
23665 PyObject *__pyx_t_8 = NULL;
23667 PyObject *__pyx_t_10 = NULL;
23668 int __pyx_lineno = 0;
23669 const char *__pyx_filename = NULL;
23670 int __pyx_clineno = 0;
23671 __Pyx_RefNannySetupContext(
"cosh", 1);
23681 __Pyx_PyThreadState_declare
23682 __Pyx_PyThreadState_assign
23683 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
23684 __Pyx_XGOTREF(__pyx_t_1);
23685 __Pyx_XGOTREF(__pyx_t_2);
23686 __Pyx_XGOTREF(__pyx_t_3);
23696 __Pyx_XDECREF(__pyx_r);
23697 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1764, __pyx_L3_error)
23698 __Pyx_GOTREF(__pyx_t_5);
23699 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1764, __pyx_L3_error)
23700 __Pyx_GOTREF(__pyx_t_6);
23701 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23704 #if CYTHON_UNPACK_METHODS 23705 if (unlikely(PyMethod_Check(__pyx_t_6))) {
23706 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
23707 if (likely(__pyx_t_5)) {
23708 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
23709 __Pyx_INCREF(__pyx_t_5);
23710 __Pyx_INCREF(
function);
23711 __Pyx_DECREF_SET(__pyx_t_6,
function);
23717 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_obj};
23718 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
23719 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23720 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1764, __pyx_L3_error)
23721 __Pyx_GOTREF(__pyx_t_4);
23722 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23724 __pyx_r = __pyx_t_4;
23726 goto __pyx_L7_try_return;
23737 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23738 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23739 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
23749 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
23750 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1765, __pyx_L5_except_error)
23751 __Pyx_XGOTREF(__pyx_t_4);
23752 __Pyx_XGOTREF(__pyx_t_6);
23753 __Pyx_XGOTREF(__pyx_t_5);
23762 __Pyx_XDECREF(__pyx_r);
23763 __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1766, __pyx_L5_except_error)
23764 __Pyx_GOTREF(__pyx_t_8);
23765 __pyx_t_9 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1766, __pyx_L5_except_error)
23766 __pyx_t_10 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_8),
cosh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9)));
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1766, __pyx_L5_except_error)
23767 __Pyx_GOTREF(__pyx_t_10);
23768 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23769 __pyx_r = __pyx_t_10;
23771 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23772 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23773 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23774 goto __pyx_L6_except_return;
23784 __pyx_L5_except_error:;
23785 __Pyx_XGIVEREF(__pyx_t_1);
23786 __Pyx_XGIVEREF(__pyx_t_2);
23787 __Pyx_XGIVEREF(__pyx_t_3);
23788 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
23789 goto __pyx_L1_error;
23790 __pyx_L7_try_return:;
23791 __Pyx_XGIVEREF(__pyx_t_1);
23792 __Pyx_XGIVEREF(__pyx_t_2);
23793 __Pyx_XGIVEREF(__pyx_t_3);
23794 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
23796 __pyx_L6_except_return:;
23797 __Pyx_XGIVEREF(__pyx_t_1);
23798 __Pyx_XGIVEREF(__pyx_t_2);
23799 __Pyx_XGIVEREF(__pyx_t_3);
23800 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
23814 __Pyx_XDECREF(__pyx_t_4);
23815 __Pyx_XDECREF(__pyx_t_5);
23816 __Pyx_XDECREF(__pyx_t_6);
23817 __Pyx_XDECREF(__pyx_t_8);
23818 __Pyx_XDECREF(__pyx_t_10);
23819 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
23822 __Pyx_XGIVEREF(__pyx_r);
23823 __Pyx_RefNannyFinishContext();
23828 static PyObject *__pyx_pw_8PyClical_61cosh(PyObject *__pyx_self,
23829 #
if CYTHON_METH_FASTCALL
23830 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23832 PyObject *__pyx_args, PyObject *__pyx_kwds
23835 PyDoc_STRVAR(__pyx_doc_8PyClical_60cosh,
"\n Hyperbolic cosine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi; print(cosh(x))\n -1\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x)))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print(cosh(acosh(x)))\n {1,2}\n ");
23836 static PyMethodDef __pyx_mdef_8PyClical_61cosh = {
"cosh", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_61cosh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_60cosh};
23837 static PyObject *__pyx_pw_8PyClical_61cosh(PyObject *__pyx_self,
23838 #
if CYTHON_METH_FASTCALL
23839 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23841 PyObject *__pyx_args, PyObject *__pyx_kwds
23844 PyObject *__pyx_v_obj = 0;
23845 #if !CYTHON_METH_FASTCALL 23846 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23848 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
23849 PyObject* values[1] = {0};
23850 int __pyx_lineno = 0;
23851 const char *__pyx_filename = NULL;
23852 int __pyx_clineno = 0;
23853 PyObject *__pyx_r = 0;
23854 __Pyx_RefNannyDeclarations
23855 __Pyx_RefNannySetupContext(
"cosh (wrapper)", 0);
23856 #if !CYTHON_METH_FASTCALL 23857 #if CYTHON_ASSUME_SAFE_MACROS 23858 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23860 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
23863 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
23865 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
23867 Py_ssize_t kw_args;
23868 switch (__pyx_nargs) {
23869 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
23870 CYTHON_FALLTHROUGH;
23872 default:
goto __pyx_L5_argtuple_error;
23874 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
23875 switch (__pyx_nargs) {
23877 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
23878 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
23881 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1752, __pyx_L3_error)
23882 else goto __pyx_L5_argtuple_error;
23884 if (unlikely(kw_args > 0)) {
23885 const Py_ssize_t kwd_pos_args = __pyx_nargs;
23886 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"cosh") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
23888 }
else if (unlikely(__pyx_nargs != 1)) {
23889 goto __pyx_L5_argtuple_error;
23891 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
23893 __pyx_v_obj = values[0];
23895 goto __pyx_L6_skip;
23896 __pyx_L5_argtuple_error:;
23897 __Pyx_RaiseArgtupleInvalid(
"cosh", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1752, __pyx_L3_error)
23899 goto __pyx_L4_argument_unpacking_done;
23902 Py_ssize_t __pyx_temp;
23903 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
23904 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
23907 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
23908 __Pyx_RefNannyFinishContext();
23910 __pyx_L4_argument_unpacking_done:;
23911 __pyx_r = __pyx_pf_8PyClical_60cosh(__pyx_self, __pyx_v_obj);
23915 Py_ssize_t __pyx_temp;
23916 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
23917 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
23920 __Pyx_RefNannyFinishContext();
23924 static PyObject *__pyx_pf_8PyClical_60cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
23925 PyObject *__pyx_r = NULL;
23926 __Pyx_RefNannyDeclarations
23927 PyObject *__pyx_t_1 = NULL;
23928 int __pyx_lineno = 0;
23929 const char *__pyx_filename = NULL;
23930 int __pyx_clineno = 0;
23931 __Pyx_RefNannySetupContext(
"cosh", 1);
23932 __Pyx_XDECREF(__pyx_r);
23933 __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error)
23934 __Pyx_GOTREF(__pyx_t_1);
23935 __pyx_r = __pyx_t_1;
23941 __Pyx_XDECREF(__pyx_t_1);
23942 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
23945 __Pyx_XGIVEREF(__pyx_r);
23946 __Pyx_RefNannyFinishContext();
23958 static PyObject *__pyx_pw_8PyClical_63acosh(PyObject *__pyx_self,
23959 #
if CYTHON_METH_FASTCALL
23960 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
23962 PyObject *__pyx_args, PyObject *__pyx_kwds
23965 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args) {
23966 PyObject *__pyx_v_i = ((PyObject *)Py_None);
23967 PyObject *__pyx_r = NULL;
23968 __Pyx_RefNannyDeclarations
23970 PyObject *__pyx_t_2 = NULL;
23974 PyObject *__pyx_t_6 = NULL;
23975 PyObject *__pyx_t_7 = NULL;
23976 PyObject *__pyx_t_8 = NULL;
23977 PyObject *__pyx_t_9 = NULL;
23978 PyObject *__pyx_t_10 = NULL;
23980 PyObject *__pyx_t_12 = NULL;
23981 PyObject *__pyx_t_13 = NULL;
23982 int __pyx_lineno = 0;
23983 const char *__pyx_filename = NULL;
23984 int __pyx_clineno = 0;
23985 __Pyx_RefNannySetupContext(
"acosh", 1);
23986 if (__pyx_optional_args) {
23987 if (__pyx_optional_args->__pyx_n > 0) {
23988 __pyx_v_i = __pyx_optional_args->i;
23999 __pyx_t_1 = (__pyx_v_i != Py_None);
24009 __Pyx_XDECREF(__pyx_r);
24010 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
24011 __Pyx_GOTREF(__pyx_t_2);
24012 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1784, __pyx_L1_error)
24013 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1784, __pyx_L1_error)
24015 __pyx_t_5 =
acosh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
24017 __Pyx_CppExn2PyErr();
24018 __PYX_ERR(0, 1784, __pyx_L1_error)
24020 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L1_error)
24021 __Pyx_GOTREF(__pyx_t_6);
24022 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24023 __pyx_r = __pyx_t_6;
24045 __Pyx_PyThreadState_declare
24046 __Pyx_PyThreadState_assign
24047 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
24048 __Pyx_XGOTREF(__pyx_t_7);
24049 __Pyx_XGOTREF(__pyx_t_8);
24050 __Pyx_XGOTREF(__pyx_t_9);
24060 __Pyx_XDECREF(__pyx_r);
24061 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L4_error)
24062 __Pyx_GOTREF(__pyx_t_2);
24063 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_acosh);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1787, __pyx_L4_error)
24064 __Pyx_GOTREF(__pyx_t_10);
24065 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24068 #if CYTHON_UNPACK_METHODS 24069 if (unlikely(PyMethod_Check(__pyx_t_10))) {
24070 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
24071 if (likely(__pyx_t_2)) {
24072 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
24073 __Pyx_INCREF(__pyx_t_2);
24074 __Pyx_INCREF(
function);
24075 __Pyx_DECREF_SET(__pyx_t_10,
function);
24081 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
24082 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
24083 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24084 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1787, __pyx_L4_error)
24085 __Pyx_GOTREF(__pyx_t_6);
24086 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24088 __pyx_r = __pyx_t_6;
24090 goto __pyx_L8_try_return;
24101 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24102 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24103 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24113 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
24114 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1788, __pyx_L6_except_error)
24115 __Pyx_XGOTREF(__pyx_t_6);
24116 __Pyx_XGOTREF(__pyx_t_10);
24117 __Pyx_XGOTREF(__pyx_t_2);
24126 __Pyx_XDECREF(__pyx_r);
24127 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1789, __pyx_L6_except_error)
24128 __Pyx_GOTREF(__pyx_t_12);
24129 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1789, __pyx_L6_except_error)
24130 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
acosh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1789, __pyx_L6_except_error)
24131 __Pyx_GOTREF(__pyx_t_13);
24132 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24133 __pyx_r = __pyx_t_13;
24135 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24136 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24137 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24138 goto __pyx_L7_except_return;
24148 __pyx_L6_except_error:;
24149 __Pyx_XGIVEREF(__pyx_t_7);
24150 __Pyx_XGIVEREF(__pyx_t_8);
24151 __Pyx_XGIVEREF(__pyx_t_9);
24152 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24153 goto __pyx_L1_error;
24154 __pyx_L8_try_return:;
24155 __Pyx_XGIVEREF(__pyx_t_7);
24156 __Pyx_XGIVEREF(__pyx_t_8);
24157 __Pyx_XGIVEREF(__pyx_t_9);
24158 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24160 __pyx_L7_except_return:;
24161 __Pyx_XGIVEREF(__pyx_t_7);
24162 __Pyx_XGIVEREF(__pyx_t_8);
24163 __Pyx_XGIVEREF(__pyx_t_9);
24164 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24179 __Pyx_XDECREF(__pyx_t_2);
24180 __Pyx_XDECREF(__pyx_t_6);
24181 __Pyx_XDECREF(__pyx_t_10);
24182 __Pyx_XDECREF(__pyx_t_12);
24183 __Pyx_XDECREF(__pyx_t_13);
24184 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
24187 __Pyx_XGIVEREF(__pyx_r);
24188 __Pyx_RefNannyFinishContext();
24193 static PyObject *__pyx_pw_8PyClical_63acosh(PyObject *__pyx_self,
24194 #
if CYTHON_METH_FASTCALL
24195 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24197 PyObject *__pyx_args, PyObject *__pyx_kwds
24200 PyDoc_STRVAR(__pyx_doc_8PyClical_62acosh,
"\n Inverse hyperbolic cosine of multivector with optional complexifier.\n\n >>> print(acosh(0,\"{-2,-1,1}\"))\n 1.571{-2,-1,1}\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x,\"{-1,1,2,3,4}\")))\n {1,2,3}\n >>> print(acosh(0))\n 1.571{-1}\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x)))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print(cosh(acosh(x)))\n {1,2}\n ");
24201 static PyMethodDef __pyx_mdef_8PyClical_63acosh = {
"acosh", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_63acosh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_62acosh};
24202 static PyObject *__pyx_pw_8PyClical_63acosh(PyObject *__pyx_self,
24203 #
if CYTHON_METH_FASTCALL
24204 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24206 PyObject *__pyx_args, PyObject *__pyx_kwds
24209 PyObject *__pyx_v_obj = 0;
24210 PyObject *__pyx_v_i = 0;
24211 #if !CYTHON_METH_FASTCALL 24212 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24214 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
24215 PyObject* values[2] = {0,0};
24216 int __pyx_lineno = 0;
24217 const char *__pyx_filename = NULL;
24218 int __pyx_clineno = 0;
24219 PyObject *__pyx_r = 0;
24220 __Pyx_RefNannyDeclarations
24221 __Pyx_RefNannySetupContext(
"acosh (wrapper)", 0);
24222 #if !CYTHON_METH_FASTCALL 24223 #if CYTHON_ASSUME_SAFE_MACROS 24224 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24226 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
24229 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24231 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
24232 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
24234 Py_ssize_t kw_args;
24235 switch (__pyx_nargs) {
24236 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
24237 CYTHON_FALLTHROUGH;
24238 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
24239 CYTHON_FALLTHROUGH;
24241 default:
goto __pyx_L5_argtuple_error;
24243 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
24244 switch (__pyx_nargs) {
24246 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
24247 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
24250 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1768, __pyx_L3_error)
24251 else goto __pyx_L5_argtuple_error;
24252 CYTHON_FALLTHROUGH;
24255 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
24256 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
24257 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1768, __pyx_L3_error)
24260 if (unlikely(kw_args > 0)) {
24261 const Py_ssize_t kwd_pos_args = __pyx_nargs;
24262 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"acosh") < 0)) __PYX_ERR(0, 1768, __pyx_L3_error)
24265 switch (__pyx_nargs) {
24266 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
24267 CYTHON_FALLTHROUGH;
24268 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
24270 default:
goto __pyx_L5_argtuple_error;
24273 __pyx_v_obj = values[0];
24274 __pyx_v_i = values[1];
24276 goto __pyx_L6_skip;
24277 __pyx_L5_argtuple_error:;
24278 __Pyx_RaiseArgtupleInvalid(
"acosh", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1768, __pyx_L3_error)
24280 goto __pyx_L4_argument_unpacking_done;
24283 Py_ssize_t __pyx_temp;
24284 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
24285 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
24288 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
24289 __Pyx_RefNannyFinishContext();
24291 __pyx_L4_argument_unpacking_done:;
24292 __pyx_r = __pyx_pf_8PyClical_62acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
24296 Py_ssize_t __pyx_temp;
24297 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
24298 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
24301 __Pyx_RefNannyFinishContext();
24305 static PyObject *__pyx_pf_8PyClical_62acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
24306 PyObject *__pyx_r = NULL;
24307 __Pyx_RefNannyDeclarations
24308 PyObject *__pyx_t_1 = NULL;
24309 struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
24310 int __pyx_lineno = 0;
24311 const char *__pyx_filename = NULL;
24312 int __pyx_clineno = 0;
24313 __Pyx_RefNannySetupContext(
"acosh", 1);
24314 __Pyx_XDECREF(__pyx_r);
24315 __pyx_t_2.__pyx_n = 1;
24316 __pyx_t_2.i = __pyx_v_i;
24317 __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
24318 __Pyx_GOTREF(__pyx_t_1);
24319 __pyx_r = __pyx_t_1;
24325 __Pyx_XDECREF(__pyx_t_1);
24326 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
24329 __Pyx_XGIVEREF(__pyx_r);
24330 __Pyx_RefNannyFinishContext();
24342 static PyObject *__pyx_pw_8PyClical_65sin(PyObject *__pyx_self,
24343 #
if CYTHON_METH_FASTCALL
24344 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24346 PyObject *__pyx_args, PyObject *__pyx_kwds
24349 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args) {
24350 PyObject *__pyx_v_i = ((PyObject *)Py_None);
24351 PyObject *__pyx_r = NULL;
24352 __Pyx_RefNannyDeclarations
24354 PyObject *__pyx_t_2 = NULL;
24358 PyObject *__pyx_t_6 = NULL;
24359 PyObject *__pyx_t_7 = NULL;
24360 PyObject *__pyx_t_8 = NULL;
24361 PyObject *__pyx_t_9 = NULL;
24362 PyObject *__pyx_t_10 = NULL;
24364 PyObject *__pyx_t_12 = NULL;
24365 PyObject *__pyx_t_13 = NULL;
24366 int __pyx_lineno = 0;
24367 const char *__pyx_filename = NULL;
24368 int __pyx_clineno = 0;
24369 __Pyx_RefNannySetupContext(
"sin", 1);
24370 if (__pyx_optional_args) {
24371 if (__pyx_optional_args->__pyx_n > 0) {
24372 __pyx_v_i = __pyx_optional_args->i;
24383 __pyx_t_1 = (__pyx_v_i != Py_None);
24393 __Pyx_XDECREF(__pyx_r);
24394 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
24395 __Pyx_GOTREF(__pyx_t_2);
24396 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1803, __pyx_L1_error)
24397 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1803, __pyx_L1_error)
24399 __pyx_t_5 =
sin(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
24401 __Pyx_CppExn2PyErr();
24402 __PYX_ERR(0, 1803, __pyx_L1_error)
24404 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L1_error)
24405 __Pyx_GOTREF(__pyx_t_6);
24406 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24407 __pyx_r = __pyx_t_6;
24429 __Pyx_PyThreadState_declare
24430 __Pyx_PyThreadState_assign
24431 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
24432 __Pyx_XGOTREF(__pyx_t_7);
24433 __Pyx_XGOTREF(__pyx_t_8);
24434 __Pyx_XGOTREF(__pyx_t_9);
24444 __Pyx_XDECREF(__pyx_r);
24445 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1806, __pyx_L4_error)
24446 __Pyx_GOTREF(__pyx_t_2);
24447 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sin);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1806, __pyx_L4_error)
24448 __Pyx_GOTREF(__pyx_t_10);
24449 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24452 #if CYTHON_UNPACK_METHODS 24453 if (unlikely(PyMethod_Check(__pyx_t_10))) {
24454 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
24455 if (likely(__pyx_t_2)) {
24456 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
24457 __Pyx_INCREF(__pyx_t_2);
24458 __Pyx_INCREF(
function);
24459 __Pyx_DECREF_SET(__pyx_t_10,
function);
24465 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
24466 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
24467 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24468 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1806, __pyx_L4_error)
24469 __Pyx_GOTREF(__pyx_t_6);
24470 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24472 __pyx_r = __pyx_t_6;
24474 goto __pyx_L8_try_return;
24485 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24486 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24487 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24497 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
24498 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1807, __pyx_L6_except_error)
24499 __Pyx_XGOTREF(__pyx_t_6);
24500 __Pyx_XGOTREF(__pyx_t_10);
24501 __Pyx_XGOTREF(__pyx_t_2);
24510 __Pyx_XDECREF(__pyx_r);
24511 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1808, __pyx_L6_except_error)
24512 __Pyx_GOTREF(__pyx_t_12);
24513 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1808, __pyx_L6_except_error)
24514 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
sin(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1808, __pyx_L6_except_error)
24515 __Pyx_GOTREF(__pyx_t_13);
24516 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24517 __pyx_r = __pyx_t_13;
24519 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24520 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24521 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24522 goto __pyx_L7_except_return;
24532 __pyx_L6_except_error:;
24533 __Pyx_XGIVEREF(__pyx_t_7);
24534 __Pyx_XGIVEREF(__pyx_t_8);
24535 __Pyx_XGIVEREF(__pyx_t_9);
24536 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24537 goto __pyx_L1_error;
24538 __pyx_L8_try_return:;
24539 __Pyx_XGIVEREF(__pyx_t_7);
24540 __Pyx_XGIVEREF(__pyx_t_8);
24541 __Pyx_XGIVEREF(__pyx_t_9);
24542 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24544 __pyx_L7_except_return:;
24545 __Pyx_XGIVEREF(__pyx_t_7);
24546 __Pyx_XGIVEREF(__pyx_t_8);
24547 __Pyx_XGIVEREF(__pyx_t_9);
24548 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24563 __Pyx_XDECREF(__pyx_t_2);
24564 __Pyx_XDECREF(__pyx_t_6);
24565 __Pyx_XDECREF(__pyx_t_10);
24566 __Pyx_XDECREF(__pyx_t_12);
24567 __Pyx_XDECREF(__pyx_t_13);
24568 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
24571 __Pyx_XGIVEREF(__pyx_r);
24572 __Pyx_RefNannyFinishContext();
24577 static PyObject *__pyx_pw_8PyClical_65sin(PyObject *__pyx_self,
24578 #
if CYTHON_METH_FASTCALL
24579 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24581 PyObject *__pyx_args, PyObject *__pyx_kwds
24584 PyDoc_STRVAR(__pyx_doc_8PyClical_64sin,
"\n Sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),s))\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),\"{-2,-1,1}\"))\n {-1}\n >>> x=clifford(\"{1,2,3}\"); print(asin(sin(x)))\n {1,2,3}\n ");
24585 static PyMethodDef __pyx_mdef_8PyClical_65sin = {
"sin", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_65sin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_64sin};
24586 static PyObject *__pyx_pw_8PyClical_65sin(PyObject *__pyx_self,
24587 #
if CYTHON_METH_FASTCALL
24588 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24590 PyObject *__pyx_args, PyObject *__pyx_kwds
24593 PyObject *__pyx_v_obj = 0;
24594 PyObject *__pyx_v_i = 0;
24595 #if !CYTHON_METH_FASTCALL 24596 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24598 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
24599 PyObject* values[2] = {0,0};
24600 int __pyx_lineno = 0;
24601 const char *__pyx_filename = NULL;
24602 int __pyx_clineno = 0;
24603 PyObject *__pyx_r = 0;
24604 __Pyx_RefNannyDeclarations
24605 __Pyx_RefNannySetupContext(
"sin (wrapper)", 0);
24606 #if !CYTHON_METH_FASTCALL 24607 #if CYTHON_ASSUME_SAFE_MACROS 24608 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24610 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
24613 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24615 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
24616 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
24618 Py_ssize_t kw_args;
24619 switch (__pyx_nargs) {
24620 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
24621 CYTHON_FALLTHROUGH;
24622 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
24623 CYTHON_FALLTHROUGH;
24625 default:
goto __pyx_L5_argtuple_error;
24627 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
24628 switch (__pyx_nargs) {
24630 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
24631 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
24634 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1791, __pyx_L3_error)
24635 else goto __pyx_L5_argtuple_error;
24636 CYTHON_FALLTHROUGH;
24639 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
24640 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
24641 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1791, __pyx_L3_error)
24644 if (unlikely(kw_args > 0)) {
24645 const Py_ssize_t kwd_pos_args = __pyx_nargs;
24646 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"sin") < 0)) __PYX_ERR(0, 1791, __pyx_L3_error)
24649 switch (__pyx_nargs) {
24650 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
24651 CYTHON_FALLTHROUGH;
24652 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
24654 default:
goto __pyx_L5_argtuple_error;
24657 __pyx_v_obj = values[0];
24658 __pyx_v_i = values[1];
24660 goto __pyx_L6_skip;
24661 __pyx_L5_argtuple_error:;
24662 __Pyx_RaiseArgtupleInvalid(
"sin", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1791, __pyx_L3_error)
24664 goto __pyx_L4_argument_unpacking_done;
24667 Py_ssize_t __pyx_temp;
24668 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
24669 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
24672 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
24673 __Pyx_RefNannyFinishContext();
24675 __pyx_L4_argument_unpacking_done:;
24676 __pyx_r = __pyx_pf_8PyClical_64sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
24680 Py_ssize_t __pyx_temp;
24681 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
24682 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
24685 __Pyx_RefNannyFinishContext();
24689 static PyObject *__pyx_pf_8PyClical_64sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
24690 PyObject *__pyx_r = NULL;
24691 __Pyx_RefNannyDeclarations
24692 PyObject *__pyx_t_1 = NULL;
24693 struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
24694 int __pyx_lineno = 0;
24695 const char *__pyx_filename = NULL;
24696 int __pyx_clineno = 0;
24697 __Pyx_RefNannySetupContext(
"sin", 1);
24698 __Pyx_XDECREF(__pyx_r);
24699 __pyx_t_2.__pyx_n = 1;
24700 __pyx_t_2.i = __pyx_v_i;
24701 __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L1_error)
24702 __Pyx_GOTREF(__pyx_t_1);
24703 __pyx_r = __pyx_t_1;
24709 __Pyx_XDECREF(__pyx_t_1);
24710 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
24713 __Pyx_XGIVEREF(__pyx_r);
24714 __Pyx_RefNannyFinishContext();
24726 static PyObject *__pyx_pw_8PyClical_67asin(PyObject *__pyx_self,
24727 #
if CYTHON_METH_FASTCALL
24728 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24730 PyObject *__pyx_args, PyObject *__pyx_kwds
24733 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args) {
24734 PyObject *__pyx_v_i = ((PyObject *)Py_None);
24735 PyObject *__pyx_r = NULL;
24736 __Pyx_RefNannyDeclarations
24738 PyObject *__pyx_t_2 = NULL;
24742 PyObject *__pyx_t_6 = NULL;
24743 PyObject *__pyx_t_7 = NULL;
24744 PyObject *__pyx_t_8 = NULL;
24745 PyObject *__pyx_t_9 = NULL;
24746 PyObject *__pyx_t_10 = NULL;
24748 PyObject *__pyx_t_12 = NULL;
24749 PyObject *__pyx_t_13 = NULL;
24750 int __pyx_lineno = 0;
24751 const char *__pyx_filename = NULL;
24752 int __pyx_clineno = 0;
24753 __Pyx_RefNannySetupContext(
"asin", 1);
24754 if (__pyx_optional_args) {
24755 if (__pyx_optional_args->__pyx_n > 0) {
24756 __pyx_v_i = __pyx_optional_args->i;
24767 __pyx_t_1 = (__pyx_v_i != Py_None);
24777 __Pyx_XDECREF(__pyx_r);
24778 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error)
24779 __Pyx_GOTREF(__pyx_t_2);
24780 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1824, __pyx_L1_error)
24781 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1824, __pyx_L1_error)
24783 __pyx_t_5 =
asin(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
24785 __Pyx_CppExn2PyErr();
24786 __PYX_ERR(0, 1824, __pyx_L1_error)
24788 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1824, __pyx_L1_error)
24789 __Pyx_GOTREF(__pyx_t_6);
24790 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24791 __pyx_r = __pyx_t_6;
24813 __Pyx_PyThreadState_declare
24814 __Pyx_PyThreadState_assign
24815 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
24816 __Pyx_XGOTREF(__pyx_t_7);
24817 __Pyx_XGOTREF(__pyx_t_8);
24818 __Pyx_XGOTREF(__pyx_t_9);
24828 __Pyx_XDECREF(__pyx_r);
24829 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L4_error)
24830 __Pyx_GOTREF(__pyx_t_2);
24831 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asin);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1827, __pyx_L4_error)
24832 __Pyx_GOTREF(__pyx_t_10);
24833 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24836 #if CYTHON_UNPACK_METHODS 24837 if (unlikely(PyMethod_Check(__pyx_t_10))) {
24838 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
24839 if (likely(__pyx_t_2)) {
24840 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
24841 __Pyx_INCREF(__pyx_t_2);
24842 __Pyx_INCREF(
function);
24843 __Pyx_DECREF_SET(__pyx_t_10,
function);
24849 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
24850 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
24851 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24852 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1827, __pyx_L4_error)
24853 __Pyx_GOTREF(__pyx_t_6);
24854 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24856 __pyx_r = __pyx_t_6;
24858 goto __pyx_L8_try_return;
24869 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24870 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24871 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24881 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
24882 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1828, __pyx_L6_except_error)
24883 __Pyx_XGOTREF(__pyx_t_6);
24884 __Pyx_XGOTREF(__pyx_t_10);
24885 __Pyx_XGOTREF(__pyx_t_2);
24894 __Pyx_XDECREF(__pyx_r);
24895 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1829, __pyx_L6_except_error)
24896 __Pyx_GOTREF(__pyx_t_12);
24897 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1829, __pyx_L6_except_error)
24898 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
asin(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1829, __pyx_L6_except_error)
24899 __Pyx_GOTREF(__pyx_t_13);
24900 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24901 __pyx_r = __pyx_t_13;
24903 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24904 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24905 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24906 goto __pyx_L7_except_return;
24916 __pyx_L6_except_error:;
24917 __Pyx_XGIVEREF(__pyx_t_7);
24918 __Pyx_XGIVEREF(__pyx_t_8);
24919 __Pyx_XGIVEREF(__pyx_t_9);
24920 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24921 goto __pyx_L1_error;
24922 __pyx_L8_try_return:;
24923 __Pyx_XGIVEREF(__pyx_t_7);
24924 __Pyx_XGIVEREF(__pyx_t_8);
24925 __Pyx_XGIVEREF(__pyx_t_9);
24926 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24928 __pyx_L7_except_return:;
24929 __Pyx_XGIVEREF(__pyx_t_7);
24930 __Pyx_XGIVEREF(__pyx_t_8);
24931 __Pyx_XGIVEREF(__pyx_t_9);
24932 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24947 __Pyx_XDECREF(__pyx_t_2);
24948 __Pyx_XDECREF(__pyx_t_6);
24949 __Pyx_XDECREF(__pyx_t_10);
24950 __Pyx_XDECREF(__pyx_t_12);
24951 __Pyx_XDECREF(__pyx_t_13);
24952 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
24955 __Pyx_XGIVEREF(__pyx_r);
24956 __Pyx_RefNannyFinishContext();
24961 static PyObject *__pyx_pw_8PyClical_67asin(PyObject *__pyx_self,
24962 #
if CYTHON_METH_FASTCALL
24963 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24965 PyObject *__pyx_args, PyObject *__pyx_kwds
24968 PyDoc_STRVAR(__pyx_doc_8PyClical_66asin,
"\n Inverse sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),s))\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),\"{-2,-1,1}\"))\n {-1}\n >>> print(asin(1) / pi)\n 0.5\n >>> x=clifford(\"{1,2,3}\"); print(asin(sin(x)))\n {1,2,3}\n ");
24969 static PyMethodDef __pyx_mdef_8PyClical_67asin = {
"asin", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_67asin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_66asin};
24970 static PyObject *__pyx_pw_8PyClical_67asin(PyObject *__pyx_self,
24971 #
if CYTHON_METH_FASTCALL
24972 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
24974 PyObject *__pyx_args, PyObject *__pyx_kwds
24977 PyObject *__pyx_v_obj = 0;
24978 PyObject *__pyx_v_i = 0;
24979 #if !CYTHON_METH_FASTCALL 24980 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24982 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
24983 PyObject* values[2] = {0,0};
24984 int __pyx_lineno = 0;
24985 const char *__pyx_filename = NULL;
24986 int __pyx_clineno = 0;
24987 PyObject *__pyx_r = 0;
24988 __Pyx_RefNannyDeclarations
24989 __Pyx_RefNannySetupContext(
"asin (wrapper)", 0);
24990 #if !CYTHON_METH_FASTCALL 24991 #if CYTHON_ASSUME_SAFE_MACROS 24992 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24994 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
24997 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
24999 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
25000 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
25002 Py_ssize_t kw_args;
25003 switch (__pyx_nargs) {
25004 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
25005 CYTHON_FALLTHROUGH;
25006 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25007 CYTHON_FALLTHROUGH;
25009 default:
goto __pyx_L5_argtuple_error;
25011 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
25012 switch (__pyx_nargs) {
25014 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
25015 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
25018 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1810, __pyx_L3_error)
25019 else goto __pyx_L5_argtuple_error;
25020 CYTHON_FALLTHROUGH;
25023 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
25024 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
25025 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1810, __pyx_L3_error)
25028 if (unlikely(kw_args > 0)) {
25029 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25030 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"asin") < 0)) __PYX_ERR(0, 1810, __pyx_L3_error)
25033 switch (__pyx_nargs) {
25034 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
25035 CYTHON_FALLTHROUGH;
25036 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25038 default:
goto __pyx_L5_argtuple_error;
25041 __pyx_v_obj = values[0];
25042 __pyx_v_i = values[1];
25044 goto __pyx_L6_skip;
25045 __pyx_L5_argtuple_error:;
25046 __Pyx_RaiseArgtupleInvalid(
"asin", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1810, __pyx_L3_error)
25048 goto __pyx_L4_argument_unpacking_done;
25051 Py_ssize_t __pyx_temp;
25052 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
25053 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25056 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
25057 __Pyx_RefNannyFinishContext();
25059 __pyx_L4_argument_unpacking_done:;
25060 __pyx_r = __pyx_pf_8PyClical_66asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
25064 Py_ssize_t __pyx_temp;
25065 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
25066 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25069 __Pyx_RefNannyFinishContext();
25073 static PyObject *__pyx_pf_8PyClical_66asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
25074 PyObject *__pyx_r = NULL;
25075 __Pyx_RefNannyDeclarations
25076 PyObject *__pyx_t_1 = NULL;
25077 struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
25078 int __pyx_lineno = 0;
25079 const char *__pyx_filename = NULL;
25080 int __pyx_clineno = 0;
25081 __Pyx_RefNannySetupContext(
"asin", 1);
25082 __Pyx_XDECREF(__pyx_r);
25083 __pyx_t_2.__pyx_n = 1;
25084 __pyx_t_2.i = __pyx_v_i;
25085 __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
25086 __Pyx_GOTREF(__pyx_t_1);
25087 __pyx_r = __pyx_t_1;
25093 __Pyx_XDECREF(__pyx_t_1);
25094 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
25097 __Pyx_XGIVEREF(__pyx_r);
25098 __Pyx_RefNannyFinishContext();
25110 static PyObject *__pyx_pw_8PyClical_69sinh(PyObject *__pyx_self,
25111 #
if CYTHON_METH_FASTCALL
25112 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25114 PyObject *__pyx_args, PyObject *__pyx_kwds
25117 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
25118 PyObject *__pyx_r = NULL;
25119 __Pyx_RefNannyDeclarations
25120 PyObject *__pyx_t_1 = NULL;
25121 PyObject *__pyx_t_2 = NULL;
25122 PyObject *__pyx_t_3 = NULL;
25123 PyObject *__pyx_t_4 = NULL;
25124 PyObject *__pyx_t_5 = NULL;
25125 PyObject *__pyx_t_6 = NULL;
25127 PyObject *__pyx_t_8 = NULL;
25129 PyObject *__pyx_t_10 = NULL;
25130 int __pyx_lineno = 0;
25131 const char *__pyx_filename = NULL;
25132 int __pyx_clineno = 0;
25133 __Pyx_RefNannySetupContext(
"sinh", 1);
25143 __Pyx_PyThreadState_declare
25144 __Pyx_PyThreadState_assign
25145 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
25146 __Pyx_XGOTREF(__pyx_t_1);
25147 __Pyx_XGOTREF(__pyx_t_2);
25148 __Pyx_XGOTREF(__pyx_t_3);
25158 __Pyx_XDECREF(__pyx_r);
25159 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1841, __pyx_L3_error)
25160 __Pyx_GOTREF(__pyx_t_5);
25161 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1841, __pyx_L3_error)
25162 __Pyx_GOTREF(__pyx_t_6);
25163 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25166 #if CYTHON_UNPACK_METHODS 25167 if (unlikely(PyMethod_Check(__pyx_t_6))) {
25168 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
25169 if (likely(__pyx_t_5)) {
25170 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
25171 __Pyx_INCREF(__pyx_t_5);
25172 __Pyx_INCREF(
function);
25173 __Pyx_DECREF_SET(__pyx_t_6,
function);
25179 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_obj};
25180 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
25181 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25182 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L3_error)
25183 __Pyx_GOTREF(__pyx_t_4);
25184 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25186 __pyx_r = __pyx_t_4;
25188 goto __pyx_L7_try_return;
25199 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25200 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25201 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25211 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25212 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1842, __pyx_L5_except_error)
25213 __Pyx_XGOTREF(__pyx_t_4);
25214 __Pyx_XGOTREF(__pyx_t_6);
25215 __Pyx_XGOTREF(__pyx_t_5);
25224 __Pyx_XDECREF(__pyx_r);
25225 __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1843, __pyx_L5_except_error)
25226 __Pyx_GOTREF(__pyx_t_8);
25227 __pyx_t_9 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L5_except_error)
25228 __pyx_t_10 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_8),
sinh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9)));
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1843, __pyx_L5_except_error)
25229 __Pyx_GOTREF(__pyx_t_10);
25230 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
25231 __pyx_r = __pyx_t_10;
25233 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25234 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25235 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25236 goto __pyx_L6_except_return;
25246 __pyx_L5_except_error:;
25247 __Pyx_XGIVEREF(__pyx_t_1);
25248 __Pyx_XGIVEREF(__pyx_t_2);
25249 __Pyx_XGIVEREF(__pyx_t_3);
25250 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25251 goto __pyx_L1_error;
25252 __pyx_L7_try_return:;
25253 __Pyx_XGIVEREF(__pyx_t_1);
25254 __Pyx_XGIVEREF(__pyx_t_2);
25255 __Pyx_XGIVEREF(__pyx_t_3);
25256 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25258 __pyx_L6_except_return:;
25259 __Pyx_XGIVEREF(__pyx_t_1);
25260 __Pyx_XGIVEREF(__pyx_t_2);
25261 __Pyx_XGIVEREF(__pyx_t_3);
25262 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25276 __Pyx_XDECREF(__pyx_t_4);
25277 __Pyx_XDECREF(__pyx_t_5);
25278 __Pyx_XDECREF(__pyx_t_6);
25279 __Pyx_XDECREF(__pyx_t_8);
25280 __Pyx_XDECREF(__pyx_t_10);
25281 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25284 __Pyx_XGIVEREF(__pyx_r);
25285 __Pyx_RefNannyFinishContext();
25290 static PyObject *__pyx_pw_8PyClical_69sinh(PyObject *__pyx_self,
25291 #
if CYTHON_METH_FASTCALL
25292 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25294 PyObject *__pyx_args, PyObject *__pyx_kwds
25297 PyDoc_STRVAR(__pyx_doc_8PyClical_68sinh,
"\n Hyperbolic sine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/2; print(sinh(x))\n {1,2}\n >>> x=clifford(\"{1,2}\") * pi/6; print(sinh(x))\n 0.5{1,2}\n ");
25298 static PyMethodDef __pyx_mdef_8PyClical_69sinh = {
"sinh", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_69sinh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_68sinh};
25299 static PyObject *__pyx_pw_8PyClical_69sinh(PyObject *__pyx_self,
25300 #
if CYTHON_METH_FASTCALL
25301 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25303 PyObject *__pyx_args, PyObject *__pyx_kwds
25306 PyObject *__pyx_v_obj = 0;
25307 #if !CYTHON_METH_FASTCALL 25308 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25310 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
25311 PyObject* values[1] = {0};
25312 int __pyx_lineno = 0;
25313 const char *__pyx_filename = NULL;
25314 int __pyx_clineno = 0;
25315 PyObject *__pyx_r = 0;
25316 __Pyx_RefNannyDeclarations
25317 __Pyx_RefNannySetupContext(
"sinh (wrapper)", 0);
25318 #if !CYTHON_METH_FASTCALL 25319 #if CYTHON_ASSUME_SAFE_MACROS 25320 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25322 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
25325 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25327 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
25329 Py_ssize_t kw_args;
25330 switch (__pyx_nargs) {
25331 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25332 CYTHON_FALLTHROUGH;
25334 default:
goto __pyx_L5_argtuple_error;
25336 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
25337 switch (__pyx_nargs) {
25339 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
25340 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
25343 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1831, __pyx_L3_error)
25344 else goto __pyx_L5_argtuple_error;
25346 if (unlikely(kw_args > 0)) {
25347 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25348 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"sinh") < 0)) __PYX_ERR(0, 1831, __pyx_L3_error)
25350 }
else if (unlikely(__pyx_nargs != 1)) {
25351 goto __pyx_L5_argtuple_error;
25353 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25355 __pyx_v_obj = values[0];
25357 goto __pyx_L6_skip;
25358 __pyx_L5_argtuple_error:;
25359 __Pyx_RaiseArgtupleInvalid(
"sinh", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1831, __pyx_L3_error)
25361 goto __pyx_L4_argument_unpacking_done;
25364 Py_ssize_t __pyx_temp;
25365 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
25366 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25369 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25370 __Pyx_RefNannyFinishContext();
25372 __pyx_L4_argument_unpacking_done:;
25373 __pyx_r = __pyx_pf_8PyClical_68sinh(__pyx_self, __pyx_v_obj);
25377 Py_ssize_t __pyx_temp;
25378 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
25379 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25382 __Pyx_RefNannyFinishContext();
25386 static PyObject *__pyx_pf_8PyClical_68sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
25387 PyObject *__pyx_r = NULL;
25388 __Pyx_RefNannyDeclarations
25389 PyObject *__pyx_t_1 = NULL;
25390 int __pyx_lineno = 0;
25391 const char *__pyx_filename = NULL;
25392 int __pyx_clineno = 0;
25393 __Pyx_RefNannySetupContext(
"sinh", 1);
25394 __Pyx_XDECREF(__pyx_r);
25395 __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
25396 __Pyx_GOTREF(__pyx_t_1);
25397 __pyx_r = __pyx_t_1;
25403 __Pyx_XDECREF(__pyx_t_1);
25404 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25407 __Pyx_XGIVEREF(__pyx_r);
25408 __Pyx_RefNannyFinishContext();
25420 static PyObject *__pyx_pw_8PyClical_71asinh(PyObject *__pyx_self,
25421 #
if CYTHON_METH_FASTCALL
25422 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25424 PyObject *__pyx_args, PyObject *__pyx_kwds
25427 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args) {
25428 PyObject *__pyx_v_i = ((PyObject *)Py_None);
25429 PyObject *__pyx_r = NULL;
25430 __Pyx_RefNannyDeclarations
25432 PyObject *__pyx_t_2 = NULL;
25436 PyObject *__pyx_t_6 = NULL;
25437 PyObject *__pyx_t_7 = NULL;
25438 PyObject *__pyx_t_8 = NULL;
25439 PyObject *__pyx_t_9 = NULL;
25440 PyObject *__pyx_t_10 = NULL;
25442 PyObject *__pyx_t_12 = NULL;
25443 PyObject *__pyx_t_13 = NULL;
25444 int __pyx_lineno = 0;
25445 const char *__pyx_filename = NULL;
25446 int __pyx_clineno = 0;
25447 __Pyx_RefNannySetupContext(
"asinh", 1);
25448 if (__pyx_optional_args) {
25449 if (__pyx_optional_args->__pyx_n > 0) {
25450 __pyx_v_i = __pyx_optional_args->i;
25461 __pyx_t_1 = (__pyx_v_i != Py_None);
25471 __Pyx_XDECREF(__pyx_r);
25472 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
25473 __Pyx_GOTREF(__pyx_t_2);
25474 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1857, __pyx_L1_error)
25475 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1857, __pyx_L1_error)
25477 __pyx_t_5 =
asinh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
25479 __Pyx_CppExn2PyErr();
25480 __PYX_ERR(0, 1857, __pyx_L1_error)
25482 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1857, __pyx_L1_error)
25483 __Pyx_GOTREF(__pyx_t_6);
25484 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25485 __pyx_r = __pyx_t_6;
25507 __Pyx_PyThreadState_declare
25508 __Pyx_PyThreadState_assign
25509 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
25510 __Pyx_XGOTREF(__pyx_t_7);
25511 __Pyx_XGOTREF(__pyx_t_8);
25512 __Pyx_XGOTREF(__pyx_t_9);
25522 __Pyx_XDECREF(__pyx_r);
25523 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L4_error)
25524 __Pyx_GOTREF(__pyx_t_2);
25525 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asinh);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1860, __pyx_L4_error)
25526 __Pyx_GOTREF(__pyx_t_10);
25527 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25530 #if CYTHON_UNPACK_METHODS 25531 if (unlikely(PyMethod_Check(__pyx_t_10))) {
25532 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
25533 if (likely(__pyx_t_2)) {
25534 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
25535 __Pyx_INCREF(__pyx_t_2);
25536 __Pyx_INCREF(
function);
25537 __Pyx_DECREF_SET(__pyx_t_10,
function);
25543 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
25544 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
25545 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25546 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1860, __pyx_L4_error)
25547 __Pyx_GOTREF(__pyx_t_6);
25548 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25550 __pyx_r = __pyx_t_6;
25552 goto __pyx_L8_try_return;
25563 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25564 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25565 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25575 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25576 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1861, __pyx_L6_except_error)
25577 __Pyx_XGOTREF(__pyx_t_6);
25578 __Pyx_XGOTREF(__pyx_t_10);
25579 __Pyx_XGOTREF(__pyx_t_2);
25588 __Pyx_XDECREF(__pyx_r);
25589 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1862, __pyx_L6_except_error)
25590 __Pyx_GOTREF(__pyx_t_12);
25591 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1862, __pyx_L6_except_error)
25592 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
asinh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1862, __pyx_L6_except_error)
25593 __Pyx_GOTREF(__pyx_t_13);
25594 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25595 __pyx_r = __pyx_t_13;
25597 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25598 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25599 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25600 goto __pyx_L7_except_return;
25610 __pyx_L6_except_error:;
25611 __Pyx_XGIVEREF(__pyx_t_7);
25612 __Pyx_XGIVEREF(__pyx_t_8);
25613 __Pyx_XGIVEREF(__pyx_t_9);
25614 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
25615 goto __pyx_L1_error;
25616 __pyx_L8_try_return:;
25617 __Pyx_XGIVEREF(__pyx_t_7);
25618 __Pyx_XGIVEREF(__pyx_t_8);
25619 __Pyx_XGIVEREF(__pyx_t_9);
25620 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
25622 __pyx_L7_except_return:;
25623 __Pyx_XGIVEREF(__pyx_t_7);
25624 __Pyx_XGIVEREF(__pyx_t_8);
25625 __Pyx_XGIVEREF(__pyx_t_9);
25626 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
25641 __Pyx_XDECREF(__pyx_t_2);
25642 __Pyx_XDECREF(__pyx_t_6);
25643 __Pyx_XDECREF(__pyx_t_10);
25644 __Pyx_XDECREF(__pyx_t_12);
25645 __Pyx_XDECREF(__pyx_t_13);
25646 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25649 __Pyx_XGIVEREF(__pyx_r);
25650 __Pyx_RefNannyFinishContext();
25655 static PyObject *__pyx_pw_8PyClical_71asinh(PyObject *__pyx_self,
25656 #
if CYTHON_METH_FASTCALL
25657 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25659 PyObject *__pyx_args, PyObject *__pyx_kwds
25662 PyDoc_STRVAR(__pyx_doc_8PyClical_70asinh,
"\n Inverse hyperbolic sine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(asinh(x,\"{1,2,3}\") * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(asinh(x) * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\") / 2; print(asinh(x) * 6/pi)\n {1,2}\n ");
25663 static PyMethodDef __pyx_mdef_8PyClical_71asinh = {
"asinh", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_71asinh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_70asinh};
25664 static PyObject *__pyx_pw_8PyClical_71asinh(PyObject *__pyx_self,
25665 #
if CYTHON_METH_FASTCALL
25666 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25668 PyObject *__pyx_args, PyObject *__pyx_kwds
25671 PyObject *__pyx_v_obj = 0;
25672 PyObject *__pyx_v_i = 0;
25673 #if !CYTHON_METH_FASTCALL 25674 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25676 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
25677 PyObject* values[2] = {0,0};
25678 int __pyx_lineno = 0;
25679 const char *__pyx_filename = NULL;
25680 int __pyx_clineno = 0;
25681 PyObject *__pyx_r = 0;
25682 __Pyx_RefNannyDeclarations
25683 __Pyx_RefNannySetupContext(
"asinh (wrapper)", 0);
25684 #if !CYTHON_METH_FASTCALL 25685 #if CYTHON_ASSUME_SAFE_MACROS 25686 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25688 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
25691 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25693 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
25694 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
25696 Py_ssize_t kw_args;
25697 switch (__pyx_nargs) {
25698 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
25699 CYTHON_FALLTHROUGH;
25700 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25701 CYTHON_FALLTHROUGH;
25703 default:
goto __pyx_L5_argtuple_error;
25705 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
25706 switch (__pyx_nargs) {
25708 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
25709 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
25712 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1845, __pyx_L3_error)
25713 else goto __pyx_L5_argtuple_error;
25714 CYTHON_FALLTHROUGH;
25717 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
25718 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
25719 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1845, __pyx_L3_error)
25722 if (unlikely(kw_args > 0)) {
25723 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25724 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"asinh") < 0)) __PYX_ERR(0, 1845, __pyx_L3_error)
25727 switch (__pyx_nargs) {
25728 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
25729 CYTHON_FALLTHROUGH;
25730 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25732 default:
goto __pyx_L5_argtuple_error;
25735 __pyx_v_obj = values[0];
25736 __pyx_v_i = values[1];
25738 goto __pyx_L6_skip;
25739 __pyx_L5_argtuple_error:;
25740 __Pyx_RaiseArgtupleInvalid(
"asinh", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1845, __pyx_L3_error)
25742 goto __pyx_L4_argument_unpacking_done;
25745 Py_ssize_t __pyx_temp;
25746 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
25747 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25750 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25751 __Pyx_RefNannyFinishContext();
25753 __pyx_L4_argument_unpacking_done:;
25754 __pyx_r = __pyx_pf_8PyClical_70asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
25758 Py_ssize_t __pyx_temp;
25759 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
25760 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25763 __Pyx_RefNannyFinishContext();
25767 static PyObject *__pyx_pf_8PyClical_70asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
25768 PyObject *__pyx_r = NULL;
25769 __Pyx_RefNannyDeclarations
25770 PyObject *__pyx_t_1 = NULL;
25771 struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
25772 int __pyx_lineno = 0;
25773 const char *__pyx_filename = NULL;
25774 int __pyx_clineno = 0;
25775 __Pyx_RefNannySetupContext(
"asinh", 1);
25776 __Pyx_XDECREF(__pyx_r);
25777 __pyx_t_2.__pyx_n = 1;
25778 __pyx_t_2.i = __pyx_v_i;
25779 __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
25780 __Pyx_GOTREF(__pyx_t_1);
25781 __pyx_r = __pyx_t_1;
25787 __Pyx_XDECREF(__pyx_t_1);
25788 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
25791 __Pyx_XGIVEREF(__pyx_r);
25792 __Pyx_RefNannyFinishContext();
25804 static PyObject *__pyx_pw_8PyClical_73tan(PyObject *__pyx_self,
25805 #
if CYTHON_METH_FASTCALL
25806 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25808 PyObject *__pyx_args, PyObject *__pyx_kwds
25811 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args) {
25812 PyObject *__pyx_v_i = ((PyObject *)Py_None);
25813 PyObject *__pyx_r = NULL;
25814 __Pyx_RefNannyDeclarations
25816 PyObject *__pyx_t_2 = NULL;
25820 PyObject *__pyx_t_6 = NULL;
25821 PyObject *__pyx_t_7 = NULL;
25822 PyObject *__pyx_t_8 = NULL;
25823 PyObject *__pyx_t_9 = NULL;
25824 PyObject *__pyx_t_10 = NULL;
25826 PyObject *__pyx_t_12 = NULL;
25827 PyObject *__pyx_t_13 = NULL;
25828 int __pyx_lineno = 0;
25829 const char *__pyx_filename = NULL;
25830 int __pyx_clineno = 0;
25831 __Pyx_RefNannySetupContext(
"tan", 1);
25832 if (__pyx_optional_args) {
25833 if (__pyx_optional_args->__pyx_n > 0) {
25834 __pyx_v_i = __pyx_optional_args->i;
25845 __pyx_t_1 = (__pyx_v_i != Py_None);
25855 __Pyx_XDECREF(__pyx_r);
25856 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __pyx_L1_error)
25857 __Pyx_GOTREF(__pyx_t_2);
25858 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L1_error)
25859 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L1_error)
25861 __pyx_t_5 =
tan(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
25863 __Pyx_CppExn2PyErr();
25864 __PYX_ERR(0, 1874, __pyx_L1_error)
25866 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1874, __pyx_L1_error)
25867 __Pyx_GOTREF(__pyx_t_6);
25868 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25869 __pyx_r = __pyx_t_6;
25891 __Pyx_PyThreadState_declare
25892 __Pyx_PyThreadState_assign
25893 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
25894 __Pyx_XGOTREF(__pyx_t_7);
25895 __Pyx_XGOTREF(__pyx_t_8);
25896 __Pyx_XGOTREF(__pyx_t_9);
25906 __Pyx_XDECREF(__pyx_r);
25907 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L4_error)
25908 __Pyx_GOTREF(__pyx_t_2);
25909 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tan);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1877, __pyx_L4_error)
25910 __Pyx_GOTREF(__pyx_t_10);
25911 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25914 #if CYTHON_UNPACK_METHODS 25915 if (unlikely(PyMethod_Check(__pyx_t_10))) {
25916 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
25917 if (likely(__pyx_t_2)) {
25918 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
25919 __Pyx_INCREF(__pyx_t_2);
25920 __Pyx_INCREF(
function);
25921 __Pyx_DECREF_SET(__pyx_t_10,
function);
25927 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
25928 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
25929 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25930 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1877, __pyx_L4_error)
25931 __Pyx_GOTREF(__pyx_t_6);
25932 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25934 __pyx_r = __pyx_t_6;
25936 goto __pyx_L8_try_return;
25947 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25948 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25949 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25959 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
25960 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1878, __pyx_L6_except_error)
25961 __Pyx_XGOTREF(__pyx_t_6);
25962 __Pyx_XGOTREF(__pyx_t_10);
25963 __Pyx_XGOTREF(__pyx_t_2);
25972 __Pyx_XDECREF(__pyx_r);
25973 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1879, __pyx_L6_except_error)
25974 __Pyx_GOTREF(__pyx_t_12);
25975 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1879, __pyx_L6_except_error)
25976 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
tan(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1879, __pyx_L6_except_error)
25977 __Pyx_GOTREF(__pyx_t_13);
25978 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25979 __pyx_r = __pyx_t_13;
25981 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25982 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25983 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25984 goto __pyx_L7_except_return;
25994 __pyx_L6_except_error:;
25995 __Pyx_XGIVEREF(__pyx_t_7);
25996 __Pyx_XGIVEREF(__pyx_t_8);
25997 __Pyx_XGIVEREF(__pyx_t_9);
25998 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
25999 goto __pyx_L1_error;
26000 __pyx_L8_try_return:;
26001 __Pyx_XGIVEREF(__pyx_t_7);
26002 __Pyx_XGIVEREF(__pyx_t_8);
26003 __Pyx_XGIVEREF(__pyx_t_9);
26004 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
26006 __pyx_L7_except_return:;
26007 __Pyx_XGIVEREF(__pyx_t_7);
26008 __Pyx_XGIVEREF(__pyx_t_8);
26009 __Pyx_XGIVEREF(__pyx_t_9);
26010 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
26025 __Pyx_XDECREF(__pyx_t_2);
26026 __Pyx_XDECREF(__pyx_t_6);
26027 __Pyx_XDECREF(__pyx_t_10);
26028 __Pyx_XDECREF(__pyx_t_12);
26029 __Pyx_XDECREF(__pyx_t_13);
26030 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26033 __Pyx_XGIVEREF(__pyx_r);
26034 __Pyx_RefNannyFinishContext();
26039 static PyObject *__pyx_pw_8PyClical_73tan(PyObject *__pyx_self,
26040 #
if CYTHON_METH_FASTCALL
26041 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26043 PyObject *__pyx_args, PyObject *__pyx_kwds
26046 PyDoc_STRVAR(__pyx_doc_8PyClical_72tan,
"\n Tangent of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(tan(x,\"{1,2,3}\"))\n 0.7616{1,2}\n >>> x=clifford(\"{1,2}\"); print(tan(x))\n 0.7616{1,2}\n ");
26047 static PyMethodDef __pyx_mdef_8PyClical_73tan = {
"tan", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_73tan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_72tan};
26048 static PyObject *__pyx_pw_8PyClical_73tan(PyObject *__pyx_self,
26049 #
if CYTHON_METH_FASTCALL
26050 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26052 PyObject *__pyx_args, PyObject *__pyx_kwds
26055 PyObject *__pyx_v_obj = 0;
26056 PyObject *__pyx_v_i = 0;
26057 #if !CYTHON_METH_FASTCALL 26058 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26060 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
26061 PyObject* values[2] = {0,0};
26062 int __pyx_lineno = 0;
26063 const char *__pyx_filename = NULL;
26064 int __pyx_clineno = 0;
26065 PyObject *__pyx_r = 0;
26066 __Pyx_RefNannyDeclarations
26067 __Pyx_RefNannySetupContext(
"tan (wrapper)", 0);
26068 #if !CYTHON_METH_FASTCALL 26069 #if CYTHON_ASSUME_SAFE_MACROS 26070 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26072 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
26075 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26077 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
26078 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
26080 Py_ssize_t kw_args;
26081 switch (__pyx_nargs) {
26082 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
26083 CYTHON_FALLTHROUGH;
26084 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26085 CYTHON_FALLTHROUGH;
26087 default:
goto __pyx_L5_argtuple_error;
26089 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
26090 switch (__pyx_nargs) {
26092 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
26093 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
26096 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1864, __pyx_L3_error)
26097 else goto __pyx_L5_argtuple_error;
26098 CYTHON_FALLTHROUGH;
26101 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
26102 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
26103 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1864, __pyx_L3_error)
26106 if (unlikely(kw_args > 0)) {
26107 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26108 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"tan") < 0)) __PYX_ERR(0, 1864, __pyx_L3_error)
26111 switch (__pyx_nargs) {
26112 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
26113 CYTHON_FALLTHROUGH;
26114 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26116 default:
goto __pyx_L5_argtuple_error;
26119 __pyx_v_obj = values[0];
26120 __pyx_v_i = values[1];
26122 goto __pyx_L6_skip;
26123 __pyx_L5_argtuple_error:;
26124 __Pyx_RaiseArgtupleInvalid(
"tan", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1864, __pyx_L3_error)
26126 goto __pyx_L4_argument_unpacking_done;
26129 Py_ssize_t __pyx_temp;
26130 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
26131 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26134 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26135 __Pyx_RefNannyFinishContext();
26137 __pyx_L4_argument_unpacking_done:;
26138 __pyx_r = __pyx_pf_8PyClical_72tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
26142 Py_ssize_t __pyx_temp;
26143 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
26144 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26147 __Pyx_RefNannyFinishContext();
26151 static PyObject *__pyx_pf_8PyClical_72tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
26152 PyObject *__pyx_r = NULL;
26153 __Pyx_RefNannyDeclarations
26154 PyObject *__pyx_t_1 = NULL;
26155 struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
26156 int __pyx_lineno = 0;
26157 const char *__pyx_filename = NULL;
26158 int __pyx_clineno = 0;
26159 __Pyx_RefNannySetupContext(
"tan", 1);
26160 __Pyx_XDECREF(__pyx_r);
26161 __pyx_t_2.__pyx_n = 1;
26162 __pyx_t_2.i = __pyx_v_i;
26163 __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1864, __pyx_L1_error)
26164 __Pyx_GOTREF(__pyx_t_1);
26165 __pyx_r = __pyx_t_1;
26171 __Pyx_XDECREF(__pyx_t_1);
26172 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26175 __Pyx_XGIVEREF(__pyx_r);
26176 __Pyx_RefNannyFinishContext();
26188 static PyObject *__pyx_pw_8PyClical_75atan(PyObject *__pyx_self,
26189 #
if CYTHON_METH_FASTCALL
26190 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26192 PyObject *__pyx_args, PyObject *__pyx_kwds
26195 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args) {
26196 PyObject *__pyx_v_i = ((PyObject *)Py_None);
26197 PyObject *__pyx_r = NULL;
26198 __Pyx_RefNannyDeclarations
26200 PyObject *__pyx_t_2 = NULL;
26204 PyObject *__pyx_t_6 = NULL;
26205 PyObject *__pyx_t_7 = NULL;
26206 PyObject *__pyx_t_8 = NULL;
26207 PyObject *__pyx_t_9 = NULL;
26208 PyObject *__pyx_t_10 = NULL;
26210 PyObject *__pyx_t_12 = NULL;
26211 PyObject *__pyx_t_13 = NULL;
26212 int __pyx_lineno = 0;
26213 const char *__pyx_filename = NULL;
26214 int __pyx_clineno = 0;
26215 __Pyx_RefNannySetupContext(
"atan", 1);
26216 if (__pyx_optional_args) {
26217 if (__pyx_optional_args->__pyx_n > 0) {
26218 __pyx_v_i = __pyx_optional_args->i;
26229 __pyx_t_1 = (__pyx_v_i != Py_None);
26239 __Pyx_XDECREF(__pyx_r);
26240 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1891, __pyx_L1_error)
26241 __Pyx_GOTREF(__pyx_t_2);
26242 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1891, __pyx_L1_error)
26243 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1891, __pyx_L1_error)
26245 __pyx_t_5 =
atan(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
26247 __Pyx_CppExn2PyErr();
26248 __PYX_ERR(0, 1891, __pyx_L1_error)
26250 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1891, __pyx_L1_error)
26251 __Pyx_GOTREF(__pyx_t_6);
26252 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26253 __pyx_r = __pyx_t_6;
26275 __Pyx_PyThreadState_declare
26276 __Pyx_PyThreadState_assign
26277 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
26278 __Pyx_XGOTREF(__pyx_t_7);
26279 __Pyx_XGOTREF(__pyx_t_8);
26280 __Pyx_XGOTREF(__pyx_t_9);
26290 __Pyx_XDECREF(__pyx_r);
26291 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1894, __pyx_L4_error)
26292 __Pyx_GOTREF(__pyx_t_2);
26293 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_atan);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1894, __pyx_L4_error)
26294 __Pyx_GOTREF(__pyx_t_10);
26295 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26298 #if CYTHON_UNPACK_METHODS 26299 if (unlikely(PyMethod_Check(__pyx_t_10))) {
26300 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
26301 if (likely(__pyx_t_2)) {
26302 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
26303 __Pyx_INCREF(__pyx_t_2);
26304 __Pyx_INCREF(
function);
26305 __Pyx_DECREF_SET(__pyx_t_10,
function);
26311 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
26312 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
26313 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26314 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1894, __pyx_L4_error)
26315 __Pyx_GOTREF(__pyx_t_6);
26316 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
26318 __pyx_r = __pyx_t_6;
26320 goto __pyx_L8_try_return;
26331 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
26332 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26333 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
26343 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26344 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1895, __pyx_L6_except_error)
26345 __Pyx_XGOTREF(__pyx_t_6);
26346 __Pyx_XGOTREF(__pyx_t_10);
26347 __Pyx_XGOTREF(__pyx_t_2);
26356 __Pyx_XDECREF(__pyx_r);
26357 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1896, __pyx_L6_except_error)
26358 __Pyx_GOTREF(__pyx_t_12);
26359 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1896, __pyx_L6_except_error)
26360 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
atan(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1896, __pyx_L6_except_error)
26361 __Pyx_GOTREF(__pyx_t_13);
26362 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26363 __pyx_r = __pyx_t_13;
26365 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26366 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26367 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
26368 goto __pyx_L7_except_return;
26378 __pyx_L6_except_error:;
26379 __Pyx_XGIVEREF(__pyx_t_7);
26380 __Pyx_XGIVEREF(__pyx_t_8);
26381 __Pyx_XGIVEREF(__pyx_t_9);
26382 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
26383 goto __pyx_L1_error;
26384 __pyx_L8_try_return:;
26385 __Pyx_XGIVEREF(__pyx_t_7);
26386 __Pyx_XGIVEREF(__pyx_t_8);
26387 __Pyx_XGIVEREF(__pyx_t_9);
26388 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
26390 __pyx_L7_except_return:;
26391 __Pyx_XGIVEREF(__pyx_t_7);
26392 __Pyx_XGIVEREF(__pyx_t_8);
26393 __Pyx_XGIVEREF(__pyx_t_9);
26394 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
26409 __Pyx_XDECREF(__pyx_t_2);
26410 __Pyx_XDECREF(__pyx_t_6);
26411 __Pyx_XDECREF(__pyx_t_10);
26412 __Pyx_XDECREF(__pyx_t_12);
26413 __Pyx_XDECREF(__pyx_t_13);
26414 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26417 __Pyx_XGIVEREF(__pyx_r);
26418 __Pyx_RefNannyFinishContext();
26423 static PyObject *__pyx_pw_8PyClical_75atan(PyObject *__pyx_self,
26424 #
if CYTHON_METH_FASTCALL
26425 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26427 PyObject *__pyx_args, PyObject *__pyx_kwds
26430 PyDoc_STRVAR(__pyx_doc_8PyClical_74atan,
"\n Inverse tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1}\"); print(tan(atan(x,s),s))\n {1}\n >>> x=clifford(\"{1}\"); print(tan(atan(x)))\n {1}\n ");
26431 static PyMethodDef __pyx_mdef_8PyClical_75atan = {
"atan", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_75atan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_74atan};
26432 static PyObject *__pyx_pw_8PyClical_75atan(PyObject *__pyx_self,
26433 #
if CYTHON_METH_FASTCALL
26434 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26436 PyObject *__pyx_args, PyObject *__pyx_kwds
26439 PyObject *__pyx_v_obj = 0;
26440 PyObject *__pyx_v_i = 0;
26441 #if !CYTHON_METH_FASTCALL 26442 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26444 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
26445 PyObject* values[2] = {0,0};
26446 int __pyx_lineno = 0;
26447 const char *__pyx_filename = NULL;
26448 int __pyx_clineno = 0;
26449 PyObject *__pyx_r = 0;
26450 __Pyx_RefNannyDeclarations
26451 __Pyx_RefNannySetupContext(
"atan (wrapper)", 0);
26452 #if !CYTHON_METH_FASTCALL 26453 #if CYTHON_ASSUME_SAFE_MACROS 26454 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26456 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
26459 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26461 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
26462 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
26464 Py_ssize_t kw_args;
26465 switch (__pyx_nargs) {
26466 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
26467 CYTHON_FALLTHROUGH;
26468 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26469 CYTHON_FALLTHROUGH;
26471 default:
goto __pyx_L5_argtuple_error;
26473 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
26474 switch (__pyx_nargs) {
26476 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
26477 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
26480 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L3_error)
26481 else goto __pyx_L5_argtuple_error;
26482 CYTHON_FALLTHROUGH;
26485 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
26486 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
26487 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L3_error)
26490 if (unlikely(kw_args > 0)) {
26491 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26492 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"atan") < 0)) __PYX_ERR(0, 1881, __pyx_L3_error)
26495 switch (__pyx_nargs) {
26496 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
26497 CYTHON_FALLTHROUGH;
26498 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26500 default:
goto __pyx_L5_argtuple_error;
26503 __pyx_v_obj = values[0];
26504 __pyx_v_i = values[1];
26506 goto __pyx_L6_skip;
26507 __pyx_L5_argtuple_error:;
26508 __Pyx_RaiseArgtupleInvalid(
"atan", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1881, __pyx_L3_error)
26510 goto __pyx_L4_argument_unpacking_done;
26513 Py_ssize_t __pyx_temp;
26514 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
26515 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26518 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26519 __Pyx_RefNannyFinishContext();
26521 __pyx_L4_argument_unpacking_done:;
26522 __pyx_r = __pyx_pf_8PyClical_74atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
26526 Py_ssize_t __pyx_temp;
26527 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
26528 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26531 __Pyx_RefNannyFinishContext();
26535 static PyObject *__pyx_pf_8PyClical_74atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
26536 PyObject *__pyx_r = NULL;
26537 __Pyx_RefNannyDeclarations
26538 PyObject *__pyx_t_1 = NULL;
26539 struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
26540 int __pyx_lineno = 0;
26541 const char *__pyx_filename = NULL;
26542 int __pyx_clineno = 0;
26543 __Pyx_RefNannySetupContext(
"atan", 1);
26544 __Pyx_XDECREF(__pyx_r);
26545 __pyx_t_2.__pyx_n = 1;
26546 __pyx_t_2.i = __pyx_v_i;
26547 __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error)
26548 __Pyx_GOTREF(__pyx_t_1);
26549 __pyx_r = __pyx_t_1;
26555 __Pyx_XDECREF(__pyx_t_1);
26556 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
26559 __Pyx_XGIVEREF(__pyx_r);
26560 __Pyx_RefNannyFinishContext();
26572 static PyObject *__pyx_pw_8PyClical_77tanh(PyObject *__pyx_self,
26573 #
if CYTHON_METH_FASTCALL
26574 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26576 PyObject *__pyx_args, PyObject *__pyx_kwds
26579 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
26580 PyObject *__pyx_r = NULL;
26581 __Pyx_RefNannyDeclarations
26582 PyObject *__pyx_t_1 = NULL;
26583 PyObject *__pyx_t_2 = NULL;
26584 PyObject *__pyx_t_3 = NULL;
26585 PyObject *__pyx_t_4 = NULL;
26586 PyObject *__pyx_t_5 = NULL;
26587 PyObject *__pyx_t_6 = NULL;
26589 PyObject *__pyx_t_8 = NULL;
26591 PyObject *__pyx_t_10 = NULL;
26592 int __pyx_lineno = 0;
26593 const char *__pyx_filename = NULL;
26594 int __pyx_clineno = 0;
26595 __Pyx_RefNannySetupContext(
"tanh", 1);
26605 __Pyx_PyThreadState_declare
26606 __Pyx_PyThreadState_assign
26607 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
26608 __Pyx_XGOTREF(__pyx_t_1);
26609 __Pyx_XGOTREF(__pyx_t_2);
26610 __Pyx_XGOTREF(__pyx_t_3);
26620 __Pyx_XDECREF(__pyx_r);
26621 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1906, __pyx_L3_error)
26622 __Pyx_GOTREF(__pyx_t_5);
26623 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1906, __pyx_L3_error)
26624 __Pyx_GOTREF(__pyx_t_6);
26625 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
26628 #if CYTHON_UNPACK_METHODS 26629 if (unlikely(PyMethod_Check(__pyx_t_6))) {
26630 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
26631 if (likely(__pyx_t_5)) {
26632 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
26633 __Pyx_INCREF(__pyx_t_5);
26634 __Pyx_INCREF(
function);
26635 __Pyx_DECREF_SET(__pyx_t_6,
function);
26641 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_obj};
26642 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
26643 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26644 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1906, __pyx_L3_error)
26645 __Pyx_GOTREF(__pyx_t_4);
26646 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26648 __pyx_r = __pyx_t_4;
26650 goto __pyx_L7_try_return;
26661 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
26662 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26663 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
26673 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
26674 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1907, __pyx_L5_except_error)
26675 __Pyx_XGOTREF(__pyx_t_4);
26676 __Pyx_XGOTREF(__pyx_t_6);
26677 __Pyx_XGOTREF(__pyx_t_5);
26686 __Pyx_XDECREF(__pyx_r);
26687 __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1908, __pyx_L5_except_error)
26688 __Pyx_GOTREF(__pyx_t_8);
26689 __pyx_t_9 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L5_except_error)
26690 __pyx_t_10 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_8),
tanh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9)));
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1908, __pyx_L5_except_error)
26691 __Pyx_GOTREF(__pyx_t_10);
26692 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
26693 __pyx_r = __pyx_t_10;
26695 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26696 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
26697 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26698 goto __pyx_L6_except_return;
26708 __pyx_L5_except_error:;
26709 __Pyx_XGIVEREF(__pyx_t_1);
26710 __Pyx_XGIVEREF(__pyx_t_2);
26711 __Pyx_XGIVEREF(__pyx_t_3);
26712 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
26713 goto __pyx_L1_error;
26714 __pyx_L7_try_return:;
26715 __Pyx_XGIVEREF(__pyx_t_1);
26716 __Pyx_XGIVEREF(__pyx_t_2);
26717 __Pyx_XGIVEREF(__pyx_t_3);
26718 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
26720 __pyx_L6_except_return:;
26721 __Pyx_XGIVEREF(__pyx_t_1);
26722 __Pyx_XGIVEREF(__pyx_t_2);
26723 __Pyx_XGIVEREF(__pyx_t_3);
26724 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
26738 __Pyx_XDECREF(__pyx_t_4);
26739 __Pyx_XDECREF(__pyx_t_5);
26740 __Pyx_XDECREF(__pyx_t_6);
26741 __Pyx_XDECREF(__pyx_t_8);
26742 __Pyx_XDECREF(__pyx_t_10);
26743 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
26746 __Pyx_XGIVEREF(__pyx_r);
26747 __Pyx_RefNannyFinishContext();
26752 static PyObject *__pyx_pw_8PyClical_77tanh(PyObject *__pyx_self,
26753 #
if CYTHON_METH_FASTCALL
26754 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26756 PyObject *__pyx_args, PyObject *__pyx_kwds
26759 PyDoc_STRVAR(__pyx_doc_8PyClical_76tanh,
"\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(tanh(x))\n {1,2}\n ");
26760 static PyMethodDef __pyx_mdef_8PyClical_77tanh = {
"tanh", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_77tanh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_76tanh};
26761 static PyObject *__pyx_pw_8PyClical_77tanh(PyObject *__pyx_self,
26762 #
if CYTHON_METH_FASTCALL
26763 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26765 PyObject *__pyx_args, PyObject *__pyx_kwds
26768 PyObject *__pyx_v_obj = 0;
26769 #if !CYTHON_METH_FASTCALL 26770 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26772 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
26773 PyObject* values[1] = {0};
26774 int __pyx_lineno = 0;
26775 const char *__pyx_filename = NULL;
26776 int __pyx_clineno = 0;
26777 PyObject *__pyx_r = 0;
26778 __Pyx_RefNannyDeclarations
26779 __Pyx_RefNannySetupContext(
"tanh (wrapper)", 0);
26780 #if !CYTHON_METH_FASTCALL 26781 #if CYTHON_ASSUME_SAFE_MACROS 26782 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26784 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
26787 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26789 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
26791 Py_ssize_t kw_args;
26792 switch (__pyx_nargs) {
26793 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26794 CYTHON_FALLTHROUGH;
26796 default:
goto __pyx_L5_argtuple_error;
26798 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
26799 switch (__pyx_nargs) {
26801 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
26802 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
26805 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1898, __pyx_L3_error)
26806 else goto __pyx_L5_argtuple_error;
26808 if (unlikely(kw_args > 0)) {
26809 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26810 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"tanh") < 0)) __PYX_ERR(0, 1898, __pyx_L3_error)
26812 }
else if (unlikely(__pyx_nargs != 1)) {
26813 goto __pyx_L5_argtuple_error;
26815 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26817 __pyx_v_obj = values[0];
26819 goto __pyx_L6_skip;
26820 __pyx_L5_argtuple_error:;
26821 __Pyx_RaiseArgtupleInvalid(
"tanh", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1898, __pyx_L3_error)
26823 goto __pyx_L4_argument_unpacking_done;
26826 Py_ssize_t __pyx_temp;
26827 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
26828 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26831 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
26832 __Pyx_RefNannyFinishContext();
26834 __pyx_L4_argument_unpacking_done:;
26835 __pyx_r = __pyx_pf_8PyClical_76tanh(__pyx_self, __pyx_v_obj);
26839 Py_ssize_t __pyx_temp;
26840 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
26841 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26844 __Pyx_RefNannyFinishContext();
26848 static PyObject *__pyx_pf_8PyClical_76tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
26849 PyObject *__pyx_r = NULL;
26850 __Pyx_RefNannyDeclarations
26851 PyObject *__pyx_t_1 = NULL;
26852 int __pyx_lineno = 0;
26853 const char *__pyx_filename = NULL;
26854 int __pyx_clineno = 0;
26855 __Pyx_RefNannySetupContext(
"tanh", 1);
26856 __Pyx_XDECREF(__pyx_r);
26857 __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
26858 __Pyx_GOTREF(__pyx_t_1);
26859 __pyx_r = __pyx_t_1;
26865 __Pyx_XDECREF(__pyx_t_1);
26866 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
26869 __Pyx_XGIVEREF(__pyx_r);
26870 __Pyx_RefNannyFinishContext();
26882 static PyObject *__pyx_pw_8PyClical_79atanh(PyObject *__pyx_self,
26883 #
if CYTHON_METH_FASTCALL
26884 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26886 PyObject *__pyx_args, PyObject *__pyx_kwds
26889 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args) {
26890 PyObject *__pyx_v_i = ((PyObject *)Py_None);
26891 PyObject *__pyx_r = NULL;
26892 __Pyx_RefNannyDeclarations
26894 PyObject *__pyx_t_2 = NULL;
26898 PyObject *__pyx_t_6 = NULL;
26899 PyObject *__pyx_t_7 = NULL;
26900 PyObject *__pyx_t_8 = NULL;
26901 PyObject *__pyx_t_9 = NULL;
26902 PyObject *__pyx_t_10 = NULL;
26904 PyObject *__pyx_t_12 = NULL;
26905 PyObject *__pyx_t_13 = NULL;
26906 int __pyx_lineno = 0;
26907 const char *__pyx_filename = NULL;
26908 int __pyx_clineno = 0;
26909 __Pyx_RefNannySetupContext(
"atanh", 1);
26910 if (__pyx_optional_args) {
26911 if (__pyx_optional_args->__pyx_n > 0) {
26912 __pyx_v_i = __pyx_optional_args->i;
26923 __pyx_t_1 = (__pyx_v_i != Py_None);
26933 __Pyx_XDECREF(__pyx_r);
26934 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error)
26935 __Pyx_GOTREF(__pyx_t_2);
26936 __pyx_t_3 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1920, __pyx_L1_error)
26937 __pyx_t_4 = __pyx_f_8PyClical_toClifford(__pyx_v_i);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1920, __pyx_L1_error)
26939 __pyx_t_5 =
atanh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4));
26941 __Pyx_CppExn2PyErr();
26942 __PYX_ERR(0, 1920, __pyx_L1_error)
26944 __pyx_t_6 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
26945 __Pyx_GOTREF(__pyx_t_6);
26946 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26947 __pyx_r = __pyx_t_6;
26969 __Pyx_PyThreadState_declare
26970 __Pyx_PyThreadState_assign
26971 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
26972 __Pyx_XGOTREF(__pyx_t_7);
26973 __Pyx_XGOTREF(__pyx_t_8);
26974 __Pyx_XGOTREF(__pyx_t_9);
26984 __Pyx_XDECREF(__pyx_r);
26985 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L4_error)
26986 __Pyx_GOTREF(__pyx_t_2);
26987 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_atanh);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1923, __pyx_L4_error)
26988 __Pyx_GOTREF(__pyx_t_10);
26989 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26992 #if CYTHON_UNPACK_METHODS 26993 if (unlikely(PyMethod_Check(__pyx_t_10))) {
26994 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
26995 if (likely(__pyx_t_2)) {
26996 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_10);
26997 __Pyx_INCREF(__pyx_t_2);
26998 __Pyx_INCREF(
function);
26999 __Pyx_DECREF_SET(__pyx_t_10,
function);
27005 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
27006 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
27007 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27008 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1923, __pyx_L4_error)
27009 __Pyx_GOTREF(__pyx_t_6);
27010 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
27012 __pyx_r = __pyx_t_6;
27014 goto __pyx_L8_try_return;
27025 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
27026 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27027 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27037 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
27038 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(0, 1924, __pyx_L6_except_error)
27039 __Pyx_XGOTREF(__pyx_t_6);
27040 __Pyx_XGOTREF(__pyx_t_10);
27041 __Pyx_XGOTREF(__pyx_t_2);
27050 __Pyx_XDECREF(__pyx_r);
27051 __pyx_t_12 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1925, __pyx_L6_except_error)
27052 __Pyx_GOTREF(__pyx_t_12);
27053 __pyx_t_5 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1925, __pyx_L6_except_error)
27054 __pyx_t_13 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_12),
atanh(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)));
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1925, __pyx_L6_except_error)
27055 __Pyx_GOTREF(__pyx_t_13);
27056 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
27057 __pyx_r = __pyx_t_13;
27059 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27060 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27061 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
27062 goto __pyx_L7_except_return;
27072 __pyx_L6_except_error:;
27073 __Pyx_XGIVEREF(__pyx_t_7);
27074 __Pyx_XGIVEREF(__pyx_t_8);
27075 __Pyx_XGIVEREF(__pyx_t_9);
27076 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
27077 goto __pyx_L1_error;
27078 __pyx_L8_try_return:;
27079 __Pyx_XGIVEREF(__pyx_t_7);
27080 __Pyx_XGIVEREF(__pyx_t_8);
27081 __Pyx_XGIVEREF(__pyx_t_9);
27082 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
27084 __pyx_L7_except_return:;
27085 __Pyx_XGIVEREF(__pyx_t_7);
27086 __Pyx_XGIVEREF(__pyx_t_8);
27087 __Pyx_XGIVEREF(__pyx_t_9);
27088 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
27103 __Pyx_XDECREF(__pyx_t_2);
27104 __Pyx_XDECREF(__pyx_t_6);
27105 __Pyx_XDECREF(__pyx_t_10);
27106 __Pyx_XDECREF(__pyx_t_12);
27107 __Pyx_XDECREF(__pyx_t_13);
27108 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
27111 __Pyx_XGIVEREF(__pyx_r);
27112 __Pyx_RefNannyFinishContext();
27117 static PyObject *__pyx_pw_8PyClical_79atanh(PyObject *__pyx_self,
27118 #
if CYTHON_METH_FASTCALL
27119 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27121 PyObject *__pyx_args, PyObject *__pyx_kwds
27124 PyDoc_STRVAR(__pyx_doc_8PyClical_78atanh,
"\n Inverse hyperbolic tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1,2}\"); print(tanh(atanh(x,s)))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(tanh(atanh(x)))\n {1,2}\n ");
27125 static PyMethodDef __pyx_mdef_8PyClical_79atanh = {
"atanh", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_79atanh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_78atanh};
27126 static PyObject *__pyx_pw_8PyClical_79atanh(PyObject *__pyx_self,
27127 #
if CYTHON_METH_FASTCALL
27128 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27130 PyObject *__pyx_args, PyObject *__pyx_kwds
27133 PyObject *__pyx_v_obj = 0;
27134 PyObject *__pyx_v_i = 0;
27135 #if !CYTHON_METH_FASTCALL 27136 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27138 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
27139 PyObject* values[2] = {0,0};
27140 int __pyx_lineno = 0;
27141 const char *__pyx_filename = NULL;
27142 int __pyx_clineno = 0;
27143 PyObject *__pyx_r = 0;
27144 __Pyx_RefNannyDeclarations
27145 __Pyx_RefNannySetupContext(
"atanh (wrapper)", 0);
27146 #if !CYTHON_METH_FASTCALL 27147 #if CYTHON_ASSUME_SAFE_MACROS 27148 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27150 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
27153 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27155 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
27156 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
27158 Py_ssize_t kw_args;
27159 switch (__pyx_nargs) {
27160 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
27161 CYTHON_FALLTHROUGH;
27162 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27163 CYTHON_FALLTHROUGH;
27165 default:
goto __pyx_L5_argtuple_error;
27167 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
27168 switch (__pyx_nargs) {
27170 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
27171 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
27174 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1910, __pyx_L3_error)
27175 else goto __pyx_L5_argtuple_error;
27176 CYTHON_FALLTHROUGH;
27179 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i);
27180 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
27181 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1910, __pyx_L3_error)
27184 if (unlikely(kw_args > 0)) {
27185 const Py_ssize_t kwd_pos_args = __pyx_nargs;
27186 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"atanh") < 0)) __PYX_ERR(0, 1910, __pyx_L3_error)
27189 switch (__pyx_nargs) {
27190 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
27191 CYTHON_FALLTHROUGH;
27192 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27194 default:
goto __pyx_L5_argtuple_error;
27197 __pyx_v_obj = values[0];
27198 __pyx_v_i = values[1];
27200 goto __pyx_L6_skip;
27201 __pyx_L5_argtuple_error:;
27202 __Pyx_RaiseArgtupleInvalid(
"atanh", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1910, __pyx_L3_error)
27204 goto __pyx_L4_argument_unpacking_done;
27207 Py_ssize_t __pyx_temp;
27208 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27209 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27212 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
27213 __Pyx_RefNannyFinishContext();
27215 __pyx_L4_argument_unpacking_done:;
27216 __pyx_r = __pyx_pf_8PyClical_78atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
27220 Py_ssize_t __pyx_temp;
27221 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27222 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27225 __Pyx_RefNannyFinishContext();
27229 static PyObject *__pyx_pf_8PyClical_78atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
27230 PyObject *__pyx_r = NULL;
27231 __Pyx_RefNannyDeclarations
27232 PyObject *__pyx_t_1 = NULL;
27233 struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
27234 int __pyx_lineno = 0;
27235 const char *__pyx_filename = NULL;
27236 int __pyx_clineno = 0;
27237 __Pyx_RefNannySetupContext(
"atanh", 1);
27238 __Pyx_XDECREF(__pyx_r);
27239 __pyx_t_2.__pyx_n = 1;
27240 __pyx_t_2.i = __pyx_v_i;
27241 __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
27242 __Pyx_GOTREF(__pyx_t_1);
27243 __pyx_r = __pyx_t_1;
27249 __Pyx_XDECREF(__pyx_t_1);
27250 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
27253 __Pyx_XGIVEREF(__pyx_r);
27254 __Pyx_RefNannyFinishContext();
27266 static PyObject *__pyx_pw_8PyClical_81random_clifford(PyObject *__pyx_self,
27267 #
if CYTHON_METH_FASTCALL
27268 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27270 PyObject *__pyx_args, PyObject *__pyx_kwds
27273 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_random_clifford(
struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, CYTHON_UNUSED
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_random_clifford *__pyx_optional_args) {
27274 PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
27275 PyObject *__pyx_r = NULL;
27276 __Pyx_RefNannyDeclarations
27277 PyObject *__pyx_t_1 = NULL;
27278 PyObject *__pyx_t_2 = NULL;
27281 PyObject *__pyx_t_5 = NULL;
27282 int __pyx_lineno = 0;
27283 const char *__pyx_filename = NULL;
27284 int __pyx_clineno = 0;
27285 __Pyx_RefNannySetupContext(
"random_clifford", 1);
27286 if (__pyx_optional_args) {
27287 if (__pyx_optional_args->__pyx_n > 0) {
27288 __pyx_v_fill = __pyx_optional_args->fill;
27299 __Pyx_XDECREF(__pyx_r);
27300 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
27301 __Pyx_GOTREF(__pyx_t_1);
27302 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
27303 __Pyx_GOTREF(__pyx_t_2);
27304 __pyx_t_3 = __pyx_f_8PyClical_9index_set_unwrap(__pyx_v_ixt);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L1_error)
27305 __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_fill);
if (unlikely((__pyx_t_4 == ((
scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L1_error)
27306 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance->random(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), ((
scalar_t)__pyx_t_4)));
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1934, __pyx_L1_error)
27307 __Pyx_GOTREF(__pyx_t_5);
27308 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27309 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27310 __pyx_r = __pyx_t_5;
27324 __Pyx_XDECREF(__pyx_t_1);
27325 __Pyx_XDECREF(__pyx_t_2);
27326 __Pyx_XDECREF(__pyx_t_5);
27327 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
27330 __Pyx_XGIVEREF(__pyx_r);
27331 __Pyx_RefNannyFinishContext();
27336 static PyObject *__pyx_pw_8PyClical_81random_clifford(PyObject *__pyx_self,
27337 #
if CYTHON_METH_FASTCALL
27338 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27340 PyObject *__pyx_args, PyObject *__pyx_kwds
27343 PyDoc_STRVAR(__pyx_doc_8PyClical_80random_clifford,
"\n Random multivector within a frame.\n\n >>> print(random_clifford(index_set({-3,-1,2})).frame())\n {-3,-1,2}\n ");
27344 static PyMethodDef __pyx_mdef_8PyClical_81random_clifford = {
"random_clifford", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_81random_clifford, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_80random_clifford};
27345 static PyObject *__pyx_pw_8PyClical_81random_clifford(PyObject *__pyx_self,
27346 #
if CYTHON_METH_FASTCALL
27347 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27349 PyObject *__pyx_args, PyObject *__pyx_kwds
27352 struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
27353 PyObject *__pyx_v_fill = 0;
27354 #if !CYTHON_METH_FASTCALL 27355 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27357 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
27358 PyObject* values[2] = {0,0};
27359 int __pyx_lineno = 0;
27360 const char *__pyx_filename = NULL;
27361 int __pyx_clineno = 0;
27362 PyObject *__pyx_r = 0;
27363 __Pyx_RefNannyDeclarations
27364 __Pyx_RefNannySetupContext(
"random_clifford (wrapper)", 0);
27365 #if !CYTHON_METH_FASTCALL 27366 #if CYTHON_ASSUME_SAFE_MACROS 27367 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27369 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
27372 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27374 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
27375 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_1_0));
27377 Py_ssize_t kw_args;
27378 switch (__pyx_nargs) {
27379 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
27380 CYTHON_FALLTHROUGH;
27381 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27382 CYTHON_FALLTHROUGH;
27384 default:
goto __pyx_L5_argtuple_error;
27386 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
27387 switch (__pyx_nargs) {
27389 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ixt)) != 0)) {
27390 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
27393 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L3_error)
27394 else goto __pyx_L5_argtuple_error;
27395 CYTHON_FALLTHROUGH;
27398 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fill);
27399 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
27400 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L3_error)
27403 if (unlikely(kw_args > 0)) {
27404 const Py_ssize_t kwd_pos_args = __pyx_nargs;
27405 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"random_clifford") < 0)) __PYX_ERR(0, 1927, __pyx_L3_error)
27408 switch (__pyx_nargs) {
27409 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
27410 CYTHON_FALLTHROUGH;
27411 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27413 default:
goto __pyx_L5_argtuple_error;
27416 __pyx_v_ixt = ((
struct __pyx_obj_8PyClical_index_set *)values[0]);
27417 __pyx_v_fill = values[1];
27419 goto __pyx_L6_skip;
27420 __pyx_L5_argtuple_error:;
27421 __Pyx_RaiseArgtupleInvalid(
"random_clifford", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1927, __pyx_L3_error)
27423 goto __pyx_L4_argument_unpacking_done;
27426 Py_ssize_t __pyx_temp;
27427 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27428 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27431 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
27432 __Pyx_RefNannyFinishContext();
27434 __pyx_L4_argument_unpacking_done:;
27435 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1,
"ixt", 0))) __PYX_ERR(0, 1927, __pyx_L1_error)
27436 __pyx_r = __pyx_pf_8PyClical_80random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
27444 Py_ssize_t __pyx_temp;
27445 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27446 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27449 __Pyx_RefNannyFinishContext();
27453 static PyObject *__pyx_pf_8PyClical_80random_clifford(CYTHON_UNUSED PyObject *__pyx_self,
struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill) {
27454 PyObject *__pyx_r = NULL;
27455 __Pyx_RefNannyDeclarations
27456 PyObject *__pyx_t_1 = NULL;
27457 struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
27458 int __pyx_lineno = 0;
27459 const char *__pyx_filename = NULL;
27460 int __pyx_clineno = 0;
27461 __Pyx_RefNannySetupContext(
"random_clifford", 1);
27462 __Pyx_XDECREF(__pyx_r);
27463 __pyx_t_2.__pyx_n = 1;
27464 __pyx_t_2.fill = __pyx_v_fill;
27465 __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
27466 __Pyx_GOTREF(__pyx_t_1);
27467 __pyx_r = __pyx_t_1;
27473 __Pyx_XDECREF(__pyx_t_1);
27474 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
27477 __Pyx_XGIVEREF(__pyx_r);
27478 __Pyx_RefNannyFinishContext();
27490 static PyObject *__pyx_pw_8PyClical_83cga3(PyObject *__pyx_self,
27491 #
if CYTHON_METH_FASTCALL
27492 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27494 PyObject *__pyx_args, PyObject *__pyx_kwds
27497 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
27498 PyObject *__pyx_r = NULL;
27499 __Pyx_RefNannyDeclarations
27500 PyObject *__pyx_t_1 = NULL;
27502 PyObject *__pyx_t_3 = NULL;
27503 int __pyx_lineno = 0;
27504 const char *__pyx_filename = NULL;
27505 int __pyx_clineno = 0;
27506 __Pyx_RefNannySetupContext(
"cga3", 1);
27515 __Pyx_XDECREF(__pyx_r);
27516 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
27517 __Pyx_GOTREF(__pyx_t_1);
27518 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L1_error)
27519 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
cga3::cga3(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1943, __pyx_L1_error)
27520 __Pyx_GOTREF(__pyx_t_3);
27521 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27522 __pyx_r = __pyx_t_3;
27536 __Pyx_XDECREF(__pyx_t_1);
27537 __Pyx_XDECREF(__pyx_t_3);
27538 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
27541 __Pyx_XGIVEREF(__pyx_r);
27542 __Pyx_RefNannyFinishContext();
27547 static PyObject *__pyx_pw_8PyClical_83cga3(PyObject *__pyx_self,
27548 #
if CYTHON_METH_FASTCALL
27549 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27551 PyObject *__pyx_args, PyObject *__pyx_kwds
27554 PyDoc_STRVAR(__pyx_doc_8PyClical_82cga3,
"\n Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3(x))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n ");
27555 static PyMethodDef __pyx_mdef_8PyClical_83cga3 = {
"cga3", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_83cga3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_82cga3};
27556 static PyObject *__pyx_pw_8PyClical_83cga3(PyObject *__pyx_self,
27557 #
if CYTHON_METH_FASTCALL
27558 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27560 PyObject *__pyx_args, PyObject *__pyx_kwds
27563 PyObject *__pyx_v_obj = 0;
27564 #if !CYTHON_METH_FASTCALL 27565 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27567 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
27568 PyObject* values[1] = {0};
27569 int __pyx_lineno = 0;
27570 const char *__pyx_filename = NULL;
27571 int __pyx_clineno = 0;
27572 PyObject *__pyx_r = 0;
27573 __Pyx_RefNannyDeclarations
27574 __Pyx_RefNannySetupContext(
"cga3 (wrapper)", 0);
27575 #if !CYTHON_METH_FASTCALL 27576 #if CYTHON_ASSUME_SAFE_MACROS 27577 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27579 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
27582 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27584 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
27586 Py_ssize_t kw_args;
27587 switch (__pyx_nargs) {
27588 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27589 CYTHON_FALLTHROUGH;
27591 default:
goto __pyx_L5_argtuple_error;
27593 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
27594 switch (__pyx_nargs) {
27596 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
27597 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
27600 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1936, __pyx_L3_error)
27601 else goto __pyx_L5_argtuple_error;
27603 if (unlikely(kw_args > 0)) {
27604 const Py_ssize_t kwd_pos_args = __pyx_nargs;
27605 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"cga3") < 0)) __PYX_ERR(0, 1936, __pyx_L3_error)
27607 }
else if (unlikely(__pyx_nargs != 1)) {
27608 goto __pyx_L5_argtuple_error;
27610 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27612 __pyx_v_obj = values[0];
27614 goto __pyx_L6_skip;
27615 __pyx_L5_argtuple_error:;
27616 __Pyx_RaiseArgtupleInvalid(
"cga3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1936, __pyx_L3_error)
27618 goto __pyx_L4_argument_unpacking_done;
27621 Py_ssize_t __pyx_temp;
27622 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27623 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27626 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
27627 __Pyx_RefNannyFinishContext();
27629 __pyx_L4_argument_unpacking_done:;
27630 __pyx_r = __pyx_pf_8PyClical_82cga3(__pyx_self, __pyx_v_obj);
27634 Py_ssize_t __pyx_temp;
27635 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27636 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27639 __Pyx_RefNannyFinishContext();
27643 static PyObject *__pyx_pf_8PyClical_82cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
27644 PyObject *__pyx_r = NULL;
27645 __Pyx_RefNannyDeclarations
27646 PyObject *__pyx_t_1 = NULL;
27647 int __pyx_lineno = 0;
27648 const char *__pyx_filename = NULL;
27649 int __pyx_clineno = 0;
27650 __Pyx_RefNannySetupContext(
"cga3", 1);
27651 __Pyx_XDECREF(__pyx_r);
27652 __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __pyx_L1_error)
27653 __Pyx_GOTREF(__pyx_t_1);
27654 __pyx_r = __pyx_t_1;
27660 __Pyx_XDECREF(__pyx_t_1);
27661 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
27664 __Pyx_XGIVEREF(__pyx_r);
27665 __Pyx_RefNannyFinishContext();
27677 static PyObject *__pyx_pw_8PyClical_85cga3std(PyObject *__pyx_self,
27678 #
if CYTHON_METH_FASTCALL
27679 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27681 PyObject *__pyx_args, PyObject *__pyx_kwds
27684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
27685 PyObject *__pyx_r = NULL;
27686 __Pyx_RefNannyDeclarations
27687 PyObject *__pyx_t_1 = NULL;
27689 PyObject *__pyx_t_3 = NULL;
27690 int __pyx_lineno = 0;
27691 const char *__pyx_filename = NULL;
27692 int __pyx_clineno = 0;
27693 __Pyx_RefNannySetupContext(
"cga3std", 1);
27702 __Pyx_XDECREF(__pyx_r);
27703 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
27704 __Pyx_GOTREF(__pyx_t_1);
27705 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1954, __pyx_L1_error)
27706 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
cga3::cga3std(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L1_error)
27707 __Pyx_GOTREF(__pyx_t_3);
27708 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27709 __pyx_r = __pyx_t_3;
27723 __Pyx_XDECREF(__pyx_t_1);
27724 __Pyx_XDECREF(__pyx_t_3);
27725 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
27728 __Pyx_XGIVEREF(__pyx_r);
27729 __Pyx_RefNannyFinishContext();
27734 static PyObject *__pyx_pw_8PyClical_85cga3std(PyObject *__pyx_self,
27735 #
if CYTHON_METH_FASTCALL
27736 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27738 PyObject *__pyx_args, PyObject *__pyx_kwds
27741 PyDoc_STRVAR(__pyx_doc_8PyClical_84cga3std,
"\n Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3std(cga3(x)))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3std(cga3(x))-cga3(x))\n 0\n ");
27742 static PyMethodDef __pyx_mdef_8PyClical_85cga3std = {
"cga3std", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_85cga3std, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_84cga3std};
27743 static PyObject *__pyx_pw_8PyClical_85cga3std(PyObject *__pyx_self,
27744 #
if CYTHON_METH_FASTCALL
27745 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27747 PyObject *__pyx_args, PyObject *__pyx_kwds
27750 PyObject *__pyx_v_obj = 0;
27751 #if !CYTHON_METH_FASTCALL 27752 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27754 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
27755 PyObject* values[1] = {0};
27756 int __pyx_lineno = 0;
27757 const char *__pyx_filename = NULL;
27758 int __pyx_clineno = 0;
27759 PyObject *__pyx_r = 0;
27760 __Pyx_RefNannyDeclarations
27761 __Pyx_RefNannySetupContext(
"cga3std (wrapper)", 0);
27762 #if !CYTHON_METH_FASTCALL 27763 #if CYTHON_ASSUME_SAFE_MACROS 27764 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27766 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
27769 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27771 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
27773 Py_ssize_t kw_args;
27774 switch (__pyx_nargs) {
27775 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27776 CYTHON_FALLTHROUGH;
27778 default:
goto __pyx_L5_argtuple_error;
27780 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
27781 switch (__pyx_nargs) {
27783 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
27784 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
27787 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1945, __pyx_L3_error)
27788 else goto __pyx_L5_argtuple_error;
27790 if (unlikely(kw_args > 0)) {
27791 const Py_ssize_t kwd_pos_args = __pyx_nargs;
27792 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"cga3std") < 0)) __PYX_ERR(0, 1945, __pyx_L3_error)
27794 }
else if (unlikely(__pyx_nargs != 1)) {
27795 goto __pyx_L5_argtuple_error;
27797 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27799 __pyx_v_obj = values[0];
27801 goto __pyx_L6_skip;
27802 __pyx_L5_argtuple_error:;
27803 __Pyx_RaiseArgtupleInvalid(
"cga3std", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1945, __pyx_L3_error)
27805 goto __pyx_L4_argument_unpacking_done;
27808 Py_ssize_t __pyx_temp;
27809 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27810 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27813 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
27814 __Pyx_RefNannyFinishContext();
27816 __pyx_L4_argument_unpacking_done:;
27817 __pyx_r = __pyx_pf_8PyClical_84cga3std(__pyx_self, __pyx_v_obj);
27821 Py_ssize_t __pyx_temp;
27822 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27823 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27826 __Pyx_RefNannyFinishContext();
27830 static PyObject *__pyx_pf_8PyClical_84cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
27831 PyObject *__pyx_r = NULL;
27832 __Pyx_RefNannyDeclarations
27833 PyObject *__pyx_t_1 = NULL;
27834 int __pyx_lineno = 0;
27835 const char *__pyx_filename = NULL;
27836 int __pyx_clineno = 0;
27837 __Pyx_RefNannySetupContext(
"cga3std", 1);
27838 __Pyx_XDECREF(__pyx_r);
27839 __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
27840 __Pyx_GOTREF(__pyx_t_1);
27841 __pyx_r = __pyx_t_1;
27847 __Pyx_XDECREF(__pyx_t_1);
27848 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
27851 __Pyx_XGIVEREF(__pyx_r);
27852 __Pyx_RefNannyFinishContext();
27864 static PyObject *__pyx_pw_8PyClical_87agc3(PyObject *__pyx_self,
27865 #
if CYTHON_METH_FASTCALL
27866 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27868 PyObject *__pyx_args, PyObject *__pyx_kwds
27871 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
27872 PyObject *__pyx_r = NULL;
27873 __Pyx_RefNannyDeclarations
27874 PyObject *__pyx_t_1 = NULL;
27876 PyObject *__pyx_t_3 = NULL;
27877 int __pyx_lineno = 0;
27878 const char *__pyx_filename = NULL;
27879 int __pyx_clineno = 0;
27880 __Pyx_RefNannySetupContext(
"agc3", 1);
27889 __Pyx_XDECREF(__pyx_r);
27890 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1965, __pyx_L1_error)
27891 __Pyx_GOTREF(__pyx_t_1);
27892 __pyx_t_2 = __pyx_f_8PyClical_toClifford(__pyx_v_obj);
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1965, __pyx_L1_error)
27893 __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
cga3::agc3(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1965, __pyx_L1_error)
27894 __Pyx_GOTREF(__pyx_t_3);
27895 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27896 __pyx_r = __pyx_t_3;
27910 __Pyx_XDECREF(__pyx_t_1);
27911 __Pyx_XDECREF(__pyx_t_3);
27912 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
27915 __Pyx_XGIVEREF(__pyx_r);
27916 __Pyx_RefNannyFinishContext();
27921 static PyObject *__pyx_pw_8PyClical_87agc3(PyObject *__pyx_self,
27922 #
if CYTHON_METH_FASTCALL
27923 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27925 PyObject *__pyx_args, PyObject *__pyx_kwds
27928 PyDoc_STRVAR(__pyx_doc_8PyClical_86agc3,
"\n Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(agc3(cga3(x)))\n 2{1}+9{2}+{3}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(agc3(cga3(x))-x)\n 0\n ");
27929 static PyMethodDef __pyx_mdef_8PyClical_87agc3 = {
"agc3", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_87agc3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_86agc3};
27930 static PyObject *__pyx_pw_8PyClical_87agc3(PyObject *__pyx_self,
27931 #
if CYTHON_METH_FASTCALL
27932 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27934 PyObject *__pyx_args, PyObject *__pyx_kwds
27937 PyObject *__pyx_v_obj = 0;
27938 #if !CYTHON_METH_FASTCALL 27939 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27941 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
27942 PyObject* values[1] = {0};
27943 int __pyx_lineno = 0;
27944 const char *__pyx_filename = NULL;
27945 int __pyx_clineno = 0;
27946 PyObject *__pyx_r = 0;
27947 __Pyx_RefNannyDeclarations
27948 __Pyx_RefNannySetupContext(
"agc3 (wrapper)", 0);
27949 #if !CYTHON_METH_FASTCALL 27950 #if CYTHON_ASSUME_SAFE_MACROS 27951 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27953 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
27956 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27958 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
27960 Py_ssize_t kw_args;
27961 switch (__pyx_nargs) {
27962 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27963 CYTHON_FALLTHROUGH;
27965 default:
goto __pyx_L5_argtuple_error;
27967 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
27968 switch (__pyx_nargs) {
27970 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
27971 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
27974 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1956, __pyx_L3_error)
27975 else goto __pyx_L5_argtuple_error;
27977 if (unlikely(kw_args > 0)) {
27978 const Py_ssize_t kwd_pos_args = __pyx_nargs;
27979 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"agc3") < 0)) __PYX_ERR(0, 1956, __pyx_L3_error)
27981 }
else if (unlikely(__pyx_nargs != 1)) {
27982 goto __pyx_L5_argtuple_error;
27984 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27986 __pyx_v_obj = values[0];
27988 goto __pyx_L6_skip;
27989 __pyx_L5_argtuple_error:;
27990 __Pyx_RaiseArgtupleInvalid(
"agc3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1956, __pyx_L3_error)
27992 goto __pyx_L4_argument_unpacking_done;
27995 Py_ssize_t __pyx_temp;
27996 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
27997 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28000 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
28001 __Pyx_RefNannyFinishContext();
28003 __pyx_L4_argument_unpacking_done:;
28004 __pyx_r = __pyx_pf_8PyClical_86agc3(__pyx_self, __pyx_v_obj);
28008 Py_ssize_t __pyx_temp;
28009 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
28010 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28013 __Pyx_RefNannyFinishContext();
28017 static PyObject *__pyx_pf_8PyClical_86agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
28018 PyObject *__pyx_r = NULL;
28019 __Pyx_RefNannyDeclarations
28020 PyObject *__pyx_t_1 = NULL;
28021 int __pyx_lineno = 0;
28022 const char *__pyx_filename = NULL;
28023 int __pyx_clineno = 0;
28024 __Pyx_RefNannySetupContext(
"agc3", 1);
28025 __Pyx_XDECREF(__pyx_r);
28026 __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
28027 __Pyx_GOTREF(__pyx_t_1);
28028 __pyx_r = __pyx_t_1;
28034 __Pyx_XDECREF(__pyx_t_1);
28035 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
28038 __Pyx_XGIVEREF(__pyx_r);
28039 __Pyx_RefNannyFinishContext();
28052 static PyObject *__pyx_pw_8PyClical_89e(PyObject *__pyx_self,
28053 #
if CYTHON_METH_FASTCALL
28054 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28056 PyObject *__pyx_args, PyObject *__pyx_kwds
28059 PyDoc_STRVAR(__pyx_doc_8PyClical_88e,
"\n Abbreviation for clifford(index_set(obj)).\n\n >>> print(e(1))\n {1}\n >>> print(e(-1))\n {-1}\n >>> print(e(0))\n 1\n ");
28060 static PyMethodDef __pyx_mdef_8PyClical_89e = {
"e", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_89e, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_88e};
28061 static PyObject *__pyx_pw_8PyClical_89e(PyObject *__pyx_self,
28062 #
if CYTHON_METH_FASTCALL
28063 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28065 PyObject *__pyx_args, PyObject *__pyx_kwds
28068 PyObject *__pyx_v_obj = 0;
28069 #if !CYTHON_METH_FASTCALL 28070 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28072 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
28073 PyObject* values[1] = {0};
28074 int __pyx_lineno = 0;
28075 const char *__pyx_filename = NULL;
28076 int __pyx_clineno = 0;
28077 PyObject *__pyx_r = 0;
28078 __Pyx_RefNannyDeclarations
28079 __Pyx_RefNannySetupContext(
"e (wrapper)", 0);
28080 #if !CYTHON_METH_FASTCALL 28081 #if CYTHON_ASSUME_SAFE_MACROS 28082 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28084 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
28087 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
28089 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
28091 Py_ssize_t kw_args;
28092 switch (__pyx_nargs) {
28093 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
28094 CYTHON_FALLTHROUGH;
28096 default:
goto __pyx_L5_argtuple_error;
28098 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
28099 switch (__pyx_nargs) {
28101 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
28102 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
28105 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L3_error)
28106 else goto __pyx_L5_argtuple_error;
28108 if (unlikely(kw_args > 0)) {
28109 const Py_ssize_t kwd_pos_args = __pyx_nargs;
28110 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"e") < 0)) __PYX_ERR(0, 1999, __pyx_L3_error)
28112 }
else if (unlikely(__pyx_nargs != 1)) {
28113 goto __pyx_L5_argtuple_error;
28115 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
28117 __pyx_v_obj = values[0];
28119 goto __pyx_L6_skip;
28120 __pyx_L5_argtuple_error:;
28121 __Pyx_RaiseArgtupleInvalid(
"e", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1999, __pyx_L3_error)
28123 goto __pyx_L4_argument_unpacking_done;
28126 Py_ssize_t __pyx_temp;
28127 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
28128 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28131 __Pyx_AddTraceback(
"PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
28132 __Pyx_RefNannyFinishContext();
28134 __pyx_L4_argument_unpacking_done:;
28135 __pyx_r = __pyx_pf_8PyClical_88e(__pyx_self, __pyx_v_obj);
28139 Py_ssize_t __pyx_temp;
28140 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
28141 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28144 __Pyx_RefNannyFinishContext();
28148 static PyObject *__pyx_pf_8PyClical_88e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
28149 PyObject *__pyx_r = NULL;
28150 __Pyx_RefNannyDeclarations
28151 PyObject *__pyx_t_1 = NULL;
28152 PyObject *__pyx_t_2 = NULL;
28153 int __pyx_lineno = 0;
28154 const char *__pyx_filename = NULL;
28155 int __pyx_clineno = 0;
28156 __Pyx_RefNannySetupContext(
"e", 1);
28165 __Pyx_XDECREF(__pyx_r);
28166 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2010, __pyx_L1_error)
28167 __Pyx_GOTREF(__pyx_t_1);
28168 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2010, __pyx_L1_error)
28169 __Pyx_GOTREF(__pyx_t_2);
28170 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28171 __pyx_r = __pyx_t_2;
28185 __Pyx_XDECREF(__pyx_t_1);
28186 __Pyx_XDECREF(__pyx_t_2);
28187 __Pyx_AddTraceback(
"PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
28190 __Pyx_XGIVEREF(__pyx_r);
28191 __Pyx_RefNannyFinishContext();
28204 static PyObject *__pyx_pw_8PyClical_91istpq(PyObject *__pyx_self,
28205 #
if CYTHON_METH_FASTCALL
28206 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28208 PyObject *__pyx_args, PyObject *__pyx_kwds
28211 PyDoc_STRVAR(__pyx_doc_8PyClical_90istpq,
"\n Abbreviation for index_set({-q,...p}).\n\n >>> print(istpq(2,3))\n {-3,-2,-1,1,2}\n ");
28212 static PyMethodDef __pyx_mdef_8PyClical_91istpq = {
"istpq", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_91istpq, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_90istpq};
28213 static PyObject *__pyx_pw_8PyClical_91istpq(PyObject *__pyx_self,
28214 #
if CYTHON_METH_FASTCALL
28215 PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28217 PyObject *__pyx_args, PyObject *__pyx_kwds
28220 PyObject *__pyx_v_p = 0;
28221 PyObject *__pyx_v_q = 0;
28222 #if !CYTHON_METH_FASTCALL 28223 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28225 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
28226 PyObject* values[2] = {0,0};
28227 int __pyx_lineno = 0;
28228 const char *__pyx_filename = NULL;
28229 int __pyx_clineno = 0;
28230 PyObject *__pyx_r = 0;
28231 __Pyx_RefNannyDeclarations
28232 __Pyx_RefNannySetupContext(
"istpq (wrapper)", 0);
28233 #if !CYTHON_METH_FASTCALL 28234 #if CYTHON_ASSUME_SAFE_MACROS 28235 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28237 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
28240 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
28242 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
28244 Py_ssize_t kw_args;
28245 switch (__pyx_nargs) {
28246 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
28247 CYTHON_FALLTHROUGH;
28248 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
28249 CYTHON_FALLTHROUGH;
28251 default:
goto __pyx_L5_argtuple_error;
28253 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
28254 switch (__pyx_nargs) {
28256 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p)) != 0)) {
28257 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
28260 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2012, __pyx_L3_error)
28261 else goto __pyx_L5_argtuple_error;
28262 CYTHON_FALLTHROUGH;
28264 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
28265 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
28268 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2012, __pyx_L3_error)
28270 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, 1); __PYX_ERR(0, 2012, __pyx_L3_error)
28273 if (unlikely(kw_args > 0)) {
28274 const Py_ssize_t kwd_pos_args = __pyx_nargs;
28275 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args,
"istpq") < 0)) __PYX_ERR(0, 2012, __pyx_L3_error)
28277 }
else if (unlikely(__pyx_nargs != 2)) {
28278 goto __pyx_L5_argtuple_error;
28280 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
28281 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
28283 __pyx_v_p = values[0];
28284 __pyx_v_q = values[1];
28286 goto __pyx_L6_skip;
28287 __pyx_L5_argtuple_error:;
28288 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2012, __pyx_L3_error)
28290 goto __pyx_L4_argument_unpacking_done;
28293 Py_ssize_t __pyx_temp;
28294 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
28295 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28298 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
28299 __Pyx_RefNannyFinishContext();
28301 __pyx_L4_argument_unpacking_done:;
28302 __pyx_r = __pyx_pf_8PyClical_90istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
28306 Py_ssize_t __pyx_temp;
28307 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
28308 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28311 __Pyx_RefNannyFinishContext();
28315 static PyObject *__pyx_pf_8PyClical_90istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
28316 PyObject *__pyx_r = NULL;
28317 __Pyx_RefNannyDeclarations
28318 PyObject *__pyx_t_1 = NULL;
28319 PyObject *__pyx_t_2 = NULL;
28320 PyObject *__pyx_t_3 = NULL;
28321 int __pyx_lineno = 0;
28322 const char *__pyx_filename = NULL;
28323 int __pyx_clineno = 0;
28324 __Pyx_RefNannySetupContext(
"istpq", 1);
28333 __Pyx_XDECREF(__pyx_r);
28334 __pyx_t_1 = PyNumber_Negative(__pyx_v_q);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
28335 __Pyx_GOTREF(__pyx_t_1);
28336 __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error)
28337 __Pyx_GOTREF(__pyx_t_2);
28338 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L1_error)
28339 __Pyx_GOTREF(__pyx_t_3);
28340 __Pyx_GIVEREF(__pyx_t_1);
28341 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error);
28342 __Pyx_GIVEREF(__pyx_t_2);
28343 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error);
28346 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error)
28347 __Pyx_GOTREF(__pyx_t_2);
28348 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28349 __pyx_t_3 = PySet_New(__pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L1_error)
28350 __Pyx_GOTREF(__pyx_t_3);
28351 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28352 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error)
28353 __Pyx_GOTREF(__pyx_t_2);
28354 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28355 __pyx_r = __pyx_t_2;
28369 __Pyx_XDECREF(__pyx_t_1);
28370 __Pyx_XDECREF(__pyx_t_2);
28371 __Pyx_XDECREF(__pyx_t_3);
28372 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
28375 __Pyx_XGIVEREF(__pyx_r);
28376 __Pyx_RefNannyFinishContext();
28389 static PyObject *__pyx_pw_8PyClical_93_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
28390 static PyMethodDef __pyx_mdef_8PyClical_93_test = {
"_test", (PyCFunction)__pyx_pw_8PyClical_93_test, METH_NOARGS, 0};
28391 static PyObject *__pyx_pw_8PyClical_93_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
28392 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
28393 PyObject *__pyx_r = 0;
28394 __Pyx_RefNannyDeclarations
28395 __Pyx_RefNannySetupContext(
"_test (wrapper)", 0);
28396 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28397 __pyx_r = __pyx_pf_8PyClical_92_test(__pyx_self);
28400 __Pyx_RefNannyFinishContext();
28404 static PyObject *__pyx_pf_8PyClical_92_test(CYTHON_UNUSED PyObject *__pyx_self) {
28405 PyObject *__pyx_v_PyClical = NULL;
28406 PyObject *__pyx_v_doctest = NULL;
28407 PyObject *__pyx_r = NULL;
28408 __Pyx_RefNannyDeclarations
28409 PyObject *__pyx_t_1 = NULL;
28410 PyObject *__pyx_t_2 = NULL;
28411 PyObject *__pyx_t_3 = NULL;
28413 int __pyx_lineno = 0;
28414 const char *__pyx_filename = NULL;
28415 int __pyx_clineno = 0;
28416 __Pyx_RefNannySetupContext(
"_test", 1);
28425 __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_PyClical, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
28426 __Pyx_GOTREF(__pyx_t_1);
28427 __pyx_v_PyClical = __pyx_t_1;
28429 __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_doctest, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
28430 __Pyx_GOTREF(__pyx_t_1);
28431 __pyx_v_doctest = __pyx_t_1;
28441 __Pyx_XDECREF(__pyx_r);
28442 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2027, __pyx_L1_error)
28443 __Pyx_GOTREF(__pyx_t_2);
28446 #if CYTHON_UNPACK_METHODS 28447 if (likely(PyMethod_Check(__pyx_t_2))) {
28448 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
28449 if (likely(__pyx_t_3)) {
28450 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
28451 __Pyx_INCREF(__pyx_t_3);
28452 __Pyx_INCREF(
function);
28453 __Pyx_DECREF_SET(__pyx_t_2,
function);
28459 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_PyClical};
28460 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
28461 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28462 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2027, __pyx_L1_error)
28463 __Pyx_GOTREF(__pyx_t_1);
28464 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28466 __pyx_r = __pyx_t_1;
28480 __Pyx_XDECREF(__pyx_t_1);
28481 __Pyx_XDECREF(__pyx_t_2);
28482 __Pyx_XDECREF(__pyx_t_3);
28483 __Pyx_AddTraceback(
"PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
28486 __Pyx_XDECREF(__pyx_v_PyClical);
28487 __Pyx_XDECREF(__pyx_v_doctest);
28488 __Pyx_XGIVEREF(__pyx_r);
28489 __Pyx_RefNannyFinishContext();
28492 static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
28494 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
28495 struct __pyx_obj_8PyClical_index_set *p;
28497 #if CYTHON_COMPILING_IN_LIMITED_API 28498 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
28499 o = alloc_func(t, 0);
28501 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
28502 o = (*t->tp_alloc)(t, 0);
28504 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
28506 if (unlikely(!o))
return 0;
28508 p = ((
struct __pyx_obj_8PyClical_index_set *)o);
28509 p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
28510 if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0))
goto bad;
28513 Py_DECREF(o); o = 0;
28517 static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
28518 #if CYTHON_USE_TP_FINALIZE 28519 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
28520 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8PyClical_index_set) {
28521 if (PyObject_CallFinalizerFromDealloc(o))
return;
28526 PyObject *etype, *eval, *etb;
28527 PyErr_Fetch(&etype, &eval, &etb);
28528 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
28529 __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
28530 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
28531 PyErr_Restore(etype, eval, etb);
28533 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY 28534 (*Py_TYPE(o)->tp_free)(o);
28537 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
28538 if (tp_free) tp_free(o);
28542 static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t
i) {
28544 PyObject *x = PyInt_FromSsize_t(
i);
if(!x)
return 0;
28545 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
28550 static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *
i, PyObject *v) {
28552 return __pyx_pw_8PyClical_9index_set_9__setitem__(o,
i, v);
28555 __Pyx_TypeName o_type_name;
28556 o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
28557 PyErr_Format(PyExc_NotImplementedError,
28558 "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
28559 __Pyx_DECREF_TypeName(o_type_name);
28564 static CYTHON_INLINE PyObject *__pyx_nb_and_8PyClical_index_set_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
28566 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 28567 slot = type->tp_as_number ? type->tp_as_number->nb_and : NULL;
28569 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_and);
28571 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
28573 static PyObject *__pyx_nb_and_8PyClical_index_set(PyObject *left, PyObject *right ) {
28574 int maybe_self_is_left, maybe_self_is_right = 0;
28575 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
28576 #if CYTHON_USE_TYPE_SLOTS 28577 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_and == &__pyx_nb_and_8PyClical_index_set)
28579 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_index_set);
28580 if (maybe_self_is_left) {
28582 res = __pyx_pw_8PyClical_9index_set_24__and__(left, right);
28583 if (res != Py_NotImplemented)
return res;
28586 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
28587 #if CYTHON_USE_TYPE_SLOTS 28588 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_and == &__pyx_nb_and_8PyClical_index_set)
28590 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_index_set);
28591 if (maybe_self_is_right) {
28592 return __pyx_nb_and_8PyClical_index_set_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_8PyClical_index_set, tp_base, PyTypeObject*), left, right );
28594 return __Pyx_NewRef(Py_NotImplemented);
28599 static CYTHON_INLINE PyObject *__pyx_nb_xor_8PyClical_index_set_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
28601 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 28602 slot = type->tp_as_number ? type->tp_as_number->nb_xor : NULL;
28604 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_xor);
28606 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
28608 static PyObject *__pyx_nb_xor_8PyClical_index_set(PyObject *left, PyObject *right ) {
28609 int maybe_self_is_left, maybe_self_is_right = 0;
28610 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
28611 #if CYTHON_USE_TYPE_SLOTS 28612 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_xor == &__pyx_nb_xor_8PyClical_index_set)
28614 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_index_set);
28615 if (maybe_self_is_left) {
28617 res = __pyx_pw_8PyClical_9index_set_20__xor__(left, right);
28618 if (res != Py_NotImplemented)
return res;
28621 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
28622 #if CYTHON_USE_TYPE_SLOTS 28623 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_xor == &__pyx_nb_xor_8PyClical_index_set)
28625 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_index_set);
28626 if (maybe_self_is_right) {
28627 return __pyx_nb_xor_8PyClical_index_set_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_8PyClical_index_set, tp_base, PyTypeObject*), left, right );
28629 return __Pyx_NewRef(Py_NotImplemented);
28634 static CYTHON_INLINE PyObject *__pyx_nb_or_8PyClical_index_set_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
28636 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 28637 slot = type->tp_as_number ? type->tp_as_number->nb_or : NULL;
28639 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_or);
28641 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
28643 static PyObject *__pyx_nb_or_8PyClical_index_set(PyObject *left, PyObject *right ) {
28644 int maybe_self_is_left, maybe_self_is_right = 0;
28645 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
28646 #if CYTHON_USE_TYPE_SLOTS 28647 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_or == &__pyx_nb_or_8PyClical_index_set)
28649 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_index_set);
28650 if (maybe_self_is_left) {
28652 res = __pyx_pw_8PyClical_9index_set_28__or__(left, right);
28653 if (res != Py_NotImplemented)
return res;
28656 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
28657 #if CYTHON_USE_TYPE_SLOTS 28658 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_or == &__pyx_nb_or_8PyClical_index_set)
28660 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_index_set);
28661 if (maybe_self_is_right) {
28662 return __pyx_nb_or_8PyClical_index_set_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_8PyClical_index_set, tp_base, PyTypeObject*), left, right );
28664 return __Pyx_NewRef(Py_NotImplemented);
28669 static PyObject *__pyx_specialmethod___pyx_pw_8PyClical_9index_set_48__repr__(PyObject *
self, CYTHON_UNUSED PyObject *arg) {
28670 return __pyx_pw_8PyClical_9index_set_48__repr__(
self);
28673 static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
28674 {
"count", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_32count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_31count},
28675 {
"count_neg", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_34count_neg, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_33count_neg},
28676 {
"count_pos", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_36count_pos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_35count_pos},
28677 {
"min", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_38min, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_37min},
28678 {
"max", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_40max, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_39max},
28679 {
"hash_fn", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_42hash_fn, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_41hash_fn},
28680 {
"sign_of_mult", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_44sign_of_mult, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
28681 {
"sign_of_square", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_46sign_of_square, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
28682 {
"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_8PyClical_9index_set_48__repr__, METH_NOARGS|METH_COEXIST, __pyx_doc_8PyClical_9index_set_47__repr__},
28683 {
"__reduce_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28684 {
"__setstate_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
28687 #if CYTHON_USE_TYPE_SPECS 28688 static PyType_Slot __pyx_type_8PyClical_index_set_slots[] = {
28689 {Py_tp_dealloc, (
void *)__pyx_tp_dealloc_8PyClical_index_set},
28690 {Py_tp_repr, (
void *)__pyx_pw_8PyClical_9index_set_48__repr__},
28691 {Py_nb_invert, (
void *)__pyx_pw_8PyClical_9index_set_18__invert__},
28692 {Py_nb_and, (
void *)__pyx_nb_and_8PyClical_index_set},
28693 {Py_nb_xor, (
void *)__pyx_nb_xor_8PyClical_index_set},
28694 {Py_nb_or, (
void *)__pyx_nb_or_8PyClical_index_set},
28695 {Py_nb_inplace_and, (
void *)__pyx_pw_8PyClical_9index_set_26__iand__},
28696 {Py_nb_inplace_xor, (
void *)__pyx_pw_8PyClical_9index_set_22__ixor__},
28697 {Py_nb_inplace_or, (
void *)__pyx_pw_8PyClical_9index_set_30__ior__},
28698 {Py_sq_item, (
void *)__pyx_sq_item_8PyClical_index_set},
28699 {Py_sq_contains, (
void *)__pyx_pw_8PyClical_9index_set_13__contains__},
28700 {Py_mp_subscript, (
void *)__pyx_pw_8PyClical_9index_set_11__getitem__},
28701 {Py_mp_ass_subscript, (
void *)__pyx_mp_ass_subscript_8PyClical_index_set},
28702 {Py_tp_str, (
void *)__pyx_pw_8PyClical_9index_set_50__str__},
28703 {Py_tp_doc, (
void *)PyDoc_STR(
"\n Python class index_set wraps C++ class IndexSet.\n ")},
28704 {Py_tp_richcompare, (
void *)__pyx_pw_8PyClical_9index_set_7__richcmp__},
28705 {Py_tp_iter, (
void *)__pyx_pw_8PyClical_9index_set_15__iter__},
28706 {Py_tp_methods, (
void *)__pyx_methods_8PyClical_index_set},
28707 {Py_tp_new, (
void *)__pyx_tp_new_8PyClical_index_set},
28710 static PyType_Spec __pyx_type_8PyClical_index_set_spec = {
28711 "PyClical.index_set",
28712 sizeof(
struct __pyx_obj_8PyClical_index_set),
28714 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
28715 __pyx_type_8PyClical_index_set_slots,
28719 static PyNumberMethods __pyx_tp_as_number_index_set = {
28723 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 28733 __pyx_pw_8PyClical_9index_set_18__invert__,
28736 __pyx_nb_and_8PyClical_index_set,
28737 __pyx_nb_xor_8PyClical_index_set,
28738 __pyx_nb_or_8PyClical_index_set,
28739 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 28743 #if PY_MAJOR_VERSION < 3 28749 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 28752 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 28758 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 28765 __pyx_pw_8PyClical_9index_set_26__iand__,
28766 __pyx_pw_8PyClical_9index_set_22__ixor__,
28767 __pyx_pw_8PyClical_9index_set_30__ior__,
28773 #if PY_VERSION_HEX >= 0x03050000 28776 #if PY_VERSION_HEX >= 0x03050000 28781 static PySequenceMethods __pyx_tp_as_sequence_index_set = {
28785 __pyx_sq_item_8PyClical_index_set,
28789 __pyx_pw_8PyClical_9index_set_13__contains__,
28794 static PyMappingMethods __pyx_tp_as_mapping_index_set = {
28796 __pyx_pw_8PyClical_9index_set_11__getitem__,
28797 __pyx_mp_ass_subscript_8PyClical_index_set,
28800 static PyTypeObject __pyx_type_8PyClical_index_set = {
28801 PyVarObject_HEAD_INIT(0, 0)
28802 "PyClical.""index_set",
28803 sizeof(
struct __pyx_obj_8PyClical_index_set),
28805 __pyx_tp_dealloc_8PyClical_index_set,
28806 #if PY_VERSION_HEX < 0x030800b4
28809 #if PY_VERSION_HEX >= 0x030800b4
28814 #if PY_MAJOR_VERSION < 3 28817 #if PY_MAJOR_VERSION >= 3 28820 __pyx_pw_8PyClical_9index_set_48__repr__,
28821 &__pyx_tp_as_number_index_set,
28822 &__pyx_tp_as_sequence_index_set,
28823 &__pyx_tp_as_mapping_index_set,
28826 __pyx_pw_8PyClical_9index_set_50__str__,
28830 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
28831 PyDoc_STR(
"\n Python class index_set wraps C++ class IndexSet.\n "),
28834 __pyx_pw_8PyClical_9index_set_7__richcmp__,
28836 __pyx_pw_8PyClical_9index_set_15__iter__,
28838 __pyx_methods_8PyClical_index_set,
28845 #if !CYTHON_USE_TYPE_SPECS 28850 __pyx_tp_new_8PyClical_index_set,
28860 #if PY_VERSION_HEX >= 0x030400a1 28861 #if CYTHON_USE_TP_FINALIZE 28867 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 28870 #if __PYX_NEED_TP_PRINT_SLOT == 1 28873 #if PY_VERSION_HEX >= 0x030C0000 28876 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 28881 static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
28883 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
28884 struct __pyx_obj_8PyClical_clifford *p;
28886 #if CYTHON_COMPILING_IN_LIMITED_API 28887 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
28888 o = alloc_func(t, 0);
28890 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
28891 o = (*t->tp_alloc)(t, 0);
28893 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
28895 if (unlikely(!o))
return 0;
28897 p = ((
struct __pyx_obj_8PyClical_clifford *)o);
28898 p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
28899 if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0))
goto bad;
28902 Py_DECREF(o); o = 0;
28906 static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
28907 #if CYTHON_USE_TP_FINALIZE 28908 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
28909 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8PyClical_clifford) {
28910 if (PyObject_CallFinalizerFromDealloc(o))
return;
28915 PyObject *etype, *eval, *etb;
28916 PyErr_Fetch(&etype, &eval, &etb);
28917 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
28918 __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
28919 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
28920 PyErr_Restore(etype, eval, etb);
28922 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY 28923 (*Py_TYPE(o)->tp_free)(o);
28926 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
28927 if (tp_free) tp_free(o);
28931 static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t
i) {
28933 PyObject *x = PyInt_FromSsize_t(
i);
if(!x)
return 0;
28934 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
28939 static CYTHON_INLINE PyObject *__pyx_nb_add_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
28941 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 28942 slot = type->tp_as_number ? type->tp_as_number->nb_add : NULL;
28944 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_add);
28946 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
28948 static PyObject *__pyx_nb_add_8PyClical_clifford(PyObject *left, PyObject *right ) {
28949 int maybe_self_is_left, maybe_self_is_right = 0;
28950 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
28951 #if CYTHON_USE_TYPE_SLOTS 28952 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_add == &__pyx_nb_add_8PyClical_clifford)
28954 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
28955 if (maybe_self_is_left) {
28957 res = __pyx_pw_8PyClical_8clifford_21__add__(left, right);
28958 if (res != Py_NotImplemented)
return res;
28961 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
28962 #if CYTHON_USE_TYPE_SLOTS 28963 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_8PyClical_clifford)
28965 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
28966 if (maybe_self_is_right) {
28967 return __pyx_pw_8PyClical_8clifford_23__radd__(right, left);
28969 return __Pyx_NewRef(Py_NotImplemented);
28974 static CYTHON_INLINE PyObject *__pyx_nb_subtract_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
28976 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 28977 slot = type->tp_as_number ? type->tp_as_number->nb_subtract : NULL;
28979 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_subtract);
28981 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
28983 static PyObject *__pyx_nb_subtract_8PyClical_clifford(PyObject *left, PyObject *right ) {
28984 int maybe_self_is_left, maybe_self_is_right = 0;
28985 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
28986 #if CYTHON_USE_TYPE_SLOTS 28987 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_subtract == &__pyx_nb_subtract_8PyClical_clifford)
28989 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
28990 if (maybe_self_is_left) {
28992 res = __pyx_pw_8PyClical_8clifford_27__sub__(left, right);
28993 if (res != Py_NotImplemented)
return res;
28996 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
28997 #if CYTHON_USE_TYPE_SLOTS 28998 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_8PyClical_clifford)
29000 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29001 if (maybe_self_is_right) {
29002 return __pyx_pw_8PyClical_8clifford_29__rsub__(right, left);
29004 return __Pyx_NewRef(Py_NotImplemented);
29009 static CYTHON_INLINE PyObject *__pyx_nb_multiply_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
29011 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29012 slot = type->tp_as_number ? type->tp_as_number->nb_multiply : NULL;
29014 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_multiply);
29016 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
29018 static PyObject *__pyx_nb_multiply_8PyClical_clifford(PyObject *left, PyObject *right ) {
29019 int maybe_self_is_left, maybe_self_is_right = 0;
29020 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29021 #if CYTHON_USE_TYPE_SLOTS 29022 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_multiply == &__pyx_nb_multiply_8PyClical_clifford)
29024 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29025 if (maybe_self_is_left) {
29027 res = __pyx_pw_8PyClical_8clifford_33__mul__(left, right);
29028 if (res != Py_NotImplemented)
return res;
29031 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29032 #if CYTHON_USE_TYPE_SLOTS 29033 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_multiply == &__pyx_nb_multiply_8PyClical_clifford)
29035 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29036 if (maybe_self_is_right) {
29037 return __pyx_pw_8PyClical_8clifford_35__rmul__(right, left);
29039 return __Pyx_NewRef(Py_NotImplemented);
29044 static CYTHON_INLINE PyObject *__pyx_nb_remainder_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
29046 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29047 slot = type->tp_as_number ? type->tp_as_number->nb_remainder : NULL;
29049 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_remainder);
29051 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
29053 static PyObject *__pyx_nb_remainder_8PyClical_clifford(PyObject *left, PyObject *right ) {
29054 int maybe_self_is_left, maybe_self_is_right = 0;
29055 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29056 #if CYTHON_USE_TYPE_SLOTS 29057 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_remainder == &__pyx_nb_remainder_8PyClical_clifford)
29059 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29060 if (maybe_self_is_left) {
29062 res = __pyx_pw_8PyClical_8clifford_39__mod__(left, right);
29063 if (res != Py_NotImplemented)
return res;
29066 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29067 #if CYTHON_USE_TYPE_SLOTS 29068 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_remainder == &__pyx_nb_remainder_8PyClical_clifford)
29070 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29071 if (maybe_self_is_right) {
29072 return __pyx_pw_8PyClical_8clifford_41__rmod__(right, left);
29074 return __Pyx_NewRef(Py_NotImplemented);
29079 static CYTHON_INLINE PyObject *__pyx_nb_power_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right , PyObject* extra_arg) {
29081 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29082 slot = type->tp_as_number ? type->tp_as_number->nb_power : NULL;
29084 slot = (ternaryfunc) PyType_GetSlot(type, Py_nb_power);
29086 return slot ? slot(left, right , extra_arg) : __Pyx_NewRef(Py_NotImplemented);
29088 static PyObject *__pyx_nb_power_8PyClical_clifford(PyObject *left, PyObject *right , PyObject* extra_arg) {
29089 int maybe_self_is_left, maybe_self_is_right = 0;
29090 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29091 #if CYTHON_USE_TYPE_SLOTS 29092 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_power == &__pyx_nb_power_8PyClical_clifford)
29094 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29095 if (maybe_self_is_left) {
29097 res = __pyx_pw_8PyClical_8clifford_69__pow__(left, right, extra_arg);
29098 if (res != Py_NotImplemented)
return res;
29101 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29102 #if CYTHON_USE_TYPE_SLOTS 29103 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_power == &__pyx_nb_power_8PyClical_clifford)
29105 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29106 if (maybe_self_is_right) {
29107 return __pyx_nb_power_8PyClical_clifford_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_8PyClical_clifford, tp_base, PyTypeObject*), left, right , extra_arg);
29109 return __Pyx_NewRef(Py_NotImplemented);
29114 static CYTHON_INLINE PyObject *__pyx_nb_and_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
29116 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29117 slot = type->tp_as_number ? type->tp_as_number->nb_and : NULL;
29119 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_and);
29121 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
29123 static PyObject *__pyx_nb_and_8PyClical_clifford(PyObject *left, PyObject *right ) {
29124 int maybe_self_is_left, maybe_self_is_right = 0;
29125 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29126 #if CYTHON_USE_TYPE_SLOTS 29127 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_and == &__pyx_nb_and_8PyClical_clifford)
29129 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29130 if (maybe_self_is_left) {
29132 res = __pyx_pw_8PyClical_8clifford_45__and__(left, right);
29133 if (res != Py_NotImplemented)
return res;
29136 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29137 #if CYTHON_USE_TYPE_SLOTS 29138 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_and == &__pyx_nb_and_8PyClical_clifford)
29140 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29141 if (maybe_self_is_right) {
29142 return __pyx_pw_8PyClical_8clifford_47__rand__(right, left);
29144 return __Pyx_NewRef(Py_NotImplemented);
29149 static CYTHON_INLINE PyObject *__pyx_nb_xor_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
29151 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29152 slot = type->tp_as_number ? type->tp_as_number->nb_xor : NULL;
29154 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_xor);
29156 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
29158 static PyObject *__pyx_nb_xor_8PyClical_clifford(PyObject *left, PyObject *right ) {
29159 int maybe_self_is_left, maybe_self_is_right = 0;
29160 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29161 #if CYTHON_USE_TYPE_SLOTS 29162 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_xor == &__pyx_nb_xor_8PyClical_clifford)
29164 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29165 if (maybe_self_is_left) {
29167 res = __pyx_pw_8PyClical_8clifford_51__xor__(left, right);
29168 if (res != Py_NotImplemented)
return res;
29171 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29172 #if CYTHON_USE_TYPE_SLOTS 29173 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_xor == &__pyx_nb_xor_8PyClical_clifford)
29175 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29176 if (maybe_self_is_right) {
29177 return __pyx_pw_8PyClical_8clifford_53__rxor__(right, left);
29179 return __Pyx_NewRef(Py_NotImplemented);
29184 static CYTHON_INLINE PyObject *__pyx_nb_or_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
29186 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29187 slot = type->tp_as_number ? type->tp_as_number->nb_or : NULL;
29189 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_or);
29191 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
29193 static PyObject *__pyx_nb_or_8PyClical_clifford(PyObject *left, PyObject *right ) {
29194 int maybe_self_is_left, maybe_self_is_right = 0;
29195 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29196 #if CYTHON_USE_TYPE_SLOTS 29197 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_or == &__pyx_nb_or_8PyClical_clifford)
29199 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29200 if (maybe_self_is_left) {
29202 res = __pyx_pw_8PyClical_8clifford_65__or__(left, right);
29203 if (res != Py_NotImplemented)
return res;
29206 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29207 #if CYTHON_USE_TYPE_SLOTS 29208 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_or == &__pyx_nb_or_8PyClical_clifford)
29210 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29211 if (maybe_self_is_right) {
29212 return __pyx_nb_or_8PyClical_clifford_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_8PyClical_clifford, tp_base, PyTypeObject*), left, right );
29214 return __Pyx_NewRef(Py_NotImplemented);
29219 static CYTHON_INLINE PyObject *__pyx_nb_true_divide_8PyClical_clifford_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
29221 #if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 29222 slot = type->tp_as_number ? type->tp_as_number->nb_true_divide : NULL;
29224 slot = (binaryfunc) PyType_GetSlot(type, Py_nb_true_divide);
29226 return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
29228 static PyObject *__pyx_nb_true_divide_8PyClical_clifford(PyObject *left, PyObject *right ) {
29229 int maybe_self_is_left, maybe_self_is_right = 0;
29230 maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
29231 #if CYTHON_USE_TYPE_SLOTS 29232 || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_8PyClical_clifford)
29234 || __Pyx_TypeCheck(left, __pyx_ptype_8PyClical_clifford);
29235 if (maybe_self_is_left) {
29237 res = __pyx_pw_8PyClical_8clifford_57__truediv__(left, right);
29238 if (res != Py_NotImplemented)
return res;
29241 maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
29242 #if CYTHON_USE_TYPE_SLOTS 29243 || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_8PyClical_clifford)
29245 || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_8PyClical_clifford);
29246 if (maybe_self_is_right) {
29247 return __pyx_pw_8PyClical_8clifford_59__rtruediv__(right, left);
29249 return __Pyx_NewRef(Py_NotImplemented);
29254 static PyObject *__pyx_specialmethod___pyx_pw_8PyClical_8clifford_109__repr__(PyObject *
self, CYTHON_UNUSED PyObject *arg) {
29255 return __pyx_pw_8PyClical_8clifford_109__repr__(
self);
29258 static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
29259 {
"reframe", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_11reframe, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_10reframe},
29260 {
"__radd__", (PyCFunction)__pyx_pw_8PyClical_8clifford_23__radd__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_22__radd__},
29261 {
"__rsub__", (PyCFunction)__pyx_pw_8PyClical_8clifford_29__rsub__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_28__rsub__},
29262 {
"__rmul__", (PyCFunction)__pyx_pw_8PyClical_8clifford_35__rmul__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_34__rmul__},
29263 {
"__rmod__", (PyCFunction)__pyx_pw_8PyClical_8clifford_41__rmod__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_40__rmod__},
29264 {
"__rand__", (PyCFunction)__pyx_pw_8PyClical_8clifford_47__rand__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_46__rand__},
29265 {
"__rxor__", (PyCFunction)__pyx_pw_8PyClical_8clifford_53__rxor__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_52__rxor__},
29266 {
"__rtruediv__", (PyCFunction)__pyx_pw_8PyClical_8clifford_59__rtruediv__, METH_O|METH_COEXIST, __pyx_doc_8PyClical_8clifford_58__rtruediv__},
29267 {
"inv", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_63inv, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_62inv},
29268 {
"pow", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_71pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70pow},
29269 {
"outer_pow", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_73outer_pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_72outer_pow},
29270 {
"scalar", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_77scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_76scalar},
29271 {
"pure", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_79pure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_78pure},
29272 {
"even", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_81even, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_80even},
29273 {
"odd", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_83odd, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_82odd},
29274 {
"vector_part", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_85vector_part, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_84vector_part},
29275 {
"involute", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_87involute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_86involute},
29276 {
"reverse", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_89reverse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_88reverse},
29277 {
"conj", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_91conj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_90conj},
29278 {
"quad", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_93quad, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_92quad},
29279 {
"norm", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_95norm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_94norm},
29280 {
"abs", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_97abs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_96abs},
29281 {
"max_abs", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_99max_abs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_98max_abs},
29282 {
"truncated", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_101truncated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_100truncated},
29283 {
"isinf", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_103isinf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_102isinf},
29284 {
"isnan", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_105isnan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_104isnan},
29285 {
"frame", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_107frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_106frame},
29286 {
"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_8PyClical_8clifford_109__repr__, METH_NOARGS|METH_COEXIST, __pyx_doc_8PyClical_8clifford_108__repr__},
29287 {
"__reduce_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_113__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
29288 {
"__setstate_cython__", (PyCFunction)(
void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8PyClical_8clifford_115__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
29291 #if CYTHON_USE_TYPE_SPECS 29292 static PyType_Slot __pyx_type_8PyClical_clifford_slots[] = {
29293 {Py_tp_dealloc, (
void *)__pyx_tp_dealloc_8PyClical_clifford},
29294 {Py_tp_repr, (
void *)__pyx_pw_8PyClical_8clifford_109__repr__},
29295 {Py_nb_add, (
void *)__pyx_nb_add_8PyClical_clifford},
29296 {Py_nb_subtract, (
void *)__pyx_nb_subtract_8PyClical_clifford},
29297 {Py_nb_multiply, (
void *)__pyx_nb_multiply_8PyClical_clifford},
29298 {Py_nb_remainder, (
void *)__pyx_nb_remainder_8PyClical_clifford},
29299 {Py_nb_power, (
void *)__pyx_nb_power_8PyClical_clifford},
29300 {Py_nb_negative, (
void *)__pyx_pw_8PyClical_8clifford_17__neg__},
29301 {Py_nb_positive, (
void *)__pyx_pw_8PyClical_8clifford_19__pos__},
29302 {Py_nb_and, (
void *)__pyx_nb_and_8PyClical_clifford},
29303 {Py_nb_xor, (
void *)__pyx_nb_xor_8PyClical_clifford},
29304 {Py_nb_or, (
void *)__pyx_nb_or_8PyClical_clifford},
29305 {Py_nb_inplace_add, (
void *)__pyx_pw_8PyClical_8clifford_25__iadd__},
29306 {Py_nb_inplace_subtract, (
void *)__pyx_pw_8PyClical_8clifford_31__isub__},
29307 {Py_nb_inplace_multiply, (
void *)__pyx_pw_8PyClical_8clifford_37__imul__},
29308 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 29309 {Py_nb_inplace_divide, (
void *)__pyx_pw_8PyClical_8clifford_61__idiv__},
29311 {Py_nb_inplace_remainder, (
void *)__pyx_pw_8PyClical_8clifford_43__imod__},
29312 {Py_nb_inplace_and, (
void *)__pyx_pw_8PyClical_8clifford_49__iand__},
29313 {Py_nb_inplace_xor, (
void *)__pyx_pw_8PyClical_8clifford_55__ixor__},
29314 {Py_nb_inplace_or, (
void *)__pyx_pw_8PyClical_8clifford_67__ior__},
29315 {Py_nb_true_divide, (
void *)__pyx_nb_true_divide_8PyClical_clifford},
29316 {Py_sq_item, (
void *)__pyx_sq_item_8PyClical_clifford},
29317 {Py_sq_contains, (
void *)__pyx_pw_8PyClical_8clifford_7__contains__},
29318 {Py_mp_subscript, (
void *)__pyx_pw_8PyClical_8clifford_15__getitem__},
29319 {Py_tp_call, (
void *)__pyx_pw_8PyClical_8clifford_75__call__},
29320 {Py_tp_str, (
void *)__pyx_pw_8PyClical_8clifford_111__str__},
29321 {Py_tp_doc, (
void *)PyDoc_STR(
"\n Python class clifford wraps C++ class Clifford.\n ")},
29322 {Py_tp_richcompare, (
void *)__pyx_pw_8PyClical_8clifford_13__richcmp__},
29323 {Py_tp_iter, (
void *)__pyx_pw_8PyClical_8clifford_9__iter__},
29324 {Py_tp_methods, (
void *)__pyx_methods_8PyClical_clifford},
29325 {Py_tp_new, (
void *)__pyx_tp_new_8PyClical_clifford},
29328 static PyType_Spec __pyx_type_8PyClical_clifford_spec = {
29329 "PyClical.clifford",
29330 sizeof(
struct __pyx_obj_8PyClical_clifford),
29332 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
29333 __pyx_type_8PyClical_clifford_slots,
29337 static PyNumberMethods __pyx_tp_as_number_clifford = {
29338 __pyx_nb_add_8PyClical_clifford,
29339 __pyx_nb_subtract_8PyClical_clifford,
29340 __pyx_nb_multiply_8PyClical_clifford,
29341 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 29344 __pyx_nb_remainder_8PyClical_clifford,
29346 __pyx_nb_power_8PyClical_clifford,
29347 __pyx_pw_8PyClical_8clifford_17__neg__,
29348 __pyx_pw_8PyClical_8clifford_19__pos__,
29354 __pyx_nb_and_8PyClical_clifford,
29355 __pyx_nb_xor_8PyClical_clifford,
29356 __pyx_nb_or_8PyClical_clifford,
29357 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 29361 #if PY_MAJOR_VERSION < 3 29367 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 29370 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 29373 __pyx_pw_8PyClical_8clifford_25__iadd__,
29374 __pyx_pw_8PyClical_8clifford_31__isub__,
29375 __pyx_pw_8PyClical_8clifford_37__imul__,
29376 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 29377 __pyx_pw_8PyClical_8clifford_61__idiv__,
29379 __pyx_pw_8PyClical_8clifford_43__imod__,
29383 __pyx_pw_8PyClical_8clifford_49__iand__,
29384 __pyx_pw_8PyClical_8clifford_55__ixor__,
29385 __pyx_pw_8PyClical_8clifford_67__ior__,
29387 __pyx_nb_true_divide_8PyClical_clifford,
29391 #if PY_VERSION_HEX >= 0x03050000 29394 #if PY_VERSION_HEX >= 0x03050000 29399 static PySequenceMethods __pyx_tp_as_sequence_clifford = {
29403 __pyx_sq_item_8PyClical_clifford,
29407 __pyx_pw_8PyClical_8clifford_7__contains__,
29412 static PyMappingMethods __pyx_tp_as_mapping_clifford = {
29414 __pyx_pw_8PyClical_8clifford_15__getitem__,
29418 static PyTypeObject __pyx_type_8PyClical_clifford = {
29419 PyVarObject_HEAD_INIT(0, 0)
29420 "PyClical.""clifford",
29421 sizeof(
struct __pyx_obj_8PyClical_clifford),
29423 __pyx_tp_dealloc_8PyClical_clifford,
29424 #if PY_VERSION_HEX < 0x030800b4
29427 #if PY_VERSION_HEX >= 0x030800b4
29432 #if PY_MAJOR_VERSION < 3 29435 #if PY_MAJOR_VERSION >= 3 29438 __pyx_pw_8PyClical_8clifford_109__repr__,
29439 &__pyx_tp_as_number_clifford,
29440 &__pyx_tp_as_sequence_clifford,
29441 &__pyx_tp_as_mapping_clifford,
29443 __pyx_pw_8PyClical_8clifford_75__call__,
29444 __pyx_pw_8PyClical_8clifford_111__str__,
29448 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
29449 PyDoc_STR(
"\n Python class clifford wraps C++ class Clifford.\n "),
29452 __pyx_pw_8PyClical_8clifford_13__richcmp__,
29454 __pyx_pw_8PyClical_8clifford_9__iter__,
29456 __pyx_methods_8PyClical_clifford,
29463 #if !CYTHON_USE_TYPE_SPECS 29468 __pyx_tp_new_8PyClical_clifford,
29478 #if PY_VERSION_HEX >= 0x030400a1 29479 #if CYTHON_USE_TP_FINALIZE 29485 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 29488 #if __PYX_NEED_TP_PRINT_SLOT == 1 29491 #if PY_VERSION_HEX >= 0x030C0000 29494 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 29500 static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
29501 static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
29503 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
29505 #if CYTHON_COMPILING_IN_LIMITED_API 29506 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
29507 o = alloc_func(t, 0);
29509 #if CYTHON_COMPILING_IN_CPYTHON 29510 if (likely((
int)(__pyx_freecount_8PyClical___pyx_scope_struct____iter__ > 0) & (
int)(t->tp_basicsize ==
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
29511 o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
29512 memset(o, 0,
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
29513 (void) PyObject_INIT(o, t);
29514 PyObject_GC_Track(o);
29518 o = (*t->tp_alloc)(t, 0);
29519 if (unlikely(!o))
return 0;
29525 static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
29526 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
29527 #if CYTHON_USE_TP_FINALIZE 29528 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
29529 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__) {
29530 if (PyObject_CallFinalizerFromDealloc(o))
return;
29534 PyObject_GC_UnTrack(o);
29535 Py_CLEAR(p->__pyx_v_idx);
29536 Py_CLEAR(p->__pyx_v_self);
29537 Py_CLEAR(p->__pyx_t_0);
29538 #if CYTHON_COMPILING_IN_CPYTHON 29539 if (((
int)(__pyx_freecount_8PyClical___pyx_scope_struct____iter__ < 8) & (
int)(Py_TYPE(o)->tp_basicsize ==
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
29540 __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
29544 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY 29545 (*Py_TYPE(o)->tp_free)(o);
29548 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
29549 if (tp_free) tp_free(o);
29555 static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v,
void *a) {
29557 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
29558 if (p->__pyx_v_idx) {
29559 e = (*v)(p->__pyx_v_idx, a);
if (
e)
return e;
29561 if (p->__pyx_v_self) {
29562 e = (*v)(((PyObject *)p->__pyx_v_self), a);
if (
e)
return e;
29564 if (p->__pyx_t_0) {
29565 e = (*v)(p->__pyx_t_0, a);
if (
e)
return e;
29569 #if CYTHON_USE_TYPE_SPECS 29570 static PyType_Slot __pyx_type_8PyClical___pyx_scope_struct____iter___slots[] = {
29571 {Py_tp_dealloc, (
void *)__pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__},
29572 {Py_tp_traverse, (
void *)__pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__},
29573 {Py_tp_new, (
void *)__pyx_tp_new_8PyClical___pyx_scope_struct____iter__},
29576 static PyType_Spec __pyx_type_8PyClical___pyx_scope_struct____iter___spec = {
29577 "PyClical.__pyx_scope_struct____iter__",
29578 sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__),
29580 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
29581 __pyx_type_8PyClical___pyx_scope_struct____iter___slots,
29585 static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
29586 PyVarObject_HEAD_INIT(0, 0)
29587 "PyClical.""__pyx_scope_struct____iter__",
29588 sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__),
29590 __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__,
29591 #if PY_VERSION_HEX < 0x030800b4
29594 #if PY_VERSION_HEX >= 0x030800b4
29599 #if PY_MAJOR_VERSION < 3 29602 #if PY_MAJOR_VERSION >= 3 29615 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
29617 __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__,
29630 #if !CYTHON_USE_TYPE_SPECS 29635 __pyx_tp_new_8PyClical___pyx_scope_struct____iter__,
29645 #if PY_VERSION_HEX >= 0x030400a1 29646 #if CYTHON_USE_TP_FINALIZE 29652 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 29655 #if __PYX_NEED_TP_PRINT_SLOT == 1 29658 #if PY_VERSION_HEX >= 0x030C0000 29661 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 29667 static PyMethodDef __pyx_methods[] = {
29670 #ifndef CYTHON_SMALL_CODE 29671 #if defined(__clang__) 29672 #define CYTHON_SMALL_CODE 29673 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 29674 #define CYTHON_SMALL_CODE __attribute__((cold)) 29676 #define CYTHON_SMALL_CODE 29681 static int __Pyx_CreateStringTabAndInitStrings(
void) {
29682 __Pyx_StringTabEntry __pyx_string_tab[] = {
29683 {&__pyx_kp_u_, __pyx_k_,
sizeof(__pyx_k_), 0, 1, 0, 0},
29684 {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index,
sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
29685 {&__pyx_kp_u_Abbreviation_for_index_set_q_p, __pyx_k_Abbreviation_for_index_set_q_p,
sizeof(__pyx_k_Abbreviation_for_index_set_q_p), 0, 1, 0, 0},
29686 {&__pyx_kp_u_Absolute_value_of_multivector_m, __pyx_k_Absolute_value_of_multivector_m,
sizeof(__pyx_k_Absolute_value_of_multivector_m), 0, 1, 0, 0},
29687 {&__pyx_kp_u_Absolute_value_square_root_of_n, __pyx_k_Absolute_value_square_root_of_n,
sizeof(__pyx_k_Absolute_value_square_root_of_n), 0, 1, 0, 0},
29688 {&__pyx_kp_u_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec,
sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 1, 0, 0},
29689 {&__pyx_kp_u_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje,
sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 1, 0, 0},
29690 {&__pyx_kp_u_Cannot_reframe, __pyx_k_Cannot_reframe,
sizeof(__pyx_k_Cannot_reframe), 0, 1, 0, 0},
29691 {&__pyx_kp_u_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of,
sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 1, 0, 0},
29692 {&__pyx_kp_u_Cardinality_Number_of_indices_i, __pyx_k_Cardinality_Number_of_indices_i,
sizeof(__pyx_k_Cardinality_Number_of_indices_i), 0, 1, 0, 0},
29693 {&__pyx_kp_u_Check_if_a_multivector_contains, __pyx_k_Check_if_a_multivector_contains,
sizeof(__pyx_k_Check_if_a_multivector_contains), 0, 1, 0, 0},
29694 {&__pyx_kp_u_Check_if_a_multivector_contains_2, __pyx_k_Check_if_a_multivector_contains_2,
sizeof(__pyx_k_Check_if_a_multivector_contains_2), 0, 1, 0, 0},
29695 {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute,
sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
29696 {&__pyx_kp_u_Conjugation_reverse_o_involute_2, __pyx_k_Conjugation_reverse_o_involute_2,
sizeof(__pyx_k_Conjugation_reverse_o_involute_2), 0, 1, 0, 0},
29697 {&__pyx_kp_u_Contraction_print_2_clifford_2, __pyx_k_Contraction_print_2_clifford_2,
sizeof(__pyx_k_Contraction_print_2_clifford_2), 0, 1, 0, 0},
29698 {&__pyx_kp_u_Contraction_print_clifford_1_cl, __pyx_k_Contraction_print_clifford_1_cl,
sizeof(__pyx_k_Contraction_print_clifford_1_cl), 0, 1, 0, 0},
29699 {&__pyx_kp_u_Contraction_x_clifford_1_x_clif, __pyx_k_Contraction_x_clifford_1_x_clif,
sizeof(__pyx_k_Contraction_x_clifford_1_x_clif), 0, 1, 0, 0},
29700 {&__pyx_kp_u_Convert_CGA3_null_vector_to_Euc, __pyx_k_Convert_CGA3_null_vector_to_Euc,
sizeof(__pyx_k_Convert_CGA3_null_vector_to_Euc), 0, 1, 0, 0},
29701 {&__pyx_kp_u_Convert_CGA3_null_vector_to_sta, __pyx_k_Convert_CGA3_null_vector_to_sta,
sizeof(__pyx_k_Convert_CGA3_null_vector_to_sta), 0, 1, 0, 0},
29702 {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto,
sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
29703 {&__pyx_kp_u_Copy_this_clifford_object_x_cli, __pyx_k_Copy_this_clifford_object_x_cli,
sizeof(__pyx_k_Copy_this_clifford_object_x_cli), 0, 1, 0, 0},
29704 {&__pyx_kp_u_Copy_this_index_set_object_s_in, __pyx_k_Copy_this_index_set_object_s_in,
sizeof(__pyx_k_Copy_this_index_set_object_s_in), 0, 1, 0, 0},
29705 {&__pyx_kp_u_Cosine_of_multivector_with_opti, __pyx_k_Cosine_of_multivector_with_opti,
sizeof(__pyx_k_Cosine_of_multivector_with_opti), 0, 1, 0, 0},
29706 {&__pyx_kp_u_Even_part_of_multivector_sum_of, __pyx_k_Even_part_of_multivector_sum_of,
sizeof(__pyx_k_Even_part_of_multivector_sum_of), 0, 1, 0, 0},
29707 {&__pyx_kp_u_Even_part_of_multivector_sum_of_2, __pyx_k_Even_part_of_multivector_sum_of_2,
sizeof(__pyx_k_Even_part_of_multivector_sum_of_2), 0, 1, 0, 0},
29708 {&__pyx_kp_u_Exponential_of_multivector_x_cl, __pyx_k_Exponential_of_multivector_x_cl,
sizeof(__pyx_k_Exponential_of_multivector_x_cl), 0, 1, 0, 0},
29709 {&__pyx_kp_u_Geometric_difference_print_1_cl, __pyx_k_Geometric_difference_print_1_cl,
sizeof(__pyx_k_Geometric_difference_print_1_cl), 0, 1, 0, 0},
29710 {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif,
sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
29711 {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford,
sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
29712 {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers,
sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
29713 {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2,
sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
29714 {&__pyx_kp_u_Geometric_product_print_2_cliff, __pyx_k_Geometric_product_print_2_cliff,
sizeof(__pyx_k_Geometric_product_print_2_cliff), 0, 1, 0, 0},
29715 {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor,
sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
29716 {&__pyx_kp_u_Geometric_product_x_clifford_2, __pyx_k_Geometric_product_x_clifford_2,
sizeof(__pyx_k_Geometric_product_x_clifford_2), 0, 1, 0, 0},
29717 {&__pyx_kp_u_Geometric_quotient_print_2_clif, __pyx_k_Geometric_quotient_print_2_clif,
sizeof(__pyx_k_Geometric_quotient_print_2_clif), 0, 1, 0, 0},
29718 {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo,
sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
29719 {&__pyx_kp_u_Geometric_quotient_x_clifford_1, __pyx_k_Geometric_quotient_x_clifford_1,
sizeof(__pyx_k_Geometric_quotient_x_clifford_1), 0, 1, 0, 0},
29720 {&__pyx_kp_u_Geometric_sum_print_1_clifford, __pyx_k_Geometric_sum_print_1_clifford,
sizeof(__pyx_k_Geometric_sum_print_1_clifford), 0, 1, 0, 0},
29721 {&__pyx_kp_u_Geometric_sum_print_clifford_1, __pyx_k_Geometric_sum_print_clifford_1,
sizeof(__pyx_k_Geometric_sum_print_clifford_1), 0, 1, 0, 0},
29722 {&__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl, __pyx_k_Geometric_sum_x_clifford_1_x_cl,
sizeof(__pyx_k_Geometric_sum_x_clifford_1_x_cl), 0, 1, 0, 0},
29723 {&__pyx_kp_u_Get_the_value_of_an_index_set_o, __pyx_k_Get_the_value_of_an_index_set_o,
sizeof(__pyx_k_Get_the_value_of_an_index_set_o), 0, 1, 0, 0},
29724 {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto,
sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
29725 {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector,
sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
29726 {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect,
sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
29727 {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway,
sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
29728 {&__pyx_n_s_IndexError, __pyx_k_IndexError,
sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
29729 {&__pyx_kp_u_Inner_product_print_2_clifford, __pyx_k_Inner_product_print_2_clifford,
sizeof(__pyx_k_Inner_product_print_2_clifford), 0, 1, 0, 0},
29730 {&__pyx_kp_u_Inner_product_print_clifford_1, __pyx_k_Inner_product_print_clifford_1,
sizeof(__pyx_k_Inner_product_print_clifford_1), 0, 1, 0, 0},
29731 {&__pyx_kp_u_Inner_product_x_clifford_1_x_cl, __pyx_k_Inner_product_x_clifford_1_x_cl,
sizeof(__pyx_k_Inner_product_x_clifford_1_x_cl), 0, 1, 0, 0},
29732 {&__pyx_kp_u_Integer_power_of_multivector_ob, __pyx_k_Integer_power_of_multivector_ob,
sizeof(__pyx_k_Integer_power_of_multivector_ob), 0, 1, 0, 0},
29733 {&__pyx_n_s_Integral, __pyx_k_Integral,
sizeof(__pyx_k_Integral), 0, 0, 1, 1},
29734 {&__pyx_kp_u_Inverse_cosine_of_multivector_w, __pyx_k_Inverse_cosine_of_multivector_w,
sizeof(__pyx_k_Inverse_cosine_of_multivector_w), 0, 1, 0, 0},
29735 {&__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu, __pyx_k_Inverse_hyperbolic_cosine_of_mu,
sizeof(__pyx_k_Inverse_hyperbolic_cosine_of_mu), 0, 1, 0, 0},
29736 {&__pyx_kp_u_Inverse_hyperbolic_sine_of_mult, __pyx_k_Inverse_hyperbolic_sine_of_mult,
sizeof(__pyx_k_Inverse_hyperbolic_sine_of_mult), 0, 1, 0, 0},
29737 {&__pyx_kp_u_Inverse_hyperbolic_tangent_of_m, __pyx_k_Inverse_hyperbolic_tangent_of_m,
sizeof(__pyx_k_Inverse_hyperbolic_tangent_of_m), 0, 1, 0, 0},
29738 {&__pyx_kp_u_Inverse_sine_of_multivector_wit, __pyx_k_Inverse_sine_of_multivector_wit,
sizeof(__pyx_k_Inverse_sine_of_multivector_wit), 0, 1, 0, 0},
29739 {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector,
sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
29740 {&__pyx_kp_u_Iterate_over_the_indices_of_an, __pyx_k_Iterate_over_the_indices_of_an,
sizeof(__pyx_k_Iterate_over_the_indices_of_an), 0, 1, 0, 0},
29741 {&__pyx_kp_u_Main_involution_each_i_is_repla, __pyx_k_Main_involution_each_i_is_repla,
sizeof(__pyx_k_Main_involution_each_i_is_repla), 0, 1, 0, 0},
29742 {&__pyx_kp_u_Main_involution_each_i_is_repla_2, __pyx_k_Main_involution_each_i_is_repla_2,
sizeof(__pyx_k_Main_involution_each_i_is_repla_2), 0, 1, 0, 0},
29743 {&__pyx_kp_u_Maximum_absolute_value_of_coord, __pyx_k_Maximum_absolute_value_of_coord,
sizeof(__pyx_k_Maximum_absolute_value_of_coord), 0, 1, 0, 0},
29744 {&__pyx_kp_u_Maximum_member_index_set_1_1_2, __pyx_k_Maximum_member_index_set_1_1_2,
sizeof(__pyx_k_Maximum_member_index_set_1_1_2), 0, 1, 0, 0},
29745 {&__pyx_kp_u_Maximum_of_absolute_values_of_c, __pyx_k_Maximum_of_absolute_values_of_c,
sizeof(__pyx_k_Maximum_of_absolute_values_of_c), 0, 1, 0, 0},
29746 {&__pyx_kp_u_Maximum_positive_index_or_0_if, __pyx_k_Maximum_positive_index_or_0_if,
sizeof(__pyx_k_Maximum_positive_index_or_0_if), 0, 1, 0, 0},
29747 {&__pyx_kp_u_Minimum_member_index_set_1_1_2, __pyx_k_Minimum_member_index_set_1_1_2,
sizeof(__pyx_k_Minimum_member_index_set_1_1_2), 0, 1, 0, 0},
29748 {&__pyx_kp_u_Minimum_negative_index_or_0_if, __pyx_k_Minimum_negative_index_or_0_if,
sizeof(__pyx_k_Minimum_negative_index_or_0_if), 0, 1, 0, 0},
29749 {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto,
sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
29750 {&__pyx_kp_u_Norm_sum_of_squares_of_coordina, __pyx_k_Norm_sum_of_squares_of_coordina,
sizeof(__pyx_k_Norm_sum_of_squares_of_coordina), 0, 1, 0, 0},
29751 {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented,
sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
29752 {&__pyx_kp_u_Not_applicable, __pyx_k_Not_applicable,
sizeof(__pyx_k_Not_applicable), 0, 1, 0, 0},
29753 {&__pyx_kp_u_Not_applicable_for_a_in_cliffor, __pyx_k_Not_applicable_for_a_in_cliffor,
sizeof(__pyx_k_Not_applicable_for_a_in_cliffor), 0, 1, 0, 0},
29754 {&__pyx_kp_u_Number_of_negative_indices_incl, __pyx_k_Number_of_negative_indices_incl,
sizeof(__pyx_k_Number_of_negative_indices_incl), 0, 1, 0, 0},
29755 {&__pyx_kp_u_Number_of_positive_indices_incl, __pyx_k_Number_of_positive_indices_incl,
sizeof(__pyx_k_Number_of_positive_indices_incl), 0, 1, 0, 0},
29756 {&__pyx_kp_u_Odd_part_of_multivector_sum_of, __pyx_k_Odd_part_of_multivector_sum_of,
sizeof(__pyx_k_Odd_part_of_multivector_sum_of), 0, 1, 0, 0},
29757 {&__pyx_kp_u_Odd_part_of_multivector_sum_of_2, __pyx_k_Odd_part_of_multivector_sum_of_2,
sizeof(__pyx_k_Odd_part_of_multivector_sum_of_2), 0, 1, 0, 0},
29758 {&__pyx_kp_u_Outer_product_power_of_multivec, __pyx_k_Outer_product_power_of_multivec,
sizeof(__pyx_k_Outer_product_power_of_multivec), 0, 1, 0, 0},
29759 {&__pyx_kp_u_Outer_product_power_x_clifford, __pyx_k_Outer_product_power_x_clifford,
sizeof(__pyx_k_Outer_product_power_x_clifford), 0, 1, 0, 0},
29760 {&__pyx_kp_u_Outer_product_print_2_clifford, __pyx_k_Outer_product_print_2_clifford,
sizeof(__pyx_k_Outer_product_print_2_clifford), 0, 1, 0, 0},
29761 {&__pyx_kp_u_Outer_product_print_clifford_1, __pyx_k_Outer_product_print_clifford_1,
sizeof(__pyx_k_Outer_product_print_clifford_1), 0, 1, 0, 0},
29762 {&__pyx_kp_u_Outer_product_x_clifford_1_x_cl, __pyx_k_Outer_product_x_clifford_1_x_cl,
sizeof(__pyx_k_Outer_product_x_clifford_1_x_cl), 0, 1, 0, 0},
29763 {&__pyx_kp_u_Power_self_to_the_m_x_clifford, __pyx_k_Power_self_to_the_m_x_clifford,
sizeof(__pyx_k_Power_self_to_the_m_x_clifford), 0, 1, 0, 0},
29764 {&__pyx_kp_u_Power_self_to_the_m_x_clifford_2, __pyx_k_Power_self_to_the_m_x_clifford_2,
sizeof(__pyx_k_Power_self_to_the_m_x_clifford_2), 0, 1, 0, 0},
29765 {&__pyx_kp_u_Pure_grade_vector_part_print_cl, __pyx_k_Pure_grade_vector_part_print_cl,
sizeof(__pyx_k_Pure_grade_vector_part_print_cl), 0, 1, 0, 0},
29766 {&__pyx_kp_u_Pure_part_print_clifford_1_1_1, __pyx_k_Pure_part_print_clifford_1_1_1,
sizeof(__pyx_k_Pure_part_print_clifford_1_1_1), 0, 1, 0, 0},
29767 {&__pyx_kp_u_Pure_part_print_pure_clifford_1, __pyx_k_Pure_part_print_pure_clifford_1,
sizeof(__pyx_k_Pure_part_print_pure_clifford_1), 0, 1, 0, 0},
29768 {&__pyx_kp_u_Put_self_into_a_larger_frame_co, __pyx_k_Put_self_into_a_larger_frame_co,
sizeof(__pyx_k_Put_self_into_a_larger_frame_co), 0, 1, 0, 0},
29769 {&__pyx_n_s_PyClical, __pyx_k_PyClical,
sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
29770 {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx,
sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
29771 {&__pyx_kp_u_Quadratic_form_rev_x_x_0_print, __pyx_k_Quadratic_form_rev_x_x_0_print,
sizeof(__pyx_k_Quadratic_form_rev_x_x_0_print), 0, 1, 0, 0},
29772 {&__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2, __pyx_k_Quadratic_form_rev_x_x_0_print_2,
sizeof(__pyx_k_Quadratic_form_rev_x_x_0_print_2), 0, 1, 0, 0},
29773 {&__pyx_kp_u_Quadratic_norm_error_tolerance, __pyx_k_Quadratic_norm_error_tolerance,
sizeof(__pyx_k_Quadratic_norm_error_tolerance), 0, 1, 0, 0},
29774 {&__pyx_kp_u_Random_multivector_within_a_fra, __pyx_k_Random_multivector_within_a_fra,
sizeof(__pyx_k_Random_multivector_within_a_fra), 0, 1, 0, 0},
29775 {&__pyx_n_s_Real, __pyx_k_Real,
sizeof(__pyx_k_Real), 0, 0, 1, 1},
29776 {&__pyx_kp_u_Real_part_synonym_for_scalar_pa, __pyx_k_Real_part_synonym_for_scalar_pa,
sizeof(__pyx_k_Real_part_synonym_for_scalar_pa), 0, 1, 0, 0},
29777 {&__pyx_kp_u_Relative_or_absolute_error_usin, __pyx_k_Relative_or_absolute_error_usin,
sizeof(__pyx_k_Relative_or_absolute_error_usin), 0, 1, 0, 0},
29778 {&__pyx_kp_u_Remove_all_terms_of_self_with_r, __pyx_k_Remove_all_terms_of_self_with_r,
sizeof(__pyx_k_Remove_all_terms_of_self_with_r), 0, 1, 0, 0},
29779 {&__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve, __pyx_k_Reversion_eg_1_2_2_1_print_reve,
sizeof(__pyx_k_Reversion_eg_1_2_2_1_print_reve), 0, 1, 0, 0},
29780 {&__pyx_kp_u_Reversion_eg_clifford_1_cliffor, __pyx_k_Reversion_eg_clifford_1_cliffor,
sizeof(__pyx_k_Reversion_eg_clifford_1_cliffor), 0, 1, 0, 0},
29781 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError,
sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
29782 {&__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc, __pyx_k_Scalar_part_clifford_1_1_1_2_sc,
sizeof(__pyx_k_Scalar_part_clifford_1_1_1_2_sc), 0, 1, 0, 0},
29783 {&__pyx_kp_u_Scalar_part_scalar_clifford_1_1, __pyx_k_Scalar_part_scalar_clifford_1_1,
sizeof(__pyx_k_Scalar_part_scalar_clifford_1_1), 0, 1, 0, 0},
29784 {&__pyx_n_s_Sequence, __pyx_k_Sequence,
sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
29785 {&__pyx_kp_u_Set_complement_not_print_index, __pyx_k_Set_complement_not_print_index,
sizeof(__pyx_k_Set_complement_not_print_index), 0, 1, 0, 0},
29786 {&__pyx_kp_u_Set_intersection_and_print_inde, __pyx_k_Set_intersection_and_print_inde,
sizeof(__pyx_k_Set_intersection_and_print_inde), 0, 1, 0, 0},
29787 {&__pyx_kp_u_Set_intersection_and_x_index_se, __pyx_k_Set_intersection_and_x_index_se,
sizeof(__pyx_k_Set_intersection_and_x_index_se), 0, 1, 0, 0},
29788 {&__pyx_kp_u_Set_the_value_of_an_index_set_o, __pyx_k_Set_the_value_of_an_index_set_o,
sizeof(__pyx_k_Set_the_value_of_an_index_set_o), 0, 1, 0, 0},
29789 {&__pyx_kp_u_Set_union_or_print_index_set_1, __pyx_k_Set_union_or_print_index_set_1,
sizeof(__pyx_k_Set_union_or_print_index_set_1), 0, 1, 0, 0},
29790 {&__pyx_kp_u_Set_union_or_x_index_set_1_x_in, __pyx_k_Set_union_or_x_index_set_1_x_in,
sizeof(__pyx_k_Set_union_or_x_index_set_1_x_in), 0, 1, 0, 0},
29791 {&__pyx_kp_u_Sign_of_geometric_product_of_tw, __pyx_k_Sign_of_geometric_product_of_tw,
sizeof(__pyx_k_Sign_of_geometric_product_of_tw), 0, 1, 0, 0},
29792 {&__pyx_kp_u_Sign_of_geometric_square_of_a_C, __pyx_k_Sign_of_geometric_square_of_a_C,
sizeof(__pyx_k_Sign_of_geometric_square_of_a_C), 0, 1, 0, 0},
29793 {&__pyx_kp_u_Sine_of_multivector_with_option, __pyx_k_Sine_of_multivector_with_option,
sizeof(__pyx_k_Sine_of_multivector_with_option), 0, 1, 0, 0},
29794 {&__pyx_kp_u_Square_root_of_1_which_commutes, __pyx_k_Square_root_of_1_which_commutes,
sizeof(__pyx_k_Square_root_of_1_which_commutes), 0, 1, 0, 0},
29795 {&__pyx_kp_u_Square_root_of_multivector_with, __pyx_k_Square_root_of_multivector_with,
sizeof(__pyx_k_Square_root_of_multivector_with), 0, 1, 0, 0},
29796 {&__pyx_kp_u_Subalgebra_generated_by_all_gen, __pyx_k_Subalgebra_generated_by_all_gen,
sizeof(__pyx_k_Subalgebra_generated_by_all_gen), 0, 1, 0, 0},
29797 {&__pyx_kp_u_Subscripting_map_from_index_set, __pyx_k_Subscripting_map_from_index_set,
sizeof(__pyx_k_Subscripting_map_from_index_set), 0, 1, 0, 0},
29798 {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus,
sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
29799 {&__pyx_kp_u_Symmetric_set_difference_exclus_2, __pyx_k_Symmetric_set_difference_exclus_2,
sizeof(__pyx_k_Symmetric_set_difference_exclus_2), 0, 1, 0, 0},
29800 {&__pyx_kp_u_Tangent_of_multivector_with_opt, __pyx_k_Tangent_of_multivector_with_opt,
sizeof(__pyx_k_Tangent_of_multivector_with_opt), 0, 1, 0, 0},
29801 {&__pyx_kp_u_Test_for_approximate_equality_o, __pyx_k_Test_for_approximate_equality_o,
sizeof(__pyx_k_Test_for_approximate_equality_o), 0, 1, 0, 0},
29802 {&__pyx_kp_u_Tests_for_functions_that_Doctes, __pyx_k_Tests_for_functions_that_Doctes,
sizeof(__pyx_k_Tests_for_functions_that_Doctes), 0, 1, 0, 0},
29803 {&__pyx_kp_u_Tests_for_functions_that_Doctes_2, __pyx_k_Tests_for_functions_that_Doctes_2,
sizeof(__pyx_k_Tests_for_functions_that_Doctes_2), 0, 1, 0, 0},
29804 {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat,
sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
29805 {&__pyx_kp_u_The_informal_string_representat_2, __pyx_k_The_informal_string_representat_2,
sizeof(__pyx_k_The_informal_string_representat_2), 0, 1, 0, 0},
29806 {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat,
sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
29807 {&__pyx_kp_u_The_official_string_representat_2, __pyx_k_The_official_string_representat_2,
sizeof(__pyx_k_The_official_string_representat_2), 0, 1, 0, 0},
29808 {&__pyx_kp_u_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not,
sizeof(__pyx_k_This_comparison_operator_is_not), 0, 1, 0, 0},
29809 {&__pyx_kp_u_Transform_left_hand_side_using, __pyx_k_Transform_left_hand_side_using,
sizeof(__pyx_k_Transform_left_hand_side_using), 0, 1, 0, 0},
29810 {&__pyx_kp_u_Transform_left_hand_side_using_2, __pyx_k_Transform_left_hand_side_using_2,
sizeof(__pyx_k_Transform_left_hand_side_using_2), 0, 1, 0, 0},
29811 {&__pyx_n_s_TypeError, __pyx_k_TypeError,
sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
29812 {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8,
sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
29813 {&__pyx_kp_u_Unary_print_clifford_1_1, __pyx_k_Unary_print_clifford_1_1,
sizeof(__pyx_k_Unary_print_clifford_1_1), 0, 1, 0, 0},
29814 {&__pyx_kp_u_Unary_print_clifford_1_1_2, __pyx_k_Unary_print_clifford_1_1_2,
sizeof(__pyx_k_Unary_print_clifford_1_1_2), 0, 1, 0, 0},
29815 {&__pyx_n_s_ValueError, __pyx_k_ValueError,
sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
29816 {&__pyx_kp_u_Vector_part_of_multivector_as_a, __pyx_k_Vector_part_of_multivector_as_a,
sizeof(__pyx_k_Vector_part_of_multivector_as_a), 0, 1, 0, 0},
29817 {&__pyx_n_s__113, __pyx_k__113,
sizeof(__pyx_k__113), 0, 0, 1, 1},
29818 {&__pyx_kp_u__2, __pyx_k__2,
sizeof(__pyx_k__2), 0, 1, 0, 0},
29819 {&__pyx_kp_u__3, __pyx_k__3,
sizeof(__pyx_k__3), 0, 1, 0, 0},
29820 {&__pyx_kp_u__4, __pyx_k__4,
sizeof(__pyx_k__4), 0, 1, 0, 0},
29821 {&__pyx_kp_u__5, __pyx_k__5,
sizeof(__pyx_k__5), 0, 1, 0, 0},
29822 {&__pyx_kp_u__6, __pyx_k__6,
sizeof(__pyx_k__6), 0, 1, 0, 0},
29823 {&__pyx_kp_u__7, __pyx_k__7,
sizeof(__pyx_k__7), 0, 1, 0, 0},
29824 {&__pyx_n_s__9, __pyx_k__9,
sizeof(__pyx_k__9), 0, 0, 1, 1},
29825 {&__pyx_n_s_abc, __pyx_k_abc,
sizeof(__pyx_k_abc), 0, 0, 1, 1},
29826 {&__pyx_n_s_abs, __pyx_k_abs,
sizeof(__pyx_k_abs), 0, 0, 1, 1},
29827 {&__pyx_kp_u_abs_line_1585, __pyx_k_abs_line_1585,
sizeof(__pyx_k_abs_line_1585), 0, 1, 0, 0},
29828 {&__pyx_n_s_acos, __pyx_k_acos,
sizeof(__pyx_k_acos), 0, 0, 1, 1},
29829 {&__pyx_kp_u_acos_line_1731, __pyx_k_acos_line_1731,
sizeof(__pyx_k_acos_line_1731), 0, 1, 0, 0},
29830 {&__pyx_n_s_acosh, __pyx_k_acosh,
sizeof(__pyx_k_acosh), 0, 0, 1, 1},
29831 {&__pyx_kp_u_acosh_line_1768, __pyx_k_acosh_line_1768,
sizeof(__pyx_k_acosh_line_1768), 0, 1, 0, 0},
29832 {&__pyx_n_s_agc3, __pyx_k_agc3,
sizeof(__pyx_k_agc3), 0, 0, 1, 1},
29833 {&__pyx_kp_u_agc3_line_1956, __pyx_k_agc3_line_1956,
sizeof(__pyx_k_agc3_line_1956), 0, 1, 0, 0},
29834 {&__pyx_n_s_approx_equal, __pyx_k_approx_equal,
sizeof(__pyx_k_approx_equal), 0, 0, 1, 1},
29835 {&__pyx_kp_u_approx_equal_line_1422, __pyx_k_approx_equal_line_1422,
sizeof(__pyx_k_approx_equal_line_1422), 0, 1, 0, 0},
29836 {&__pyx_n_s_args, __pyx_k_args,
sizeof(__pyx_k_args), 0, 0, 1, 1},
29837 {&__pyx_kp_u_as_frame, __pyx_k_as_frame,
sizeof(__pyx_k_as_frame), 0, 1, 0, 0},
29838 {&__pyx_n_s_asin, __pyx_k_asin,
sizeof(__pyx_k_asin), 0, 0, 1, 1},
29839 {&__pyx_kp_u_asin_line_1810, __pyx_k_asin_line_1810,
sizeof(__pyx_k_asin_line_1810), 0, 1, 0, 0},
29840 {&__pyx_n_s_asinh, __pyx_k_asinh,
sizeof(__pyx_k_asinh), 0, 0, 1, 1},
29841 {&__pyx_kp_u_asinh_line_1845, __pyx_k_asinh_line_1845,
sizeof(__pyx_k_asinh_line_1845), 0, 1, 0, 0},
29842 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines,
sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
29843 {&__pyx_n_s_atan, __pyx_k_atan,
sizeof(__pyx_k_atan), 0, 0, 1, 1},
29844 {&__pyx_kp_u_atan_line_1881, __pyx_k_atan_line_1881,
sizeof(__pyx_k_atan_line_1881), 0, 1, 0, 0},
29845 {&__pyx_n_s_atanh, __pyx_k_atanh,
sizeof(__pyx_k_atanh), 0, 0, 1, 1},
29846 {&__pyx_kp_u_atanh_line_1910, __pyx_k_atanh_line_1910,
sizeof(__pyx_k_atanh_line_1910), 0, 1, 0, 0},
29847 {&__pyx_n_s_cga3, __pyx_k_cga3,
sizeof(__pyx_k_cga3), 0, 0, 1, 1},
29848 {&__pyx_kp_u_cga3_line_1936, __pyx_k_cga3_line_1936,
sizeof(__pyx_k_cga3_line_1936), 0, 1, 0, 0},
29849 {&__pyx_n_s_cga3std, __pyx_k_cga3std,
sizeof(__pyx_k_cga3std), 0, 0, 1, 1},
29850 {&__pyx_kp_u_cga3std_line_1945, __pyx_k_cga3std_line_1945,
sizeof(__pyx_k_cga3std_line_1945), 0, 1, 0, 0},
29851 {&__pyx_n_s_cl, __pyx_k_cl,
sizeof(__pyx_k_cl), 0, 0, 1, 1},
29852 {&__pyx_n_s_clifford, __pyx_k_clifford,
sizeof(__pyx_k_clifford), 0, 0, 1, 1},
29853 {&__pyx_kp_u_clifford___add___line_740, __pyx_k_clifford___add___line_740,
sizeof(__pyx_k_clifford___add___line_740), 0, 1, 0, 0},
29854 {&__pyx_kp_u_clifford___and___line_872, __pyx_k_clifford___and___line_872,
sizeof(__pyx_k_clifford___and___line_872), 0, 1, 0, 0},
29855 {&__pyx_kp_u_clifford___call___line_1083, __pyx_k_clifford___call___line_1083,
sizeof(__pyx_k_clifford___call___line_1083), 0, 1, 0, 0},
29856 {&__pyx_kp_u_clifford___getitem___line_707, __pyx_k_clifford___getitem___line_707,
sizeof(__pyx_k_clifford___getitem___line_707), 0, 1, 0, 0},
29857 {&__pyx_kp_u_clifford___iadd___line_760, __pyx_k_clifford___iadd___line_760,
sizeof(__pyx_k_clifford___iadd___line_760), 0, 1, 0, 0},
29858 {&__pyx_kp_u_clifford___iand___line_896, __pyx_k_clifford___iand___line_896,
sizeof(__pyx_k_clifford___iand___line_896), 0, 1, 0, 0},
29859 {&__pyx_kp_u_clifford___idiv___line_974, __pyx_k_clifford___idiv___line_974,
sizeof(__pyx_k_clifford___idiv___line_974), 0, 1, 0, 0},
29860 {&__pyx_kp_u_clifford___imod___line_857, __pyx_k_clifford___imod___line_857,
sizeof(__pyx_k_clifford___imod___line_857), 0, 1, 0, 0},
29861 {&__pyx_kp_u_clifford___imul___line_820, __pyx_k_clifford___imul___line_820,
sizeof(__pyx_k_clifford___imul___line_820), 0, 1, 0, 0},
29862 {&__pyx_kp_u_clifford___ior___line_1013, __pyx_k_clifford___ior___line_1013,
sizeof(__pyx_k_clifford___ior___line_1013), 0, 1, 0, 0},
29863 {&__pyx_kp_u_clifford___isub___line_789, __pyx_k_clifford___isub___line_789,
sizeof(__pyx_k_clifford___isub___line_789), 0, 1, 0, 0},
29864 {&__pyx_kp_u_clifford___iter___line_638, __pyx_k_clifford___iter___line_638,
sizeof(__pyx_k_clifford___iter___line_638), 0, 1, 0, 0},
29865 {&__pyx_kp_u_clifford___ixor___line_935, __pyx_k_clifford___ixor___line_935,
sizeof(__pyx_k_clifford___ixor___line_935), 0, 1, 0, 0},
29866 {&__pyx_kp_u_clifford___mod___line_833, __pyx_k_clifford___mod___line_833,
sizeof(__pyx_k_clifford___mod___line_833), 0, 1, 0, 0},
29867 {&__pyx_kp_u_clifford___mul___line_798, __pyx_k_clifford___mul___line_798,
sizeof(__pyx_k_clifford___mul___line_798), 0, 1, 0, 0},
29868 {&__pyx_kp_u_clifford___neg___line_722, __pyx_k_clifford___neg___line_722,
sizeof(__pyx_k_clifford___neg___line_722), 0, 1, 0, 0},
29869 {&__pyx_kp_u_clifford___or___line_1002, __pyx_k_clifford___or___line_1002,
sizeof(__pyx_k_clifford___or___line_1002), 0, 1, 0, 0},
29870 {&__pyx_kp_u_clifford___pos___line_731, __pyx_k_clifford___pos___line_731,
sizeof(__pyx_k_clifford___pos___line_731), 0, 1, 0, 0},
29871 {&__pyx_kp_u_clifford___pow___line_1024, __pyx_k_clifford___pow___line_1024,
sizeof(__pyx_k_clifford___pow___line_1024), 0, 1, 0, 0},
29872 {&__pyx_kp_u_clifford___radd___line_751, __pyx_k_clifford___radd___line_751,
sizeof(__pyx_k_clifford___radd___line_751), 0, 1, 0, 0},
29873 {&__pyx_kp_u_clifford___rand___line_887, __pyx_k_clifford___rand___line_887,
sizeof(__pyx_k_clifford___rand___line_887), 0, 1, 0, 0},
29874 {&__pyx_n_s_clifford___reduce_cython, __pyx_k_clifford___reduce_cython,
sizeof(__pyx_k_clifford___reduce_cython), 0, 0, 1, 1},
29875 {&__pyx_kp_u_clifford___repr___line_1298, __pyx_k_clifford___repr___line_1298,
sizeof(__pyx_k_clifford___repr___line_1298), 0, 1, 0, 0},
29876 {&__pyx_kp_u_clifford___rmod___line_848, __pyx_k_clifford___rmod___line_848,
sizeof(__pyx_k_clifford___rmod___line_848), 0, 1, 0, 0},
29877 {&__pyx_kp_u_clifford___rmul___line_811, __pyx_k_clifford___rmul___line_811,
sizeof(__pyx_k_clifford___rmul___line_811), 0, 1, 0, 0},
29878 {&__pyx_kp_u_clifford___rsub___line_780, __pyx_k_clifford___rsub___line_780,
sizeof(__pyx_k_clifford___rsub___line_780), 0, 1, 0, 0},
29879 {&__pyx_kp_u_clifford___rtruediv___line_965, __pyx_k_clifford___rtruediv___line_965,
sizeof(__pyx_k_clifford___rtruediv___line_965), 0, 1, 0, 0},
29880 {&__pyx_kp_u_clifford___rxor___line_926, __pyx_k_clifford___rxor___line_926,
sizeof(__pyx_k_clifford___rxor___line_926), 0, 1, 0, 0},
29881 {&__pyx_n_s_clifford___setstate_cython, __pyx_k_clifford___setstate_cython,
sizeof(__pyx_k_clifford___setstate_cython), 0, 0, 1, 1},
29882 {&__pyx_kp_u_clifford___str___line_1307, __pyx_k_clifford___str___line_1307,
sizeof(__pyx_k_clifford___str___line_1307), 0, 1, 0, 0},
29883 {&__pyx_kp_u_clifford___sub___line_769, __pyx_k_clifford___sub___line_769,
sizeof(__pyx_k_clifford___sub___line_769), 0, 1, 0, 0},
29884 {&__pyx_kp_u_clifford___truediv___line_950, __pyx_k_clifford___truediv___line_950,
sizeof(__pyx_k_clifford___truediv___line_950), 0, 1, 0, 0},
29885 {&__pyx_kp_u_clifford___xor___line_911, __pyx_k_clifford___xor___line_911,
sizeof(__pyx_k_clifford___xor___line_911), 0, 1, 0, 0},
29886 {&__pyx_n_s_clifford_abs, __pyx_k_clifford_abs,
sizeof(__pyx_k_clifford_abs), 0, 0, 1, 1},
29887 {&__pyx_kp_u_clifford_abs_line_1238, __pyx_k_clifford_abs_line_1238,
sizeof(__pyx_k_clifford_abs_line_1238), 0, 1, 0, 0},
29888 {&__pyx_n_s_clifford_conj, __pyx_k_clifford_conj,
sizeof(__pyx_k_clifford_conj), 0, 0, 1, 1},
29889 {&__pyx_kp_u_clifford_conj_line_1201, __pyx_k_clifford_conj_line_1201,
sizeof(__pyx_k_clifford_conj_line_1201), 0, 1, 0, 0},
29890 {&__pyx_n_s_clifford_copy, __pyx_k_clifford_copy,
sizeof(__pyx_k_clifford_copy), 0, 0, 1, 1},
29891 {&__pyx_kp_u_clifford_copy_line_556, __pyx_k_clifford_copy_line_556,
sizeof(__pyx_k_clifford_copy_line_556), 0, 1, 0, 0},
29892 {&__pyx_n_s_clifford_even, __pyx_k_clifford_even,
sizeof(__pyx_k_clifford_even), 0, 0, 1, 1},
29893 {&__pyx_kp_u_clifford_even_line_1124, __pyx_k_clifford_even_line_1124,
sizeof(__pyx_k_clifford_even_line_1124), 0, 1, 0, 0},
29894 {&__pyx_n_s_clifford_frame, __pyx_k_clifford_frame,
sizeof(__pyx_k_clifford_frame), 0, 0, 1, 1},
29895 {&__pyx_kp_u_clifford_frame_line_1287, __pyx_k_clifford_frame_line_1287,
sizeof(__pyx_k_clifford_frame_line_1287), 0, 1, 0, 0},
29896 {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests,
sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
29897 {&__pyx_kp_u_clifford_hidden_doctests_line_13, __pyx_k_clifford_hidden_doctests_line_13,
sizeof(__pyx_k_clifford_hidden_doctests_line_13), 0, 1, 0, 0},
29898 {&__pyx_n_s_clifford_inv, __pyx_k_clifford_inv,
sizeof(__pyx_k_clifford_inv), 0, 0, 1, 1},
29899 {&__pyx_kp_u_clifford_inv_line_989, __pyx_k_clifford_inv_line_989,
sizeof(__pyx_k_clifford_inv_line_989), 0, 1, 0, 0},
29900 {&__pyx_n_s_clifford_involute, __pyx_k_clifford_involute,
sizeof(__pyx_k_clifford_involute), 0, 0, 1, 1},
29901 {&__pyx_kp_u_clifford_involute_line_1170, __pyx_k_clifford_involute_line_1170,
sizeof(__pyx_k_clifford_involute_line_1170), 0, 1, 0, 0},
29902 {&__pyx_n_s_clifford_isinf, __pyx_k_clifford_isinf,
sizeof(__pyx_k_clifford_isinf), 0, 0, 1, 1},
29903 {&__pyx_kp_u_clifford_isinf_line_1269, __pyx_k_clifford_isinf_line_1269,
sizeof(__pyx_k_clifford_isinf_line_1269), 0, 1, 0, 0},
29904 {&__pyx_n_s_clifford_isnan, __pyx_k_clifford_isnan,
sizeof(__pyx_k_clifford_isnan), 0, 0, 1, 1},
29905 {&__pyx_kp_u_clifford_isnan_line_1278, __pyx_k_clifford_isnan_line_1278,
sizeof(__pyx_k_clifford_isnan_line_1278), 0, 1, 0, 0},
29906 {&__pyx_n_s_clifford_max_abs, __pyx_k_clifford_max_abs,
sizeof(__pyx_k_clifford_max_abs), 0, 0, 1, 1},
29907 {&__pyx_kp_u_clifford_max_abs_line_1247, __pyx_k_clifford_max_abs_line_1247,
sizeof(__pyx_k_clifford_max_abs_line_1247), 0, 1, 0, 0},
29908 {&__pyx_n_s_clifford_norm, __pyx_k_clifford_norm,
sizeof(__pyx_k_clifford_norm), 0, 0, 1, 1},
29909 {&__pyx_kp_u_clifford_norm_line_1227, __pyx_k_clifford_norm_line_1227,
sizeof(__pyx_k_clifford_norm_line_1227), 0, 1, 0, 0},
29910 {&__pyx_n_s_clifford_odd, __pyx_k_clifford_odd,
sizeof(__pyx_k_clifford_odd), 0, 0, 1, 1},
29911 {&__pyx_kp_u_clifford_odd_line_1133, __pyx_k_clifford_odd_line_1133,
sizeof(__pyx_k_clifford_odd_line_1133), 0, 1, 0, 0},
29912 {&__pyx_n_s_clifford_outer_pow, __pyx_k_clifford_outer_pow,
sizeof(__pyx_k_clifford_outer_pow), 0, 0, 1, 1},
29913 {&__pyx_kp_u_clifford_outer_pow_line_1067, __pyx_k_clifford_outer_pow_line_1067,
sizeof(__pyx_k_clifford_outer_pow_line_1067), 0, 1, 0, 0},
29914 {&__pyx_n_s_clifford_pow, __pyx_k_clifford_pow,
sizeof(__pyx_k_clifford_pow), 0, 0, 1, 1},
29915 {&__pyx_kp_u_clifford_pow_line_1043, __pyx_k_clifford_pow_line_1043,
sizeof(__pyx_k_clifford_pow_line_1043), 0, 1, 0, 0},
29916 {&__pyx_n_s_clifford_pure, __pyx_k_clifford_pure,
sizeof(__pyx_k_clifford_pure), 0, 0, 1, 1},
29917 {&__pyx_kp_u_clifford_pure_line_1113, __pyx_k_clifford_pure_line_1113,
sizeof(__pyx_k_clifford_pure_line_1113), 0, 1, 0, 0},
29918 {&__pyx_n_s_clifford_quad, __pyx_k_clifford_quad,
sizeof(__pyx_k_clifford_quad), 0, 0, 1, 1},
29919 {&__pyx_kp_u_clifford_quad_line_1216, __pyx_k_clifford_quad_line_1216,
sizeof(__pyx_k_clifford_quad_line_1216), 0, 1, 0, 0},
29920 {&__pyx_n_s_clifford_reframe, __pyx_k_clifford_reframe,
sizeof(__pyx_k_clifford_reframe), 0, 0, 1, 1},
29921 {&__pyx_kp_u_clifford_reframe_line_649, __pyx_k_clifford_reframe_line_649,
sizeof(__pyx_k_clifford_reframe_line_649), 0, 1, 0, 0},
29922 {&__pyx_n_s_clifford_reverse, __pyx_k_clifford_reverse,
sizeof(__pyx_k_clifford_reverse), 0, 0, 1, 1},
29923 {&__pyx_kp_u_clifford_reverse_line_1186, __pyx_k_clifford_reverse_line_1186,
sizeof(__pyx_k_clifford_reverse_line_1186), 0, 1, 0, 0},
29924 {&__pyx_n_s_clifford_scalar, __pyx_k_clifford_scalar,
sizeof(__pyx_k_clifford_scalar), 0, 0, 1, 1},
29925 {&__pyx_kp_u_clifford_scalar_line_1102, __pyx_k_clifford_scalar_line_1102,
sizeof(__pyx_k_clifford_scalar_line_1102), 0, 1, 0, 0},
29926 {&__pyx_n_s_clifford_truncated, __pyx_k_clifford_truncated,
sizeof(__pyx_k_clifford_truncated), 0, 0, 1, 1},
29927 {&__pyx_kp_u_clifford_truncated_line_1258, __pyx_k_clifford_truncated_line_1258,
sizeof(__pyx_k_clifford_truncated_line_1258), 0, 1, 0, 0},
29928 {&__pyx_n_s_clifford_vector_part, __pyx_k_clifford_vector_part,
sizeof(__pyx_k_clifford_vector_part), 0, 0, 1, 1},
29929 {&__pyx_kp_u_clifford_vector_part_line_1142, __pyx_k_clifford_vector_part_line_1142,
sizeof(__pyx_k_clifford_vector_part_line_1142), 0, 1, 0, 0},
29930 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback,
sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
29931 {&__pyx_n_s_close, __pyx_k_close,
sizeof(__pyx_k_close), 0, 0, 1, 1},
29932 {&__pyx_n_s_collections, __pyx_k_collections,
sizeof(__pyx_k_collections), 0, 0, 1, 1},
29933 {&__pyx_n_s_compare, __pyx_k_compare,
sizeof(__pyx_k_compare), 0, 0, 1, 1},
29934 {&__pyx_kp_u_compare_line_492, __pyx_k_compare_line_492,
sizeof(__pyx_k_compare_line_492), 0, 1, 0, 0},
29935 {&__pyx_n_s_complexifier, __pyx_k_complexifier,
sizeof(__pyx_k_complexifier), 0, 0, 1, 1},
29936 {&__pyx_kp_u_complexifier_line_1639, __pyx_k_complexifier_line_1639,
sizeof(__pyx_k_complexifier_line_1639), 0, 1, 0, 0},
29937 {&__pyx_n_s_conj, __pyx_k_conj,
sizeof(__pyx_k_conj), 0, 0, 1, 1},
29938 {&__pyx_kp_u_conj_line_1548, __pyx_k_conj_line_1548,
sizeof(__pyx_k_conj_line_1548), 0, 1, 0, 0},
29939 {&__pyx_n_s_copy, __pyx_k_copy,
sizeof(__pyx_k_copy), 0, 0, 1, 1},
29940 {&__pyx_n_s_cos, __pyx_k_cos,
sizeof(__pyx_k_cos), 0, 0, 1, 1},
29941 {&__pyx_kp_u_cos_line_1714, __pyx_k_cos_line_1714,
sizeof(__pyx_k_cos_line_1714), 0, 1, 0, 0},
29942 {&__pyx_n_s_cosh, __pyx_k_cosh,
sizeof(__pyx_k_cosh), 0, 0, 1, 1},
29943 {&__pyx_kp_u_cosh_line_1752, __pyx_k_cosh_line_1752,
sizeof(__pyx_k_cosh_line_1752), 0, 1, 0, 0},
29944 {&__pyx_n_s_count, __pyx_k_count,
sizeof(__pyx_k_count), 0, 0, 1, 1},
29945 {&__pyx_n_s_count_neg, __pyx_k_count_neg,
sizeof(__pyx_k_count_neg), 0, 0, 1, 1},
29946 {&__pyx_n_s_count_pos, __pyx_k_count_pos,
sizeof(__pyx_k_count_pos), 0, 0, 1, 1},
29947 {&__pyx_kp_u_disable, __pyx_k_disable,
sizeof(__pyx_k_disable), 0, 1, 0, 0},
29948 {&__pyx_n_s_doctest, __pyx_k_doctest,
sizeof(__pyx_k_doctest), 0, 0, 1, 1},
29949 {&__pyx_n_s_e, __pyx_k_e,
sizeof(__pyx_k_e), 0, 0, 1, 1},
29950 {&__pyx_kp_u_e_line_1999, __pyx_k_e_line_1999,
sizeof(__pyx_k_e_line_1999), 0, 1, 0, 0},
29951 {&__pyx_kp_u_enable, __pyx_k_enable,
sizeof(__pyx_k_enable), 0, 1, 0, 0},
29952 {&__pyx_n_s_encode, __pyx_k_encode,
sizeof(__pyx_k_encode), 0, 0, 1, 1},
29953 {&__pyx_n_s_err, __pyx_k_err,
sizeof(__pyx_k_err), 0, 0, 1, 1},
29954 {&__pyx_n_s_error_msg_prefix, __pyx_k_error_msg_prefix,
sizeof(__pyx_k_error_msg_prefix), 0, 0, 1, 1},
29955 {&__pyx_n_s_error_squared, __pyx_k_error_squared,
sizeof(__pyx_k_error_squared), 0, 0, 1, 1},
29956 {&__pyx_kp_u_error_squared_line_1409, __pyx_k_error_squared_line_1409,
sizeof(__pyx_k_error_squared_line_1409), 0, 1, 0, 0},
29957 {&__pyx_n_s_error_squared_tol, __pyx_k_error_squared_tol,
sizeof(__pyx_k_error_squared_tol), 0, 0, 1, 1},
29958 {&__pyx_kp_u_error_squared_tol_line_1400, __pyx_k_error_squared_tol_line_1400,
sizeof(__pyx_k_error_squared_tol_line_1400), 0, 1, 0, 0},
29959 {&__pyx_n_s_even, __pyx_k_even,
sizeof(__pyx_k_even), 0, 0, 1, 1},
29960 {&__pyx_kp_u_even_line_1500, __pyx_k_even_line_1500,
sizeof(__pyx_k_even_line_1500), 0, 1, 0, 0},
29961 {&__pyx_n_s_exp, __pyx_k_exp,
sizeof(__pyx_k_exp), 0, 0, 1, 1},
29962 {&__pyx_kp_u_exp_line_1677, __pyx_k_exp_line_1677,
sizeof(__pyx_k_exp_line_1677), 0, 1, 0, 0},
29963 {&__pyx_n_s_fill, __pyx_k_fill,
sizeof(__pyx_k_fill), 0, 0, 1, 1},
29964 {&__pyx_n_s_frame, __pyx_k_frame,
sizeof(__pyx_k_frame), 0, 0, 1, 1},
29965 {&__pyx_n_s_frm, __pyx_k_frm,
sizeof(__pyx_k_frm), 0, 0, 1, 1},
29966 {&__pyx_kp_u_from, __pyx_k_from,
sizeof(__pyx_k_from), 0, 1, 0, 0},
29967 {&__pyx_kp_u_gc, __pyx_k_gc,
sizeof(__pyx_k_gc), 0, 1, 0, 0},
29968 {&__pyx_n_s_getstate, __pyx_k_getstate,
sizeof(__pyx_k_getstate), 0, 0, 1, 1},
29969 {&__pyx_n_s_grade, __pyx_k_grade,
sizeof(__pyx_k_grade), 0, 0, 1, 1},
29970 {&__pyx_n_s_hash_fn, __pyx_k_hash_fn,
sizeof(__pyx_k_hash_fn), 0, 0, 1, 1},
29971 {&__pyx_n_s_i, __pyx_k_i,
sizeof(__pyx_k_i), 0, 0, 1, 1},
29972 {&__pyx_n_s_imag, __pyx_k_imag,
sizeof(__pyx_k_imag), 0, 0, 1, 1},
29973 {&__pyx_kp_u_imag_line_1478, __pyx_k_imag_line_1478,
sizeof(__pyx_k_imag_line_1478), 0, 1, 0, 0},
29974 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
29975 {&__pyx_n_s_index_set, __pyx_k_index_set,
sizeof(__pyx_k_index_set), 0, 0, 1, 1},
29976 {&__pyx_kp_u_index_set___and___line_271, __pyx_k_index_set___and___line_271,
sizeof(__pyx_k_index_set___and___line_271), 0, 1, 0, 0},
29977 {&__pyx_kp_u_index_set___getitem___line_191, __pyx_k_index_set___getitem___line_191,
sizeof(__pyx_k_index_set___getitem___line_191), 0, 1, 0, 0},
29978 {&__pyx_kp_u_index_set___iand___line_282, __pyx_k_index_set___iand___line_282,
sizeof(__pyx_k_index_set___iand___line_282), 0, 1, 0, 0},
29979 {&__pyx_kp_u_index_set___invert___line_240, __pyx_k_index_set___invert___line_240,
sizeof(__pyx_k_index_set___invert___line_240), 0, 1, 0, 0},
29980 {&__pyx_kp_u_index_set___ior___line_304, __pyx_k_index_set___ior___line_304,
sizeof(__pyx_k_index_set___ior___line_304), 0, 1, 0, 0},
29981 {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter,
sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
29982 {&__pyx_kp_u_index_set___iter___line_229, __pyx_k_index_set___iter___line_229,
sizeof(__pyx_k_index_set___iter___line_229), 0, 1, 0, 0},
29983 {&__pyx_kp_u_index_set___ixor___line_260, __pyx_k_index_set___ixor___line_260,
sizeof(__pyx_k_index_set___ixor___line_260), 0, 1, 0, 0},
29984 {&__pyx_kp_u_index_set___or___line_293, __pyx_k_index_set___or___line_293,
sizeof(__pyx_k_index_set___or___line_293), 0, 1, 0, 0},
29985 {&__pyx_n_s_index_set___reduce_cython, __pyx_k_index_set___reduce_cython,
sizeof(__pyx_k_index_set___reduce_cython), 0, 0, 1, 1},
29986 {&__pyx_kp_u_index_set___repr___line_384, __pyx_k_index_set___repr___line_384,
sizeof(__pyx_k_index_set___repr___line_384), 0, 1, 0, 0},
29987 {&__pyx_kp_u_index_set___setitem___line_179, __pyx_k_index_set___setitem___line_179,
sizeof(__pyx_k_index_set___setitem___line_179), 0, 1, 0, 0},
29988 {&__pyx_n_s_index_set___setstate_cython, __pyx_k_index_set___setstate_cython,
sizeof(__pyx_k_index_set___setstate_cython), 0, 0, 1, 1},
29989 {&__pyx_kp_u_index_set___str___line_395, __pyx_k_index_set___str___line_395,
sizeof(__pyx_k_index_set___str___line_395), 0, 1, 0, 0},
29990 {&__pyx_kp_u_index_set___xor___line_249, __pyx_k_index_set___xor___line_249,
sizeof(__pyx_k_index_set___xor___line_249), 0, 1, 0, 0},
29991 {&__pyx_n_s_index_set_copy, __pyx_k_index_set_copy,
sizeof(__pyx_k_index_set_copy), 0, 0, 1, 1},
29992 {&__pyx_kp_u_index_set_copy_line_65, __pyx_k_index_set_copy_line_65,
sizeof(__pyx_k_index_set_copy_line_65), 0, 1, 0, 0},
29993 {&__pyx_n_s_index_set_count, __pyx_k_index_set_count,
sizeof(__pyx_k_index_set_count), 0, 0, 1, 1},
29994 {&__pyx_kp_u_index_set_count_line_315, __pyx_k_index_set_count_line_315,
sizeof(__pyx_k_index_set_count_line_315), 0, 1, 0, 0},
29995 {&__pyx_n_s_index_set_count_neg, __pyx_k_index_set_count_neg,
sizeof(__pyx_k_index_set_count_neg), 0, 0, 1, 1},
29996 {&__pyx_kp_u_index_set_count_neg_line_324, __pyx_k_index_set_count_neg_line_324,
sizeof(__pyx_k_index_set_count_neg_line_324), 0, 1, 0, 0},
29997 {&__pyx_n_s_index_set_count_pos, __pyx_k_index_set_count_pos,
sizeof(__pyx_k_index_set_count_pos), 0, 0, 1, 1},
29998 {&__pyx_kp_u_index_set_count_pos_line_333, __pyx_k_index_set_count_pos_line_333,
sizeof(__pyx_k_index_set_count_pos_line_333), 0, 1, 0, 0},
29999 {&__pyx_n_s_index_set_hash_fn, __pyx_k_index_set_hash_fn,
sizeof(__pyx_k_index_set_hash_fn), 0, 0, 1, 1},
30000 {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests,
sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
30001 {&__pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_k_index_set_hidden_doctests_line_4,
sizeof(__pyx_k_index_set_hidden_doctests_line_4), 0, 1, 0, 0},
30002 {&__pyx_n_s_index_set_max, __pyx_k_index_set_max,
sizeof(__pyx_k_index_set_max), 0, 0, 1, 1},
30003 {&__pyx_kp_u_index_set_max_line_351, __pyx_k_index_set_max_line_351,
sizeof(__pyx_k_index_set_max_line_351), 0, 1, 0, 0},
30004 {&__pyx_n_s_index_set_min, __pyx_k_index_set_min,
sizeof(__pyx_k_index_set_min), 0, 0, 1, 1},
30005 {&__pyx_kp_u_index_set_min_line_342, __pyx_k_index_set_min_line_342,
sizeof(__pyx_k_index_set_min_line_342), 0, 1, 0, 0},
30006 {&__pyx_n_s_index_set_sign_of_mult, __pyx_k_index_set_sign_of_mult,
sizeof(__pyx_k_index_set_sign_of_mult), 0, 0, 1, 1},
30007 {&__pyx_kp_u_index_set_sign_of_mult_line_366, __pyx_k_index_set_sign_of_mult_line_366,
sizeof(__pyx_k_index_set_sign_of_mult_line_366), 0, 1, 0, 0},
30008 {&__pyx_n_s_index_set_sign_of_square, __pyx_k_index_set_sign_of_square,
sizeof(__pyx_k_index_set_sign_of_square), 0, 0, 1, 1},
30009 {&__pyx_kp_u_index_set_sign_of_square_line_37, __pyx_k_index_set_sign_of_square_line_37,
sizeof(__pyx_k_index_set_sign_of_square_line_37), 0, 1, 0, 0},
30010 {&__pyx_n_s_initializing, __pyx_k_initializing,
sizeof(__pyx_k_initializing), 0, 0, 1, 1},
30011 {&__pyx_n_s_inv, __pyx_k_inv,
sizeof(__pyx_k_inv), 0, 0, 1, 1},
30012 {&__pyx_kp_u_inv_line_1441, __pyx_k_inv_line_1441,
sizeof(__pyx_k_inv_line_1441), 0, 1, 0, 0},
30013 {&__pyx_kp_u_invalid, __pyx_k_invalid,
sizeof(__pyx_k_invalid), 0, 1, 0, 0},
30014 {&__pyx_kp_u_invalid_string, __pyx_k_invalid_string,
sizeof(__pyx_k_invalid_string), 0, 1, 0, 0},
30015 {&__pyx_n_s_involute, __pyx_k_involute,
sizeof(__pyx_k_involute), 0, 0, 1, 1},
30016 {&__pyx_kp_u_involute_line_1518, __pyx_k_involute_line_1518,
sizeof(__pyx_k_involute_line_1518), 0, 1, 0, 0},
30017 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine,
sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
30018 {&__pyx_kp_u_isenabled, __pyx_k_isenabled,
sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
30019 {&__pyx_n_s_isinf, __pyx_k_isinf,
sizeof(__pyx_k_isinf), 0, 0, 1, 1},
30020 {&__pyx_n_s_isnan, __pyx_k_isnan,
sizeof(__pyx_k_isnan), 0, 0, 1, 1},
30021 {&__pyx_n_s_ist, __pyx_k_ist,
sizeof(__pyx_k_ist), 0, 0, 1, 1},
30022 {&__pyx_n_s_istpq, __pyx_k_istpq,
sizeof(__pyx_k_istpq), 0, 0, 1, 1},
30023 {&__pyx_kp_u_istpq_line_2012, __pyx_k_istpq_line_2012,
sizeof(__pyx_k_istpq_line_2012), 0, 1, 0, 0},
30024 {&__pyx_n_s_iter, __pyx_k_iter,
sizeof(__pyx_k_iter), 0, 0, 1, 1},
30025 {&__pyx_n_s_ixt, __pyx_k_ixt,
sizeof(__pyx_k_ixt), 0, 0, 1, 1},
30026 {&__pyx_kp_u_lexicographic_compare_eg_3_4_5, __pyx_k_lexicographic_compare_eg_3_4_5,
sizeof(__pyx_k_lexicographic_compare_eg_3_4_5), 0, 1, 0, 0},
30027 {&__pyx_n_s_lhs, __pyx_k_lhs,
sizeof(__pyx_k_lhs), 0, 0, 1, 1},
30028 {&__pyx_n_s_limit, __pyx_k_limit,
sizeof(__pyx_k_limit), 0, 0, 1, 1},
30029 {&__pyx_n_s_log, __pyx_k_log,
sizeof(__pyx_k_log), 0, 0, 1, 1},
30030 {&__pyx_kp_u_log_line_1691, __pyx_k_log_line_1691,
sizeof(__pyx_k_log_line_1691), 0, 1, 0, 0},
30031 {&__pyx_n_s_lst, __pyx_k_lst,
sizeof(__pyx_k_lst), 0, 0, 1, 1},
30032 {&__pyx_n_s_m, __pyx_k_m,
sizeof(__pyx_k_m), 0, 0, 1, 1},
30033 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
30034 {&__pyx_n_u_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 1, 0, 1},
30035 {&__pyx_n_s_math, __pyx_k_math,
sizeof(__pyx_k_math), 0, 0, 1, 1},
30036 {&__pyx_n_s_max, __pyx_k_max,
sizeof(__pyx_k_max), 0, 0, 1, 1},
30037 {&__pyx_n_s_max_abs, __pyx_k_max_abs,
sizeof(__pyx_k_max_abs), 0, 0, 1, 1},
30038 {&__pyx_kp_u_max_abs_line_1594, __pyx_k_max_abs_line_1594,
sizeof(__pyx_k_max_abs_line_1594), 0, 1, 0, 0},
30039 {&__pyx_n_s_max_pos, __pyx_k_max_pos,
sizeof(__pyx_k_max_pos), 0, 0, 1, 1},
30040 {&__pyx_kp_u_max_pos_line_513, __pyx_k_max_pos_line_513,
sizeof(__pyx_k_max_pos_line_513), 0, 1, 0, 0},
30041 {&__pyx_n_s_min, __pyx_k_min,
sizeof(__pyx_k_min), 0, 0, 1, 1},
30042 {&__pyx_n_s_min_neg, __pyx_k_min_neg,
sizeof(__pyx_k_min_neg), 0, 0, 1, 1},
30043 {&__pyx_kp_u_min_neg_line_504, __pyx_k_min_neg_line_504,
sizeof(__pyx_k_min_neg_line_504), 0, 1, 0, 0},
30044 {&__pyx_n_s_n, __pyx_k_n,
sizeof(__pyx_k_n), 0, 0, 1, 1},
30045 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
30046 {&__pyx_n_s_nbar3, __pyx_k_nbar3,
sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
30047 {&__pyx_n_s_ninf3, __pyx_k_ninf3,
sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
30048 {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non,
sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
30049 {&__pyx_n_s_norm, __pyx_k_norm,
sizeof(__pyx_k_norm), 0, 0, 1, 1},
30050 {&__pyx_kp_u_norm_line_1574, __pyx_k_norm_line_1574,
sizeof(__pyx_k_norm_line_1574), 0, 1, 0, 0},
30051 {&__pyx_kp_u_norm_sum_of_squares_of_coordina, __pyx_k_norm_sum_of_squares_of_coordina,
sizeof(__pyx_k_norm_sum_of_squares_of_coordina), 0, 1, 0, 0},
30052 {&__pyx_n_s_numbers, __pyx_k_numbers,
sizeof(__pyx_k_numbers), 0, 0, 1, 1},
30053 {&__pyx_n_s_obj, __pyx_k_obj,
sizeof(__pyx_k_obj), 0, 0, 1, 1},
30054 {&__pyx_n_s_odd, __pyx_k_odd,
sizeof(__pyx_k_odd), 0, 0, 1, 1},
30055 {&__pyx_kp_u_odd_line_1509, __pyx_k_odd_line_1509,
sizeof(__pyx_k_odd_line_1509), 0, 1, 0, 0},
30056 {&__pyx_n_s_other, __pyx_k_other,
sizeof(__pyx_k_other), 0, 0, 1, 1},
30057 {&__pyx_n_s_outer_pow, __pyx_k_outer_pow,
sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
30058 {&__pyx_kp_u_outer_pow_line_1630, __pyx_k_outer_pow_line_1630,
sizeof(__pyx_k_outer_pow_line_1630), 0, 1, 0, 0},
30059 {&__pyx_n_s_p, __pyx_k_p,
sizeof(__pyx_k_p), 0, 0, 1, 1},
30060 {&__pyx_n_s_pi, __pyx_k_pi,
sizeof(__pyx_k_pi), 0, 0, 1, 1},
30061 {&__pyx_n_s_pow, __pyx_k_pow,
sizeof(__pyx_k_pow), 0, 0, 1, 1},
30062 {&__pyx_kp_u_pow_line_1606, __pyx_k_pow_line_1606,
sizeof(__pyx_k_pow_line_1606), 0, 1, 0, 0},
30063 {&__pyx_n_s_pure, __pyx_k_pure,
sizeof(__pyx_k_pure), 0, 0, 1, 1},
30064 {&__pyx_kp_u_pure_line_1489, __pyx_k_pure_line_1489,
sizeof(__pyx_k_pure_line_1489), 0, 1, 0, 0},
30065 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state,
sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
30066 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable,
sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
30067 {&__pyx_n_s_q, __pyx_k_q,
sizeof(__pyx_k_q), 0, 0, 1, 1},
30068 {&__pyx_n_s_quad, __pyx_k_quad,
sizeof(__pyx_k_quad), 0, 0, 1, 1},
30069 {&__pyx_kp_u_quad_line_1563, __pyx_k_quad_line_1563,
sizeof(__pyx_k_quad_line_1563), 0, 1, 0, 0},
30070 {&__pyx_n_s_random_clifford, __pyx_k_random_clifford,
sizeof(__pyx_k_random_clifford), 0, 0, 1, 1},
30071 {&__pyx_kp_u_random_clifford_line_1927, __pyx_k_random_clifford_line_1927,
sizeof(__pyx_k_random_clifford_line_1927), 0, 1, 0, 0},
30072 {&__pyx_n_s_range, __pyx_k_range,
sizeof(__pyx_k_range), 0, 0, 1, 1},
30073 {&__pyx_n_s_real, __pyx_k_real,
sizeof(__pyx_k_real), 0, 0, 1, 1},
30074 {&__pyx_kp_u_real_line_1467, __pyx_k_real_line_1467,
sizeof(__pyx_k_real_line_1467), 0, 1, 0, 0},
30075 {&__pyx_n_s_reduce, __pyx_k_reduce,
sizeof(__pyx_k_reduce), 0, 0, 1, 1},
30076 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython,
sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
30077 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex,
sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
30078 {&__pyx_n_s_reframe, __pyx_k_reframe,
sizeof(__pyx_k_reframe), 0, 0, 1, 1},
30079 {&__pyx_n_s_result, __pyx_k_result,
sizeof(__pyx_k_result), 0, 0, 1, 1},
30080 {&__pyx_n_s_reverse, __pyx_k_reverse,
sizeof(__pyx_k_reverse), 0, 0, 1, 1},
30081 {&__pyx_kp_u_reverse_line_1533, __pyx_k_reverse_line_1533,
sizeof(__pyx_k_reverse_line_1533), 0, 1, 0, 0},
30082 {&__pyx_n_s_rhs, __pyx_k_rhs,
sizeof(__pyx_k_rhs), 0, 0, 1, 1},
30083 {&__pyx_n_s_scalar, __pyx_k_scalar,
sizeof(__pyx_k_scalar), 0, 0, 1, 1},
30084 {&__pyx_n_s_scalar_epsilon, __pyx_k_scalar_epsilon,
sizeof(__pyx_k_scalar_epsilon), 0, 0, 1, 1},
30085 {&__pyx_kp_u_scalar_line_1456, __pyx_k_scalar_line_1456,
sizeof(__pyx_k_scalar_line_1456), 0, 1, 0, 0},
30086 {&__pyx_n_s_self, __pyx_k_self,
sizeof(__pyx_k_self), 0, 0, 1, 1},
30087 {&__pyx_n_s_send, __pyx_k_send,
sizeof(__pyx_k_send), 0, 0, 1, 1},
30088 {&__pyx_n_s_setstate, __pyx_k_setstate,
sizeof(__pyx_k_setstate), 0, 0, 1, 1},
30089 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython,
sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
30090 {&__pyx_n_s_sign_of_mult, __pyx_k_sign_of_mult,
sizeof(__pyx_k_sign_of_mult), 0, 0, 1, 1},
30091 {&__pyx_n_s_sign_of_square, __pyx_k_sign_of_square,
sizeof(__pyx_k_sign_of_square), 0, 0, 1, 1},
30092 {&__pyx_n_s_sin, __pyx_k_sin,
sizeof(__pyx_k_sin), 0, 0, 1, 1},
30093 {&__pyx_kp_u_sin_line_1791, __pyx_k_sin_line_1791,
sizeof(__pyx_k_sin_line_1791), 0, 1, 0, 0},
30094 {&__pyx_n_s_sinh, __pyx_k_sinh,
sizeof(__pyx_k_sinh), 0, 0, 1, 1},
30095 {&__pyx_kp_u_sinh_line_1831, __pyx_k_sinh_line_1831,
sizeof(__pyx_k_sinh_line_1831), 0, 1, 0, 0},
30096 {&__pyx_n_s_spec, __pyx_k_spec,
sizeof(__pyx_k_spec), 0, 0, 1, 1},
30097 {&__pyx_n_s_sqrt, __pyx_k_sqrt,
sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
30098 {&__pyx_kp_u_sqrt_line_1654, __pyx_k_sqrt_line_1654,
sizeof(__pyx_k_sqrt_line_1654), 0, 1, 0, 0},
30099 {&__pyx_kp_s_stringsource, __pyx_k_stringsource,
sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
30100 {&__pyx_n_s_tan, __pyx_k_tan,
sizeof(__pyx_k_tan), 0, 0, 1, 1},
30101 {&__pyx_kp_u_tan_line_1864, __pyx_k_tan_line_1864,
sizeof(__pyx_k_tan_line_1864), 0, 1, 0, 0},
30102 {&__pyx_n_s_tanh, __pyx_k_tanh,
sizeof(__pyx_k_tanh), 0, 0, 1, 1},
30103 {&__pyx_kp_u_tanh_line_1898, __pyx_k_tanh_line_1898,
sizeof(__pyx_k_tanh_line_1898), 0, 1, 0, 0},
30104 {&__pyx_n_s_tau, __pyx_k_tau,
sizeof(__pyx_k_tau), 0, 0, 1, 1},
30105 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
30106 {&__pyx_n_s_test_2, __pyx_k_test_2,
sizeof(__pyx_k_test_2), 0, 0, 1, 1},
30107 {&__pyx_n_s_testmod, __pyx_k_testmod,
sizeof(__pyx_k_testmod), 0, 0, 1, 1},
30108 {&__pyx_n_s_threshold, __pyx_k_threshold,
sizeof(__pyx_k_threshold), 0, 0, 1, 1},
30109 {&__pyx_n_s_throw, __pyx_k_throw,
sizeof(__pyx_k_throw), 0, 0, 1, 1},
30110 {&__pyx_kp_u_to_frame, __pyx_k_to_frame,
sizeof(__pyx_k_to_frame), 0, 1, 0, 0},
30111 {&__pyx_n_s_tol, __pyx_k_tol,
sizeof(__pyx_k_tol), 0, 0, 1, 1},
30112 {&__pyx_n_s_truncated, __pyx_k_truncated,
sizeof(__pyx_k_truncated), 0, 0, 1, 1},
30113 {&__pyx_kp_u_using, __pyx_k_using,
sizeof(__pyx_k_using), 0, 1, 0, 0},
30114 {&__pyx_kp_u_using_invalid, __pyx_k_using_invalid,
sizeof(__pyx_k_using_invalid), 0, 1, 0, 0},
30115 {&__pyx_kp_u_utf_8, __pyx_k_utf_8,
sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
30116 {&__pyx_kp_u_value, __pyx_k_value,
sizeof(__pyx_k_value), 0, 1, 0, 0},
30117 {&__pyx_n_s_vec, __pyx_k_vec,
sizeof(__pyx_k_vec), 0, 0, 1, 1},
30118 {&__pyx_n_s_vector_part, __pyx_k_vector_part,
sizeof(__pyx_k_vector_part), 0, 0, 1, 1},
30119 {&__pyx_n_s_version, __pyx_k_version,
sizeof(__pyx_k_version), 0, 0, 1, 1},
30120 {&__pyx_n_s_xrange, __pyx_k_xrange,
sizeof(__pyx_k_xrange), 0, 0, 1, 1},
30121 {0, 0, 0, 0, 0, 0, 0}
30123 return __Pyx_InitStrings(__pyx_string_tab);
30126 static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(
void) {
30127 __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError);
if (!__pyx_builtin_IndexError) __PYX_ERR(0, 103, __pyx_L1_error)
30128 __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError);
if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 105, __pyx_L1_error)
30129 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError);
if (!__pyx_builtin_TypeError) __PYX_ERR(0, 105, __pyx_L1_error)
30130 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError);
if (!__pyx_builtin_ValueError) __PYX_ERR(0, 106, __pyx_L1_error)
30131 __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented);
if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 159, __pyx_L1_error)
30132 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range);
if (!__pyx_builtin_range) __PYX_ERR(0, 236, __pyx_L1_error)
30133 #if PY_MAJOR_VERSION >= 3 30134 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range);
if (!__pyx_builtin_xrange) __PYX_ERR(0, 1162, __pyx_L1_error)
30136 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange);
if (!__pyx_builtin_xrange) __PYX_ERR(0, 1162, __pyx_L1_error)
30144 static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(
void) {
30145 __Pyx_RefNannyDeclarations
30146 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
30155 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Not_applicable);
if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 636, __pyx_L1_error)
30156 __Pyx_GOTREF(__pyx_tuple__8);
30157 __Pyx_GIVEREF(__pyx_tuple__8);
30166 __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_self);
if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 65, __pyx_L1_error)
30167 __Pyx_GOTREF(__pyx_tuple__10);
30168 __Pyx_GIVEREF(__pyx_tuple__10);
30169 __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_copy, 65, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 65, __pyx_L1_error)
30178 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_count, 315, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 315, __pyx_L1_error)
30187 __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_count_neg, 324, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 324, __pyx_L1_error)
30196 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_count_pos, 333, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 333, __pyx_L1_error)
30205 __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_min, 342, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 342, __pyx_L1_error)
30214 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_max, 351, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 351, __pyx_L1_error)
30223 __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_hash_fn, 360, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 360, __pyx_L1_error)
30232 __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_rhs);
if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 366, __pyx_L1_error)
30233 __Pyx_GOTREF(__pyx_tuple__18);
30234 __Pyx_GIVEREF(__pyx_tuple__18);
30235 __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_sign_of_mult, 366, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 366, __pyx_L1_error)
30244 __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_sign_of_square, 375, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 375, __pyx_L1_error)
30251 __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(1, 1, __pyx_L1_error)
30259 __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state);
if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 3, __pyx_L1_error)
30260 __Pyx_GOTREF(__pyx_tuple__22);
30261 __Pyx_GIVEREF(__pyx_tuple__22);
30262 __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 3, __pyx_L1_error)
30271 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_index_set_hidden_doctests, 406, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 406, __pyx_L1_error)
30280 __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_lhs, __pyx_n_s_rhs);
if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 492, __pyx_L1_error)
30281 __Pyx_GOTREF(__pyx_tuple__25);
30282 __Pyx_GIVEREF(__pyx_tuple__25);
30283 __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_compare, 492, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 492, __pyx_L1_error)
30292 __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_obj);
if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 504, __pyx_L1_error)
30293 __Pyx_GOTREF(__pyx_tuple__27);
30294 __Pyx_GIVEREF(__pyx_tuple__27);
30295 __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_min_neg, 504, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 504, __pyx_L1_error)
30304 __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_max_pos, 513, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 513, __pyx_L1_error)
30313 __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_copy, 556, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 556, __pyx_L1_error)
30322 __pyx_tuple__31 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_ixt, __pyx_n_s_error_msg_prefix, __pyx_n_s_result, __pyx_n_s_err);
if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 649, __pyx_L1_error)
30323 __Pyx_GOTREF(__pyx_tuple__31);
30324 __Pyx_GIVEREF(__pyx_tuple__31);
30325 __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_reframe, 649, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 649, __pyx_L1_error)
30334 __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_inv, 989, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 989, __pyx_L1_error)
30343 __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_m);
if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1043, __pyx_L1_error)
30344 __Pyx_GOTREF(__pyx_tuple__34);
30345 __Pyx_GIVEREF(__pyx_tuple__34);
30346 __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_pow, 1043, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1043, __pyx_L1_error)
30355 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_outer_pow, 1067, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 1067, __pyx_L1_error)
30364 __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_scalar, 1102, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1102, __pyx_L1_error)
30373 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_pure, 1113, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1113, __pyx_L1_error)
30382 __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_even, 1124, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1124, __pyx_L1_error)
30391 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_odd, 1133, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1133, __pyx_L1_error)
30400 __pyx_tuple__41 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_frm, __pyx_n_s_error_msg_prefix, __pyx_n_s_vec, __pyx_n_s_n, __pyx_n_s_i, __pyx_n_s_lst, __pyx_n_s_err);
if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1142, __pyx_L1_error)
30401 __Pyx_GOTREF(__pyx_tuple__41);
30402 __Pyx_GIVEREF(__pyx_tuple__41);
30403 __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_vector_part, 1142, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1142, __pyx_L1_error)
30404 __pyx_tuple__43 = PyTuple_Pack(1, Py_None);
if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1142, __pyx_L1_error)
30405 __Pyx_GOTREF(__pyx_tuple__43);
30406 __Pyx_GIVEREF(__pyx_tuple__43);
30415 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_involute, 1170, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1170, __pyx_L1_error)
30424 __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_reverse, 1186, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1186, __pyx_L1_error)
30433 __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_conj, 1201, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 1201, __pyx_L1_error)
30442 __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_quad, 1216, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 1216, __pyx_L1_error)
30451 __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_norm, 1227, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1227, __pyx_L1_error)
30460 __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_abs, 1238, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 1238, __pyx_L1_error)
30469 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_max_abs, 1247, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 1247, __pyx_L1_error)
30478 __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_limit);
if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1258, __pyx_L1_error)
30479 __Pyx_GOTREF(__pyx_tuple__51);
30480 __Pyx_GIVEREF(__pyx_tuple__51);
30481 __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_truncated, 1258, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1258, __pyx_L1_error)
30490 __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_isinf, 1269, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 1269, __pyx_L1_error)
30499 __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_isnan, 1278, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 1278, __pyx_L1_error)
30508 __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_frame, 1287, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 1287, __pyx_L1_error)
30515 __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 1, __pyx_L1_error)
30523 __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(1, 3, __pyx_L1_error)
30532 __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_clifford_hidden_doctests, 1316, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1316, __pyx_L1_error)
30541 __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_error_squared_tol, 1400, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 1400, __pyx_L1_error)
30550 __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_threshold);
if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1409, __pyx_L1_error)
30551 __Pyx_GOTREF(__pyx_tuple__60);
30552 __Pyx_GIVEREF(__pyx_tuple__60);
30553 __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_error_squared, 1409, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 1409, __pyx_L1_error)
30562 __pyx_tuple__62 = PyTuple_Pack(4, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_threshold, __pyx_n_s_tol);
if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1422, __pyx_L1_error)
30563 __Pyx_GOTREF(__pyx_tuple__62);
30564 __Pyx_GIVEREF(__pyx_tuple__62);
30565 __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_approx_equal, 1422, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 1422, __pyx_L1_error)
30566 __pyx_tuple__64 = PyTuple_Pack(2, Py_None, Py_None);
if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1422, __pyx_L1_error)
30567 __Pyx_GOTREF(__pyx_tuple__64);
30568 __Pyx_GIVEREF(__pyx_tuple__64);
30577 __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_inv, 1441, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1441, __pyx_L1_error)
30586 __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_scalar, 1456, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 1456, __pyx_L1_error)
30595 __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_real, 1467, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 1467, __pyx_L1_error)
30604 __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_imag, 1478, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1478, __pyx_L1_error)
30613 __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_pure, 1489, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1489, __pyx_L1_error)
30622 __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_even, 1500, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1500, __pyx_L1_error)
30631 __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_odd, 1509, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 1509, __pyx_L1_error)
30640 __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_involute, 1518, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 1518, __pyx_L1_error)
30649 __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_reverse, 1533, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 1533, __pyx_L1_error)
30658 __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_conj, 1548, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1548, __pyx_L1_error)
30667 __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_quad, 1563, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 1563, __pyx_L1_error)
30676 __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_norm, 1574, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1574, __pyx_L1_error)
30685 __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_abs, 1585, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 1585, __pyx_L1_error)
30694 __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_max_abs, 1594, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1594, __pyx_L1_error)
30703 __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_m);
if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1606, __pyx_L1_error)
30704 __Pyx_GOTREF(__pyx_tuple__79);
30705 __Pyx_GIVEREF(__pyx_tuple__79);
30706 __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_pow, 1606, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1606, __pyx_L1_error)
30715 __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_outer_pow, 1630, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 1630, __pyx_L1_error)
30724 __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_complexifier, 1639, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1639, __pyx_L1_error)
30733 __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_i);
if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1654, __pyx_L1_error)
30734 __Pyx_GOTREF(__pyx_tuple__83);
30735 __Pyx_GIVEREF(__pyx_tuple__83);
30736 __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_sqrt, 1654, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1654, __pyx_L1_error)
30745 __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_exp, 1677, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1677, __pyx_L1_error)
30754 __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_log, 1691, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1691, __pyx_L1_error)
30763 __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_cos, 1714, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1714, __pyx_L1_error)
30772 __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_acos, 1731, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1731, __pyx_L1_error)
30781 __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_cosh, 1752, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1752, __pyx_L1_error)
30790 __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_acosh, 1768, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1768, __pyx_L1_error)
30799 __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_sin, 1791, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1791, __pyx_L1_error)
30808 __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_asin, 1810, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1810, __pyx_L1_error)
30817 __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_sinh, 1831, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1831, __pyx_L1_error)
30826 __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_asinh, 1845, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1845, __pyx_L1_error)
30835 __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_tan, 1864, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1864, __pyx_L1_error)
30844 __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_atan, 1881, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1881, __pyx_L1_error)
30853 __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_tanh, 1898, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1898, __pyx_L1_error)
30862 __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_atanh, 1910, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1910, __pyx_L1_error)
30871 __pyx_tuple__99 = PyTuple_Pack(2, __pyx_n_s_ixt, __pyx_n_s_fill);
if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 1927, __pyx_L1_error)
30872 __Pyx_GOTREF(__pyx_tuple__99);
30873 __Pyx_GIVEREF(__pyx_tuple__99);
30874 __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_random_clifford, 1927, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1927, __pyx_L1_error)
30875 __pyx_tuple__101 = PyTuple_Pack(1, __pyx_float_1_0);
if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1927, __pyx_L1_error)
30876 __Pyx_GOTREF(__pyx_tuple__101);
30877 __Pyx_GIVEREF(__pyx_tuple__101);
30886 __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_cga3, 1936, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1936, __pyx_L1_error)
30895 __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_cga3std, 1945, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1945, __pyx_L1_error)
30904 __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_agc3, 1956, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1956, __pyx_L1_error)
30913 __pyx_tuple__105 = PyTuple_Pack(1, __pyx_float_1_0);
if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1970, __pyx_L1_error)
30914 __Pyx_GOTREF(__pyx_tuple__105);
30915 __Pyx_GIVEREF(__pyx_tuple__105);
30924 __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_e, 1999, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1999, __pyx_L1_error)
30933 __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q);
if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 2012, __pyx_L1_error)
30934 __Pyx_GOTREF(__pyx_tuple__107);
30935 __Pyx_GIVEREF(__pyx_tuple__107);
30936 __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_istpq, 2012, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 2012, __pyx_L1_error)
30945 __pyx_tuple__109 = PyTuple_Pack(1, __pyx_int_4);
if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 2021, __pyx_L1_error)
30946 __Pyx_GOTREF(__pyx_tuple__109);
30947 __Pyx_GIVEREF(__pyx_tuple__109);
30948 __pyx_tuple__110 = PyTuple_Pack(1, __pyx_int_neg_1);
if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 2021, __pyx_L1_error)
30949 __Pyx_GOTREF(__pyx_tuple__110);
30950 __Pyx_GIVEREF(__pyx_tuple__110);
30959 __pyx_tuple__111 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest);
if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 2025, __pyx_L1_error)
30960 __Pyx_GOTREF(__pyx_tuple__111);
30961 __Pyx_GIVEREF(__pyx_tuple__111);
30962 __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_test, 2025, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 2025, __pyx_L1_error)
30963 __Pyx_RefNannyFinishContext();
30966 __Pyx_RefNannyFinishContext();
30971 static CYTHON_SMALL_CODE
int __Pyx_InitConstants(
void) {
30972 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
30973 __pyx_float_0_0 =
PyFloat_FromDouble(0.0);
if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30974 __pyx_float_1_0 =
PyFloat_FromDouble(1.0);
if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30975 __pyx_float_4_0 =
PyFloat_FromDouble(4.0);
if (unlikely(!__pyx_float_4_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30976 __pyx_float_8_0 =
PyFloat_FromDouble(8.0);
if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30977 __pyx_int_0 = PyInt_FromLong(0);
if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30978 __pyx_int_1 = PyInt_FromLong(1);
if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
30979 __pyx_int_4 = PyInt_FromLong(4);
if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
30980 __pyx_int_neg_1 = PyInt_FromLong(-1);
if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
30987 static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void) {
30992 static CYTHON_SMALL_CODE
int __Pyx_modinit_global_init_code(
void);
30993 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_export_code(
void);
30994 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_export_code(
void);
30995 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_init_code(
void);
30996 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_import_code(
void);
30997 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_import_code(
void);
30998 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_import_code(
void);
31000 static int __Pyx_modinit_global_init_code(
void) {
31001 __Pyx_RefNannyDeclarations
31002 __Pyx_RefNannySetupContext(
"__Pyx_modinit_global_init_code", 0);
31004 __Pyx_RefNannyFinishContext();
31008 static int __Pyx_modinit_variable_export_code(
void) {
31009 __Pyx_RefNannyDeclarations
31010 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_export_code", 0);
31012 __Pyx_RefNannyFinishContext();
31016 static int __Pyx_modinit_function_export_code(
void) {
31017 __Pyx_RefNannyDeclarations
31018 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_export_code", 0);
31020 __Pyx_RefNannyFinishContext();
31024 static int __Pyx_modinit_type_init_code(
void) {
31025 __Pyx_RefNannyDeclarations
31026 int __pyx_lineno = 0;
31027 const char *__pyx_filename = NULL;
31028 int __pyx_clineno = 0;
31029 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_init_code", 0);
31031 __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
31032 __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet))__pyx_f_8PyClical_9index_set_wrap;
31033 __pyx_vtable_8PyClical_index_set.unwrap = (
IndexSet (*)(
struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
31034 __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
31035 #if CYTHON_USE_TYPE_SPECS 31036 __pyx_ptype_8PyClical_index_set = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8PyClical_index_set_spec, NULL);
if (unlikely(!__pyx_ptype_8PyClical_index_set)) __PYX_ERR(0, 46, __pyx_L1_error)
31037 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8PyClical_index_set_spec, __pyx_ptype_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
31039 __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
31041 #if !CYTHON_COMPILING_IN_LIMITED_API 31043 #if !CYTHON_USE_TYPE_SPECS 31044 if (__Pyx_PyType_Ready(__pyx_ptype_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
31046 #if PY_MAJOR_VERSION < 3 31047 __pyx_ptype_8PyClical_index_set->tp_print = 0;
31049 #if !CYTHON_COMPILING_IN_LIMITED_API 31050 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8PyClical_index_set->tp_dictoffset && __pyx_ptype_8PyClical_index_set->tp_getattro == PyObject_GenericGetAttr)) {
31051 __pyx_ptype_8PyClical_index_set->tp_getattro = __Pyx_PyObject_GenericGetAttr;
31054 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31056 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__setitem__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31057 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31058 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31059 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
31060 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
31064 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31066 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__getitem__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31067 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31068 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31069 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
31070 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
31074 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31076 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__contains__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31077 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31078 __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31079 __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
31080 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
31084 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31086 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__iter__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31087 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31088 __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31089 __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
31090 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
31094 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31096 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__invert__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31097 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31098 __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31099 __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
31100 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
31104 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31106 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__xor__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31107 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31108 __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31109 __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
31110 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
31114 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31116 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__ixor__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31117 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31118 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31119 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
31120 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
31124 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31126 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__and__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31127 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31128 __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31129 __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
31130 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
31134 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31136 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__iand__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31137 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31138 __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31139 __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
31140 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
31144 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31146 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__or__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31147 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31148 __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31149 __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
31150 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
31154 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31156 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__ior__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31157 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31158 __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31159 __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
31160 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
31164 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31166 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__repr__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31167 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31168 __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31169 __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
31170 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
31174 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31176 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_index_set,
"__str__");
if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
31177 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31178 __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31179 __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
31180 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
31184 if (__Pyx_SetVtable(__pyx_ptype_8PyClical_index_set, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
31185 #if !CYTHON_COMPILING_IN_LIMITED_API 31186 if (__Pyx_MergeVtables(__pyx_ptype_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
31188 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *) __pyx_ptype_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
31189 #if !CYTHON_COMPILING_IN_LIMITED_API 31190 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
31192 __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
31193 __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
Clifford))__pyx_f_8PyClical_8clifford_wrap;
31194 __pyx_vtable_8PyClical_clifford.unwrap = (
Clifford (*)(
struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
31195 __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
31196 #if CYTHON_USE_TYPE_SPECS 31197 __pyx_ptype_8PyClical_clifford = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8PyClical_clifford_spec, NULL);
if (unlikely(!__pyx_ptype_8PyClical_clifford)) __PYX_ERR(0, 537, __pyx_L1_error)
31198 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8PyClical_clifford_spec, __pyx_ptype_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
31200 __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
31202 #if !CYTHON_COMPILING_IN_LIMITED_API 31204 #if !CYTHON_USE_TYPE_SPECS 31205 if (__Pyx_PyType_Ready(__pyx_ptype_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
31207 #if PY_MAJOR_VERSION < 3 31208 __pyx_ptype_8PyClical_clifford->tp_print = 0;
31210 #if !CYTHON_COMPILING_IN_LIMITED_API 31211 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8PyClical_clifford->tp_dictoffset && __pyx_ptype_8PyClical_clifford->tp_getattro == PyObject_GenericGetAttr)) {
31212 __pyx_ptype_8PyClical_clifford->tp_getattro = __Pyx_PyObject_GenericGetAttr;
31215 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31217 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__contains__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31218 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31219 __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31220 __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
31221 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
31225 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31227 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__iter__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31228 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31229 __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31230 __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
31231 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
31235 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31237 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__getitem__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31238 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31239 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31240 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
31241 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
31245 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31247 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__neg__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31248 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31249 __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31250 __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
31251 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
31255 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31257 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__pos__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31258 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31259 __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31260 __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
31261 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
31265 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31267 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__add__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31268 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31269 __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31270 __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
31271 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
31275 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31277 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__radd__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31278 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31279 __pyx_wrapperbase_8PyClical_8clifford_22__radd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31280 __pyx_wrapperbase_8PyClical_8clifford_22__radd__.doc = __pyx_doc_8PyClical_8clifford_22__radd__;
31281 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__radd__;
31285 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31287 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__iadd__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31288 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31289 __pyx_wrapperbase_8PyClical_8clifford_24__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31290 __pyx_wrapperbase_8PyClical_8clifford_24__iadd__.doc = __pyx_doc_8PyClical_8clifford_24__iadd__;
31291 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__iadd__;
31295 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31297 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__sub__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31298 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31299 __pyx_wrapperbase_8PyClical_8clifford_26__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31300 __pyx_wrapperbase_8PyClical_8clifford_26__sub__.doc = __pyx_doc_8PyClical_8clifford_26__sub__;
31301 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__sub__;
31305 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31307 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__rsub__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31308 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31309 __pyx_wrapperbase_8PyClical_8clifford_28__rsub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31310 __pyx_wrapperbase_8PyClical_8clifford_28__rsub__.doc = __pyx_doc_8PyClical_8clifford_28__rsub__;
31311 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__rsub__;
31315 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31317 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__isub__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31318 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31319 __pyx_wrapperbase_8PyClical_8clifford_30__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31320 __pyx_wrapperbase_8PyClical_8clifford_30__isub__.doc = __pyx_doc_8PyClical_8clifford_30__isub__;
31321 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__isub__;
31325 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31327 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__mul__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31328 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31329 __pyx_wrapperbase_8PyClical_8clifford_32__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31330 __pyx_wrapperbase_8PyClical_8clifford_32__mul__.doc = __pyx_doc_8PyClical_8clifford_32__mul__;
31331 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mul__;
31335 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31337 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__rmul__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31338 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31339 __pyx_wrapperbase_8PyClical_8clifford_34__rmul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31340 __pyx_wrapperbase_8PyClical_8clifford_34__rmul__.doc = __pyx_doc_8PyClical_8clifford_34__rmul__;
31341 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__rmul__;
31345 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31347 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__imul__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31348 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31349 __pyx_wrapperbase_8PyClical_8clifford_36__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31350 __pyx_wrapperbase_8PyClical_8clifford_36__imul__.doc = __pyx_doc_8PyClical_8clifford_36__imul__;
31351 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__imul__;
31355 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31357 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__mod__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31358 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31359 __pyx_wrapperbase_8PyClical_8clifford_38__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31360 __pyx_wrapperbase_8PyClical_8clifford_38__mod__.doc = __pyx_doc_8PyClical_8clifford_38__mod__;
31361 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__mod__;
31365 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31367 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__rmod__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31368 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31369 __pyx_wrapperbase_8PyClical_8clifford_40__rmod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31370 __pyx_wrapperbase_8PyClical_8clifford_40__rmod__.doc = __pyx_doc_8PyClical_8clifford_40__rmod__;
31371 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__rmod__;
31375 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31377 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__imod__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31378 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31379 __pyx_wrapperbase_8PyClical_8clifford_42__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31380 __pyx_wrapperbase_8PyClical_8clifford_42__imod__.doc = __pyx_doc_8PyClical_8clifford_42__imod__;
31381 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__imod__;
31385 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31387 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__and__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31388 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31389 __pyx_wrapperbase_8PyClical_8clifford_44__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31390 __pyx_wrapperbase_8PyClical_8clifford_44__and__.doc = __pyx_doc_8PyClical_8clifford_44__and__;
31391 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__and__;
31395 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31397 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__rand__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31398 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31399 __pyx_wrapperbase_8PyClical_8clifford_46__rand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31400 __pyx_wrapperbase_8PyClical_8clifford_46__rand__.doc = __pyx_doc_8PyClical_8clifford_46__rand__;
31401 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__rand__;
31405 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31407 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__iand__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31408 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31409 __pyx_wrapperbase_8PyClical_8clifford_48__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31410 __pyx_wrapperbase_8PyClical_8clifford_48__iand__.doc = __pyx_doc_8PyClical_8clifford_48__iand__;
31411 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_48__iand__;
31415 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31417 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__xor__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31418 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31419 __pyx_wrapperbase_8PyClical_8clifford_50__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31420 __pyx_wrapperbase_8PyClical_8clifford_50__xor__.doc = __pyx_doc_8PyClical_8clifford_50__xor__;
31421 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__xor__;
31425 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31427 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__rxor__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31428 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31429 __pyx_wrapperbase_8PyClical_8clifford_52__rxor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31430 __pyx_wrapperbase_8PyClical_8clifford_52__rxor__.doc = __pyx_doc_8PyClical_8clifford_52__rxor__;
31431 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__rxor__;
31435 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31437 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__ixor__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31438 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31439 __pyx_wrapperbase_8PyClical_8clifford_54__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31440 __pyx_wrapperbase_8PyClical_8clifford_54__ixor__.doc = __pyx_doc_8PyClical_8clifford_54__ixor__;
31441 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__ixor__;
31445 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31447 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__truediv__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31448 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31449 __pyx_wrapperbase_8PyClical_8clifford_56__truediv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31450 __pyx_wrapperbase_8PyClical_8clifford_56__truediv__.doc = __pyx_doc_8PyClical_8clifford_56__truediv__;
31451 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_56__truediv__;
31455 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31457 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__rtruediv__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31458 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31459 __pyx_wrapperbase_8PyClical_8clifford_58__rtruediv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31460 __pyx_wrapperbase_8PyClical_8clifford_58__rtruediv__.doc = __pyx_doc_8PyClical_8clifford_58__rtruediv__;
31461 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_58__rtruediv__;
31465 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 31466 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31468 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__idiv__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31469 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31470 __pyx_wrapperbase_8PyClical_8clifford_60__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31471 __pyx_wrapperbase_8PyClical_8clifford_60__idiv__.doc = __pyx_doc_8PyClical_8clifford_60__idiv__;
31472 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__idiv__;
31477 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31479 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__or__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31480 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31481 __pyx_wrapperbase_8PyClical_8clifford_64__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31482 __pyx_wrapperbase_8PyClical_8clifford_64__or__.doc = __pyx_doc_8PyClical_8clifford_64__or__;
31483 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_64__or__;
31487 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31489 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__ior__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31490 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31491 __pyx_wrapperbase_8PyClical_8clifford_66__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31492 __pyx_wrapperbase_8PyClical_8clifford_66__ior__.doc = __pyx_doc_8PyClical_8clifford_66__ior__;
31493 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_66__ior__;
31497 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31499 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__pow__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31500 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31501 __pyx_wrapperbase_8PyClical_8clifford_68__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31502 __pyx_wrapperbase_8PyClical_8clifford_68__pow__.doc = __pyx_doc_8PyClical_8clifford_68__pow__;
31503 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_68__pow__;
31507 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31509 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__call__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31510 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31511 __pyx_wrapperbase_8PyClical_8clifford_74__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31512 __pyx_wrapperbase_8PyClical_8clifford_74__call__.doc = __pyx_doc_8PyClical_8clifford_74__call__;
31513 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_74__call__;
31517 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31519 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__repr__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31520 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31521 __pyx_wrapperbase_8PyClical_8clifford_108__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31522 __pyx_wrapperbase_8PyClical_8clifford_108__repr__.doc = __pyx_doc_8PyClical_8clifford_108__repr__;
31523 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_108__repr__;
31527 #if CYTHON_UPDATE_DESCRIPTOR_DOC 31529 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_8PyClical_clifford,
"__str__");
if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
31530 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
31531 __pyx_wrapperbase_8PyClical_8clifford_110__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
31532 __pyx_wrapperbase_8PyClical_8clifford_110__str__.doc = __pyx_doc_8PyClical_8clifford_110__str__;
31533 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_110__str__;
31537 if (__Pyx_SetVtable(__pyx_ptype_8PyClical_clifford, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
31538 #if !CYTHON_COMPILING_IN_LIMITED_API 31539 if (__Pyx_MergeVtables(__pyx_ptype_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
31541 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *) __pyx_ptype_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
31542 #if !CYTHON_COMPILING_IN_LIMITED_API 31543 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
31545 #if CYTHON_USE_TYPE_SPECS 31546 __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8PyClical___pyx_scope_struct____iter___spec, NULL);
if (unlikely(!__pyx_ptype_8PyClical___pyx_scope_struct____iter__)) __PYX_ERR(0, 229, __pyx_L1_error)
31547 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8PyClical___pyx_scope_struct____iter___spec, __pyx_ptype_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
31549 __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
31551 #if !CYTHON_COMPILING_IN_LIMITED_API 31553 #if !CYTHON_USE_TYPE_SPECS 31554 if (__Pyx_PyType_Ready(__pyx_ptype_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
31556 #if PY_MAJOR_VERSION < 3 31557 __pyx_ptype_8PyClical___pyx_scope_struct____iter__->tp_print = 0;
31559 #if !CYTHON_COMPILING_IN_LIMITED_API 31560 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8PyClical___pyx_scope_struct____iter__->tp_dictoffset && __pyx_ptype_8PyClical___pyx_scope_struct____iter__->tp_getattro == PyObject_GenericGetAttr)) {
31561 __pyx_ptype_8PyClical___pyx_scope_struct____iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
31564 __Pyx_RefNannyFinishContext();
31567 __Pyx_RefNannyFinishContext();
31571 static int __Pyx_modinit_type_import_code(
void) {
31572 __Pyx_RefNannyDeclarations
31573 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_import_code", 0);
31575 __Pyx_RefNannyFinishContext();
31579 static int __Pyx_modinit_variable_import_code(
void) {
31580 __Pyx_RefNannyDeclarations
31581 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_import_code", 0);
31583 __Pyx_RefNannyFinishContext();
31587 static int __Pyx_modinit_function_import_code(
void) {
31588 __Pyx_RefNannyDeclarations
31589 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_import_code", 0);
31591 __Pyx_RefNannyFinishContext();
31596 #if PY_MAJOR_VERSION >= 3 31597 #if CYTHON_PEP489_MULTI_PHASE_INIT 31598 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
31599 static int __pyx_pymod_exec_PyClical(PyObject* module);
31600 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
31601 {Py_mod_create, (
void*)__pyx_pymod_create},
31602 {Py_mod_exec, (
void*)__pyx_pymod_exec_PyClical},
31609 struct PyModuleDef __pyx_moduledef =
31611 static struct PyModuleDef __pyx_moduledef =
31614 PyModuleDef_HEAD_INIT,
31617 #if CYTHON_PEP489_MULTI_PHASE_INIT 31619 #elif CYTHON_USE_MODULE_STATE 31620 sizeof(__pyx_mstate),
31625 #
if CYTHON_PEP489_MULTI_PHASE_INIT
31626 __pyx_moduledef_slots,
31630 #
if CYTHON_USE_MODULE_STATE
31645 #ifndef CYTHON_NO_PYINIT_EXPORT 31646 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC 31647 #elif PY_MAJOR_VERSION < 3 31649 #define __Pyx_PyMODINIT_FUNC extern "C" void 31651 #define __Pyx_PyMODINIT_FUNC void 31655 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * 31657 #define __Pyx_PyMODINIT_FUNC PyObject * 31662 #if PY_MAJOR_VERSION < 3 31663 __Pyx_PyMODINIT_FUNC initPyClical(
void) CYTHON_SMALL_CODE;
31664 __Pyx_PyMODINIT_FUNC initPyClical(
void)
31666 __Pyx_PyMODINIT_FUNC PyInit_PyClical(
void) CYTHON_SMALL_CODE;
31667 __Pyx_PyMODINIT_FUNC PyInit_PyClical(
void)
31668 #if CYTHON_PEP489_MULTI_PHASE_INIT 31670 return PyModuleDef_Init(&__pyx_moduledef);
31672 static CYTHON_SMALL_CODE
int __Pyx_check_single_interpreter(
void) {
31673 #if PY_VERSION_HEX >= 0x030700A1 31674 static PY_INT64_T main_interpreter_id = -1;
31675 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
31676 if (main_interpreter_id == -1) {
31677 main_interpreter_id = current_id;
31678 return (unlikely(current_id == -1)) ? -1 : 0;
31679 }
else if (unlikely(main_interpreter_id != current_id))
31681 static PyInterpreterState *main_interpreter = NULL;
31682 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
31683 if (!main_interpreter) {
31684 main_interpreter = current_interpreter;
31685 }
else if (unlikely(main_interpreter != current_interpreter))
31690 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
31695 #if CYTHON_COMPILING_IN_LIMITED_API 31696 static CYTHON_SMALL_CODE
int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module,
const char* from_name,
const char* to_name,
int allow_none)
31698 static CYTHON_SMALL_CODE
int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict,
const char* from_name,
const char* to_name,
int allow_none)
31701 PyObject *value = PyObject_GetAttrString(spec, from_name);
31703 if (likely(value)) {
31704 if (allow_none || value != Py_None) {
31705 #if CYTHON_COMPILING_IN_LIMITED_API 31706 result = PyModule_AddObject(module, to_name, value);
31708 result = PyDict_SetItemString(moddict, to_name, value);
31712 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
31719 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
31720 PyObject *module = NULL, *moddict, *modname;
31721 CYTHON_UNUSED_VAR(def);
31722 if (__Pyx_check_single_interpreter())
31725 return __Pyx_NewRef(__pyx_m);
31726 modname = PyObject_GetAttrString(spec,
"name");
31727 if (unlikely(!modname))
goto bad;
31728 module = PyModule_NewObject(modname);
31729 Py_DECREF(modname);
31730 if (unlikely(!module))
goto bad;
31731 #if CYTHON_COMPILING_IN_LIMITED_API 31734 moddict = PyModule_GetDict(module);
31735 if (unlikely(!moddict))
goto bad;
31737 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"loader",
"__loader__", 1) < 0))
goto bad;
31738 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"origin",
"__file__", 1) < 0))
goto bad;
31739 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"parent",
"__package__", 1) < 0))
goto bad;
31740 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"submodule_search_locations",
"__path__", 0) < 0))
goto bad;
31743 Py_XDECREF(module);
31748 static CYTHON_SMALL_CODE
int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
31752 int stringtab_initialized = 0;
31753 #if CYTHON_USE_MODULE_STATE 31754 int pystate_addmodule_run = 0;
31756 PyObject *__pyx_t_1 = NULL;
31757 PyObject *__pyx_t_2 = NULL;
31758 PyObject *__pyx_t_3 = NULL;
31759 PyObject *__pyx_t_4 = NULL;
31761 int __pyx_lineno = 0;
31762 const char *__pyx_filename = NULL;
31763 int __pyx_clineno = 0;
31764 __Pyx_RefNannyDeclarations
31765 #if CYTHON_PEP489_MULTI_PHASE_INIT 31767 if (__pyx_m == __pyx_pyinit_module)
return 0;
31768 PyErr_SetString(PyExc_RuntimeError,
"Module 'PyClical' has already been imported. Re-initialisation is not supported.");
31771 #elif PY_MAJOR_VERSION >= 3 31772 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
31775 #if CYTHON_PEP489_MULTI_PHASE_INIT 31776 __pyx_m = __pyx_pyinit_module;
31777 Py_INCREF(__pyx_m);
31779 #if PY_MAJOR_VERSION < 3 31780 __pyx_m = Py_InitModule4(
"PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
31781 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
31782 #elif CYTHON_USE_MODULE_STATE 31783 __pyx_t_1 = PyModule_Create(&__pyx_moduledef);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
31785 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
31787 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31788 pystate_addmodule_run = 1;
31791 __pyx_m = PyModule_Create(&__pyx_moduledef);
31792 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
31795 CYTHON_UNUSED_VAR(__pyx_t_1);
31796 __pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
31797 Py_INCREF(__pyx_d);
31798 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
31799 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((
const char *)
"cython_runtime");
if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
31800 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31801 #if CYTHON_REFNANNY 31802 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
31803 if (!__Pyx_RefNanny) {
31805 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
31806 if (!__Pyx_RefNanny)
31807 Py_FatalError(
"failed to import 'refnanny' module");
31810 __Pyx_RefNannySetupContext(
"__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
31811 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)
31812 #ifdef __Pxy_PyFrame_Initialize_Offsets 31813 __Pxy_PyFrame_Initialize_Offsets();
31815 __pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
31816 __pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
31817 __pyx_empty_unicode = PyUnicode_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
31818 #ifdef __Pyx_CyFunction_USED 31819 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31821 #ifdef __Pyx_FusedFunction_USED 31822 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31824 #ifdef __Pyx_Coroutine_USED 31825 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31827 #ifdef __Pyx_Generator_USED 31828 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31830 #ifdef __Pyx_AsyncGen_USED 31831 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31833 #ifdef __Pyx_StopAsyncIteration_USED 31834 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31838 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS 31839 PyEval_InitThreads();
31842 if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31843 stringtab_initialized = 1;
31844 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31845 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) 31846 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31848 if (__pyx_module_is_main_PyClical) {
31849 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31851 #if PY_MAJOR_VERSION >= 3 31853 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
31854 if (!PyDict_GetItemString(modules,
"PyClical")) {
31855 if (unlikely((PyDict_SetItemString(modules,
"PyClical", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31860 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31862 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31864 (void)__Pyx_modinit_global_init_code();
31865 (void)__Pyx_modinit_variable_export_code();
31866 (void)__Pyx_modinit_function_export_code();
31867 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31868 (void)__Pyx_modinit_type_import_code();
31869 (void)__Pyx_modinit_variable_import_code();
31870 (void)__Pyx_modinit_function_import_code();
31872 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 31873 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31883 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_math, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
31884 __Pyx_GOTREF(__pyx_t_2);
31885 if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
31886 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31895 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_numbers, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
31896 __Pyx_GOTREF(__pyx_t_2);
31897 if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
31898 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31907 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_collections, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
31908 __Pyx_GOTREF(__pyx_t_2);
31909 if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
31910 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31919 __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(
glucat_package_version);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
31920 __Pyx_GOTREF(__pyx_t_2);
31921 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
31922 __Pyx_GOTREF(__pyx_t_3);
31923 __Pyx_GIVEREF(__pyx_t_2);
31924 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error);
31925 __Pyx_INCREF(__pyx_kp_u_utf_8);
31926 __Pyx_GIVEREF(__pyx_kp_u_utf_8);
31927 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 35, __pyx_L1_error);
31929 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
31930 __Pyx_GOTREF(__pyx_t_2);
31931 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31932 if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
31933 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31942 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_1copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_copy, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__11));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
31943 __Pyx_GOTREF(__pyx_t_2);
31944 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
31945 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31946 PyType_Modified(__pyx_ptype_8PyClical_index_set);
31955 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_32count, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_count, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__12));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
31956 __Pyx_GOTREF(__pyx_t_2);
31957 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_count, __pyx_t_2) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
31958 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31959 PyType_Modified(__pyx_ptype_8PyClical_index_set);
31968 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_34count_neg, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_count_neg, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__13));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
31969 __Pyx_GOTREF(__pyx_t_2);
31970 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_count_neg, __pyx_t_2) < 0) __PYX_ERR(0, 324, __pyx_L1_error)
31971 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31972 PyType_Modified(__pyx_ptype_8PyClical_index_set);
31981 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_36count_pos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_count_pos, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__14));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error)
31982 __Pyx_GOTREF(__pyx_t_2);
31983 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_count_pos, __pyx_t_2) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
31984 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31985 PyType_Modified(__pyx_ptype_8PyClical_index_set);
31994 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_38min, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_min, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__15));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
31995 __Pyx_GOTREF(__pyx_t_2);
31996 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_min, __pyx_t_2) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
31997 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31998 PyType_Modified(__pyx_ptype_8PyClical_index_set);
32007 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_40max, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_max, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__16));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
32008 __Pyx_GOTREF(__pyx_t_2);
32009 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_max, __pyx_t_2) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
32010 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32011 PyType_Modified(__pyx_ptype_8PyClical_index_set);
32020 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_42hash_fn, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_hash_fn, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__17));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
32021 __Pyx_GOTREF(__pyx_t_2);
32022 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_hash_fn, __pyx_t_2) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
32023 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32024 PyType_Modified(__pyx_ptype_8PyClical_index_set);
32033 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_44sign_of_mult, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_sign_of_mult, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__19));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
32034 __Pyx_GOTREF(__pyx_t_2);
32035 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_sign_of_mult, __pyx_t_2) < 0) __PYX_ERR(0, 366, __pyx_L1_error)
32036 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32037 PyType_Modified(__pyx_ptype_8PyClical_index_set);
32046 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_46sign_of_square, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set_sign_of_square, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__20));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
32047 __Pyx_GOTREF(__pyx_t_2);
32048 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_index_set, __pyx_n_s_sign_of_square, __pyx_t_2) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
32049 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32050 PyType_Modified(__pyx_ptype_8PyClical_index_set);
32057 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_52__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set___reduce_cython, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__21));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
32058 __Pyx_GOTREF(__pyx_t_2);
32059 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
32060 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32068 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9index_set_54__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_index_set___setstate_cython, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__23));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
32069 __Pyx_GOTREF(__pyx_t_2);
32070 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
32071 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32080 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_1index_set_hidden_doctests, 0, __pyx_n_s_index_set_hidden_doctests, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__24));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
32081 __Pyx_GOTREF(__pyx_t_2);
32082 if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_2) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
32083 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32092 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_3compare, 0, __pyx_n_s_compare, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__26));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
32093 __Pyx_GOTREF(__pyx_t_2);
32094 if (PyDict_SetItem(__pyx_d, __pyx_n_s_compare, __pyx_t_2) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
32095 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32104 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_5min_neg, 0, __pyx_n_s_min_neg, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__28));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error)
32105 __Pyx_GOTREF(__pyx_t_2);
32106 if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_neg, __pyx_t_2) < 0) __PYX_ERR(0, 504, __pyx_L1_error)
32107 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32116 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_7max_pos, 0, __pyx_n_s_max_pos, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__29));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
32117 __Pyx_GOTREF(__pyx_t_2);
32118 if (PyDict_SetItem(__pyx_d, __pyx_n_s_max_pos, __pyx_t_2) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
32119 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32128 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_1copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_copy, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__30));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
32129 __Pyx_GOTREF(__pyx_t_2);
32130 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 556, __pyx_L1_error)
32131 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32132 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32141 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_11reframe, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_reframe, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__32));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
32142 __Pyx_GOTREF(__pyx_t_2);
32143 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_reframe, __pyx_t_2) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
32144 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32145 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32154 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_63inv, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_inv, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__33));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error)
32155 __Pyx_GOTREF(__pyx_t_2);
32156 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_inv, __pyx_t_2) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
32157 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32158 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32167 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_71pow, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_pow, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__35));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
32168 __Pyx_GOTREF(__pyx_t_2);
32169 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_pow, __pyx_t_2) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
32170 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32171 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32180 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_73outer_pow, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_outer_pow, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__36));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
32181 __Pyx_GOTREF(__pyx_t_2);
32182 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_outer_pow, __pyx_t_2) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
32183 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32184 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32193 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_77scalar, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_scalar, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__37));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
32194 __Pyx_GOTREF(__pyx_t_2);
32195 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_scalar, __pyx_t_2) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
32196 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32197 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32206 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_79pure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_pure, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__38));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
32207 __Pyx_GOTREF(__pyx_t_2);
32208 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_pure, __pyx_t_2) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
32209 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32210 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32219 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_81even, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_even, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__39));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error)
32220 __Pyx_GOTREF(__pyx_t_2);
32221 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_even, __pyx_t_2) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
32222 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32223 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32232 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_83odd, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_odd, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__40));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
32233 __Pyx_GOTREF(__pyx_t_2);
32234 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_odd, __pyx_t_2) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
32235 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32236 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32245 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_85vector_part, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_vector_part, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__42));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error)
32246 __Pyx_GOTREF(__pyx_t_2);
32247 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32248 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_vector_part, __pyx_t_2) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
32249 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32250 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32259 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_87involute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_involute, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__44));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
32260 __Pyx_GOTREF(__pyx_t_2);
32261 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_involute, __pyx_t_2) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
32262 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32263 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32272 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_89reverse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_reverse, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__45));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
32273 __Pyx_GOTREF(__pyx_t_2);
32274 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_reverse, __pyx_t_2) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)
32275 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32276 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32285 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_91conj, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_conj, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__46));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error)
32286 __Pyx_GOTREF(__pyx_t_2);
32287 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_conj, __pyx_t_2) < 0) __PYX_ERR(0, 1201, __pyx_L1_error)
32288 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32289 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32298 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_93quad, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_quad, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__47));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error)
32299 __Pyx_GOTREF(__pyx_t_2);
32300 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_quad, __pyx_t_2) < 0) __PYX_ERR(0, 1216, __pyx_L1_error)
32301 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32302 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32311 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_95norm, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_norm, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__48));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
32312 __Pyx_GOTREF(__pyx_t_2);
32313 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_norm, __pyx_t_2) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
32314 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32315 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32324 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_97abs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_abs, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__49));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
32325 __Pyx_GOTREF(__pyx_t_2);
32326 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_abs, __pyx_t_2) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
32327 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32328 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32337 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_99max_abs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_max_abs, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__50));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error)
32338 __Pyx_GOTREF(__pyx_t_2);
32339 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_max_abs, __pyx_t_2) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)
32340 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32341 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32350 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_101truncated, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_truncated, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__52));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
32351 __Pyx_GOTREF(__pyx_t_2);
32352 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_truncated, __pyx_t_2) < 0) __PYX_ERR(0, 1258, __pyx_L1_error)
32353 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32354 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32363 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_103isinf, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_isinf, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__53));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
32364 __Pyx_GOTREF(__pyx_t_2);
32365 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_isinf, __pyx_t_2) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
32366 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32367 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32376 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_105isnan, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_isnan, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__54));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error)
32377 __Pyx_GOTREF(__pyx_t_2);
32378 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_isnan, __pyx_t_2) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
32379 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32380 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32389 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_107frame, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford_frame, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__55));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
32390 __Pyx_GOTREF(__pyx_t_2);
32391 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8PyClical_clifford, __pyx_n_s_frame, __pyx_t_2) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
32392 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32393 PyType_Modified(__pyx_ptype_8PyClical_clifford);
32400 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_113__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford___reduce_cython, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__56));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
32401 __Pyx_GOTREF(__pyx_t_2);
32402 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
32403 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32411 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_8clifford_115__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_clifford___setstate_cython, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__57));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
32412 __Pyx_GOTREF(__pyx_t_2);
32413 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
32414 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32423 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, 0, __pyx_n_s_clifford_hidden_doctests, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__58));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
32424 __Pyx_GOTREF(__pyx_t_2);
32425 if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_2) < 0) __PYX_ERR(0, 1316, __pyx_L1_error)
32426 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32435 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_11error_squared_tol, 0, __pyx_n_s_error_squared_tol, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__59));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1400, __pyx_L1_error)
32436 __Pyx_GOTREF(__pyx_t_2);
32437 if (PyDict_SetItem(__pyx_d, __pyx_n_s_error_squared_tol, __pyx_t_2) < 0) __PYX_ERR(0, 1400, __pyx_L1_error)
32438 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32447 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_13error_squared, 0, __pyx_n_s_error_squared, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__61));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error)
32448 __Pyx_GOTREF(__pyx_t_2);
32449 if (PyDict_SetItem(__pyx_d, __pyx_n_s_error_squared, __pyx_t_2) < 0) __PYX_ERR(0, 1409, __pyx_L1_error)
32450 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32459 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_15approx_equal, 0, __pyx_n_s_approx_equal, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__63));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
32460 __Pyx_GOTREF(__pyx_t_2);
32461 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__64);
32462 if (PyDict_SetItem(__pyx_d, __pyx_n_s_approx_equal, __pyx_t_2) < 0) __PYX_ERR(0, 1422, __pyx_L1_error)
32463 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32472 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_17inv, 0, __pyx_n_s_inv, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__65));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error)
32473 __Pyx_GOTREF(__pyx_t_2);
32474 if (PyDict_SetItem(__pyx_d, __pyx_n_s_inv, __pyx_t_2) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
32475 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32484 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_19scalar, 0, __pyx_n_s_scalar, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__66));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
32485 __Pyx_GOTREF(__pyx_t_2);
32486 if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar, __pyx_t_2) < 0) __PYX_ERR(0, 1456, __pyx_L1_error)
32487 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32496 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_21real, 0, __pyx_n_s_real, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__67));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1467, __pyx_L1_error)
32497 __Pyx_GOTREF(__pyx_t_2);
32498 if (PyDict_SetItem(__pyx_d, __pyx_n_s_real, __pyx_t_2) < 0) __PYX_ERR(0, 1467, __pyx_L1_error)
32499 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32508 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_23imag, 0, __pyx_n_s_imag, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__68));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1478, __pyx_L1_error)
32509 __Pyx_GOTREF(__pyx_t_2);
32510 if (PyDict_SetItem(__pyx_d, __pyx_n_s_imag, __pyx_t_2) < 0) __PYX_ERR(0, 1478, __pyx_L1_error)
32511 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32520 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_25pure, 0, __pyx_n_s_pure, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__69));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
32521 __Pyx_GOTREF(__pyx_t_2);
32522 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pure, __pyx_t_2) < 0) __PYX_ERR(0, 1489, __pyx_L1_error)
32523 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32532 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_27even, 0, __pyx_n_s_even, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__70));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1500, __pyx_L1_error)
32533 __Pyx_GOTREF(__pyx_t_2);
32534 if (PyDict_SetItem(__pyx_d, __pyx_n_s_even, __pyx_t_2) < 0) __PYX_ERR(0, 1500, __pyx_L1_error)
32535 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32544 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_29odd, 0, __pyx_n_s_odd, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__71));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
32545 __Pyx_GOTREF(__pyx_t_2);
32546 if (PyDict_SetItem(__pyx_d, __pyx_n_s_odd, __pyx_t_2) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
32547 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32556 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_31involute, 0, __pyx_n_s_involute, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__72));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1518, __pyx_L1_error)
32557 __Pyx_GOTREF(__pyx_t_2);
32558 if (PyDict_SetItem(__pyx_d, __pyx_n_s_involute, __pyx_t_2) < 0) __PYX_ERR(0, 1518, __pyx_L1_error)
32559 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32568 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_33reverse, 0, __pyx_n_s_reverse, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__73));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
32569 __Pyx_GOTREF(__pyx_t_2);
32570 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse, __pyx_t_2) < 0) __PYX_ERR(0, 1533, __pyx_L1_error)
32571 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32580 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_35conj, 0, __pyx_n_s_conj, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__74));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
32581 __Pyx_GOTREF(__pyx_t_2);
32582 if (PyDict_SetItem(__pyx_d, __pyx_n_s_conj, __pyx_t_2) < 0) __PYX_ERR(0, 1548, __pyx_L1_error)
32583 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32592 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_37quad, 0, __pyx_n_s_quad, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__75));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error)
32593 __Pyx_GOTREF(__pyx_t_2);
32594 if (PyDict_SetItem(__pyx_d, __pyx_n_s_quad, __pyx_t_2) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
32595 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32604 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_39norm, 0, __pyx_n_s_norm, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__76));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error)
32605 __Pyx_GOTREF(__pyx_t_2);
32606 if (PyDict_SetItem(__pyx_d, __pyx_n_s_norm, __pyx_t_2) < 0) __PYX_ERR(0, 1574, __pyx_L1_error)
32607 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32616 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_41abs, 0, __pyx_n_s_abs, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__77));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error)
32617 __Pyx_GOTREF(__pyx_t_2);
32618 if (PyDict_SetItem(__pyx_d, __pyx_n_s_abs, __pyx_t_2) < 0) __PYX_ERR(0, 1585, __pyx_L1_error)
32619 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32628 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_43max_abs, 0, __pyx_n_s_max_abs, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__78));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error)
32629 __Pyx_GOTREF(__pyx_t_2);
32630 if (PyDict_SetItem(__pyx_d, __pyx_n_s_max_abs, __pyx_t_2) < 0) __PYX_ERR(0, 1594, __pyx_L1_error)
32631 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32640 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_45pow, 0, __pyx_n_s_pow, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__80));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error)
32641 __Pyx_GOTREF(__pyx_t_2);
32642 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pow, __pyx_t_2) < 0) __PYX_ERR(0, 1606, __pyx_L1_error)
32643 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32652 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_47outer_pow, 0, __pyx_n_s_outer_pow, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__81));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1630, __pyx_L1_error)
32653 __Pyx_GOTREF(__pyx_t_2);
32654 if (PyDict_SetItem(__pyx_d, __pyx_n_s_outer_pow, __pyx_t_2) < 0) __PYX_ERR(0, 1630, __pyx_L1_error)
32655 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32664 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_49complexifier, 0, __pyx_n_s_complexifier, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__82));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1639, __pyx_L1_error)
32665 __Pyx_GOTREF(__pyx_t_2);
32666 if (PyDict_SetItem(__pyx_d, __pyx_n_s_complexifier, __pyx_t_2) < 0) __PYX_ERR(0, 1639, __pyx_L1_error)
32667 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32676 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_51sqrt, 0, __pyx_n_s_sqrt, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__84));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error)
32677 __Pyx_GOTREF(__pyx_t_2);
32678 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32679 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sqrt, __pyx_t_2) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
32680 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32689 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_53exp, 0, __pyx_n_s_exp, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__85));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
32690 __Pyx_GOTREF(__pyx_t_2);
32691 if (PyDict_SetItem(__pyx_d, __pyx_n_s_exp, __pyx_t_2) < 0) __PYX_ERR(0, 1677, __pyx_L1_error)
32692 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32701 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_55log, 0, __pyx_n_s_log, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__86));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error)
32702 __Pyx_GOTREF(__pyx_t_2);
32703 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32704 if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_2) < 0) __PYX_ERR(0, 1691, __pyx_L1_error)
32705 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32714 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_57cos, 0, __pyx_n_s_cos, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__87));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
32715 __Pyx_GOTREF(__pyx_t_2);
32716 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32717 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cos, __pyx_t_2) < 0) __PYX_ERR(0, 1714, __pyx_L1_error)
32718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32727 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_59acos, 0, __pyx_n_s_acos, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__88));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error)
32728 __Pyx_GOTREF(__pyx_t_2);
32729 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32730 if (PyDict_SetItem(__pyx_d, __pyx_n_s_acos, __pyx_t_2) < 0) __PYX_ERR(0, 1731, __pyx_L1_error)
32731 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32740 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_61cosh, 0, __pyx_n_s_cosh, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__89));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1752, __pyx_L1_error)
32741 __Pyx_GOTREF(__pyx_t_2);
32742 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cosh, __pyx_t_2) < 0) __PYX_ERR(0, 1752, __pyx_L1_error)
32743 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32752 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_63acosh, 0, __pyx_n_s_acosh, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__90));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error)
32753 __Pyx_GOTREF(__pyx_t_2);
32754 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32755 if (PyDict_SetItem(__pyx_d, __pyx_n_s_acosh, __pyx_t_2) < 0) __PYX_ERR(0, 1768, __pyx_L1_error)
32756 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32765 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_65sin, 0, __pyx_n_s_sin, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__91));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
32766 __Pyx_GOTREF(__pyx_t_2);
32767 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32768 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sin, __pyx_t_2) < 0) __PYX_ERR(0, 1791, __pyx_L1_error)
32769 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32778 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_67asin, 0, __pyx_n_s_asin, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__92));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
32779 __Pyx_GOTREF(__pyx_t_2);
32780 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32781 if (PyDict_SetItem(__pyx_d, __pyx_n_s_asin, __pyx_t_2) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
32782 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32791 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_69sinh, 0, __pyx_n_s_sinh, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__93));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
32792 __Pyx_GOTREF(__pyx_t_2);
32793 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sinh, __pyx_t_2) < 0) __PYX_ERR(0, 1831, __pyx_L1_error)
32794 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32803 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_71asinh, 0, __pyx_n_s_asinh, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__94));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
32804 __Pyx_GOTREF(__pyx_t_2);
32805 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32806 if (PyDict_SetItem(__pyx_d, __pyx_n_s_asinh, __pyx_t_2) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
32807 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32816 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_73tan, 0, __pyx_n_s_tan, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__95));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1864, __pyx_L1_error)
32817 __Pyx_GOTREF(__pyx_t_2);
32818 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32819 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tan, __pyx_t_2) < 0) __PYX_ERR(0, 1864, __pyx_L1_error)
32820 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32829 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_75atan, 0, __pyx_n_s_atan, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__96));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
32830 __Pyx_GOTREF(__pyx_t_2);
32831 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32832 if (PyDict_SetItem(__pyx_d, __pyx_n_s_atan, __pyx_t_2) < 0) __PYX_ERR(0, 1881, __pyx_L1_error)
32833 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32842 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_77tanh, 0, __pyx_n_s_tanh, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__97));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
32843 __Pyx_GOTREF(__pyx_t_2);
32844 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tanh, __pyx_t_2) < 0) __PYX_ERR(0, 1898, __pyx_L1_error)
32845 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32854 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_79atanh, 0, __pyx_n_s_atanh, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__98));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
32855 __Pyx_GOTREF(__pyx_t_2);
32856 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__43);
32857 if (PyDict_SetItem(__pyx_d, __pyx_n_s_atanh, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
32858 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32867 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_81random_clifford, 0, __pyx_n_s_random_clifford, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__100));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1927, __pyx_L1_error)
32868 __Pyx_GOTREF(__pyx_t_2);
32869 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__101);
32870 if (PyDict_SetItem(__pyx_d, __pyx_n_s_random_clifford, __pyx_t_2) < 0) __PYX_ERR(0, 1927, __pyx_L1_error)
32871 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32880 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_83cga3, 0, __pyx_n_s_cga3, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__102));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1936, __pyx_L1_error)
32881 __Pyx_GOTREF(__pyx_t_2);
32882 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cga3, __pyx_t_2) < 0) __PYX_ERR(0, 1936, __pyx_L1_error)
32883 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32892 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_85cga3std, 0, __pyx_n_s_cga3std, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__103));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
32893 __Pyx_GOTREF(__pyx_t_2);
32894 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cga3std, __pyx_t_2) < 0) __PYX_ERR(0, 1945, __pyx_L1_error)
32895 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32904 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_87agc3, 0, __pyx_n_s_agc3, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__104));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
32905 __Pyx_GOTREF(__pyx_t_2);
32906 if (PyDict_SetItem(__pyx_d, __pyx_n_s_agc3, __pyx_t_2) < 0) __PYX_ERR(0, 1956, __pyx_L1_error)
32907 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32917 __Pyx_GOTREF(__pyx_t_2);
32918 if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_epsilon, __pyx_t_2) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
32919 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32928 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__105, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __pyx_L1_error)
32929 __Pyx_GOTREF(__pyx_t_2);
32930 __pyx_t_3 = __pyx_f_8PyClical_atan(__pyx_t_2, 0, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1970, __pyx_L1_error)
32931 __Pyx_GOTREF(__pyx_t_3);
32932 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32933 __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_4_0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __pyx_L1_error)
32934 __Pyx_GOTREF(__pyx_t_2);
32935 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32936 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1970, __pyx_L1_error)
32937 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32946 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__105, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
32947 __Pyx_GOTREF(__pyx_t_2);
32948 __pyx_t_3 = __pyx_f_8PyClical_atan(__pyx_t_2, 0, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error)
32949 __Pyx_GOTREF(__pyx_t_3);
32950 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32951 __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_8_0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
32952 __Pyx_GOTREF(__pyx_t_2);
32953 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32954 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_2) < 0) __PYX_ERR(0, 1971, __pyx_L1_error)
32955 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32964 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1973, __pyx_L1_error)
32973 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1991, __pyx_L1_error)
32982 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_89e, 0, __pyx_n_s_e, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__106));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1999, __pyx_L1_error)
32983 __Pyx_GOTREF(__pyx_t_2);
32984 if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
32985 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32994 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_91istpq, 0, __pyx_n_s_istpq, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__108));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L1_error)
32995 __Pyx_GOTREF(__pyx_t_2);
32996 if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 2012, __pyx_L1_error)
32997 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33006 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L1_error)
33007 __Pyx_GOTREF(__pyx_t_2);
33008 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__109, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2021, __pyx_L1_error)
33009 __Pyx_GOTREF(__pyx_t_3);
33010 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33011 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L1_error)
33012 __Pyx_GOTREF(__pyx_t_2);
33013 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__110, NULL);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L1_error)
33014 __Pyx_GOTREF(__pyx_t_4);
33015 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33016 __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_4);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L1_error)
33017 __Pyx_GOTREF(__pyx_t_2);
33018 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33019 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33020 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 2021, __pyx_L1_error)
33021 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33030 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2022, __pyx_L1_error)
33031 __Pyx_GOTREF(__pyx_t_2);
33032 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__109, NULL);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2022, __pyx_L1_error)
33033 __Pyx_GOTREF(__pyx_t_4);
33034 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33035 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2022, __pyx_L1_error)
33036 __Pyx_GOTREF(__pyx_t_2);
33037 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__110, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2022, __pyx_L1_error)
33038 __Pyx_GOTREF(__pyx_t_3);
33039 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33040 __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2022, __pyx_L1_error)
33041 __Pyx_GOTREF(__pyx_t_2);
33042 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33043 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33044 if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 2022, __pyx_L1_error)
33045 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33054 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8PyClical_93_test, 0, __pyx_n_s_test, NULL, __pyx_n_s_PyClical, __pyx_d, ((PyObject *)__pyx_codeobj__112));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __pyx_L1_error)
33055 __Pyx_GOTREF(__pyx_t_2);
33056 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 2025, __pyx_L1_error)
33057 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33065 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2029, __pyx_L1_error)
33066 __Pyx_GOTREF(__pyx_t_2);
33067 __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_main, Py_EQ));
if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2029, __pyx_L1_error)
33068 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33076 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2030, __pyx_L1_error)
33077 __Pyx_GOTREF(__pyx_t_2);
33078 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
33079 __Pyx_GOTREF(__pyx_t_3);
33080 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33081 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33096 __pyx_t_3 = __Pyx_PyDict_NewPresized(118);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
33097 __Pyx_GOTREF(__pyx_t_3);
33098 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_copy_line_65, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33099 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___setitem___line_179, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33100 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___getitem___line_191, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33101 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___iter___line_229, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33102 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___invert___line_240, __pyx_kp_u_Set_complement_not_print_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33103 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___xor___line_249, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33104 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___ixor___line_260, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33105 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___and___line_271, __pyx_kp_u_Set_intersection_and_print_inde) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33106 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___iand___line_282, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33107 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___or___line_293, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33108 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___ior___line_304, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33109 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_count_line_315, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33110 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_count_neg_line_324, __pyx_kp_u_Number_of_negative_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33111 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_count_pos_line_333, __pyx_kp_u_Number_of_positive_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33112 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_min_line_342, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33113 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_max_line_351, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33114 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_sign_of_mult_line_366, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33115 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_sign_of_square_line_37, __pyx_kp_u_Sign_of_geometric_square_of_a_C) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33116 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___repr___line_384, __pyx_kp_u_The_official_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33117 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set___str___line_395, __pyx_kp_u_The_informal_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33118 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_kp_u_Tests_for_functions_that_Doctes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33119 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_compare_line_492, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33120 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_min_neg_line_504, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33121 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_max_pos_line_513, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33122 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_copy_line_556, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33123 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___iter___line_638, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33124 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_reframe_line_649, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33125 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___getitem___line_707, __pyx_kp_u_Subscripting_map_from_index_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33126 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___neg___line_722, __pyx_kp_u_Unary_print_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33127 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___pos___line_731, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33128 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___add___line_740, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33129 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___radd___line_751, __pyx_kp_u_Geometric_sum_print_1_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33130 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___iadd___line_760, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33131 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___sub___line_769, __pyx_kp_u_Geometric_difference_print_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33132 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___rsub___line_780, __pyx_kp_u_Geometric_difference_print_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33133 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___isub___line_789, __pyx_kp_u_Geometric_difference_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33134 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___mul___line_798, __pyx_kp_u_Geometric_product_print_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33135 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___rmul___line_811, __pyx_kp_u_Geometric_product_print_2_cliff) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33136 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___imul___line_820, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33137 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___mod___line_833, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33138 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___rmod___line_848, __pyx_kp_u_Contraction_print_2_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33139 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___imod___line_857, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33140 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___and___line_872, __pyx_kp_u_Inner_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33141 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___rand___line_887, __pyx_kp_u_Inner_product_print_2_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33142 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___iand___line_896, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33143 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___xor___line_911, __pyx_kp_u_Outer_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33144 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___rxor___line_926, __pyx_kp_u_Outer_product_print_2_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33145 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___ixor___line_935, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33146 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___truediv___line_950, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33147 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___rtruediv___line_965, __pyx_kp_u_Geometric_quotient_print_2_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33148 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___idiv___line_974, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33149 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_inv_line_989, __pyx_kp_u_Geometric_multiplicative_invers) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33150 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___or___line_1002, __pyx_kp_u_Transform_left_hand_side_using) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33151 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___ior___line_1013, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33152 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___pow___line_1024, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33153 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_pow_line_1043, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33154 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_outer_pow_line_1067, __pyx_kp_u_Outer_product_power_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33155 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___call___line_1083, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33156 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_scalar_line_1102, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33157 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_pure_line_1113, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33158 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_even_line_1124, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33159 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_odd_line_1133, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33160 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_vector_part_line_1142, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33161 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_involute_line_1170, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33162 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_reverse_line_1186, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33163 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_conj_line_1201, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33164 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_quad_line_1216, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33165 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_norm_line_1227, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33166 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_abs_line_1238, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33167 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_max_abs_line_1247, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33168 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_truncated_line_1258, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33169 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_isinf_line_1269, __pyx_kp_u_Check_if_a_multivector_contains) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33170 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_isnan_line_1278, __pyx_kp_u_Check_if_a_multivector_contains_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33171 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_frame_line_1287, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33172 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___repr___line_1298, __pyx_kp_u_The_official_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33173 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford___str___line_1307, __pyx_kp_u_The_informal_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33174 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_clifford_hidden_doctests_line_13, __pyx_kp_u_Tests_for_functions_that_Doctes_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33175 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_error_squared_tol_line_1400, __pyx_kp_u_Quadratic_norm_error_tolerance) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33176 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_error_squared_line_1409, __pyx_kp_u_Relative_or_absolute_error_usin) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33177 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_approx_equal_line_1422, __pyx_kp_u_Test_for_approximate_equality_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33178 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_inv_line_1441, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33179 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_scalar_line_1456, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33180 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_real_line_1467, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33181 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_imag_line_1478, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33182 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_pure_line_1489, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33183 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_even_line_1500, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33184 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_odd_line_1509, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33185 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_involute_line_1518, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33186 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_reverse_line_1533, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33187 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_conj_line_1548, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33188 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_quad_line_1563, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33189 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_norm_line_1574, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33190 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_abs_line_1585, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33191 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_max_abs_line_1594, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33192 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_pow_line_1606, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33193 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_outer_pow_line_1630, __pyx_kp_u_Outer_product_power_of_multivec) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33194 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_complexifier_line_1639, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33195 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_sqrt_line_1654, __pyx_kp_u_Square_root_of_multivector_with) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33196 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_exp_line_1677, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33197 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_log_line_1691, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33198 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_cos_line_1714, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33199 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_acos_line_1731, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33200 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_cosh_line_1752, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33201 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_acosh_line_1768, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33202 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_sin_line_1791, __pyx_kp_u_Sine_of_multivector_with_option) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33203 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_asin_line_1810, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33204 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_sinh_line_1831, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33205 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_asinh_line_1845, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33206 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_tan_line_1864, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33207 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_atan_line_1881, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33208 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_tanh_line_1898, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33209 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_atanh_line_1910, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33210 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_random_clifford_line_1927, __pyx_kp_u_Random_multivector_within_a_fra) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33211 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_cga3_line_1936, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33212 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_cga3std_line_1945, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33213 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_agc3_line_1956, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33214 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_e_line_1999, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33215 if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_istpq_line_2012, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33216 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
33217 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33223 __Pyx_XDECREF(__pyx_t_2);
33224 __Pyx_XDECREF(__pyx_t_3);
33225 __Pyx_XDECREF(__pyx_t_4);
33227 if (__pyx_d && stringtab_initialized) {
33228 __Pyx_AddTraceback(
"init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
33230 #if !CYTHON_USE_MODULE_STATE 33233 Py_DECREF(__pyx_m);
33234 if (pystate_addmodule_run) {
33235 PyObject *tp, *value, *tb;
33236 PyErr_Fetch(&tp, &value, &tb);
33237 PyState_RemoveModule(&__pyx_moduledef);
33238 PyErr_Restore(tp, value, tb);
33241 }
else if (!PyErr_Occurred()) {
33242 PyErr_SetString(PyExc_ImportError,
"init PyClical");
33245 __Pyx_RefNannyFinishContext();
33246 #if CYTHON_PEP489_MULTI_PHASE_INIT 33247 return (__pyx_m != NULL) ? 0 : -1;
33248 #elif PY_MAJOR_VERSION >= 3 33259 #pragma warning( push ) 33264 #pragma warning( disable : 4127 ) 33273 #if CYTHON_REFNANNY 33274 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
33275 PyObject *m = NULL, *p = NULL;
33277 m = PyImport_ImportModule(modname);
33279 p = PyObject_GetAttrString(m,
"RefNannyAPI");
33281 r = PyLong_AsVoidPtr(p);
33285 return (__Pyx_RefNannyAPIStruct *)r;
33290 #if CYTHON_FAST_THREAD_STATE 33291 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
33293 n = PyTuple_GET_SIZE(tuple);
33294 #if PY_MAJOR_VERSION >= 3 33295 for (
i=0;
i<n;
i++) {
33296 if (exc_type == PyTuple_GET_ITEM(tuple,
i))
return 1;
33299 for (
i=0;
i<n;
i++) {
33300 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple,
i)))
return 1;
33304 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
33306 PyObject *exc_type;
33307 #if PY_VERSION_HEX >= 0x030C00A6 33308 PyObject *current_exception = tstate->current_exception;
33309 if (unlikely(!current_exception))
return 0;
33310 exc_type = (PyObject*) Py_TYPE(current_exception);
33311 if (exc_type == err)
return 1;
33313 exc_type = tstate->curexc_type;
33314 if (exc_type == err)
return 1;
33315 if (unlikely(!exc_type))
return 0;
33317 #if CYTHON_AVOID_BORROWED_REFS 33318 Py_INCREF(exc_type);
33320 if (unlikely(PyTuple_Check(err))) {
33321 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
33323 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
33325 #if CYTHON_AVOID_BORROWED_REFS 33326 Py_DECREF(exc_type);
33333 #if CYTHON_FAST_THREAD_STATE 33334 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
33335 #if PY_VERSION_HEX >= 0x030C00A6 33336 PyObject *tmp_value;
33337 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
33339 #if CYTHON_COMPILING_IN_CPYTHON 33340 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
33342 PyException_SetTraceback(value, tb);
33344 tmp_value = tstate->current_exception;
33345 tstate->current_exception = value;
33346 Py_XDECREF(tmp_value);
33350 PyObject *tmp_type, *tmp_value, *tmp_tb;
33351 tmp_type = tstate->curexc_type;
33352 tmp_value = tstate->curexc_value;
33353 tmp_tb = tstate->curexc_traceback;
33354 tstate->curexc_type = type;
33355 tstate->curexc_value = value;
33356 tstate->curexc_traceback = tb;
33357 Py_XDECREF(tmp_type);
33358 Py_XDECREF(tmp_value);
33359 Py_XDECREF(tmp_tb);
33362 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
33363 #if PY_VERSION_HEX >= 0x030C00A6 33364 PyObject* exc_value;
33365 exc_value = tstate->current_exception;
33366 tstate->current_exception = 0;
33367 *value = exc_value;
33371 *type = (PyObject*) Py_TYPE(exc_value);
33373 #if CYTHON_COMPILING_IN_CPYTHON 33374 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
33377 *tb = PyException_GetTraceback(exc_value);
33381 *type = tstate->curexc_type;
33382 *value = tstate->curexc_value;
33383 *tb = tstate->curexc_traceback;
33384 tstate->curexc_type = 0;
33385 tstate->curexc_value = 0;
33386 tstate->curexc_traceback = 0;
33392 #if CYTHON_USE_TYPE_SLOTS 33393 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject*
obj, PyObject* attr_name) {
33394 PyTypeObject* tp = Py_TYPE(
obj);
33395 if (likely(tp->tp_getattro))
33396 return tp->tp_getattro(
obj, attr_name);
33397 #if PY_MAJOR_VERSION < 3 33398 if (likely(tp->tp_getattr))
33399 return tp->tp_getattr(
obj, PyString_AS_STRING(attr_name));
33401 return PyObject_GetAttr(
obj, attr_name);
33406 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 33407 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(
void) {
33408 __Pyx_PyThreadState_declare
33409 __Pyx_PyThreadState_assign
33410 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
33411 __Pyx_PyErr_Clear();
33414 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject*
obj, PyObject* attr_name) {
33416 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 33417 (void) PyObject_GetOptionalAttr(
obj, attr_name, &result);
33420 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 33421 PyTypeObject* tp = Py_TYPE(
obj);
33422 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
33423 return _PyObject_GenericGetAttrWithDict(
obj, attr_name, NULL, 1);
33426 result = __Pyx_PyObject_GetAttrStr(
obj, attr_name);
33427 if (unlikely(!result)) {
33428 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
33435 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
33436 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
33437 if (unlikely(!result) && !PyErr_Occurred()) {
33438 PyErr_Format(PyExc_NameError,
33439 #
if PY_MAJOR_VERSION >= 3
33440 "name '%U' is not defined", name);
33442 "name '%.200s' is not defined", PyString_AS_STRING(name));
33449 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL 33450 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
33451 PyObject *globals) {
33453 PyThreadState *tstate = __Pyx_PyThreadState_Current;
33454 PyObject **fastlocals;
33457 assert(globals != NULL);
33462 assert(tstate != NULL);
33463 f = PyFrame_New(tstate, co, globals, NULL);
33467 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
33468 for (
i = 0;
i < na;
i++) {
33470 fastlocals[
i] = *args++;
33472 result = PyEval_EvalFrameEx(f,0);
33473 ++tstate->recursion_depth;
33475 --tstate->recursion_depth;
33478 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
33479 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
33480 PyObject *globals = PyFunction_GET_GLOBALS(func);
33481 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
33483 #if PY_MAJOR_VERSION >= 3 33486 PyObject *kwtuple, **k;
33491 assert(kwargs == NULL || PyDict_Check(kwargs));
33492 nk = kwargs ? PyDict_Size(kwargs) : 0;
33493 #if PY_MAJOR_VERSION < 3 33494 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object"))) {
33498 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object"))) {
33503 #
if PY_MAJOR_VERSION >= 3
33504 co->co_kwonlyargcount == 0 &&
33506 likely(kwargs == NULL || nk == 0) &&
33507 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
33508 if (argdefs == NULL && co->co_argcount == nargs) {
33509 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
33512 else if (nargs == 0 && argdefs != NULL
33513 && co->co_argcount == Py_SIZE(argdefs)) {
33516 args = &PyTuple_GET_ITEM(argdefs, 0);
33517 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
33521 if (kwargs != NULL) {
33523 kwtuple = PyTuple_New(2 * nk);
33524 if (kwtuple == NULL) {
33528 k = &PyTuple_GET_ITEM(kwtuple, 0);
33530 while (PyDict_Next(kwargs, &pos, &k[
i], &k[
i+1])) {
33541 closure = PyFunction_GET_CLOSURE(func);
33542 #if PY_MAJOR_VERSION >= 3 33543 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
33545 if (argdefs != NULL) {
33546 d = &PyTuple_GET_ITEM(argdefs, 0);
33547 nd = Py_SIZE(argdefs);
33553 #if PY_MAJOR_VERSION >= 3 33554 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
33557 d, (
int)nd, kwdefs, closure);
33559 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
33562 d, (
int)nd, closure);
33564 Py_XDECREF(kwtuple);
33566 Py_LeaveRecursiveCall();
33572 #if CYTHON_COMPILING_IN_CPYTHON 33573 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
33575 ternaryfunc call = Py_TYPE(func)->tp_call;
33576 if (unlikely(!call))
33577 return PyObject_Call(func, arg, kw);
33578 #if PY_MAJOR_VERSION < 3 33579 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
33582 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
33585 result = (*call)(func, arg, kw);
33586 Py_LeaveRecursiveCall();
33587 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
33590 "NULL result without error in PyObject_Call");
33597 #if CYTHON_COMPILING_IN_CPYTHON 33598 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
33599 PyObject *
self, *result;
33601 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
33602 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
33603 #if PY_MAJOR_VERSION < 3 33604 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
33607 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
33610 result = cfunc(
self, arg);
33611 Py_LeaveRecursiveCall();
33612 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
33615 "NULL result without error in PyObject_Call");
33622 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API 33623 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args,
size_t nargs, PyObject *kwargs) {
33624 PyObject *argstuple;
33625 PyObject *result = 0;
33627 argstuple = PyTuple_New((Py_ssize_t)nargs);
33628 if (unlikely(!argstuple))
return NULL;
33629 for (
i = 0;
i < nargs;
i++) {
33630 Py_INCREF(args[
i]);
33631 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)
i, args[
i]) < 0)
goto bad;
33633 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
33635 Py_DECREF(argstuple);
33639 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args,
size_t _nargs, PyObject *kwargs) {
33640 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
33641 #if CYTHON_COMPILING_IN_CPYTHON 33642 if (nargs == 0 && kwargs == NULL) {
33643 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
33644 return __Pyx_PyObject_CallMethO(func, NULL);
33646 else if (nargs == 1 && kwargs == NULL) {
33647 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
33648 return __Pyx_PyObject_CallMethO(func, args[0]);
33651 #if PY_VERSION_HEX < 0x030800B1 33652 #if CYTHON_FAST_PYCCALL 33653 if (PyCFunction_Check(func)) {
33655 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
33657 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
33660 #if PY_VERSION_HEX >= 0x030700A1 33661 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
33662 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
33666 #if CYTHON_FAST_PYCALL 33667 if (PyFunction_Check(func)) {
33668 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
33672 if (kwargs == NULL) {
33673 #if CYTHON_VECTORCALL 33674 #if PY_VERSION_HEX < 0x03090000 33675 vectorcallfunc f = _PyVectorcall_Function(func);
33677 vectorcallfunc f = PyVectorcall_Function(func);
33680 return f(func, args, (
size_t)nargs, NULL);
33682 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL 33683 if (__Pyx_CyFunction_CheckExact(func)) {
33684 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
33685 if (f)
return f(func, args, (
size_t)nargs, NULL);
33690 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
33692 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API 33693 return PyObject_VectorcallDict(func, args, (
size_t)nargs, kwargs);
33695 return __Pyx_PyObject_FastCall_fallback(func, args, (
size_t)nargs, kwargs);
33700 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
33701 PyObject *args[2] = {NULL, arg};
33702 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
33706 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS 33707 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *
obj) {
33708 PyObject *dict = Py_TYPE(
obj)->tp_dict;
33709 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
33711 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *
obj) {
33712 PyObject **dictptr = NULL;
33713 Py_ssize_t offset = Py_TYPE(
obj)->tp_dictoffset;
33715 #if CYTHON_COMPILING_IN_CPYTHON 33716 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)
obj + offset) : _PyObject_GetDictPtr(
obj);
33718 dictptr = _PyObject_GetDictPtr(
obj);
33721 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
33723 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject*
obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
33724 PyObject *dict = Py_TYPE(
obj)->tp_dict;
33725 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
33727 return obj_dict_version == __Pyx_get_object_dict_version(
obj);
33732 #if CYTHON_COMPILING_IN_CPYTHON 33733 static CYTHON_INLINE
void __Pyx_copy_object_array(PyObject *
const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
33736 for (
i = 0;
i < length;
i++) {
33737 v = dest[
i] = src[
i];
33741 static CYTHON_INLINE PyObject *
33742 __Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t n)
33746 Py_INCREF(__pyx_empty_tuple);
33747 return __pyx_empty_tuple;
33749 res = PyTuple_New(n);
33750 if (unlikely(res == NULL))
return NULL;
33751 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
33754 static CYTHON_INLINE PyObject *
33755 __Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t n)
33759 return PyList_New(0);
33761 res = PyList_New(n);
33762 if (unlikely(res == NULL))
return NULL;
33763 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
33769 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals) {
33770 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API 33771 return PyObject_RichCompareBool(s1, s2, equals);
33774 return (equals == Py_EQ);
33775 }
else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
33776 const char *ps1, *ps2;
33777 Py_ssize_t length = PyBytes_GET_SIZE(s1);
33778 if (length != PyBytes_GET_SIZE(s2))
33779 return (equals == Py_NE);
33780 ps1 = PyBytes_AS_STRING(s1);
33781 ps2 = PyBytes_AS_STRING(s2);
33782 if (ps1[0] != ps2[0]) {
33783 return (equals == Py_NE);
33784 }
else if (length == 1) {
33785 return (equals == Py_EQ);
33788 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) 33789 Py_hash_t hash1, hash2;
33790 hash1 = ((PyBytesObject*)s1)->ob_shash;
33791 hash2 = ((PyBytesObject*)s2)->ob_shash;
33792 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
33793 return (equals == Py_NE);
33796 result = memcmp(ps1, ps2, (
size_t)length);
33797 return (equals == Py_EQ) ? (result == 0) : (result != 0);
33799 }
else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
33800 return (equals == Py_NE);
33801 }
else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
33802 return (equals == Py_NE);
33805 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
33808 result = __Pyx_PyObject_IsTrue(py_result);
33809 Py_DECREF(py_result);
33816 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals) {
33817 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API 33818 return PyObject_RichCompareBool(s1, s2, equals);
33820 #if PY_MAJOR_VERSION < 3 33821 PyObject* owned_ref = NULL;
33823 int s1_is_unicode, s2_is_unicode;
33827 s1_is_unicode = PyUnicode_CheckExact(s1);
33828 s2_is_unicode = PyUnicode_CheckExact(s2);
33829 #if PY_MAJOR_VERSION < 3 33830 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
33831 owned_ref = PyUnicode_FromObject(s2);
33832 if (unlikely(!owned_ref))
33836 }
else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
33837 owned_ref = PyUnicode_FromObject(s1);
33838 if (unlikely(!owned_ref))
33842 }
else if (((!s2_is_unicode) & (!s1_is_unicode))) {
33843 return __Pyx_PyBytes_Equals(s1, s2, equals);
33846 if (s1_is_unicode & s2_is_unicode) {
33849 void *data1, *data2;
33850 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
33852 length = __Pyx_PyUnicode_GET_LENGTH(s1);
33853 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
33856 #if CYTHON_USE_UNICODE_INTERNALS 33858 Py_hash_t hash1, hash2;
33859 #if CYTHON_PEP393_ENABLED 33860 hash1 = ((PyASCIIObject*)s1)->hash;
33861 hash2 = ((PyASCIIObject*)s2)->hash;
33863 hash1 = ((PyUnicodeObject*)s1)->hash;
33864 hash2 = ((PyUnicodeObject*)s2)->hash;
33866 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
33871 kind = __Pyx_PyUnicode_KIND(s1);
33872 if (kind != __Pyx_PyUnicode_KIND(s2)) {
33875 data1 = __Pyx_PyUnicode_DATA(s1);
33876 data2 = __Pyx_PyUnicode_DATA(s2);
33877 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
33879 }
else if (length == 1) {
33882 int result = memcmp(data1, data2, (
size_t)(length * kind));
33883 #if PY_MAJOR_VERSION < 3 33884 Py_XDECREF(owned_ref);
33886 return (equals == Py_EQ) ? (result == 0) : (result != 0);
33888 }
else if ((s1 == Py_None) & s2_is_unicode) {
33890 }
else if ((s2 == Py_None) & s1_is_unicode) {
33894 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
33895 #if PY_MAJOR_VERSION < 3 33896 Py_XDECREF(owned_ref);
33900 result = __Pyx_PyObject_IsTrue(py_result);
33901 Py_DECREF(py_result);
33905 #if PY_MAJOR_VERSION < 3 33906 Py_XDECREF(owned_ref);
33908 return (equals == Py_EQ);
33910 #if PY_MAJOR_VERSION < 3 33911 Py_XDECREF(owned_ref);
33913 return (equals == Py_NE);
33918 #if CYTHON_METH_FASTCALL 33919 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *s)
33921 Py_ssize_t
i, n = PyTuple_GET_SIZE(kwnames);
33922 for (
i = 0;
i < n;
i++)
33924 if (s == PyTuple_GET_ITEM(kwnames,
i))
return kwvalues[
i];
33926 for (
i = 0;
i < n;
i++)
33928 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames,
i), Py_EQ);
33929 if (unlikely(eq != 0)) {
33930 if (unlikely(eq < 0))
return NULL;
33931 return kwvalues[
i];
33936 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 33937 CYTHON_UNUSED
static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues) {
33938 Py_ssize_t
i, nkwargs = PyTuple_GET_SIZE(kwnames);
33940 dict = PyDict_New();
33941 if (unlikely(!dict))
33943 for (
i=0;
i<nkwargs;
i++) {
33944 PyObject *key = PyTuple_GET_ITEM(kwnames,
i);
33945 if (unlikely(PyDict_SetItem(dict, key, kwvalues[
i]) < 0))
33957 static void __Pyx_RaiseArgtupleInvalid(
33958 const char* func_name,
33960 Py_ssize_t num_min,
33961 Py_ssize_t num_max,
33962 Py_ssize_t num_found)
33964 Py_ssize_t num_expected;
33965 const char *more_or_less;
33966 if (num_found < num_min) {
33967 num_expected = num_min;
33968 more_or_less =
"at least";
33970 num_expected = num_max;
33971 more_or_less =
"at most";
33974 more_or_less =
"exactly";
33976 PyErr_Format(PyExc_TypeError,
33977 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
33978 func_name, more_or_less, num_expected,
33979 (num_expected == 1) ?
"" :
"s", num_found);
33983 static int __Pyx_CheckKeywordStrings(
33985 const char* function_name,
33989 Py_ssize_t pos = 0;
33990 #if CYTHON_COMPILING_IN_PYPY 33991 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
33992 goto invalid_keyword;
33995 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
33997 #if CYTHON_ASSUME_SAFE_MACROS 33998 kwsize = PyTuple_GET_SIZE(kw);
34000 kwsize = PyTuple_Size(kw);
34001 if (kwsize < 0)
return 0;
34003 if (unlikely(kwsize == 0))
34006 #if CYTHON_ASSUME_SAFE_MACROS 34007 key = PyTuple_GET_ITEM(kw, 0);
34009 key = PyTuple_GetItem(kw, pos);
34010 if (!key)
return 0;
34012 goto invalid_keyword;
34014 #if PY_VERSION_HEX < 0x03090000 34015 for (pos = 0; pos < kwsize; pos++) {
34016 #if CYTHON_ASSUME_SAFE_MACROS 34017 key = PyTuple_GET_ITEM(kw, pos);
34019 key = PyTuple_GetItem(kw, pos);
34020 if (!key)
return 0;
34022 if (unlikely(!PyUnicode_Check(key)))
34023 goto invalid_keyword_type;
34028 while (PyDict_Next(kw, &pos, &key, 0)) {
34029 #if PY_MAJOR_VERSION < 3 34030 if (unlikely(!PyString_Check(key)))
34032 if (unlikely(!PyUnicode_Check(key)))
34033 goto invalid_keyword_type;
34035 if (!kw_allowed && unlikely(key))
34036 goto invalid_keyword;
34038 invalid_keyword_type:
34039 PyErr_Format(PyExc_TypeError,
34040 "%.200s() keywords must be strings", function_name);
34044 #if PY_MAJOR_VERSION < 3 34045 PyErr_Format(PyExc_TypeError,
34046 "%.200s() got an unexpected keyword argument '%.200s'",
34047 function_name, PyString_AsString(key));
34049 PyErr_Format(PyExc_TypeError,
34050 "%s() got an unexpected keyword argument '%U'",
34051 function_name, key);
34057 static void __Pyx_RaiseDoubleKeywordsError(
34058 const char* func_name,
34061 PyErr_Format(PyExc_TypeError,
34062 #
if PY_MAJOR_VERSION >= 3
34063 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
34065 "%s() got multiple values for keyword argument '%s'", func_name,
34066 PyString_AsString(kw_name));
34071 static int __Pyx_ParseOptionalKeywords(
34073 PyObject *
const *kwvalues,
34074 PyObject **argnames[],
34076 PyObject *values[],
34077 Py_ssize_t num_pos_args,
34078 const char* function_name)
34080 PyObject *key = 0, *value = 0;
34081 Py_ssize_t pos = 0;
34083 PyObject*** first_kw_arg = argnames + num_pos_args;
34084 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
34086 Py_XDECREF(key); key = NULL;
34087 Py_XDECREF(value); value = NULL;
34088 if (kwds_is_tuple) {
34090 #if CYTHON_ASSUME_SAFE_MACROS 34091 size = PyTuple_GET_SIZE(kwds);
34093 size = PyTuple_Size(kwds);
34094 if (size < 0)
goto bad;
34096 if (pos >= size)
break;
34097 #if CYTHON_AVOID_BORROWED_REFS 34098 key = __Pyx_PySequence_ITEM(kwds, pos);
34099 if (!key)
goto bad;
34100 #elif CYTHON_ASSUME_SAFE_MACROS 34101 key = PyTuple_GET_ITEM(kwds, pos);
34103 key = PyTuple_GetItem(kwds, pos);
34104 if (!key)
goto bad;
34106 value = kwvalues[pos];
34111 if (!PyDict_Next(kwds, &pos, &key, &value))
break;
34112 #if CYTHON_AVOID_BORROWED_REFS 34116 name = first_kw_arg;
34117 while (*name && (**name != key)) name++;
34119 values[name-argnames] = value;
34120 #if CYTHON_AVOID_BORROWED_REFS 34128 #if !CYTHON_AVOID_BORROWED_REFS 34132 name = first_kw_arg;
34133 #if PY_MAJOR_VERSION < 3 34134 if (likely(PyString_Check(key))) {
34136 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
34137 && _PyString_Eq(**name, key)) {
34138 values[name-argnames] = value;
34139 #if CYTHON_AVOID_BORROWED_REFS 34146 if (*name)
continue;
34148 PyObject*** argname = argnames;
34149 while (argname != first_kw_arg) {
34150 if ((**argname == key) || (
34151 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
34152 && _PyString_Eq(**argname, key))) {
34153 goto arg_passed_twice;
34160 if (likely(PyUnicode_Check(key))) {
34163 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 34164 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
34166 PyUnicode_Compare(**name, key)
34168 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
34170 values[name-argnames] = value;
34171 #if CYTHON_AVOID_BORROWED_REFS 34178 if (*name)
continue;
34180 PyObject*** argname = argnames;
34181 while (argname != first_kw_arg) {
34182 int cmp = (**argname == key) ? 0 :
34183 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
34184 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
34186 PyUnicode_Compare(**argname, key);
34187 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
34188 if (cmp == 0)
goto arg_passed_twice;
34193 goto invalid_keyword_type;
34195 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
34197 goto invalid_keyword;
34204 __Pyx_RaiseDoubleKeywordsError(function_name, key);
34206 invalid_keyword_type:
34207 PyErr_Format(PyExc_TypeError,
34208 "%.200s() keywords must be strings", function_name);
34211 #if PY_MAJOR_VERSION < 3 34212 PyErr_Format(PyExc_TypeError,
34213 "%.200s() got an unexpected keyword argument '%.200s'",
34214 function_name, PyString_AsString(key));
34216 PyErr_Format(PyExc_TypeError,
34217 "%s() got an unexpected keyword argument '%U'",
34218 function_name, key);
34227 #if CYTHON_USE_DICT_VERSIONS 34228 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
34230 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
34234 #if !CYTHON_AVOID_BORROWED_REFS 34235 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 34236 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
34237 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
34238 if (likely(result)) {
34239 return __Pyx_NewRef(result);
34240 }
else if (unlikely(PyErr_Occurred())) {
34243 #elif CYTHON_COMPILING_IN_LIMITED_API 34244 if (unlikely(!__pyx_m)) {
34247 result = PyObject_GetAttr(__pyx_m, name);
34248 if (likely(result)) {
34252 result = PyDict_GetItem(__pyx_d, name);
34253 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
34254 if (likely(result)) {
34255 return __Pyx_NewRef(result);
34259 result = PyObject_GetItem(__pyx_d, name);
34260 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
34261 if (likely(result)) {
34262 return __Pyx_NewRef(result);
34266 return __Pyx_GetBuiltinName(name);
34270 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE 34271 static _PyErr_StackItem *
34272 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
34274 _PyErr_StackItem *exc_info = tstate->exc_info;
34275 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
34276 exc_info->previous_item != NULL)
34278 exc_info = exc_info->previous_item;
34285 #if CYTHON_FAST_THREAD_STATE 34286 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
34287 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 34288 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
34289 PyObject *exc_value = exc_info->exc_value;
34290 if (exc_value == NULL || exc_value == Py_None) {
34295 *value = exc_value;
34297 *type = (PyObject*) Py_TYPE(exc_value);
34299 *tb = PyException_GetTraceback(exc_value);
34301 #elif CYTHON_USE_EXC_INFO_STACK 34302 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
34303 *type = exc_info->exc_type;
34304 *value = exc_info->exc_value;
34305 *tb = exc_info->exc_traceback;
34307 Py_XINCREF(*value);
34310 *type = tstate->exc_type;
34311 *value = tstate->exc_value;
34312 *tb = tstate->exc_traceback;
34314 Py_XINCREF(*value);
34318 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
34319 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 34320 _PyErr_StackItem *exc_info = tstate->exc_info;
34321 PyObject *tmp_value = exc_info->exc_value;
34322 exc_info->exc_value = value;
34323 Py_XDECREF(tmp_value);
34327 PyObject *tmp_type, *tmp_value, *tmp_tb;
34328 #if CYTHON_USE_EXC_INFO_STACK 34329 _PyErr_StackItem *exc_info = tstate->exc_info;
34330 tmp_type = exc_info->exc_type;
34331 tmp_value = exc_info->exc_value;
34332 tmp_tb = exc_info->exc_traceback;
34333 exc_info->exc_type = type;
34334 exc_info->exc_value = value;
34335 exc_info->exc_traceback = tb;
34337 tmp_type = tstate->exc_type;
34338 tmp_value = tstate->exc_value;
34339 tmp_tb = tstate->exc_traceback;
34340 tstate->exc_type = type;
34341 tstate->exc_value = value;
34342 tstate->exc_traceback = tb;
34344 Py_XDECREF(tmp_type);
34345 Py_XDECREF(tmp_value);
34346 Py_XDECREF(tmp_tb);
34352 #if CYTHON_FAST_THREAD_STATE 34353 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
34355 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
34358 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
34359 #if CYTHON_FAST_THREAD_STATE 34360 PyObject *tmp_type, *tmp_value, *tmp_tb;
34361 #if PY_VERSION_HEX >= 0x030C00A6 34362 local_value = tstate->current_exception;
34363 tstate->current_exception = 0;
34364 if (likely(local_value)) {
34365 local_type = (PyObject*) Py_TYPE(local_value);
34366 Py_INCREF(local_type);
34367 local_tb = PyException_GetTraceback(local_value);
34370 local_type = tstate->curexc_type;
34371 local_value = tstate->curexc_value;
34372 local_tb = tstate->curexc_traceback;
34373 tstate->curexc_type = 0;
34374 tstate->curexc_value = 0;
34375 tstate->curexc_traceback = 0;
34378 PyErr_Fetch(&local_type, &local_value, &local_tb);
34380 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
34381 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 34382 if (unlikely(tstate->current_exception))
34383 #elif CYTHON_FAST_THREAD_STATE 34384 if (unlikely(tstate->curexc_type))
34386 if (unlikely(PyErr_Occurred()))
34389 #if PY_MAJOR_VERSION >= 3 34391 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
34395 Py_XINCREF(local_tb);
34396 Py_XINCREF(local_type);
34397 Py_XINCREF(local_value);
34398 *type = local_type;
34399 *value = local_value;
34401 #if CYTHON_FAST_THREAD_STATE 34402 #if CYTHON_USE_EXC_INFO_STACK 34404 _PyErr_StackItem *exc_info = tstate->exc_info;
34405 #if PY_VERSION_HEX >= 0x030B00a4 34406 tmp_value = exc_info->exc_value;
34407 exc_info->exc_value = local_value;
34410 Py_XDECREF(local_type);
34411 Py_XDECREF(local_tb);
34413 tmp_type = exc_info->exc_type;
34414 tmp_value = exc_info->exc_value;
34415 tmp_tb = exc_info->exc_traceback;
34416 exc_info->exc_type = local_type;
34417 exc_info->exc_value = local_value;
34418 exc_info->exc_traceback = local_tb;
34422 tmp_type = tstate->exc_type;
34423 tmp_value = tstate->exc_value;
34424 tmp_tb = tstate->exc_traceback;
34425 tstate->exc_type = local_type;
34426 tstate->exc_value = local_value;
34427 tstate->exc_traceback = local_tb;
34429 Py_XDECREF(tmp_type);
34430 Py_XDECREF(tmp_value);
34431 Py_XDECREF(tmp_tb);
34433 PyErr_SetExcInfo(local_type, local_value, local_tb);
34440 Py_XDECREF(local_type);
34441 Py_XDECREF(local_value);
34442 Py_XDECREF(local_tb);
34447 #if PY_MAJOR_VERSION < 3 34448 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
34449 __Pyx_PyThreadState_declare
34450 CYTHON_UNUSED_VAR(cause);
34452 if (!value || value == Py_None)
34456 if (!tb || tb == Py_None)
34460 if (!PyTraceBack_Check(tb)) {
34461 PyErr_SetString(PyExc_TypeError,
34462 "raise: arg 3 must be a traceback or None");
34466 if (PyType_Check(type)) {
34467 #if CYTHON_COMPILING_IN_PYPY 34469 Py_INCREF(Py_None);
34473 PyErr_NormalizeException(&type, &value, &tb);
34476 PyErr_SetString(PyExc_TypeError,
34477 "instance exception may not have a separate value");
34481 type = (PyObject*) Py_TYPE(type);
34483 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
34484 PyErr_SetString(PyExc_TypeError,
34485 "raise: exception class must be a subclass of BaseException");
34489 __Pyx_PyThreadState_assign
34490 __Pyx_ErrRestore(type, value, tb);
34499 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
34500 PyObject* owned_instance = NULL;
34501 if (tb == Py_None) {
34503 }
else if (tb && !PyTraceBack_Check(tb)) {
34504 PyErr_SetString(PyExc_TypeError,
34505 "raise: arg 3 must be a traceback or None");
34508 if (value == Py_None)
34510 if (PyExceptionInstance_Check(type)) {
34512 PyErr_SetString(PyExc_TypeError,
34513 "instance exception may not have a separate value");
34517 type = (PyObject*) Py_TYPE(value);
34518 }
else if (PyExceptionClass_Check(type)) {
34519 PyObject *instance_class = NULL;
34520 if (value && PyExceptionInstance_Check(value)) {
34521 instance_class = (PyObject*) Py_TYPE(value);
34522 if (instance_class != type) {
34523 int is_subclass = PyObject_IsSubclass(instance_class, type);
34524 if (!is_subclass) {
34525 instance_class = NULL;
34526 }
else if (unlikely(is_subclass == -1)) {
34529 type = instance_class;
34533 if (!instance_class) {
34536 args = PyTuple_New(0);
34537 else if (PyTuple_Check(value)) {
34541 args = PyTuple_Pack(1, value);
34544 owned_instance = PyObject_Call(type, args, NULL);
34546 if (!owned_instance)
34548 value = owned_instance;
34549 if (!PyExceptionInstance_Check(value)) {
34550 PyErr_Format(PyExc_TypeError,
34551 "calling %R should have returned an instance of " 34552 "BaseException, not %R",
34553 type, Py_TYPE(value));
34558 PyErr_SetString(PyExc_TypeError,
34559 "raise: exception class must be a subclass of BaseException");
34563 PyObject *fixed_cause;
34564 if (cause == Py_None) {
34565 fixed_cause = NULL;
34566 }
else if (PyExceptionClass_Check(cause)) {
34567 fixed_cause = PyObject_CallObject(cause, NULL);
34568 if (fixed_cause == NULL)
34570 }
else if (PyExceptionInstance_Check(cause)) {
34571 fixed_cause = cause;
34572 Py_INCREF(fixed_cause);
34574 PyErr_SetString(PyExc_TypeError,
34575 "exception causes must derive from " 34579 PyException_SetCause(value, fixed_cause);
34581 PyErr_SetObject(type, value);
34583 #if PY_VERSION_HEX >= 0x030C00A6 34584 PyException_SetTraceback(value, tb);
34585 #elif CYTHON_FAST_THREAD_STATE 34586 PyThreadState *tstate = __Pyx_PyThreadState_Current;
34587 PyObject* tmp_tb = tstate->curexc_traceback;
34588 if (tb != tmp_tb) {
34590 tstate->curexc_traceback = tb;
34591 Py_XDECREF(tmp_tb);
34594 PyObject *tmp_type, *tmp_value, *tmp_tb;
34595 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
34597 PyErr_Restore(tmp_type, tmp_value, tb);
34598 Py_XDECREF(tmp_tb);
34602 Py_XDECREF(owned_instance);
34608 #if CYTHON_COMPILING_IN_CPYTHON 34609 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
34611 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
34615 return b == &PyBaseObject_Type;
34617 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
34619 if (a == b)
return 1;
34623 n = PyTuple_GET_SIZE(mro);
34624 for (
i = 0;
i < n;
i++) {
34625 if (PyTuple_GET_ITEM(mro,
i) == (PyObject *)b)
34630 return __Pyx_InBases(a, b);
34632 static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
34634 if (cls == a || cls == b)
return 1;
34638 n = PyTuple_GET_SIZE(mro);
34639 for (
i = 0;
i < n;
i++) {
34640 PyObject *base = PyTuple_GET_ITEM(mro,
i);
34641 if (base == (PyObject *)a || base == (PyObject *)b)
34646 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
34648 #if PY_MAJOR_VERSION == 2 34649 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
34650 PyObject *exception, *value, *tb;
34652 __Pyx_PyThreadState_declare
34653 __Pyx_PyThreadState_assign
34654 __Pyx_ErrFetch(&exception, &value, &tb);
34655 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
34656 if (unlikely(res == -1)) {
34657 PyErr_WriteUnraisable(err);
34661 res = PyObject_IsSubclass(err, exc_type2);
34662 if (unlikely(res == -1)) {
34663 PyErr_WriteUnraisable(err);
34667 __Pyx_ErrRestore(exception, value, tb);
34671 static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
34673 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
34675 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
34679 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
34681 assert(PyExceptionClass_Check(exc_type));
34682 n = PyTuple_GET_SIZE(tuple);
34683 #if PY_MAJOR_VERSION >= 3 34684 for (
i=0;
i<n;
i++) {
34685 if (exc_type == PyTuple_GET_ITEM(tuple,
i))
return 1;
34688 for (
i=0;
i<n;
i++) {
34689 PyObject *t = PyTuple_GET_ITEM(tuple,
i);
34690 #if PY_MAJOR_VERSION < 3 34691 if (likely(exc_type == t))
return 1;
34693 if (likely(PyExceptionClass_Check(t))) {
34694 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t))
return 1;
34700 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
34701 if (likely(err == exc_type))
return 1;
34702 if (likely(PyExceptionClass_Check(err))) {
34703 if (likely(PyExceptionClass_Check(exc_type))) {
34704 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
34705 }
else if (likely(PyTuple_Check(exc_type))) {
34706 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
34710 return PyErr_GivenExceptionMatches(err, exc_type);
34712 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
34713 assert(PyExceptionClass_Check(exc_type1));
34714 assert(PyExceptionClass_Check(exc_type2));
34715 if (likely(err == exc_type1 || err == exc_type2))
return 1;
34716 if (likely(PyExceptionClass_Check(err))) {
34717 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
34719 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
34724 # if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 34726 __Pyx_unicode_modifiable(PyObject *unicode)
34728 if (Py_REFCNT(unicode) != 1)
34730 if (!PyUnicode_CheckExact(unicode))
34732 if (PyUnicode_CHECK_INTERNED(unicode))
34736 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
34737 #
if CYTHON_REFNANNY
34738 ,
void* __pyx_refnanny
34741 PyObject *left = *p_left;
34742 Py_ssize_t left_len, right_len, new_len;
34743 if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
34745 if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
34747 left_len = PyUnicode_GET_LENGTH(left);
34748 if (left_len == 0) {
34752 right_len = PyUnicode_GET_LENGTH(right);
34753 if (right_len == 0) {
34757 if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
34758 PyErr_SetString(PyExc_OverflowError,
34759 "strings are too large to concat");
34762 new_len = left_len + right_len;
34763 if (__Pyx_unicode_modifiable(left)
34764 && PyUnicode_CheckExact(right)
34765 && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
34766 && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
34768 __Pyx_GIVEREF(*p_left);
34769 ret = PyUnicode_Resize(p_left, new_len);
34770 __Pyx_GOTREF(*p_left);
34771 if (unlikely(ret != 0))
34773 #if PY_VERSION_HEX >= 0x030d0000 34774 if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0))
return NULL;
34776 _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
34778 __Pyx_INCREF(*p_left);
34779 __Pyx_GIVEREF(*p_left);
34782 return __Pyx_PyUnicode_Concat(left, right);
34788 #if !CYTHON_COMPILING_IN_PYPY 34789 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check) {
34790 CYTHON_MAYBE_UNUSED_VAR(intval);
34791 CYTHON_MAYBE_UNUSED_VAR(inplace);
34792 CYTHON_UNUSED_VAR(zerodivision_check);
34793 #if PY_MAJOR_VERSION < 3 34794 if (likely(PyInt_CheckExact(op1))) {
34795 const long b = intval;
34797 long a = PyInt_AS_LONG(op1);
34799 x = (long)((
unsigned long)a + (
unsigned long)b);
34800 if (likely((x^a) >= 0 || (x^b) >= 0))
34801 return PyInt_FromLong(x);
34802 return PyLong_Type.tp_as_number->nb_add(op1, op2);
34805 #if CYTHON_USE_PYLONG_INTERNALS 34806 if (likely(PyLong_CheckExact(op1))) {
34807 const long b = intval;
34809 #ifdef HAVE_LONG_LONG 34810 const PY_LONG_LONG llb = intval;
34811 PY_LONG_LONG lla, llx;
34813 if (unlikely(__Pyx_PyLong_IsZero(op1))) {
34814 return __Pyx_NewRef(op2);
34816 if (likely(__Pyx_PyLong_IsCompact(op1))) {
34817 a = __Pyx_PyLong_CompactValue(op1);
34819 const digit* digits = __Pyx_PyLong_Digits(op1);
34820 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
34823 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
34824 a = -(long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
34826 #ifdef HAVE_LONG_LONG 34827 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
34828 lla = -(PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
34832 CYTHON_FALLTHROUGH;
34834 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
34835 a = (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
34837 #ifdef HAVE_LONG_LONG 34838 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
34839 lla = (PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
34843 CYTHON_FALLTHROUGH;
34845 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
34846 a = -(long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
34848 #ifdef HAVE_LONG_LONG 34849 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
34850 lla = -(PY_LONG_LONG) (((((((
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
34854 CYTHON_FALLTHROUGH;
34856 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
34857 a = (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
34859 #ifdef HAVE_LONG_LONG 34860 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
34861 lla = (PY_LONG_LONG) (((((((
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
34865 CYTHON_FALLTHROUGH;
34867 if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
34868 a = -(long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
34870 #ifdef HAVE_LONG_LONG 34871 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
34872 lla = -(PY_LONG_LONG) (((((((((
unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
34876 CYTHON_FALLTHROUGH;
34878 if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
34879 a = (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
34881 #ifdef HAVE_LONG_LONG 34882 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
34883 lla = (PY_LONG_LONG) (((((((((
unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
34887 CYTHON_FALLTHROUGH;
34888 default:
return PyLong_Type.tp_as_number->nb_add(op1, op2);
34892 return PyLong_FromLong(x);
34893 #ifdef HAVE_LONG_LONG 34896 return PyLong_FromLongLong(llx);
34902 if (PyFloat_CheckExact(op1)) {
34903 const long b = intval;
34904 #if CYTHON_COMPILING_IN_LIMITED_API 34905 double a = __pyx_PyFloat_AsDouble(op1);
34907 double a = PyFloat_AS_DOUBLE(op1);
34911 PyFPE_START_PROTECT(
"add",
return NULL)
34912 result = ((double)a) + (double)b;
34913 PyFPE_END_PROTECT(result)
34916 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
34921 static void __Pyx_Generator_Replace_StopIteration(
int in_async_gen) {
34922 PyObject *exc, *val, *tb, *cur_exc;
34923 __Pyx_PyThreadState_declare
34924 #ifdef __Pyx_StopAsyncIteration_USED 34925 int is_async_stopiteration = 0;
34927 CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
34928 cur_exc = PyErr_Occurred();
34929 if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
34930 #ifdef __Pyx_StopAsyncIteration_USED 34931 if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) {
34932 is_async_stopiteration = 1;
34937 __Pyx_PyThreadState_assign
34938 __Pyx_GetException(&exc, &val, &tb);
34942 PyErr_SetString(PyExc_RuntimeError,
34943 #ifdef __Pyx_StopAsyncIteration_USED
34944 is_async_stopiteration ?
"async generator raised StopAsyncIteration" :
34945 in_async_gen ?
"async generator raised StopIteration" :
34947 "generator raised StopIteration");
34951 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
34952 PyObject *arg[2] = {NULL, NULL};
34953 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
34957 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
34958 const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
34959 const char* encoding,
const char* errors,
34960 PyObject* (*decode_func)(
const char *s, Py_ssize_t size,
const char *errors)) {
34961 if (unlikely((start < 0) | (stop < 0))) {
34972 if (unlikely(stop <= start))
34973 return __Pyx_NewRef(__pyx_empty_unicode);
34974 length = stop - start;
34977 return decode_func(cstring, length, errors);
34979 return PyUnicode_Decode(cstring, length, encoding, errors);
34984 #if CYTHON_FAST_THREAD_STATE 34985 static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
34986 PyObject *tmp_type, *tmp_value, *tmp_tb;
34987 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 34988 _PyErr_StackItem *exc_info = tstate->exc_info;
34989 tmp_value = exc_info->exc_value;
34990 exc_info->exc_value = *value;
34991 if (tmp_value == NULL || tmp_value == Py_None) {
34992 Py_XDECREF(tmp_value);
34997 tmp_type = (PyObject*) Py_TYPE(tmp_value);
34998 Py_INCREF(tmp_type);
34999 #if CYTHON_COMPILING_IN_CPYTHON 35000 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
35001 Py_XINCREF(tmp_tb);
35003 tmp_tb = PyException_GetTraceback(tmp_value);
35006 #elif CYTHON_USE_EXC_INFO_STACK 35007 _PyErr_StackItem *exc_info = tstate->exc_info;
35008 tmp_type = exc_info->exc_type;
35009 tmp_value = exc_info->exc_value;
35010 tmp_tb = exc_info->exc_traceback;
35011 exc_info->exc_type = *type;
35012 exc_info->exc_value = *value;
35013 exc_info->exc_traceback = *tb;
35015 tmp_type = tstate->exc_type;
35016 tmp_value = tstate->exc_value;
35017 tmp_tb = tstate->exc_traceback;
35018 tstate->exc_type = *type;
35019 tstate->exc_value = *value;
35020 tstate->exc_traceback = *tb;
35023 *value = tmp_value;
35027 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
35028 PyObject *tmp_type, *tmp_value, *tmp_tb;
35029 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
35030 PyErr_SetExcInfo(*type, *value, *tb);
35032 *value = tmp_value;
35038 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
35040 if (unlikely(!j))
return -1;
35041 r = PyObject_SetItem(o, j, v);
35045 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t
i, PyObject *v,
int is_list,
35046 CYTHON_NCP_UNUSED
int wraparound, CYTHON_NCP_UNUSED
int boundscheck) {
35047 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS 35048 if (is_list || PyList_CheckExact(o)) {
35049 Py_ssize_t n = (!wraparound) ?
i : ((likely(
i >= 0)) ?
i :
i + PyList_GET_SIZE(o));
35050 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
35051 PyObject* old = PyList_GET_ITEM(o, n);
35053 PyList_SET_ITEM(o, n, v);
35058 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
35059 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
35060 if (mm && mm->mp_ass_subscript) {
35062 PyObject *key = PyInt_FromSsize_t(
i);
35063 if (unlikely(!key))
return -1;
35064 r = mm->mp_ass_subscript(o, key, v);
35068 if (likely(sm && sm->sq_ass_item)) {
35069 if (wraparound && unlikely(
i < 0) && likely(sm->sq_length)) {
35070 Py_ssize_t l = sm->sq_length(o);
35071 if (likely(l >= 0)) {
35074 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
35079 return sm->sq_ass_item(o,
i, v);
35083 if (is_list || !PyMapping_Check(o))
35085 return PySequence_SetItem(o,
i, v);
35088 return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(
i), v);
35092 static int __Pyx__ArgTypeTest(PyObject *
obj, PyTypeObject *type,
const char *name,
int exact)
35094 __Pyx_TypeName type_name;
35095 __Pyx_TypeName obj_type_name;
35096 if (unlikely(!type)) {
35097 PyErr_SetString(PyExc_SystemError,
"Missing type object");
35101 #if PY_MAJOR_VERSION == 2 35102 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(
obj)))
return 1;
35106 if (likely(__Pyx_TypeCheck(
obj, type)))
return 1;
35108 type_name = __Pyx_PyType_GetName(type);
35109 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(
obj));
35110 PyErr_Format(PyExc_TypeError,
35111 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
35112 ", got " __Pyx_FMT_TYPENAME
")", name, type_name, obj_type_name);
35113 __Pyx_DECREF_TypeName(type_name);
35114 __Pyx_DECREF_TypeName(obj_type_name);
35119 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
35120 PyObject *module = 0;
35121 PyObject *empty_dict = 0;
35122 PyObject *empty_list = 0;
35123 #if PY_MAJOR_VERSION < 3 35124 PyObject *py_import;
35125 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
35126 if (unlikely(!py_import))
35129 empty_list = PyList_New(0);
35130 if (unlikely(!empty_list))
35132 from_list = empty_list;
35135 empty_dict = PyDict_New();
35136 if (unlikely(!empty_dict))
35139 #if PY_MAJOR_VERSION >= 3 35141 if (strchr(__Pyx_MODULE_NAME,
'.') != NULL) {
35142 module = PyImport_ImportModuleLevelObject(
35143 name, __pyx_d, empty_dict, from_list, 1);
35144 if (unlikely(!module)) {
35145 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
35154 #if PY_MAJOR_VERSION < 3 35155 PyObject *py_level = PyInt_FromLong(level);
35156 if (unlikely(!py_level))
35158 module = PyObject_CallFunctionObjArgs(py_import,
35159 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
35160 Py_DECREF(py_level);
35162 module = PyImport_ImportModuleLevelObject(
35163 name, __pyx_d, empty_dict, from_list, level);
35168 Py_XDECREF(empty_dict);
35169 Py_XDECREF(empty_list);
35170 #if PY_MAJOR_VERSION < 3 35171 Py_XDECREF(py_import);
35177 #if PY_MAJOR_VERSION >= 3 35178 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
35179 PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
35180 if (unlikely(PyErr_Occurred())) {
35183 if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
35184 partial_name = name;
35186 slice = PySequence_GetSlice(parts_tuple, 0, count);
35187 if (unlikely(!slice))
35189 sep = PyUnicode_FromStringAndSize(
".", 1);
35190 if (unlikely(!sep))
35192 partial_name = PyUnicode_Join(sep, slice);
35195 #
if PY_MAJOR_VERSION < 3
35197 "No module named '%s'", PyString_AS_STRING(partial_name));
35199 #if PY_VERSION_HEX >= 0x030600B1 35200 PyExc_ModuleNotFoundError,
35204 "No module named '%U'", partial_name);
35209 Py_XDECREF(partial_name);
35213 #if PY_MAJOR_VERSION >= 3 35214 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
35215 PyObject *imported_module;
35216 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) 35217 PyObject *modules = PyImport_GetModuleDict();
35218 if (unlikely(!modules))
35220 imported_module = __Pyx_PyDict_GetItemStr(modules, name);
35221 Py_XINCREF(imported_module);
35223 imported_module = PyImport_GetModule(name);
35225 return imported_module;
35228 #if PY_MAJOR_VERSION >= 3 35229 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
35230 Py_ssize_t
i, nparts;
35231 nparts = PyTuple_GET_SIZE(parts_tuple);
35232 for (
i=1;
i < nparts && module;
i++) {
35233 PyObject *part, *submodule;
35234 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 35235 part = PyTuple_GET_ITEM(parts_tuple,
i);
35237 part = PySequence_ITEM(parts_tuple,
i);
35239 submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
35240 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) 35244 module = submodule;
35246 if (unlikely(!module)) {
35247 return __Pyx__ImportDottedModule_Error(name, parts_tuple,
i);
35252 static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
35253 #if PY_MAJOR_VERSION < 3 35254 PyObject *module, *from_list, *
star = __pyx_n_s__9;
35255 CYTHON_UNUSED_VAR(parts_tuple);
35256 from_list = PyList_New(1);
35257 if (unlikely(!from_list))
35260 PyList_SET_ITEM(from_list, 0,
star);
35261 module = __Pyx_Import(name, from_list, 0);
35262 Py_DECREF(from_list);
35265 PyObject *imported_module;
35266 PyObject *module = __Pyx_Import(name, NULL, 0);
35267 if (!parts_tuple || unlikely(!module))
35269 imported_module = __Pyx__ImportDottedModule_Lookup(name);
35270 if (likely(imported_module)) {
35272 return imported_module;
35275 return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
35278 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
35279 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 35280 PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
35281 if (likely(module)) {
35282 PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
35283 if (likely(spec)) {
35284 PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
35285 if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
35289 Py_XDECREF(unsafe);
35291 if (likely(!spec)) {
35297 }
else if (PyErr_Occurred()) {
35301 return __Pyx__ImportDottedModule(name, parts_tuple);
35305 #if CYTHON_USE_TYPE_SPECS 35306 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
35307 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API 35308 CYTHON_UNUSED_VAR(spec);
35309 CYTHON_UNUSED_VAR(type);
35311 const PyType_Slot *slot = spec->slots;
35312 while (slot && slot->slot && slot->slot != Py_tp_members)
35314 if (slot && slot->slot == Py_tp_members) {
35316 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) 35319 PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
35320 while (memb && memb->name) {
35321 if (memb->name[0] ==
'_' && memb->name[1] ==
'_') {
35322 #if PY_VERSION_HEX < 0x030900b1 35323 if (strcmp(memb->name,
"__weaklistoffset__") == 0) {
35324 assert(memb->type == T_PYSSIZET);
35325 assert(memb->flags == READONLY);
35326 type->tp_weaklistoffset = memb->offset;
35329 else if (strcmp(memb->name,
"__dictoffset__") == 0) {
35330 assert(memb->type == T_PYSSIZET);
35331 assert(memb->flags == READONLY);
35332 type->tp_dictoffset = memb->offset;
35335 #if CYTHON_METH_FASTCALL 35336 else if (strcmp(memb->name,
"__vectorcalloffset__") == 0) {
35337 assert(memb->type == T_PYSSIZET);
35338 assert(memb->flags == READONLY);
35339 #if PY_VERSION_HEX >= 0x030800b4 35340 type->tp_vectorcall_offset = memb->offset;
35342 type->tp_print = (printfunc) memb->offset;
35350 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON 35351 else if (strcmp(memb->name,
"__module__") == 0) {
35353 assert(memb->type == T_OBJECT);
35354 assert(memb->flags == 0 || memb->flags == READONLY);
35355 descr = PyDescr_NewMember(type, memb);
35356 if (unlikely(!descr))
35358 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
35370 PyType_Modified(type);
35378 static int __Pyx_PyObject_GetMethod(PyObject *
obj, PyObject *name, PyObject **method) {
35380 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP 35381 __Pyx_TypeName type_name;
35382 PyTypeObject *tp = Py_TYPE(
obj);
35384 descrgetfunc f = NULL;
35385 PyObject **dictptr, *dict;
35386 int meth_found = 0;
35387 assert (*method == NULL);
35388 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
35389 attr = __Pyx_PyObject_GetAttrStr(
obj, name);
35392 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
35395 descr = _PyType_Lookup(tp, name);
35396 if (likely(descr != NULL)) {
35398 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR 35399 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
35400 #elif PY_MAJOR_VERSION >= 3 35401 #ifdef __Pyx_CyFunction_USED 35402 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
35404 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
35407 #ifdef __Pyx_CyFunction_USED 35408 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
35410 if (likely(PyFunction_Check(descr)))
35416 f = Py_TYPE(descr)->tp_descr_get;
35417 if (f != NULL && PyDescr_IsData(descr)) {
35418 attr = f(descr,
obj, (PyObject *)Py_TYPE(
obj));
35424 dictptr = _PyObject_GetDictPtr(
obj);
35425 if (dictptr != NULL && (dict = *dictptr) != NULL) {
35427 attr = __Pyx_PyDict_GetItemStr(dict, name);
35428 if (attr != NULL) {
35441 attr = f(descr,
obj, (PyObject *)Py_TYPE(
obj));
35445 if (likely(descr != NULL)) {
35449 type_name = __Pyx_PyType_GetName(tp);
35450 PyErr_Format(PyExc_AttributeError,
35451 #
if PY_MAJOR_VERSION >= 3
35452 "'" __Pyx_FMT_TYPENAME
"' object has no attribute '%U'",
35455 "'" __Pyx_FMT_TYPENAME
"' object has no attribute '%.400s'",
35456 type_name, PyString_AS_STRING(name));
35458 __Pyx_DECREF_TypeName(type_name);
35461 attr = __Pyx_PyObject_GetAttrStr(
obj, name);
35465 #if CYTHON_UNPACK_METHODS 35466 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) ==
obj)) {
35467 PyObject *
function = PyMethod_GET_FUNCTION(attr);
35468 Py_INCREF(
function);
35470 *method =
function;
35479 static PyObject* __Pyx_PyObject_CallMethod0(PyObject*
obj, PyObject* method_name) {
35480 PyObject *method = NULL, *result = NULL;
35481 int is_method = __Pyx_PyObject_GetMethod(
obj, method_name, &method);
35482 if (likely(is_method)) {
35483 result = __Pyx_PyObject_CallOneArg(method,
obj);
35487 if (unlikely(!method))
goto bad;
35488 result = __Pyx_PyObject_CallNoArg(method);
35495 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS 35496 static int __Pyx_validate_bases_tuple(
const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
35498 #if CYTHON_ASSUME_SAFE_MACROS 35499 n = PyTuple_GET_SIZE(bases);
35501 n = PyTuple_Size(bases);
35502 if (n < 0)
return -1;
35504 for (
i = 1;
i < n;
i++)
35506 #if CYTHON_AVOID_BORROWED_REFS 35507 PyObject *b0 = PySequence_GetItem(bases,
i);
35508 if (!b0)
return -1;
35509 #elif CYTHON_ASSUME_SAFE_MACROS 35510 PyObject *b0 = PyTuple_GET_ITEM(bases,
i);
35512 PyObject *b0 = PyTuple_GetItem(bases,
i);
35513 if (!b0)
return -1;
35516 #if PY_MAJOR_VERSION < 3 35517 if (PyClass_Check(b0))
35519 PyErr_Format(PyExc_TypeError,
"base class '%.200s' is an old-style class",
35520 PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
35521 #if CYTHON_AVOID_BORROWED_REFS 35527 b = (PyTypeObject*) b0;
35528 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
35530 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
35531 PyErr_Format(PyExc_TypeError,
35532 "base class '" __Pyx_FMT_TYPENAME
"' is not a heap type", b_name);
35533 __Pyx_DECREF_TypeName(b_name);
35534 #if CYTHON_AVOID_BORROWED_REFS 35539 if (dictoffset == 0)
35541 Py_ssize_t b_dictoffset = 0;
35542 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY 35543 b_dictoffset = b->tp_dictoffset;
35545 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b,
"__dictoffset__");
35546 if (!py_b_dictoffset)
goto dictoffset_return;
35547 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
35548 Py_DECREF(py_b_dictoffset);
35549 if (b_dictoffset == -1 && PyErr_Occurred())
goto dictoffset_return;
35551 if (b_dictoffset) {
35553 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
35554 PyErr_Format(PyExc_TypeError,
35555 "extension type '%.200s' has no __dict__ slot, " 35556 "but base type '" __Pyx_FMT_TYPENAME
"' has: " 35557 "either add 'cdef dict __dict__' to the extension type " 35558 "or add '__slots__ = [...]' to the base type",
35559 type_name, b_name);
35560 __Pyx_DECREF_TypeName(b_name);
35562 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) 35565 #if CYTHON_AVOID_BORROWED_REFS 35571 #if CYTHON_AVOID_BORROWED_REFS 35580 static int __Pyx_PyType_Ready(PyTypeObject *t) {
35581 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) 35582 (void)__Pyx_PyObject_CallMethod0;
35583 #if CYTHON_USE_TYPE_SPECS 35584 (void)__Pyx_validate_bases_tuple;
35586 return PyType_Ready(t);
35589 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
35590 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
35592 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) 35594 int gc_was_enabled;
35595 #if PY_VERSION_HEX >= 0x030A00b1 35596 gc_was_enabled = PyGC_Disable();
35597 (void)__Pyx_PyObject_CallMethod0;
35599 PyObject *ret, *py_status;
35600 PyObject *gc = NULL;
35601 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) 35602 gc = PyImport_GetModule(__pyx_kp_u_gc);
35604 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
35605 if (unlikely(!gc))
return -1;
35606 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
35607 if (unlikely(!py_status)) {
35611 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
35612 Py_DECREF(py_status);
35613 if (gc_was_enabled > 0) {
35614 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
35615 if (unlikely(!ret)) {
35620 }
else if (unlikely(gc_was_enabled == -1)) {
35625 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
35626 #if PY_VERSION_HEX >= 0x030A0000 35627 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
35630 (void)__Pyx_PyObject_CallMethod0;
35632 r = PyType_Ready(t);
35633 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) 35634 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
35635 #if PY_VERSION_HEX >= 0x030A00b1 35636 if (gc_was_enabled)
35639 if (gc_was_enabled) {
35640 PyObject *tp, *v, *tb;
35641 PyErr_Fetch(&tp, &v, &tb);
35642 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
35643 if (likely(ret || r == -1)) {
35645 PyErr_Restore(tp, v, tb);
35662 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 35663 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
35664 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
35665 PyErr_Format(PyExc_AttributeError,
35666 #
if PY_MAJOR_VERSION >= 3
35667 "'" __Pyx_FMT_TYPENAME
"' object has no attribute '%U'",
35668 type_name, attr_name);
35670 "'" __Pyx_FMT_TYPENAME
"' object has no attribute '%.400s'",
35671 type_name, PyString_AS_STRING(attr_name));
35673 __Pyx_DECREF_TypeName(type_name);
35676 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject*
obj, PyObject* attr_name) {
35678 PyTypeObject *tp = Py_TYPE(
obj);
35679 if (unlikely(!PyString_Check(attr_name))) {
35680 return PyObject_GenericGetAttr(
obj, attr_name);
35682 assert(!tp->tp_dictoffset);
35683 descr = _PyType_Lookup(tp, attr_name);
35684 if (unlikely(!descr)) {
35685 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
35688 #if PY_MAJOR_VERSION < 3 35689 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
35692 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
35694 PyObject *res = f(descr,
obj, (PyObject *)tp);
35704 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 35705 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject*
obj, PyObject* attr_name) {
35706 if (unlikely(Py_TYPE(
obj)->tp_dictoffset)) {
35707 return PyObject_GenericGetAttr(
obj, attr_name);
35709 return __Pyx_PyObject_GenericGetAttrNoDict(
obj, attr_name);
35714 static int __Pyx_SetVtable(PyTypeObject *type,
void *vtable) {
35715 PyObject *ob = PyCapsule_New(vtable, 0, 0);
35718 #if CYTHON_COMPILING_IN_LIMITED_API 35719 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
35721 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
35732 static void* __Pyx_GetVtable(PyTypeObject *type) {
35734 #if CYTHON_COMPILING_IN_LIMITED_API 35735 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
35737 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
35741 ptr = PyCapsule_GetPointer(ob, 0);
35742 if (!ptr && !PyErr_Occurred())
35743 PyErr_SetString(PyExc_RuntimeError,
"invalid vtable found for imported type");
35752 #if !CYTHON_COMPILING_IN_LIMITED_API 35753 static int __Pyx_MergeVtables(PyTypeObject *type) {
35755 void** base_vtables;
35756 __Pyx_TypeName tp_base_name;
35757 __Pyx_TypeName base_name;
35758 void* unknown = (
void*)-1;
35759 PyObject* bases = type->tp_bases;
35760 int base_depth = 0;
35762 PyTypeObject* base = type->tp_base;
35765 base = base->tp_base;
35768 base_vtables = (
void**) malloc(
sizeof(
void*) * (size_t)(base_depth + 1));
35769 base_vtables[0] = unknown;
35770 for (
i = 1;
i < PyTuple_GET_SIZE(bases);
i++) {
35771 void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases,
i)));
35772 if (base_vtable != NULL) {
35774 PyTypeObject* base = type->tp_base;
35775 for (j = 0; j < base_depth; j++) {
35776 if (base_vtables[j] == unknown) {
35777 base_vtables[j] = __Pyx_GetVtable(base);
35778 base_vtables[j + 1] = unknown;
35780 if (base_vtables[j] == base_vtable) {
35782 }
else if (base_vtables[j] == NULL) {
35785 base = base->tp_base;
35790 free(base_vtables);
35793 tp_base_name = __Pyx_PyType_GetName(type->tp_base);
35794 base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases,
i));
35795 PyErr_Format(PyExc_TypeError,
35796 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'", tp_base_name, base_name);
35797 __Pyx_DECREF_TypeName(tp_base_name);
35798 __Pyx_DECREF_TypeName(base_name);
35799 free(base_vtables);
35805 #if !CYTHON_COMPILING_IN_LIMITED_API 35806 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
35808 PyObject *name_attr;
35809 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
35810 if (likely(name_attr)) {
35811 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
35815 if (unlikely(ret < 0)) {
35819 Py_XDECREF(name_attr);
35822 static int __Pyx_setup_reduce(PyObject* type_obj) {
35824 PyObject *object_reduce = NULL;
35825 PyObject *object_getstate = NULL;
35826 PyObject *object_reduce_ex = NULL;
35827 PyObject *reduce = NULL;
35828 PyObject *reduce_ex = NULL;
35829 PyObject *reduce_cython = NULL;
35830 PyObject *setstate = NULL;
35831 PyObject *setstate_cython = NULL;
35832 PyObject *getstate = NULL;
35833 #if CYTHON_USE_PYTYPE_LOOKUP 35834 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
35836 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
35837 if (!getstate && PyErr_Occurred()) {
35842 #if CYTHON_USE_PYTYPE_LOOKUP 35843 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
35845 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
35846 if (!object_getstate && PyErr_Occurred()) {
35850 if (object_getstate != getstate) {
35854 #if CYTHON_USE_PYTYPE_LOOKUP 35855 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex);
if (!object_reduce_ex)
goto __PYX_BAD;
35857 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex);
if (!object_reduce_ex)
goto __PYX_BAD;
35859 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex);
if (unlikely(!reduce_ex))
goto __PYX_BAD;
35860 if (reduce_ex == object_reduce_ex) {
35861 #if CYTHON_USE_PYTYPE_LOOKUP 35862 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce);
if (!object_reduce)
goto __PYX_BAD;
35864 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce);
if (!object_reduce)
goto __PYX_BAD;
35866 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce);
if (unlikely(!reduce))
goto __PYX_BAD;
35867 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
35868 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
35869 if (likely(reduce_cython)) {
35870 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython);
if (unlikely(ret < 0))
goto __PYX_BAD;
35871 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython);
if (unlikely(ret < 0))
goto __PYX_BAD;
35872 }
else if (reduce == object_reduce || PyErr_Occurred()) {
35875 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
35876 if (!setstate) PyErr_Clear();
35877 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
35878 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
35879 if (likely(setstate_cython)) {
35880 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython);
if (unlikely(ret < 0))
goto __PYX_BAD;
35881 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython);
if (unlikely(ret < 0))
goto __PYX_BAD;
35882 }
else if (!setstate || PyErr_Occurred()) {
35886 PyType_Modified((PyTypeObject*)type_obj);
35891 if (!PyErr_Occurred()) {
35892 __Pyx_TypeName type_obj_name =
35893 __Pyx_PyType_GetName((PyTypeObject*)type_obj);
35894 PyErr_Format(PyExc_RuntimeError,
35895 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
35896 __Pyx_DECREF_TypeName(type_obj_name);
35900 #if !CYTHON_USE_PYTYPE_LOOKUP 35901 Py_XDECREF(object_reduce);
35902 Py_XDECREF(object_reduce_ex);
35903 Py_XDECREF(object_getstate);
35904 Py_XDECREF(getstate);
35906 Py_XDECREF(reduce);
35907 Py_XDECREF(reduce_ex);
35908 Py_XDECREF(reduce_cython);
35909 Py_XDECREF(setstate);
35910 Py_XDECREF(setstate_cython);
35916 static PyObject *__Pyx_FetchSharedCythonABIModule(
void) {
35917 return __Pyx_PyImport_AddModuleRef((
char*) __PYX_ABI_MODULE_NAME);
35921 static int __Pyx_VerifyCachedType(PyObject *cached_type,
35923 Py_ssize_t basicsize,
35924 Py_ssize_t expected_basicsize) {
35925 if (!PyType_Check(cached_type)) {
35926 PyErr_Format(PyExc_TypeError,
35927 "Shared Cython type %.200s is not a type object", name);
35930 if (basicsize != expected_basicsize) {
35931 PyErr_Format(PyExc_TypeError,
35932 "Shared Cython type %.200s has the wrong size, try recompiling",
35938 #if !CYTHON_USE_TYPE_SPECS 35939 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
35940 PyObject* abi_module;
35941 const char* object_name;
35942 PyTypeObject *cached_type = NULL;
35943 abi_module = __Pyx_FetchSharedCythonABIModule();
35944 if (!abi_module)
return NULL;
35945 object_name = strrchr(type->tp_name,
'.');
35946 object_name = object_name ? object_name+1 : type->tp_name;
35947 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
35949 if (__Pyx_VerifyCachedType(
35950 (PyObject *)cached_type,
35952 cached_type->tp_basicsize,
35953 type->tp_basicsize) < 0) {
35958 if (!PyErr_ExceptionMatches(PyExc_AttributeError))
goto bad;
35960 if (PyType_Ready(type) < 0)
goto bad;
35961 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
35964 cached_type = type;
35966 Py_DECREF(abi_module);
35967 return cached_type;
35969 Py_XDECREF(cached_type);
35970 cached_type = NULL;
35974 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
35975 PyObject *abi_module, *cached_type = NULL;
35976 const char* object_name = strrchr(spec->name,
'.');
35977 object_name = object_name ? object_name+1 : spec->name;
35978 abi_module = __Pyx_FetchSharedCythonABIModule();
35979 if (!abi_module)
return NULL;
35980 cached_type = PyObject_GetAttrString(abi_module, object_name);
35982 Py_ssize_t basicsize;
35983 #if CYTHON_COMPILING_IN_LIMITED_API 35984 PyObject *py_basicsize;
35985 py_basicsize = PyObject_GetAttrString(cached_type,
"__basicsize__");
35986 if (unlikely(!py_basicsize))
goto bad;
35987 basicsize = PyLong_AsSsize_t(py_basicsize);
35988 Py_DECREF(py_basicsize);
35990 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred())
goto bad;
35992 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
35994 if (__Pyx_VerifyCachedType(
35998 spec->basicsize) < 0) {
36003 if (!PyErr_ExceptionMatches(PyExc_AttributeError))
goto bad;
36005 CYTHON_UNUSED_VAR(module);
36006 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
36007 if (unlikely(!cached_type))
goto bad;
36008 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0))
goto bad;
36009 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0)
goto bad;
36011 Py_DECREF(abi_module);
36012 assert(cached_type == NULL || PyType_Check(cached_type));
36013 return (PyTypeObject *) cached_type;
36015 Py_XDECREF(cached_type);
36016 cached_type = NULL;
36022 #if CYTHON_METH_FASTCALL 36023 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
36025 PyObject *res = NULL;
36027 PyObject **newargs;
36028 PyObject **kwvalues;
36031 PyObject *key, *value;
36032 unsigned long keys_are_strings;
36033 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
36034 newargs = (PyObject **)PyMem_Malloc((nargs + (
size_t)nkw) *
sizeof(args[0]));
36035 if (unlikely(newargs == NULL)) {
36039 for (j = 0; j < nargs; j++) newargs[j] = args[j];
36040 kwnames = PyTuple_New(nkw);
36041 if (unlikely(kwnames == NULL)) {
36042 PyMem_Free(newargs);
36045 kwvalues = newargs + nargs;
36047 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
36048 while (PyDict_Next(kw, &pos, &key, &value)) {
36049 keys_are_strings &= Py_TYPE(key)->tp_flags;
36052 PyTuple_SET_ITEM(kwnames,
i, key);
36053 kwvalues[
i] = value;
36056 if (unlikely(!keys_are_strings)) {
36057 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
36060 res = vc(func, newargs, nargs, kwnames);
36062 Py_DECREF(kwnames);
36063 for (
i = 0;
i < nkw;
i++)
36064 Py_DECREF(kwvalues[
i]);
36065 PyMem_Free(newargs);
36068 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
36070 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
36071 return vc(func, args, nargs, NULL);
36073 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
36078 #if CYTHON_COMPILING_IN_LIMITED_API 36079 static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void *cfunc) {
36080 if (__Pyx_CyFunction_Check(func)) {
36081 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
36082 }
else if (PyCFunction_Check(func)) {
36083 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
36088 static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void *cfunc) {
36089 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
36092 static CYTHON_INLINE
void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
36093 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API 36094 __Pyx_Py_XDECREF_SET(
36095 __Pyx_CyFunction_GetClassObj(f),
36096 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
36098 __Pyx_Py_XDECREF_SET(
36099 ((PyCMethodObject *) (f))->mm_class,
36100 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
36104 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op,
void *closure)
36106 CYTHON_UNUSED_VAR(closure);
36107 if (unlikely(op->func_doc == NULL)) {
36108 #if CYTHON_COMPILING_IN_LIMITED_API 36109 op->func_doc = PyObject_GetAttrString(op->func,
"__doc__");
36110 if (unlikely(!op->func_doc))
return NULL;
36112 if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
36113 #if PY_MAJOR_VERSION >= 3 36114 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
36116 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
36118 if (unlikely(op->func_doc == NULL))
36121 Py_INCREF(Py_None);
36126 Py_INCREF(op->func_doc);
36127 return op->func_doc;
36130 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value,
void *context)
36132 CYTHON_UNUSED_VAR(context);
36133 if (value == NULL) {
36137 __Pyx_Py_XDECREF_SET(op->func_doc, value);
36141 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op,
void *context)
36143 CYTHON_UNUSED_VAR(context);
36144 if (unlikely(op->func_name == NULL)) {
36145 #if CYTHON_COMPILING_IN_LIMITED_API 36146 op->func_name = PyObject_GetAttrString(op->func,
"__name__");
36147 #elif PY_MAJOR_VERSION >= 3 36148 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
36150 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
36152 if (unlikely(op->func_name == NULL))
36155 Py_INCREF(op->func_name);
36156 return op->func_name;
36159 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value,
void *context)
36161 CYTHON_UNUSED_VAR(context);
36162 #if PY_MAJOR_VERSION >= 3 36163 if (unlikely(value == NULL || !PyUnicode_Check(value)))
36165 if (unlikely(value == NULL || !PyString_Check(value)))
36168 PyErr_SetString(PyExc_TypeError,
36169 "__name__ must be set to a string object");
36173 __Pyx_Py_XDECREF_SET(op->func_name, value);
36177 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op,
void *context)
36179 CYTHON_UNUSED_VAR(context);
36180 Py_INCREF(op->func_qualname);
36181 return op->func_qualname;
36184 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value,
void *context)
36186 CYTHON_UNUSED_VAR(context);
36187 #if PY_MAJOR_VERSION >= 3 36188 if (unlikely(value == NULL || !PyUnicode_Check(value)))
36190 if (unlikely(value == NULL || !PyString_Check(value)))
36193 PyErr_SetString(PyExc_TypeError,
36194 "__qualname__ must be set to a string object");
36198 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
36202 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op,
void *context)
36204 CYTHON_UNUSED_VAR(context);
36205 if (unlikely(op->func_dict == NULL)) {
36206 op->func_dict = PyDict_New();
36207 if (unlikely(op->func_dict == NULL))
36210 Py_INCREF(op->func_dict);
36211 return op->func_dict;
36214 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value,
void *context)
36216 CYTHON_UNUSED_VAR(context);
36217 if (unlikely(value == NULL)) {
36218 PyErr_SetString(PyExc_TypeError,
36219 "function's dictionary may not be deleted");
36222 if (unlikely(!PyDict_Check(value))) {
36223 PyErr_SetString(PyExc_TypeError,
36224 "setting function's dictionary to a non-dict");
36228 __Pyx_Py_XDECREF_SET(op->func_dict, value);
36232 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op,
void *context)
36234 CYTHON_UNUSED_VAR(context);
36235 Py_INCREF(op->func_globals);
36236 return op->func_globals;
36239 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op,
void *context)
36241 CYTHON_UNUSED_VAR(op);
36242 CYTHON_UNUSED_VAR(context);
36243 Py_INCREF(Py_None);
36247 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op,
void *context)
36249 PyObject* result = (op->func_code) ? op->func_code : Py_None;
36250 CYTHON_UNUSED_VAR(context);
36255 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
36257 PyObject *res = op->defaults_getter((PyObject *) op);
36258 if (unlikely(!res))
36260 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 36261 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
36262 Py_INCREF(op->defaults_tuple);
36263 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
36264 Py_INCREF(op->defaults_kwdict);
36266 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
36267 if (unlikely(!op->defaults_tuple)) result = -1;
36269 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
36270 if (unlikely(!op->defaults_kwdict)) result = -1;
36277 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value,
void *context) {
36278 CYTHON_UNUSED_VAR(context);
36281 }
else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
36282 PyErr_SetString(PyExc_TypeError,
36283 "__defaults__ must be set to a tuple object");
36286 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__defaults__ will not " 36287 "currently affect the values used in function calls", 1);
36289 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
36293 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op,
void *context) {
36294 PyObject* result = op->defaults_tuple;
36295 CYTHON_UNUSED_VAR(context);
36296 if (unlikely(!result)) {
36297 if (op->defaults_getter) {
36298 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0))
return NULL;
36299 result = op->defaults_tuple;
36308 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value,
void *context) {
36309 CYTHON_UNUSED_VAR(context);
36312 }
else if (unlikely(value != Py_None && !PyDict_Check(value))) {
36313 PyErr_SetString(PyExc_TypeError,
36314 "__kwdefaults__ must be set to a dict object");
36317 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__kwdefaults__ will not " 36318 "currently affect the values used in function calls", 1);
36320 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
36324 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op,
void *context) {
36325 PyObject* result = op->defaults_kwdict;
36326 CYTHON_UNUSED_VAR(context);
36327 if (unlikely(!result)) {
36328 if (op->defaults_getter) {
36329 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0))
return NULL;
36330 result = op->defaults_kwdict;
36339 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value,
void *context) {
36340 CYTHON_UNUSED_VAR(context);
36341 if (!value || value == Py_None) {
36343 }
else if (unlikely(!PyDict_Check(value))) {
36344 PyErr_SetString(PyExc_TypeError,
36345 "__annotations__ must be set to a dict object");
36349 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
36353 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op,
void *context) {
36354 PyObject* result = op->func_annotations;
36355 CYTHON_UNUSED_VAR(context);
36356 if (unlikely(!result)) {
36357 result = PyDict_New();
36358 if (unlikely(!result))
return NULL;
36359 op->func_annotations = result;
36365 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op,
void *context) {
36367 CYTHON_UNUSED_VAR(context);
36368 if (op->func_is_coroutine) {
36369 return __Pyx_NewRef(op->func_is_coroutine);
36371 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
36372 #if PY_VERSION_HEX >= 0x03050000 36373 if (is_coroutine) {
36374 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
36375 fromlist = PyList_New(1);
36376 if (unlikely(!fromlist))
return NULL;
36378 #if CYTHON_ASSUME_SAFE_MACROS 36379 PyList_SET_ITEM(fromlist, 0, marker);
36381 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
36383 Py_DECREF(fromlist);
36387 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
36388 Py_DECREF(fromlist);
36389 if (unlikely(!module))
goto ignore;
36390 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
36392 if (likely(op->func_is_coroutine)) {
36393 return __Pyx_NewRef(op->func_is_coroutine);
36399 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
36400 return __Pyx_NewRef(op->func_is_coroutine);
36402 #if CYTHON_COMPILING_IN_LIMITED_API 36404 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op,
void *context) {
36405 CYTHON_UNUSED_VAR(context);
36406 return PyObject_GetAttrString(op->func,
"__module__");
36409 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value,
void *context) {
36410 CYTHON_UNUSED_VAR(context);
36411 return PyObject_SetAttrString(op->func,
"__module__", value);
36414 static PyGetSetDef __pyx_CyFunction_getsets[] = {
36415 {(
char *)
"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
36416 {(
char *)
"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
36417 {(
char *)
"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
36418 {(
char *)
"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
36419 {(
char *)
"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
36420 {(
char *)
"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
36421 {(
char *)
"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
36422 {(
char *)
"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
36423 {(
char *)
"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
36424 {(
char *)
"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
36425 {(
char *)
"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
36426 {(
char *)
"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
36427 {(
char *)
"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
36428 {(
char *)
"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
36429 {(
char *)
"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
36430 {(
char *)
"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
36431 {(
char *)
"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
36432 {(
char *)
"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
36433 #if CYTHON_COMPILING_IN_LIMITED_API 36434 {
"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
36438 static PyMemberDef __pyx_CyFunction_members[] = {
36439 #if !CYTHON_COMPILING_IN_LIMITED_API 36440 {(
char *)
"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
36442 #if CYTHON_USE_TYPE_SPECS 36443 {(
char *)
"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
36444 #if CYTHON_METH_FASTCALL 36445 #if CYTHON_BACKPORT_VECTORCALL 36446 {(
char *)
"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
36448 #if !CYTHON_COMPILING_IN_LIMITED_API 36449 {(
char *)
"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
36453 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API 36454 {(
char *)
"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
36456 {(
char *)
"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
36462 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
36464 CYTHON_UNUSED_VAR(args);
36465 #if PY_MAJOR_VERSION >= 3 36466 Py_INCREF(m->func_qualname);
36467 return m->func_qualname;
36469 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
36472 static PyMethodDef __pyx_CyFunction_methods[] = {
36473 {
"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
36476 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API 36477 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) 36479 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) 36481 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml,
int flags, PyObject* qualname,
36482 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
36483 #if !CYTHON_COMPILING_IN_LIMITED_API 36484 PyCFunctionObject *cf = (PyCFunctionObject*) op;
36486 if (unlikely(op == NULL))
36488 #if CYTHON_COMPILING_IN_LIMITED_API 36489 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
36490 if (unlikely(!op->func))
return NULL;
36493 __Pyx_CyFunction_weakreflist(op) = NULL;
36494 #if !CYTHON_COMPILING_IN_LIMITED_API 36496 cf->m_self = (PyObject *) op;
36498 Py_XINCREF(closure);
36499 op->func_closure = closure;
36500 #if !CYTHON_COMPILING_IN_LIMITED_API 36501 Py_XINCREF(module);
36502 cf->m_module = module;
36504 op->func_dict = NULL;
36505 op->func_name = NULL;
36506 Py_INCREF(qualname);
36507 op->func_qualname = qualname;
36508 op->func_doc = NULL;
36509 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API 36510 op->func_classobj = NULL;
36512 ((PyCMethodObject*)op)->mm_class = NULL;
36514 op->func_globals = globals;
36515 Py_INCREF(op->func_globals);
36517 op->func_code = code;
36518 op->defaults_pyobjects = 0;
36519 op->defaults_size = 0;
36520 op->defaults = NULL;
36521 op->defaults_tuple = NULL;
36522 op->defaults_kwdict = NULL;
36523 op->defaults_getter = NULL;
36524 op->func_annotations = NULL;
36525 op->func_is_coroutine = NULL;
36526 #if CYTHON_METH_FASTCALL 36527 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
36529 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
36532 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
36534 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
36535 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
36537 case METH_FASTCALL | METH_KEYWORDS:
36538 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
36540 case METH_VARARGS | METH_KEYWORDS:
36541 __Pyx_CyFunction_func_vectorcall(op) = NULL;
36544 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
36549 return (PyObject *) op;
36552 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
36554 Py_CLEAR(m->func_closure);
36555 #if CYTHON_COMPILING_IN_LIMITED_API 36558 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
36560 Py_CLEAR(m->func_dict);
36561 Py_CLEAR(m->func_name);
36562 Py_CLEAR(m->func_qualname);
36563 Py_CLEAR(m->func_doc);
36564 Py_CLEAR(m->func_globals);
36565 Py_CLEAR(m->func_code);
36566 #if !CYTHON_COMPILING_IN_LIMITED_API 36567 #if PY_VERSION_HEX < 0x030900B1 36568 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
36571 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
36572 ((PyCMethodObject *) (m))->mm_class = NULL;
36577 Py_CLEAR(m->defaults_tuple);
36578 Py_CLEAR(m->defaults_kwdict);
36579 Py_CLEAR(m->func_annotations);
36580 Py_CLEAR(m->func_is_coroutine);
36582 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
36584 for (
i = 0;
i < m->defaults_pyobjects;
i++)
36585 Py_XDECREF(pydefaults[
i]);
36586 PyObject_Free(m->defaults);
36587 m->defaults = NULL;
36591 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
36593 if (__Pyx_CyFunction_weakreflist(m) != NULL)
36594 PyObject_ClearWeakRefs((PyObject *) m);
36595 __Pyx_CyFunction_clear(m);
36596 __Pyx_PyHeapTypeObject_GC_Del(m);
36598 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
36600 PyObject_GC_UnTrack(m);
36601 __Pyx__CyFunction_dealloc(m);
36603 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
void *arg)
36605 Py_VISIT(m->func_closure);
36606 #if CYTHON_COMPILING_IN_LIMITED_API 36609 Py_VISIT(((PyCFunctionObject*)m)->m_module);
36611 Py_VISIT(m->func_dict);
36612 Py_VISIT(m->func_name);
36613 Py_VISIT(m->func_qualname);
36614 Py_VISIT(m->func_doc);
36615 Py_VISIT(m->func_globals);
36616 Py_VISIT(m->func_code);
36617 #if !CYTHON_COMPILING_IN_LIMITED_API 36618 Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
36620 Py_VISIT(m->defaults_tuple);
36621 Py_VISIT(m->defaults_kwdict);
36622 Py_VISIT(m->func_is_coroutine);
36624 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
36626 for (
i = 0;
i < m->defaults_pyobjects;
i++)
36627 Py_VISIT(pydefaults[
i]);
36632 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
36634 #if PY_MAJOR_VERSION >= 3 36635 return PyUnicode_FromFormat(
"<cyfunction %U at %p>",
36636 op->func_qualname, (
void *)op);
36638 return PyString_FromFormat(
"<cyfunction %s at %p>",
36639 PyString_AsString(op->func_qualname), (
void *)op);
36642 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *
self, PyObject *arg, PyObject *kw) {
36643 #if CYTHON_COMPILING_IN_LIMITED_API 36644 PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
36645 PyObject *py_name = NULL;
36648 meth = PyCFunction_GetFunction(f);
36649 if (unlikely(!meth))
return NULL;
36650 flags = PyCFunction_GetFlags(f);
36651 if (unlikely(flags < 0))
return NULL;
36653 PyCFunctionObject* f = (PyCFunctionObject*)func;
36654 PyCFunction meth = f->m_ml->ml_meth;
36655 int flags = f->m_ml->ml_flags;
36658 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
36660 if (likely(kw == NULL || PyDict_Size(kw) == 0))
36661 return (*meth)(
self, arg);
36663 case METH_VARARGS | METH_KEYWORDS:
36664 return (*(PyCFunctionWithKeywords)(
void*)meth)(
self, arg, kw);
36666 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
36667 #if CYTHON_ASSUME_SAFE_MACROS 36668 size = PyTuple_GET_SIZE(arg);
36670 size = PyTuple_Size(arg);
36671 if (unlikely(size < 0))
return NULL;
36673 if (likely(size == 0))
36674 return (*meth)(
self, NULL);
36675 #if CYTHON_COMPILING_IN_LIMITED_API 36676 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
36677 if (!py_name)
return NULL;
36678 PyErr_Format(PyExc_TypeError,
36679 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T
"d given)",
36681 Py_DECREF(py_name);
36683 PyErr_Format(PyExc_TypeError,
36684 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T
"d given)",
36685 f->m_ml->ml_name, size);
36691 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
36692 #if CYTHON_ASSUME_SAFE_MACROS 36693 size = PyTuple_GET_SIZE(arg);
36695 size = PyTuple_Size(arg);
36696 if (unlikely(size < 0))
return NULL;
36698 if (likely(size == 1)) {
36699 PyObject *result, *arg0;
36700 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 36701 arg0 = PyTuple_GET_ITEM(arg, 0);
36703 arg0 = __Pyx_PySequence_ITEM(arg, 0);
if (unlikely(!arg0))
return NULL;
36705 result = (*meth)(
self, arg0);
36706 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) 36711 #if CYTHON_COMPILING_IN_LIMITED_API 36712 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
36713 if (!py_name)
return NULL;
36714 PyErr_Format(PyExc_TypeError,
36715 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T
"d given)",
36717 Py_DECREF(py_name);
36719 PyErr_Format(PyExc_TypeError,
36720 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T
"d given)",
36721 f->m_ml->ml_name, size);
36727 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
36730 #if CYTHON_COMPILING_IN_LIMITED_API 36731 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
36732 if (!py_name)
return NULL;
36733 PyErr_Format(PyExc_TypeError,
"%.200S() takes no keyword arguments",
36735 Py_DECREF(py_name);
36737 PyErr_Format(PyExc_TypeError,
"%.200s() takes no keyword arguments",
36742 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
36743 PyObject *
self, *result;
36744 #if CYTHON_COMPILING_IN_LIMITED_API 36745 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
36746 if (unlikely(!
self) && PyErr_Occurred())
return NULL;
36748 self = ((PyCFunctionObject*)func)->m_self;
36750 result = __Pyx_CyFunction_CallMethod(func,
self, arg, kw);
36753 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
36755 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
36756 #if CYTHON_METH_FASTCALL 36757 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
36759 #if CYTHON_ASSUME_SAFE_MACROS 36760 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (
size_t)PyTuple_GET_SIZE(args), kw);
36762 (void) &__Pyx_PyVectorcall_FastCallDict;
36763 return PyVectorcall_Call(func, args, kw);
36767 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
36769 PyObject *new_args;
36771 #if CYTHON_ASSUME_SAFE_MACROS 36772 argc = PyTuple_GET_SIZE(args);
36774 argc = PyTuple_Size(args);
36775 if (unlikely(!argc) < 0)
return NULL;
36777 new_args = PyTuple_GetSlice(args, 1, argc);
36778 if (unlikely(!new_args))
36780 self = PyTuple_GetItem(args, 0);
36781 if (unlikely(!
self)) {
36782 Py_DECREF(new_args);
36783 #if PY_MAJOR_VERSION > 2 36784 PyErr_Format(PyExc_TypeError,
36785 "unbound method %.200S() needs an argument",
36786 cyfunc->func_qualname);
36788 PyErr_SetString(PyExc_TypeError,
36789 "unbound method needs an argument");
36793 result = __Pyx_CyFunction_CallMethod(func,
self, new_args, kw);
36794 Py_DECREF(new_args);
36796 result = __Pyx_CyFunction_Call(func, args, kw);
36800 #if CYTHON_METH_FASTCALL 36801 static CYTHON_INLINE
int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
36804 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
36805 if (unlikely(nargs < 1)) {
36806 PyErr_Format(PyExc_TypeError,
"%.200s() needs an argument",
36807 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
36812 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
36813 PyErr_Format(PyExc_TypeError,
36814 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
36819 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36821 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
36822 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
36823 #if CYTHON_BACKPORT_VECTORCALL 36824 Py_ssize_t nargs = (Py_ssize_t)nargsf;
36826 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36829 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
36836 self = ((PyCFunctionObject*)cyfunc)->m_self;
36841 if (unlikely(nargs != 0)) {
36842 PyErr_Format(PyExc_TypeError,
36843 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T
"d given)",
36844 def->ml_name, nargs);
36847 return def->ml_meth(
self, NULL);
36849 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36851 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
36852 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
36853 #if CYTHON_BACKPORT_VECTORCALL 36854 Py_ssize_t nargs = (Py_ssize_t)nargsf;
36856 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36859 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
36866 self = ((PyCFunctionObject*)cyfunc)->m_self;
36871 if (unlikely(nargs != 1)) {
36872 PyErr_Format(PyExc_TypeError,
36873 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T
"d given)",
36874 def->ml_name, nargs);
36877 return def->ml_meth(
self, args[0]);
36879 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36881 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
36882 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
36883 #if CYTHON_BACKPORT_VECTORCALL 36884 Py_ssize_t nargs = (Py_ssize_t)nargsf;
36886 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36889 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
36896 self = ((PyCFunctionObject*)cyfunc)->m_self;
36901 return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(
self, args, nargs, kwnames);
36903 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
36905 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
36906 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
36907 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
36908 #if CYTHON_BACKPORT_VECTORCALL 36909 Py_ssize_t nargs = (Py_ssize_t)nargsf;
36911 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
36914 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
36921 self = ((PyCFunctionObject*)cyfunc)->m_self;
36926 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(
self, cls, args, (
size_t)nargs, kwnames);
36929 #if CYTHON_USE_TYPE_SPECS 36930 static PyType_Slot __pyx_CyFunctionType_slots[] = {
36931 {Py_tp_dealloc, (
void *)__Pyx_CyFunction_dealloc},
36932 {Py_tp_repr, (
void *)__Pyx_CyFunction_repr},
36933 {Py_tp_call, (
void *)__Pyx_CyFunction_CallAsMethod},
36934 {Py_tp_traverse, (
void *)__Pyx_CyFunction_traverse},
36935 {Py_tp_clear, (
void *)__Pyx_CyFunction_clear},
36936 {Py_tp_methods, (
void *)__pyx_CyFunction_methods},
36937 {Py_tp_members, (
void *)__pyx_CyFunction_members},
36938 {Py_tp_getset, (
void *)__pyx_CyFunction_getsets},
36939 {Py_tp_descr_get, (
void *)__Pyx_PyMethod_New},
36942 static PyType_Spec __pyx_CyFunctionType_spec = {
36943 __PYX_TYPE_MODULE_PREFIX
"cython_function_or_method",
36944 sizeof(__pyx_CyFunctionObject),
36946 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
36947 Py_TPFLAGS_METHOD_DESCRIPTOR |
36949 #
if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
36950 _Py_TPFLAGS_HAVE_VECTORCALL |
36952 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
36953 __pyx_CyFunctionType_slots
36956 static PyTypeObject __pyx_CyFunctionType_type = {
36957 PyVarObject_HEAD_INIT(0, 0)
36958 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
36959 sizeof(__pyx_CyFunctionObject),
36961 (destructor) __Pyx_CyFunction_dealloc,
36962 #if !CYTHON_METH_FASTCALL 36964 #elif CYTHON_BACKPORT_VECTORCALL 36965 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
36967 offsetof(PyCFunctionObject, vectorcall),
36971 #if PY_MAJOR_VERSION < 3 36976 (reprfunc) __Pyx_CyFunction_repr,
36981 __Pyx_CyFunction_CallAsMethod,
36986 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
36987 Py_TPFLAGS_METHOD_DESCRIPTOR |
36989 #
if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
36990 _Py_TPFLAGS_HAVE_VECTORCALL |
36992 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
36994 (traverseproc) __Pyx_CyFunction_traverse,
36995 (inquiry) __Pyx_CyFunction_clear,
36997 #if PY_VERSION_HEX < 0x030500A0 36998 offsetof(__pyx_CyFunctionObject, func_weakreflist),
37000 offsetof(PyCFunctionObject, m_weakreflist),
37004 __pyx_CyFunction_methods,
37005 __pyx_CyFunction_members,
37006 __pyx_CyFunction_getsets,
37009 __Pyx_PyMethod_New,
37011 offsetof(__pyx_CyFunctionObject, func_dict),
37024 #if PY_VERSION_HEX >= 0x030400a1 37027 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 37030 #if __PYX_NEED_TP_PRINT_SLOT 37033 #if PY_VERSION_HEX >= 0x030C0000 37036 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 37041 static int __pyx_CyFunction_init(PyObject *module) {
37042 #if CYTHON_USE_TYPE_SPECS 37043 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
37045 CYTHON_UNUSED_VAR(module);
37046 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
37048 if (unlikely(__pyx_CyFunctionType == NULL)) {
37053 static CYTHON_INLINE
void *__Pyx_CyFunction_InitDefaults(PyObject *func,
size_t size,
int pyobjects) {
37054 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37055 m->defaults = PyObject_Malloc(size);
37056 if (unlikely(!m->defaults))
37057 return PyErr_NoMemory();
37058 memset(m->defaults, 0, size);
37059 m->defaults_pyobjects = pyobjects;
37060 m->defaults_size = size;
37061 return m->defaults;
37063 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
37064 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37065 m->defaults_tuple = tuple;
37068 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
37069 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37070 m->defaults_kwdict = dict;
37073 static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
37074 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37075 m->func_annotations = dict;
37080 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
int flags, PyObject* qualname,
37081 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
37082 PyObject *op = __Pyx_CyFunction_Init(
37083 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
37084 ml, flags, qualname, closure, module, globals, code
37087 PyObject_GC_Track(op);
37093 #ifndef CYTHON_CLINE_IN_TRACEBACK 37094 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line) {
37095 PyObject *use_cline;
37096 PyObject *ptype, *pvalue, *ptraceback;
37097 #if CYTHON_COMPILING_IN_CPYTHON 37098 PyObject **cython_runtime_dict;
37100 CYTHON_MAYBE_UNUSED_VAR(tstate);
37101 if (unlikely(!__pyx_cython_runtime)) {
37104 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
37105 #if CYTHON_COMPILING_IN_CPYTHON 37106 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
37107 if (likely(cython_runtime_dict)) {
37108 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
37109 use_cline, *cython_runtime_dict,
37110 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
37114 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
37115 if (use_cline_obj) {
37116 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
37117 Py_DECREF(use_cline_obj);
37125 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
37127 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
37130 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
37136 #if !CYTHON_COMPILING_IN_LIMITED_API 37137 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
37138 int start = 0, mid = 0, end = count - 1;
37139 if (end >= 0 && code_line > entries[end].code_line) {
37142 while (start < end) {
37143 mid = start + (end - start) / 2;
37144 if (code_line < entries[mid].code_line) {
37146 }
else if (code_line > entries[mid].code_line) {
37152 if (code_line <= entries[mid].code_line) {
37158 static PyCodeObject *__pyx_find_code_object(
int code_line) {
37159 PyCodeObject* code_object;
37161 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
37164 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
37165 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
37168 code_object = __pyx_code_cache.entries[pos].code_object;
37169 Py_INCREF(code_object);
37170 return code_object;
37172 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
37174 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
37175 if (unlikely(!code_line)) {
37178 if (unlikely(!entries)) {
37179 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
37180 if (likely(entries)) {
37181 __pyx_code_cache.entries = entries;
37182 __pyx_code_cache.max_count = 64;
37183 __pyx_code_cache.count = 1;
37184 entries[0].code_line = code_line;
37185 entries[0].code_object = code_object;
37186 Py_INCREF(code_object);
37190 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
37191 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
37192 PyCodeObject* tmp = entries[pos].code_object;
37193 entries[pos].code_object = code_object;
37197 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
37198 int new_max = __pyx_code_cache.max_count + 64;
37199 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
37200 __pyx_code_cache.entries, ((
size_t)new_max) *
sizeof(__Pyx_CodeObjectCacheEntry));
37201 if (unlikely(!entries)) {
37204 __pyx_code_cache.entries = entries;
37205 __pyx_code_cache.max_count = new_max;
37207 for (
i=__pyx_code_cache.count;
i>pos;
i--) {
37208 entries[
i] = entries[
i-1];
37210 entries[pos].code_line = code_line;
37211 entries[pos].code_object = code_object;
37212 __pyx_code_cache.count++;
37213 Py_INCREF(code_object);
37218 #include "compile.h" 37219 #include "frameobject.h" 37220 #include "traceback.h" 37221 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API 37222 #ifndef Py_BUILD_CORE 37223 #define Py_BUILD_CORE 1 37225 #include "internal/pycore_frame.h" 37227 #if CYTHON_COMPILING_IN_LIMITED_API 37228 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
37229 PyObject *firstlineno, PyObject *name) {
37230 PyObject *replace = NULL;
37231 if (unlikely(PyDict_SetItemString(scratch_dict,
"co_firstlineno", firstlineno)))
return NULL;
37232 if (unlikely(PyDict_SetItemString(scratch_dict,
"co_name", name)))
return NULL;
37233 replace = PyObject_GetAttrString(code,
"replace");
37234 if (likely(replace)) {
37236 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
37237 Py_DECREF(replace);
37241 #if __PYX_LIMITED_VERSION_HEX < 0x030780000 37243 PyObject *compiled = NULL, *result = NULL;
37244 if (unlikely(PyDict_SetItemString(scratch_dict,
"code", code)))
return NULL;
37245 if (unlikely(PyDict_SetItemString(scratch_dict,
"type", (PyObject*)(&PyType_Type))))
return NULL;
37246 compiled = Py_CompileString(
37247 "out = type(code)(\n" 37248 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" 37249 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" 37250 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" 37251 " code.co_lnotab)\n",
"<dummy>", Py_file_input);
37252 if (!compiled)
return NULL;
37253 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
37254 Py_DECREF(compiled);
37255 if (!result) PyErr_Print();
37257 result = PyDict_GetItemString(scratch_dict,
"out");
37258 if (result) Py_INCREF(result);
37265 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
37266 int py_line,
const char *filename) {
37267 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
37268 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
37269 PyObject *exc_type, *exc_value, *exc_traceback;
37272 (void) __pyx_cfilenm;
37273 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
37275 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
37276 code_object = Py_CompileString(
"_getframe()", filename, Py_eval_input);
37277 if (unlikely(!code_object))
goto bad;
37278 py_py_line = PyLong_FromLong(py_line);
37279 if (unlikely(!py_py_line))
goto bad;
37280 py_funcname = PyUnicode_FromString(funcname);
37281 if (unlikely(!py_funcname))
goto bad;
37282 dict = PyDict_New();
37283 if (unlikely(!dict))
goto bad;
37285 PyObject *old_code_object = code_object;
37286 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
37287 Py_DECREF(old_code_object);
37289 if (unlikely(!code_object))
goto bad;
37290 getframe = PySys_GetObject(
"_getframe");
37291 if (unlikely(!getframe))
goto bad;
37292 if (unlikely(PyDict_SetItemString(dict,
"_getframe", getframe)))
goto bad;
37293 frame = PyEval_EvalCode(code_object, dict, dict);
37294 if (unlikely(!frame) || frame == Py_None)
goto bad;
37297 PyErr_Restore(exc_type, exc_value, exc_traceback);
37298 Py_XDECREF(code_object);
37299 Py_XDECREF(py_py_line);
37300 Py_XDECREF(py_funcname);
37302 Py_XDECREF(replace);
37305 (
struct _frame*)frame);
37310 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
37311 const char *funcname,
int c_line,
37312 int py_line,
const char *filename) {
37313 PyCodeObject *py_code = NULL;
37314 PyObject *py_funcname = NULL;
37315 #if PY_MAJOR_VERSION < 3 37316 PyObject *py_srcfile = NULL;
37317 py_srcfile = PyString_FromString(filename);
37318 if (!py_srcfile)
goto bad;
37321 #if PY_MAJOR_VERSION < 3 37322 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
37323 if (!py_funcname)
goto bad;
37325 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
37326 if (!py_funcname)
goto bad;
37327 funcname = PyUnicode_AsUTF8(py_funcname);
37328 if (!funcname)
goto bad;
37332 #if PY_MAJOR_VERSION < 3 37333 py_funcname = PyString_FromString(funcname);
37334 if (!py_funcname)
goto bad;
37337 #if PY_MAJOR_VERSION < 3 37338 py_code = __Pyx_PyCode_New(
37356 Py_DECREF(py_srcfile);
37358 py_code = PyCode_NewEmpty(filename, funcname, py_line);
37360 Py_XDECREF(py_funcname);
37363 Py_XDECREF(py_funcname);
37364 #if PY_MAJOR_VERSION < 3 37365 Py_XDECREF(py_srcfile);
37369 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
37370 int py_line,
const char *filename) {
37371 PyCodeObject *py_code = 0;
37372 PyFrameObject *py_frame = 0;
37373 PyThreadState *tstate = __Pyx_PyThreadState_Current;
37374 PyObject *ptype, *pvalue, *ptraceback;
37376 c_line = __Pyx_CLineForTraceback(tstate, c_line);
37378 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
37380 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
37381 py_code = __Pyx_CreateCodeObjectForTraceback(
37382 funcname, c_line, py_line, filename);
37387 Py_XDECREF(pvalue);
37388 Py_XDECREF(ptraceback);
37391 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
37392 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
37394 py_frame = PyFrame_New(
37400 if (!py_frame)
goto bad;
37401 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
37402 PyTraceBack_Here(py_frame);
37404 Py_XDECREF(py_code);
37405 Py_XDECREF(py_frame);
37410 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ 37411 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) 37412 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ 37413 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) 37414 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ 37416 func_type value = func_value;\ 37417 if (sizeof(target_type) < sizeof(func_type)) {\ 37418 if (unlikely(value != (func_type) (target_type) value)) {\ 37419 func_type zero = 0;\ 37420 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ 37421 return (target_type) -1;\ 37422 if (is_unsigned && unlikely(value < zero))\ 37423 goto raise_neg_overflow;\ 37425 goto raise_overflow;\ 37428 return (target_type) value;\ 37432 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
37433 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37434 #pragma GCC diagnostic push 37435 #pragma GCC diagnostic ignored "-Wconversion" 37437 const int neg_one = (int) -1, const_zero = (
int) 0;
37438 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37439 #pragma GCC diagnostic pop 37441 const int is_unsigned = neg_one > const_zero;
37442 #if PY_MAJOR_VERSION < 3 37443 if (likely(PyInt_Check(x))) {
37444 if ((
sizeof(
int) <
sizeof(
long))) {
37445 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
37447 long val = PyInt_AS_LONG(x);
37448 if (is_unsigned && unlikely(val < 0)) {
37449 goto raise_neg_overflow;
37455 if (likely(PyLong_Check(x))) {
37457 #if CYTHON_USE_PYLONG_INTERNALS 37458 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
37459 goto raise_neg_overflow;
37460 }
else if (__Pyx_PyLong_IsCompact(x)) {
37461 __PYX_VERIFY_RETURN_INT(
int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
37463 const digit* digits = __Pyx_PyLong_Digits(x);
37464 assert(__Pyx_PyLong_DigitCount(x) > 1);
37465 switch (__Pyx_PyLong_DigitCount(x)) {
37467 if ((8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
37468 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
37469 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37470 }
else if ((8 *
sizeof(
int) >= 2 * PyLong_SHIFT)) {
37471 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
37476 if ((8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
37477 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
37478 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37479 }
else if ((8 *
sizeof(
int) >= 3 * PyLong_SHIFT)) {
37480 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
37485 if ((8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
37486 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
37487 __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])))
37488 }
else if ((8 *
sizeof(
int) >= 4 * PyLong_SHIFT)) {
37489 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
37496 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 37497 if (unlikely(Py_SIZE(x) < 0)) {
37498 goto raise_neg_overflow;
37502 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
37503 if (unlikely(result < 0))
37505 if (unlikely(result == 1))
37506 goto raise_neg_overflow;
37509 if ((
sizeof(
int) <=
sizeof(
unsigned long))) {
37510 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
37511 #ifdef HAVE_LONG_LONG 37512 }
else if ((
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG))) {
37513 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
37517 #if CYTHON_USE_PYLONG_INTERNALS 37518 if (__Pyx_PyLong_IsCompact(x)) {
37519 __PYX_VERIFY_RETURN_INT(
int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
37521 const digit* digits = __Pyx_PyLong_Digits(x);
37522 assert(__Pyx_PyLong_DigitCount(x) > 1);
37523 switch (__Pyx_PyLong_SignedDigitCount(x)) {
37525 if ((8 *
sizeof(
int) - 1 > 1 * PyLong_SHIFT)) {
37526 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
37527 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37528 }
else if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
37529 return (
int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
37534 if ((8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
37535 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
37536 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37537 }
else if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
37538 return (
int) ((((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
37543 if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
37544 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
37545 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37546 }
else if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
37547 return (
int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
37552 if ((8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
37553 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
37554 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37555 }
else if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
37556 return (
int) ((((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
37561 if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
37562 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
37563 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37564 }
else if ((8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT)) {
37565 return (
int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
37570 if ((8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
37571 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
37572 __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])))
37573 }
else if ((8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT)) {
37574 return (
int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
37581 if ((
sizeof(
int) <=
sizeof(long))) {
37582 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
37583 #ifdef HAVE_LONG_LONG 37584 }
else if ((
sizeof(
int) <=
sizeof(PY_LONG_LONG))) {
37585 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
37591 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
37592 #if PY_MAJOR_VERSION < 3 37593 if (likely(v) && !PyLong_Check(v)) {
37595 v = PyNumber_Long(tmp);
37601 #if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) 37602 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
37603 unsigned char *bytes = (
unsigned char *)&val;
37604 ret = _PyLong_AsByteArray((PyLongObject *)v,
37605 bytes,
sizeof(val),
37606 is_little, !is_unsigned);
37608 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
37609 int bits, remaining_bits, is_negative = 0;
37611 int chunk_size = (
sizeof(long) < 8) ? 30 : 62;
37612 if (unlikely(!PyLong_CheckExact(v))) {
37614 v = PyNumber_Long(v);
37615 assert(PyLong_CheckExact(v));
37617 if (unlikely(!v))
return (
int) -1;
37619 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 37620 if (Py_SIZE(x) == 0)
37622 is_negative = Py_SIZE(x) < 0;
37625 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
37626 if (unlikely(result < 0))
37628 is_negative = result == 1;
37631 if (is_unsigned && unlikely(is_negative)) {
37632 goto raise_neg_overflow;
37633 }
else if (is_negative) {
37634 stepval = PyNumber_Invert(v);
37635 if (unlikely(!stepval))
37638 stepval = __Pyx_NewRef(v);
37641 mask = PyLong_FromLong((1L << chunk_size) - 1);
if (unlikely(!mask))
goto done;
37642 shift = PyLong_FromLong(chunk_size);
if (unlikely(!shift))
goto done;
37643 for (bits = 0; bits < (int)
sizeof(
int) * 8 - chunk_size; bits += chunk_size) {
37644 PyObject *tmp, *digit;
37645 digit = PyNumber_And(stepval, mask);
37646 if (unlikely(!digit))
goto done;
37647 idigit = PyLong_AsLong(digit);
37649 if (unlikely(idigit < 0))
goto done;
37650 tmp = PyNumber_Rshift(stepval, shift);
37651 if (unlikely(!tmp))
goto done;
37652 Py_DECREF(stepval); stepval = tmp;
37653 val |= ((int) idigit) << bits;
37654 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 37655 if (Py_SIZE(stepval) == 0)
37656 goto unpacking_done;
37659 idigit = PyLong_AsLong(stepval);
37660 if (unlikely(idigit < 0))
goto done;
37661 remaining_bits = ((int)
sizeof(
int) * 8) - bits - (is_unsigned ? 0 : 1);
37662 if (unlikely(idigit >= (1L << remaining_bits)))
37663 goto raise_overflow;
37664 val |= ((int) idigit) << bits;
37665 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 37668 if (!is_unsigned) {
37669 if (unlikely(val & (((
int) 1) << (
sizeof(
int) * 8 - 1))))
37670 goto raise_overflow;
37678 Py_XDECREF(stepval);
37688 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
37689 if (!tmp)
return (
int) -1;
37690 val = __Pyx_PyInt_As_int(tmp);
37695 PyErr_SetString(PyExc_OverflowError,
37696 "value too large to convert to int");
37698 raise_neg_overflow:
37699 PyErr_SetString(PyExc_OverflowError,
37700 "can't convert negative value to int");
37705 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
37706 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37707 #pragma GCC diagnostic push 37708 #pragma GCC diagnostic ignored "-Wconversion" 37710 const int neg_one = (int) -1, const_zero = (
int) 0;
37711 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37712 #pragma GCC diagnostic pop 37714 const int is_unsigned = neg_one > const_zero;
37716 if (
sizeof(
int) <
sizeof(long)) {
37717 return PyInt_FromLong((
long) value);
37718 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
37719 return PyLong_FromUnsignedLong((
unsigned long) value);
37720 #ifdef HAVE_LONG_LONG 37721 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
37722 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
37726 if (
sizeof(
int) <=
sizeof(
long)) {
37727 return PyInt_FromLong((
long) value);
37728 #ifdef HAVE_LONG_LONG 37729 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
37730 return PyLong_FromLongLong((PY_LONG_LONG) value);
37735 int one = 1;
int little = (int)*(
unsigned char *)&one;
37736 unsigned char *bytes = (
unsigned char *)&value;
37737 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 37738 return _PyLong_FromByteArray(bytes,
sizeof(
int),
37739 little, !is_unsigned);
37741 PyObject *from_bytes, *result = NULL;
37742 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
37743 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type,
"from_bytes");
37744 if (!from_bytes)
return NULL;
37745 py_bytes = PyBytes_FromStringAndSize((
char*)bytes,
sizeof(
int));
37746 if (!py_bytes)
goto limited_bad;
37747 order_str = PyUnicode_FromString(little ?
"little" :
"big");
37748 if (!order_str)
goto limited_bad;
37749 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
37750 if (!arg_tuple)
goto limited_bad;
37751 if (!is_unsigned) {
37752 kwds = PyDict_New();
37753 if (!kwds)
goto limited_bad;
37754 if (PyDict_SetItemString(kwds,
"signed", __Pyx_NewRef(Py_True)))
goto limited_bad;
37756 result = PyObject_Call(from_bytes, arg_tuple, kwds);
37759 Py_XDECREF(arg_tuple);
37760 Py_XDECREF(order_str);
37761 Py_XDECREF(py_bytes);
37762 Py_XDECREF(from_bytes);
37769 #if CYTHON_COMPILING_IN_LIMITED_API 37770 static __Pyx_TypeName
37771 __Pyx_PyType_GetName(PyTypeObject* tp)
37773 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
37775 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
37778 name = __Pyx_NewRef(__pyx_n_s__113);
37785 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
37786 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37787 #pragma GCC diagnostic push 37788 #pragma GCC diagnostic ignored "-Wconversion" 37790 const long neg_one = (long) -1, const_zero = (
long) 0;
37791 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37792 #pragma GCC diagnostic pop 37794 const int is_unsigned = neg_one > const_zero;
37796 if (
sizeof(
long) <
sizeof(long)) {
37797 return PyInt_FromLong((
long) value);
37798 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
37799 return PyLong_FromUnsignedLong((
unsigned long) value);
37800 #ifdef HAVE_LONG_LONG 37801 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
37802 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
37806 if (
sizeof(
long) <=
sizeof(
long)) {
37807 return PyInt_FromLong((
long) value);
37808 #ifdef HAVE_LONG_LONG 37809 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
37810 return PyLong_FromLongLong((PY_LONG_LONG) value);
37815 int one = 1;
int little = (int)*(
unsigned char *)&one;
37816 unsigned char *bytes = (
unsigned char *)&value;
37817 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 37818 return _PyLong_FromByteArray(bytes,
sizeof(
long),
37819 little, !is_unsigned);
37821 PyObject *from_bytes, *result = NULL;
37822 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
37823 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type,
"from_bytes");
37824 if (!from_bytes)
return NULL;
37825 py_bytes = PyBytes_FromStringAndSize((
char*)bytes,
sizeof(
long));
37826 if (!py_bytes)
goto limited_bad;
37827 order_str = PyUnicode_FromString(little ?
"little" :
"big");
37828 if (!order_str)
goto limited_bad;
37829 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
37830 if (!arg_tuple)
goto limited_bad;
37831 if (!is_unsigned) {
37832 kwds = PyDict_New();
37833 if (!kwds)
goto limited_bad;
37834 if (PyDict_SetItemString(kwds,
"signed", __Pyx_NewRef(Py_True)))
goto limited_bad;
37836 result = PyObject_Call(from_bytes, arg_tuple, kwds);
37839 Py_XDECREF(arg_tuple);
37840 Py_XDECREF(order_str);
37841 Py_XDECREF(py_bytes);
37842 Py_XDECREF(from_bytes);
37849 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
37850 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37851 #pragma GCC diagnostic push 37852 #pragma GCC diagnostic ignored "-Wconversion" 37854 const long neg_one = (long) -1, const_zero = (
long) 0;
37855 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC 37856 #pragma GCC diagnostic pop 37858 const int is_unsigned = neg_one > const_zero;
37859 #if PY_MAJOR_VERSION < 3 37860 if (likely(PyInt_Check(x))) {
37861 if ((
sizeof(
long) <
sizeof(
long))) {
37862 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
37864 long val = PyInt_AS_LONG(x);
37865 if (is_unsigned && unlikely(val < 0)) {
37866 goto raise_neg_overflow;
37872 if (likely(PyLong_Check(x))) {
37874 #if CYTHON_USE_PYLONG_INTERNALS 37875 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
37876 goto raise_neg_overflow;
37877 }
else if (__Pyx_PyLong_IsCompact(x)) {
37878 __PYX_VERIFY_RETURN_INT(
long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
37880 const digit* digits = __Pyx_PyLong_Digits(x);
37881 assert(__Pyx_PyLong_DigitCount(x) > 1);
37882 switch (__Pyx_PyLong_DigitCount(x)) {
37884 if ((8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
37885 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
37886 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37887 }
else if ((8 *
sizeof(
long) >= 2 * PyLong_SHIFT)) {
37888 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
37893 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
37894 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
37895 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37896 }
else if ((8 *
sizeof(
long) >= 3 * PyLong_SHIFT)) {
37897 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
37902 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
37903 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
37904 __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])))
37905 }
else if ((8 *
sizeof(
long) >= 4 * PyLong_SHIFT)) {
37906 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
37913 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 37914 if (unlikely(Py_SIZE(x) < 0)) {
37915 goto raise_neg_overflow;
37919 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
37920 if (unlikely(result < 0))
37922 if (unlikely(result == 1))
37923 goto raise_neg_overflow;
37926 if ((
sizeof(
long) <=
sizeof(
unsigned long))) {
37927 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
37928 #ifdef HAVE_LONG_LONG 37929 }
else if ((
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG))) {
37930 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
37934 #if CYTHON_USE_PYLONG_INTERNALS 37935 if (__Pyx_PyLong_IsCompact(x)) {
37936 __PYX_VERIFY_RETURN_INT(
long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
37938 const digit* digits = __Pyx_PyLong_Digits(x);
37939 assert(__Pyx_PyLong_DigitCount(x) > 1);
37940 switch (__Pyx_PyLong_SignedDigitCount(x)) {
37942 if ((8 *
sizeof(
long) - 1 > 1 * PyLong_SHIFT)) {
37943 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
37944 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37945 }
else if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
37946 return (
long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
37951 if ((8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
37952 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
37953 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37954 }
else if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
37955 return (
long) ((((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
37960 if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
37961 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
37962 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37963 }
else if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
37964 return (
long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
37969 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
37970 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
37971 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37972 }
else if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
37973 return (
long) ((((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
37978 if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
37979 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
37980 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
37981 }
else if ((8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT)) {
37982 return (
long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
37987 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
37988 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
37989 __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])))
37990 }
else if ((8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT)) {
37991 return (
long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
37998 if ((
sizeof(
long) <=
sizeof(long))) {
37999 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
38000 #ifdef HAVE_LONG_LONG 38001 }
else if ((
sizeof(
long) <=
sizeof(PY_LONG_LONG))) {
38002 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
38008 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
38009 #if PY_MAJOR_VERSION < 3 38010 if (likely(v) && !PyLong_Check(v)) {
38012 v = PyNumber_Long(tmp);
38018 #if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) 38019 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
38020 unsigned char *bytes = (
unsigned char *)&val;
38021 ret = _PyLong_AsByteArray((PyLongObject *)v,
38022 bytes,
sizeof(val),
38023 is_little, !is_unsigned);
38025 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
38026 int bits, remaining_bits, is_negative = 0;
38028 int chunk_size = (
sizeof(long) < 8) ? 30 : 62;
38029 if (unlikely(!PyLong_CheckExact(v))) {
38031 v = PyNumber_Long(v);
38032 assert(PyLong_CheckExact(v));
38034 if (unlikely(!v))
return (
long) -1;
38036 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 38037 if (Py_SIZE(x) == 0)
38039 is_negative = Py_SIZE(x) < 0;
38042 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
38043 if (unlikely(result < 0))
38045 is_negative = result == 1;
38048 if (is_unsigned && unlikely(is_negative)) {
38049 goto raise_neg_overflow;
38050 }
else if (is_negative) {
38051 stepval = PyNumber_Invert(v);
38052 if (unlikely(!stepval))
38055 stepval = __Pyx_NewRef(v);
38058 mask = PyLong_FromLong((1L << chunk_size) - 1);
if (unlikely(!mask))
goto done;
38059 shift = PyLong_FromLong(chunk_size);
if (unlikely(!shift))
goto done;
38060 for (bits = 0; bits < (int)
sizeof(
long) * 8 - chunk_size; bits += chunk_size) {
38061 PyObject *tmp, *digit;
38062 digit = PyNumber_And(stepval, mask);
38063 if (unlikely(!digit))
goto done;
38064 idigit = PyLong_AsLong(digit);
38066 if (unlikely(idigit < 0))
goto done;
38067 tmp = PyNumber_Rshift(stepval, shift);
38068 if (unlikely(!tmp))
goto done;
38069 Py_DECREF(stepval); stepval = tmp;
38070 val |= ((long) idigit) << bits;
38071 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 38072 if (Py_SIZE(stepval) == 0)
38073 goto unpacking_done;
38076 idigit = PyLong_AsLong(stepval);
38077 if (unlikely(idigit < 0))
goto done;
38078 remaining_bits = ((int)
sizeof(
long) * 8) - bits - (is_unsigned ? 0 : 1);
38079 if (unlikely(idigit >= (1L << remaining_bits)))
38080 goto raise_overflow;
38081 val |= ((long) idigit) << bits;
38082 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 38085 if (!is_unsigned) {
38086 if (unlikely(val & (((
long) 1) << (
sizeof(
long) * 8 - 1))))
38087 goto raise_overflow;
38095 Py_XDECREF(stepval);
38105 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
38106 if (!tmp)
return (
long) -1;
38107 val = __Pyx_PyInt_As_long(tmp);
38112 PyErr_SetString(PyExc_OverflowError,
38113 "value too large to convert to long");
38115 raise_neg_overflow:
38116 PyErr_SetString(PyExc_OverflowError,
38117 "can't convert negative value to long");
38122 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject*
function, PyObject* arg1, PyObject* arg2) {
38123 PyObject *args[3] = {NULL, arg1, arg2};
38124 return __Pyx_PyObject_FastCall(
function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
38128 #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) 38129 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
38130 PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
38135 static PyObject* __Pyx_PyObject_CallMethod1(PyObject*
obj, PyObject* method_name, PyObject* arg) {
38136 #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 38137 PyObject *args[2] = {
obj, arg};
38138 (void) __Pyx_PyObject_GetMethod;
38139 (void) __Pyx_PyObject_CallOneArg;
38140 (void) __Pyx_PyObject_Call2Args;
38141 return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
38143 PyObject *method = NULL, *result;
38144 int is_method = __Pyx_PyObject_GetMethod(
obj, method_name, &method);
38145 if (likely(is_method)) {
38146 result = __Pyx_PyObject_Call2Args(method,
obj, arg);
38150 if (unlikely(!method))
return NULL;
38151 return __Pyx__PyObject_CallMethod1(method, arg);
38156 #include <frameobject.h> 38157 #if PY_VERSION_HEX >= 0x030b00a6 38158 #ifndef Py_BUILD_CORE 38159 #define Py_BUILD_CORE 1 38161 #include "internal/pycore_frame.h" 38163 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) 38164 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
38165 PyObject *et, *ev, *tb;
38166 PyObject *value = NULL;
38167 CYTHON_UNUSED_VAR(__pyx_tstate);
38168 __Pyx_ErrFetch(&et, &ev, &tb);
38172 Py_INCREF(Py_None);
38176 if (likely(et == PyExc_StopIteration)) {
38178 Py_INCREF(Py_None);
38181 #if PY_VERSION_HEX >= 0x030300A0 38182 else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
38183 value = ((PyStopIterationObject *)ev)->value;
38188 else if (unlikely(PyTuple_Check(ev))) {
38189 if (PyTuple_GET_SIZE(ev) >= 1) {
38190 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 38191 value = PyTuple_GET_ITEM(ev, 0);
38194 value = PySequence_ITEM(ev, 0);
38197 Py_INCREF(Py_None);
38202 else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
38205 if (likely(value)) {
38211 }
else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
38212 __Pyx_ErrRestore(et, ev, tb);
38215 PyErr_NormalizeException(&et, &ev, &tb);
38216 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
38217 __Pyx_ErrRestore(et, ev, tb);
38222 #if PY_VERSION_HEX >= 0x030300A0 38223 value = ((PyStopIterationObject *)ev)->value;
38228 PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
38230 if (likely(args)) {
38231 value = PySequence_GetItem(args, 0);
38234 if (unlikely(!value)) {
38235 __Pyx_ErrRestore(NULL, NULL, NULL);
38236 Py_INCREF(Py_None);
38244 static CYTHON_INLINE
38245 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
38246 #if PY_VERSION_HEX >= 0x030B00a4 38247 Py_CLEAR(exc_state->exc_value);
38249 PyObject *t, *v, *tb;
38250 t = exc_state->exc_type;
38251 v = exc_state->exc_value;
38252 tb = exc_state->exc_traceback;
38253 exc_state->exc_type = NULL;
38254 exc_state->exc_value = NULL;
38255 exc_state->exc_traceback = NULL;
38261 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) 38262 static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
38264 CYTHON_MAYBE_UNUSED_VAR(gen);
38266 #ifdef __Pyx_Coroutine_USED 38267 }
else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
38268 msg =
"coroutine already executing";
38270 #ifdef __Pyx_AsyncGen_USED 38271 }
else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
38272 msg =
"async generator already executing";
38275 msg =
"generator already executing";
38277 PyErr_SetString(PyExc_ValueError, msg);
38279 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) 38280 static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
38282 CYTHON_MAYBE_UNUSED_VAR(gen);
38284 #ifdef __Pyx_Coroutine_USED 38285 }
else if (__Pyx_Coroutine_Check(gen)) {
38286 msg =
"can't send non-None value to a just-started coroutine";
38288 #ifdef __Pyx_AsyncGen_USED 38289 }
else if (__Pyx_AsyncGen_CheckExact(gen)) {
38290 msg =
"can't send non-None value to a just-started async generator";
38293 msg =
"can't send non-None value to a just-started generator";
38295 PyErr_SetString(PyExc_TypeError, msg);
38297 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) 38298 static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value,
int closing) {
38299 CYTHON_MAYBE_UNUSED_VAR(gen);
38300 CYTHON_MAYBE_UNUSED_VAR(closing);
38301 #ifdef __Pyx_Coroutine_USED 38302 if (!closing && __Pyx_Coroutine_Check(gen)) {
38303 PyErr_SetString(PyExc_RuntimeError,
"cannot reuse already awaited coroutine");
38307 #ifdef __Pyx_AsyncGen_USED 38308 if (__Pyx_AsyncGen_CheckExact(gen))
38309 PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
38312 PyErr_SetNone(PyExc_StopIteration);
38316 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *
self, PyObject *value,
int closing) {
38317 __Pyx_PyThreadState_declare
38318 PyThreadState *tstate;
38319 __Pyx_ExcInfoStruct *exc_state;
38321 assert(!self->is_running);
38322 if (unlikely(self->resume_label == 0)) {
38323 if (unlikely(value && value != Py_None)) {
38324 return __Pyx_Coroutine_NotStartedError((PyObject*)
self);
38327 if (unlikely(self->resume_label == -1)) {
38328 return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)
self, value, closing);
38330 #if CYTHON_FAST_THREAD_STATE 38331 __Pyx_PyThreadState_assign
38332 tstate = __pyx_tstate;
38334 tstate = __Pyx_PyThreadState_Current;
38336 exc_state = &
self->gi_exc_state;
38337 if (exc_state->exc_value) {
38338 #if CYTHON_COMPILING_IN_PYPY 38341 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON 38342 exc_tb = PyException_GetTraceback(exc_state->exc_value);
38343 #elif PY_VERSION_HEX >= 0x030B00a4 38344 exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
38346 exc_tb = exc_state->exc_traceback;
38349 PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
38350 PyFrameObject *f = tb->tb_frame;
38351 assert(f->f_back == NULL);
38352 #if PY_VERSION_HEX >= 0x030B00A1 38353 f->f_back = PyThreadState_GetFrame(tstate);
38355 Py_XINCREF(tstate->frame);
38356 f->f_back = tstate->frame;
38358 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON 38364 #if CYTHON_USE_EXC_INFO_STACK 38365 exc_state->previous_item = tstate->exc_info;
38366 tstate->exc_info = exc_state;
38368 if (exc_state->exc_type) {
38369 __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
38371 __Pyx_Coroutine_ExceptionClear(exc_state);
38372 __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
38375 self->is_running = 1;
38376 retval =
self->body(
self, tstate, value);
38377 self->is_running = 0;
38378 #if CYTHON_USE_EXC_INFO_STACK 38379 exc_state = &
self->gi_exc_state;
38380 tstate->exc_info = exc_state->previous_item;
38381 exc_state->previous_item = NULL;
38382 __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
38386 static CYTHON_INLINE
void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
38387 #if CYTHON_COMPILING_IN_PYPY 38388 CYTHON_UNUSED_VAR(exc_state);
38391 #if PY_VERSION_HEX >= 0x030B00a4 38392 if (!exc_state->exc_value)
return;
38393 exc_tb = PyException_GetTraceback(exc_state->exc_value);
38395 exc_tb = exc_state->exc_traceback;
38397 if (likely(exc_tb)) {
38398 PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
38399 PyFrameObject *f = tb->tb_frame;
38400 Py_CLEAR(f->f_back);
38401 #if PY_VERSION_HEX >= 0x030B00a4 38407 static CYTHON_INLINE
38408 PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
38409 CYTHON_MAYBE_UNUSED_VAR(gen);
38410 if (unlikely(!retval)) {
38411 __Pyx_PyThreadState_declare
38412 __Pyx_PyThreadState_assign
38413 if (!__Pyx_PyErr_Occurred()) {
38414 PyObject *exc = PyExc_StopIteration;
38415 #ifdef __Pyx_AsyncGen_USED 38416 if (__Pyx_AsyncGen_CheckExact(gen))
38417 exc = __Pyx_PyExc_StopAsyncIteration;
38419 __Pyx_PyErr_SetNone(exc);
38424 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) 38425 static CYTHON_INLINE
38426 PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
38427 #if PY_VERSION_HEX <= 0x030A00A1 38428 return _PyGen_Send(gen, arg);
38431 if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
38432 if (PyAsyncGen_CheckExact(gen)) {
38433 assert(result == Py_None);
38434 PyErr_SetNone(PyExc_StopAsyncIteration);
38436 else if (result == Py_None) {
38437 PyErr_SetNone(PyExc_StopIteration);
38440 #if PY_VERSION_HEX < 0x030d00A1 38441 _PyGen_SetStopIterationValue(result);
38443 if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
38444 PyErr_SetObject(PyExc_StopIteration, result);
38446 PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
38447 if (likely(exc != NULL)) {
38448 PyErr_SetObject(PyExc_StopIteration, exc);
38461 static CYTHON_INLINE
38462 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
38464 PyObject *val = NULL;
38465 __Pyx_Coroutine_Undelegate(gen);
38466 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
38467 ret = __Pyx_Coroutine_SendEx(gen, val, 0);
38471 static PyObject *__Pyx_Coroutine_Send(PyObject *
self, PyObject *value) {
38473 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)
self;
38474 PyObject *yf = gen->yieldfrom;
38475 if (unlikely(gen->is_running))
38476 return __Pyx_Coroutine_AlreadyRunningError(gen);
38479 gen->is_running = 1;
38480 #ifdef __Pyx_Generator_USED 38481 if (__Pyx_Generator_CheckExact(yf)) {
38482 ret = __Pyx_Coroutine_Send(yf, value);
38485 #ifdef __Pyx_Coroutine_USED 38486 if (__Pyx_Coroutine_Check(yf)) {
38487 ret = __Pyx_Coroutine_Send(yf, value);
38490 #ifdef __Pyx_AsyncGen_USED 38491 if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
38492 ret = __Pyx_async_gen_asend_send(yf, value);
38495 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) 38496 if (PyGen_CheckExact(yf)) {
38497 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
38500 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) 38501 if (PyCoro_CheckExact(yf)) {
38502 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
38506 if (value == Py_None)
38507 ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
38509 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
38511 gen->is_running = 0;
38515 retval = __Pyx_Coroutine_FinishDelegation(gen);
38517 retval = __Pyx_Coroutine_SendEx(gen, value, 0);
38519 return __Pyx_Coroutine_MethodReturn(
self, retval);
38521 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
38522 PyObject *retval = NULL;
38524 #ifdef __Pyx_Generator_USED 38525 if (__Pyx_Generator_CheckExact(yf)) {
38526 retval = __Pyx_Coroutine_Close(yf);
38531 #ifdef __Pyx_Coroutine_USED 38532 if (__Pyx_Coroutine_Check(yf)) {
38533 retval = __Pyx_Coroutine_Close(yf);
38537 if (__Pyx_CoroutineAwait_CheckExact(yf)) {
38538 retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
38543 #ifdef __Pyx_AsyncGen_USED 38544 if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
38545 retval = __Pyx_async_gen_asend_close(yf, NULL);
38547 if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
38548 retval = __Pyx_async_gen_athrow_close(yf, NULL);
38553 gen->is_running = 1;
38554 meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close);
38555 if (unlikely(!meth)) {
38556 if (unlikely(PyErr_Occurred())) {
38557 PyErr_WriteUnraisable(yf);
38560 retval = __Pyx_PyObject_CallNoArg(meth);
38562 if (unlikely(!retval))
38565 gen->is_running = 0;
38567 Py_XDECREF(retval);
38570 static PyObject *__Pyx_Generator_Next(PyObject *
self) {
38571 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)
self;
38572 PyObject *yf = gen->yieldfrom;
38573 if (unlikely(gen->is_running))
38574 return __Pyx_Coroutine_AlreadyRunningError(gen);
38577 gen->is_running = 1;
38578 #ifdef __Pyx_Generator_USED 38579 if (__Pyx_Generator_CheckExact(yf)) {
38580 ret = __Pyx_Generator_Next(yf);
38583 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) 38584 if (PyGen_CheckExact(yf)) {
38585 ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
38588 #ifdef __Pyx_Coroutine_USED 38589 if (__Pyx_Coroutine_Check(yf)) {
38590 ret = __Pyx_Coroutine_Send(yf, Py_None);
38593 ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
38594 gen->is_running = 0;
38598 return __Pyx_Coroutine_FinishDelegation(gen);
38600 return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
38602 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *
self, PyObject *arg) {
38603 CYTHON_UNUSED_VAR(arg);
38604 return __Pyx_Coroutine_Close(
self);
38606 static PyObject *__Pyx_Coroutine_Close(PyObject *
self) {
38607 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
38608 PyObject *retval, *raised_exception;
38609 PyObject *yf = gen->yieldfrom;
38611 if (unlikely(gen->is_running))
38612 return __Pyx_Coroutine_AlreadyRunningError(gen);
38615 err = __Pyx_Coroutine_CloseIter(gen, yf);
38616 __Pyx_Coroutine_Undelegate(gen);
38620 PyErr_SetNone(PyExc_GeneratorExit);
38621 retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
38622 if (unlikely(retval)) {
38626 #ifdef __Pyx_Coroutine_USED 38627 }
else if (__Pyx_Coroutine_Check(
self)) {
38628 msg =
"coroutine ignored GeneratorExit";
38630 #ifdef __Pyx_AsyncGen_USED 38631 }
else if (__Pyx_AsyncGen_CheckExact(
self)) {
38632 #if PY_VERSION_HEX < 0x03060000 38633 msg =
"async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
38635 msg =
"async generator ignored GeneratorExit";
38639 msg =
"generator ignored GeneratorExit";
38641 PyErr_SetString(PyExc_RuntimeError, msg);
38644 raised_exception = PyErr_Occurred();
38645 if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
38646 if (raised_exception) PyErr_Clear();
38647 Py_INCREF(Py_None);
38652 static PyObject *__Pyx__Coroutine_Throw(PyObject *
self, PyObject *typ, PyObject *val, PyObject *tb,
38653 PyObject *args,
int close_on_genexit) {
38654 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
38655 PyObject *yf = gen->yieldfrom;
38656 if (unlikely(gen->is_running))
38657 return __Pyx_Coroutine_AlreadyRunningError(gen);
38661 if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
38662 int err = __Pyx_Coroutine_CloseIter(gen, yf);
38664 __Pyx_Coroutine_Undelegate(gen);
38666 return __Pyx_Coroutine_MethodReturn(
self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
38669 gen->is_running = 1;
38671 #ifdef __Pyx_Generator_USED
38672 || __Pyx_Generator_CheckExact(yf)
38674 #ifdef __Pyx_Coroutine_USED
38675 || __Pyx_Coroutine_Check(yf)
38678 ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
38679 #ifdef __Pyx_Coroutine_USED 38680 }
else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
38681 ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
38684 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw);
38685 if (unlikely(!meth)) {
38687 if (unlikely(PyErr_Occurred())) {
38688 gen->is_running = 0;
38691 __Pyx_Coroutine_Undelegate(gen);
38692 gen->is_running = 0;
38695 if (likely(args)) {
38696 ret = __Pyx_PyObject_Call(meth, args, NULL);
38698 PyObject *cargs[4] = {NULL, typ, val, tb};
38699 ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
38703 gen->is_running = 0;
38706 ret = __Pyx_Coroutine_FinishDelegation(gen);
38708 return __Pyx_Coroutine_MethodReturn(
self, ret);
38711 __Pyx_Raise(typ, val, tb, NULL);
38712 return __Pyx_Coroutine_MethodReturn(
self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
38714 static PyObject *__Pyx_Coroutine_Throw(PyObject *
self, PyObject *args) {
38716 PyObject *val = NULL;
38717 PyObject *tb = NULL;
38718 if (unlikely(!PyArg_UnpackTuple(args, (
char *)
"throw", 1, 3, &typ, &val, &tb)))
38720 return __Pyx__Coroutine_Throw(
self, typ, val, tb, args, 1);
38722 static CYTHON_INLINE
int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit,
void *arg) {
38723 #if PY_VERSION_HEX >= 0x030B00a4 38724 Py_VISIT(exc_state->exc_value);
38726 Py_VISIT(exc_state->exc_type);
38727 Py_VISIT(exc_state->exc_value);
38728 Py_VISIT(exc_state->exc_traceback);
38732 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit,
void *arg) {
38733 Py_VISIT(gen->closure);
38734 Py_VISIT(gen->classobj);
38735 Py_VISIT(gen->yieldfrom);
38736 return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
38738 static int __Pyx_Coroutine_clear(PyObject *
self) {
38739 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
38740 Py_CLEAR(gen->closure);
38741 Py_CLEAR(gen->classobj);
38742 Py_CLEAR(gen->yieldfrom);
38743 __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
38744 #ifdef __Pyx_AsyncGen_USED 38745 if (__Pyx_AsyncGen_CheckExact(
self)) {
38746 Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
38749 Py_CLEAR(gen->gi_code);
38750 Py_CLEAR(gen->gi_frame);
38751 Py_CLEAR(gen->gi_name);
38752 Py_CLEAR(gen->gi_qualname);
38753 Py_CLEAR(gen->gi_modulename);
38756 static void __Pyx_Coroutine_dealloc(PyObject *
self) {
38757 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
38758 PyObject_GC_UnTrack(gen);
38759 if (gen->gi_weakreflist != NULL)
38760 PyObject_ClearWeakRefs(
self);
38761 if (gen->resume_label >= 0) {
38762 PyObject_GC_Track(
self);
38763 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE 38764 if (unlikely(PyObject_CallFinalizerFromDealloc(
self)))
38766 Py_TYPE(gen)->tp_del(
self);
38767 if (unlikely(Py_REFCNT(
self) > 0))
38772 PyObject_GC_UnTrack(
self);
38774 #ifdef __Pyx_AsyncGen_USED 38775 if (__Pyx_AsyncGen_CheckExact(
self)) {
38779 Py_CLEAR(((__pyx_PyAsyncGenObject*)
self)->ag_finalizer);
38782 __Pyx_Coroutine_clear(
self);
38783 __Pyx_PyHeapTypeObject_GC_Del(gen);
38785 static void __Pyx_Coroutine_del(PyObject *
self) {
38786 PyObject *error_type, *error_value, *error_traceback;
38787 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
38788 __Pyx_PyThreadState_declare
38789 if (gen->resume_label < 0) {
38792 #if !CYTHON_USE_TP_FINALIZE 38793 assert(self->ob_refcnt == 0);
38794 __Pyx_SET_REFCNT(
self, 1);
38796 __Pyx_PyThreadState_assign
38797 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
38798 #ifdef __Pyx_AsyncGen_USED 38799 if (__Pyx_AsyncGen_CheckExact(
self)) {
38800 __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)
self;
38801 PyObject *finalizer = agen->ag_finalizer;
38802 if (finalizer && !agen->ag_closed) {
38803 PyObject *res = __Pyx_PyObject_CallOneArg(finalizer,
self);
38804 if (unlikely(!res)) {
38805 PyErr_WriteUnraisable(
self);
38809 __Pyx_ErrRestore(error_type, error_value, error_traceback);
38814 if (unlikely(gen->resume_label == 0 && !error_value)) {
38815 #ifdef __Pyx_Coroutine_USED 38816 #ifdef __Pyx_Generator_USED 38817 if (!__Pyx_Generator_CheckExact(
self))
38820 PyObject_GC_UnTrack(
self);
38821 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat) 38822 if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
"coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
38823 PyErr_WriteUnraisable(
self);
38827 #if CYTHON_COMPILING_IN_PYPY 38829 cmsg = (
char*)
"coroutine was never awaited";
38832 PyObject *qualname;
38833 qualname = gen->gi_qualname;
38834 cname = PyString_AS_STRING(qualname);
38835 msg = PyString_FromFormat(
"coroutine '%.50s' was never awaited", cname);
38836 if (unlikely(!msg)) {
38838 cmsg = (
char*)
"coroutine was never awaited";
38840 cmsg = PyString_AS_STRING(msg);
38843 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
38844 PyErr_WriteUnraisable(
self);
38847 PyObject_GC_Track(
self);
38851 PyObject *res = __Pyx_Coroutine_Close(
self);
38852 if (unlikely(!res)) {
38853 if (PyErr_Occurred())
38854 PyErr_WriteUnraisable(
self);
38859 __Pyx_ErrRestore(error_type, error_value, error_traceback);
38860 #if !CYTHON_USE_TP_FINALIZE 38861 assert(Py_REFCNT(
self) > 0);
38862 if (likely(--self->ob_refcnt == 0)) {
38866 Py_ssize_t refcnt = Py_REFCNT(
self);
38867 _Py_NewReference(
self);
38868 __Pyx_SET_REFCNT(
self, refcnt);
38870 #if CYTHON_COMPILING_IN_CPYTHON 38871 assert(PyType_IS_GC(Py_TYPE(
self)) &&
38872 _Py_AS_GC(
self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
38875 #ifdef COUNT_ALLOCS 38876 --Py_TYPE(
self)->tp_frees;
38877 --Py_TYPE(
self)->tp_allocs;
38882 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *
self,
void *context)
38884 PyObject *name =
self->gi_name;
38885 CYTHON_UNUSED_VAR(context);
38886 if (unlikely(!name)) name = Py_None;
38891 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *
self, PyObject *value,
void *context)
38893 CYTHON_UNUSED_VAR(context);
38894 #if PY_MAJOR_VERSION >= 3 38895 if (unlikely(value == NULL || !PyUnicode_Check(value)))
38897 if (unlikely(value == NULL || !PyString_Check(value)))
38900 PyErr_SetString(PyExc_TypeError,
38901 "__name__ must be set to a string object");
38905 __Pyx_Py_XDECREF_SET(self->gi_name, value);
38909 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *
self,
void *context)
38911 PyObject *name =
self->gi_qualname;
38912 CYTHON_UNUSED_VAR(context);
38913 if (unlikely(!name)) name = Py_None;
38918 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *
self, PyObject *value,
void *context)
38920 CYTHON_UNUSED_VAR(context);
38921 #if PY_MAJOR_VERSION >= 3 38922 if (unlikely(value == NULL || !PyUnicode_Check(value)))
38924 if (unlikely(value == NULL || !PyString_Check(value)))
38927 PyErr_SetString(PyExc_TypeError,
38928 "__qualname__ must be set to a string object");
38932 __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
38936 __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *
self,
void *context)
38938 PyObject *frame =
self->gi_frame;
38939 CYTHON_UNUSED_VAR(context);
38941 if (unlikely(!self->gi_code)) {
38944 frame = (PyObject *) PyFrame_New(
38945 PyThreadState_Get(),
38946 (PyCodeObject*) self->gi_code,
38950 if (unlikely(!frame))
38952 self->gi_frame = frame;
38957 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
38958 PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
38959 PyObject *name, PyObject *qualname, PyObject *module_name) {
38960 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
38961 if (unlikely(!gen))
38963 return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
38965 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
38966 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
38967 PyObject *name, PyObject *qualname, PyObject *module_name) {
38969 gen->closure = closure;
38970 Py_XINCREF(closure);
38971 gen->is_running = 0;
38972 gen->resume_label = 0;
38973 gen->classobj = NULL;
38974 gen->yieldfrom = NULL;
38975 #if PY_VERSION_HEX >= 0x030B00a4 38976 gen->gi_exc_state.exc_value = NULL;
38978 gen->gi_exc_state.exc_type = NULL;
38979 gen->gi_exc_state.exc_value = NULL;
38980 gen->gi_exc_state.exc_traceback = NULL;
38982 #if CYTHON_USE_EXC_INFO_STACK 38983 gen->gi_exc_state.previous_item = NULL;
38985 gen->gi_weakreflist = NULL;
38986 Py_XINCREF(qualname);
38987 gen->gi_qualname = qualname;
38989 gen->gi_name = name;
38990 Py_XINCREF(module_name);
38991 gen->gi_modulename = module_name;
38993 gen->gi_code = code;
38994 gen->gi_frame = NULL;
38995 PyObject_GC_Track(gen);
39000 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code) {
39001 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 39003 PyObject *globals, *result_obj;
39004 globals = PyDict_New();
if (unlikely(!globals))
goto ignore;
39005 result = PyDict_SetItemString(globals,
"_cython_coroutine_type",
39006 #ifdef __Pyx_Coroutine_USED
39007 (PyObject*)__pyx_CoroutineType);
39011 if (unlikely(result < 0))
goto ignore;
39012 result = PyDict_SetItemString(globals,
"_cython_generator_type",
39013 #ifdef __Pyx_Generator_USED
39014 (PyObject*)__pyx_GeneratorType);
39018 if (unlikely(result < 0))
goto ignore;
39019 if (unlikely(PyDict_SetItemString(globals,
"_module", module) < 0))
goto ignore;
39020 if (unlikely(PyDict_SetItemString(globals,
"__builtins__", __pyx_b) < 0))
goto ignore;
39021 result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
39022 if (unlikely(!result_obj))
goto ignore;
39023 Py_DECREF(result_obj);
39024 Py_DECREF(globals);
39027 Py_XDECREF(globals);
39028 PyErr_WriteUnraisable(module);
39029 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
"Cython module failed to patch module with custom type", 1) < 0)) {
39040 #ifndef CYTHON_REGISTER_ABCS 39041 #define CYTHON_REGISTER_ABCS 1 39043 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 39044 static PyObject* __Pyx_patch_abc_module(PyObject *module);
39045 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
39046 module = __Pyx_Coroutine_patch_module(
39048 "if _cython_generator_type is not None:\n" 39049 " try: Generator = _module.Generator\n" 39050 " except AttributeError: pass\n" 39051 " else: Generator.register(_cython_generator_type)\n" 39052 "if _cython_coroutine_type is not None:\n" 39053 " try: Coroutine = _module.Coroutine\n" 39054 " except AttributeError: pass\n" 39055 " else: Coroutine.register(_cython_coroutine_type)\n" 39060 static int __Pyx_patch_abc(
void) {
39061 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 39062 static int abc_patched = 0;
39063 if (CYTHON_REGISTER_ABCS && !abc_patched) {
39065 module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ?
"collections.abc" :
"collections");
39066 if (unlikely(!module)) {
39067 PyErr_WriteUnraisable(NULL);
39068 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
39069 ((PY_MAJOR_VERSION >= 3) ?
39070 "Cython module failed to register with collections.abc module" :
39071 "Cython module failed to register with collections module"), 1) < 0)) {
39075 module = __Pyx_patch_abc_module(module);
39077 if (unlikely(!module))
39081 module = PyImport_ImportModule(
"backports_abc");
39083 module = __Pyx_patch_abc_module(module);
39084 Py_XDECREF(module);
39091 if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
39097 static PyMethodDef __pyx_Generator_methods[] = {
39098 {
"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
39099 (
char*) PyDoc_STR(
"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
39100 {
"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
39101 (
char*) PyDoc_STR(
"throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
39102 {
"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
39103 (
char*) PyDoc_STR(
"close() -> raise GeneratorExit inside generator.")},
39106 static PyMemberDef __pyx_Generator_memberlist[] = {
39107 {(
char *)
"gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
39108 {(
char*)
"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
39109 (
char*) PyDoc_STR(
"object being iterated by 'yield from', or None")},
39110 {(
char*)
"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
39111 {(
char *)
"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
39112 #if CYTHON_USE_TYPE_SPECS 39113 {(
char *)
"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
39117 static PyGetSetDef __pyx_Generator_getsets[] = {
39118 {(
char *)
"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
39119 (
char*) PyDoc_STR(
"name of the generator"), 0},
39120 {(
char *)
"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
39121 (
char*) PyDoc_STR(
"qualified name of the generator"), 0},
39122 {(
char *)
"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
39123 (
char*) PyDoc_STR(
"Frame of the generator"), 0},
39126 #if CYTHON_USE_TYPE_SPECS 39127 static PyType_Slot __pyx_GeneratorType_slots[] = {
39128 {Py_tp_dealloc, (
void *)__Pyx_Coroutine_dealloc},
39129 {Py_tp_traverse, (
void *)__Pyx_Coroutine_traverse},
39130 {Py_tp_iter, (
void *)PyObject_SelfIter},
39131 {Py_tp_iternext, (
void *)__Pyx_Generator_Next},
39132 {Py_tp_methods, (
void *)__pyx_Generator_methods},
39133 {Py_tp_members, (
void *)__pyx_Generator_memberlist},
39134 {Py_tp_getset, (
void *)__pyx_Generator_getsets},
39135 {Py_tp_getattro, (
void *) __Pyx_PyObject_GenericGetAttrNoDict},
39136 #if CYTHON_USE_TP_FINALIZE 39137 {Py_tp_finalize, (
void *)__Pyx_Coroutine_del},
39141 static PyType_Spec __pyx_GeneratorType_spec = {
39142 __PYX_TYPE_MODULE_PREFIX
"generator",
39143 sizeof(__pyx_CoroutineObject),
39145 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
39146 __pyx_GeneratorType_slots
39149 static PyTypeObject __pyx_GeneratorType_type = {
39150 PyVarObject_HEAD_INIT(0, 0)
39151 __PYX_TYPE_MODULE_PREFIX "generator",
39152 sizeof(__pyx_CoroutineObject),
39154 (destructor) __Pyx_Coroutine_dealloc,
39169 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
39171 (traverseproc) __Pyx_Coroutine_traverse,
39174 offsetof(__pyx_CoroutineObject, gi_weakreflist),
39176 (iternextfunc) __Pyx_Generator_Next,
39177 __pyx_Generator_methods,
39178 __pyx_Generator_memberlist,
39179 __pyx_Generator_getsets,
39195 #if CYTHON_USE_TP_FINALIZE 39198 __Pyx_Coroutine_del,
39201 #if CYTHON_USE_TP_FINALIZE 39202 __Pyx_Coroutine_del,
39203 #elif PY_VERSION_HEX >= 0x030400a1 39206 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 39209 #if __PYX_NEED_TP_PRINT_SLOT 39212 #if PY_VERSION_HEX >= 0x030C0000 39215 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 39220 static int __pyx_Generator_init(PyObject *module) {
39221 #if CYTHON_USE_TYPE_SPECS 39222 __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL);
39224 CYTHON_UNUSED_VAR(module);
39225 __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
39226 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
39227 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
39229 if (unlikely(!__pyx_GeneratorType)) {
39236 static unsigned long __Pyx_get_runtime_version(
void) {
39237 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 39238 return Py_Version & ~0xFFUL;
39240 const char* rt_version = Py_GetVersion();
39241 unsigned long version = 0;
39242 unsigned long factor = 0x01000000UL;
39243 unsigned int digit = 0;
39246 while (
'0' <= rt_version[
i] && rt_version[
i] <=
'9') {
39247 digit = digit * 10 + (
unsigned int) (rt_version[
i] -
'0');
39250 version += factor * digit;
39251 if (rt_version[
i] !=
'.')
39260 static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer) {
39261 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
39262 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
39264 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
39268 PyOS_snprintf(message,
sizeof(message),
39269 "compile time Python version %d.%d " 39270 "of module '%.100s' " 39272 "runtime version %d.%d",
39273 (
int) (ct_version >> 24), (
int) ((ct_version >> 16) & 0xFF),
39275 (allow_newer) ?
"was newer than" :
"does not match",
39276 (
int) (rt_version >> 24), (
int) ((rt_version >> 16) & 0xFF)
39278 return PyErr_WarnEx(NULL, message, 1);
39283 #if PY_MAJOR_VERSION >= 3 39284 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
39285 if (t.is_unicode | t.is_str) {
39287 *str = PyUnicode_InternFromString(t.s);
39288 }
else if (t.encoding) {
39289 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
39291 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
39294 *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
39298 if (PyObject_Hash(*str) == -1)
39303 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
39305 #if PY_MAJOR_VERSION >= 3 39306 __Pyx_InitString(*t, t->p);
39308 if (t->is_unicode) {
39309 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
39310 }
else if (t->intern) {
39311 *t->p = PyString_InternFromString(t->s);
39313 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
39317 if (PyObject_Hash(*t->p) == -1)
39325 #include <string.h> 39326 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(
const char *s) {
39327 size_t len = strlen(s);
39328 if (unlikely(len > (
size_t) PY_SSIZE_T_MAX)) {
39329 PyErr_SetString(PyExc_OverflowError,
"byte string is too long");
39332 return (Py_ssize_t) len;
39334 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
39335 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
39336 if (unlikely(len < 0))
return NULL;
39337 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
39339 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(
const char* c_str) {
39340 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
39341 if (unlikely(len < 0))
return NULL;
39342 return PyByteArray_FromStringAndSize(c_str, len);
39344 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
39346 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
39348 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 39349 #if !CYTHON_PEP393_ENABLED 39350 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
39352 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
39353 if (!defenc)
return NULL;
39354 defenc_c = PyBytes_AS_STRING(defenc);
39355 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 39357 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
39359 for (c = defenc_c; c < end; c++) {
39360 if ((
unsigned char) (*c) >= 128) {
39361 PyUnicode_AsASCIIString(o);
39367 *length = PyBytes_GET_SIZE(defenc);
39371 static CYTHON_INLINE
const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
39372 if (unlikely(__Pyx_PyUnicode_READY(o) == -1))
return NULL;
39373 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 39374 if (likely(PyUnicode_IS_ASCII(o))) {
39375 *length = PyUnicode_GET_LENGTH(o);
39376 return PyUnicode_AsUTF8(o);
39378 PyUnicode_AsASCIIString(o);
39382 return PyUnicode_AsUTF8AndSize(o, length);
39387 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
39388 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 39390 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
39391 __Pyx_sys_getdefaultencoding_not_ascii &&
39393 PyUnicode_Check(o)) {
39394 return __Pyx_PyUnicode_AsStringAndSize(o, length);
39397 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) 39398 if (PyByteArray_Check(o)) {
39399 *length = PyByteArray_GET_SIZE(o);
39400 return PyByteArray_AS_STRING(o);
39405 int r = PyBytes_AsStringAndSize(o, &result, length);
39406 if (unlikely(r < 0)) {
39413 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
39414 int is_true = x == Py_True;
39415 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
39416 else return PyObject_IsTrue(x);
39418 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
39420 if (unlikely(!x))
return -1;
39421 retval = __Pyx_PyObject_IsTrue(x);
39425 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result,
const char* type_name) {
39426 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
39427 #if PY_MAJOR_VERSION >= 3 39428 if (PyLong_Check(result)) {
39429 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
39430 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME
"). " 39431 "The ability to return an instance of a strict subclass of int is deprecated, " 39432 "and may be removed in a future version of Python.",
39433 result_type_name)) {
39434 __Pyx_DECREF_TypeName(result_type_name);
39438 __Pyx_DECREF_TypeName(result_type_name);
39442 PyErr_Format(PyExc_TypeError,
39443 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME
")",
39444 type_name, type_name, result_type_name);
39445 __Pyx_DECREF_TypeName(result_type_name);
39449 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
39450 #if CYTHON_USE_TYPE_SLOTS 39451 PyNumberMethods *m;
39453 const char *name = NULL;
39454 PyObject *res = NULL;
39455 #if PY_MAJOR_VERSION < 3 39456 if (likely(PyInt_Check(x) || PyLong_Check(x)))
39458 if (likely(PyLong_Check(x)))
39460 return __Pyx_NewRef(x);
39461 #if CYTHON_USE_TYPE_SLOTS 39462 m = Py_TYPE(x)->tp_as_number;
39463 #if PY_MAJOR_VERSION < 3 39464 if (m && m->nb_int) {
39466 res = m->nb_int(x);
39468 else if (m && m->nb_long) {
39470 res = m->nb_long(x);
39473 if (likely(m && m->nb_int)) {
39475 res = m->nb_int(x);
39479 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
39480 res = PyNumber_Int(x);
39484 #if PY_MAJOR_VERSION < 3 39485 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
39487 if (unlikely(!PyLong_CheckExact(res))) {
39489 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
39492 else if (!PyErr_Occurred()) {
39493 PyErr_SetString(PyExc_TypeError,
39494 "an integer is required");
39498 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
39501 #if PY_MAJOR_VERSION < 3 39502 if (likely(PyInt_CheckExact(b))) {
39503 if (
sizeof(Py_ssize_t) >=
sizeof(
long))
39504 return PyInt_AS_LONG(b);
39506 return PyInt_AsSsize_t(b);
39509 if (likely(PyLong_CheckExact(b))) {
39510 #if CYTHON_USE_PYLONG_INTERNALS 39511 if (likely(__Pyx_PyLong_IsCompact(b))) {
39512 return __Pyx_PyLong_CompactValue(b);
39514 const digit* digits = __Pyx_PyLong_Digits(b);
39515 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
39518 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
39519 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
39523 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
39524 return -(Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
39528 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
39529 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
39533 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
39534 return -(Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
39538 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
39539 return (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]));
39543 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
39544 return -(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]));
39550 return PyLong_AsSsize_t(b);
39552 x = PyNumber_Index(b);
39554 ival = PyInt_AsSsize_t(x);
39558 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
39559 if (
sizeof(Py_hash_t) ==
sizeof(Py_ssize_t)) {
39560 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
39561 #if PY_MAJOR_VERSION < 3 39562 }
else if (likely(PyInt_CheckExact(o))) {
39563 return PyInt_AS_LONG(o);
39568 x = PyNumber_Index(o);
39570 ival = PyInt_AsLong(x);
39575 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
39576 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
39578 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
39579 return PyInt_FromSize_t(ival);
39585 #pragma warning( pop ) auto atanh(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse hyperbolic tangent of multivector with specified complexifier.
String glucat_package_version
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
auto exp(const framed_multi< Scalar_T, LO, HI, Tune_P > &val) -> const framed_multi< Scalar_T, LO, HI, Tune_P >
Exponential of multivector.
auto operator!=(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs) -> bool
Test for inequality of multivectors.
auto max_pos(const index_set< LO, HI > &ist) -> index_t
Maximum positive index, or 0 if none.
auto min_neg(const index_set< LO, HI > &ist) -> index_t
Minimum negative index, or 0 if none.
auto asinh(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse hyperbolic sine of multivector with specified complexifier.
auto star(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs) -> Scalar_T
Hestenes scalar product.
auto error_squared(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs, const Scalar_T threshold) -> Scalar_T
Relative or absolute error using the quadratic norm.
auto log(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Natural logarithm of multivector with specified complexifier.
auto complexifier(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Square root of -1 which commutes with all members of the frame of the given multivector.
auto sinh(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Hyperbolic sine of multivector.
auto approx_equal(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs, const Scalar_T threshold, const Scalar_T tolerance) -> bool
Test for approximate equality of multivectors.
A matrix_multi<Scalar_T,LO,HI,Tune_P> is a matrix approximation to a multivector. ...
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
auto asin(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse sine of multivector with specified complexifier.
auto tanh(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Hyperbolic tangent of multivector.
auto error_squared_tol(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Quadratic norm error tolerance relative to a specific multivector.
auto abs(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Absolute value == sqrt(norm)
auto compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b) -> int
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
auto operator &(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inner product.
index_set< lo_ndx, hi_ndx > IndexSet
auto tan(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Tangent of multivector with specified complexifier.
auto acosh(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse hyperbolic cosine of multivector with specified complexifier.
auto cos(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Cosine of multivector with specified complexifier.
auto atan(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse tangent of multivector with specified complexifier.
PyObject * PyFloat_FromDouble(Scalar_T v)
auto sqrt(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Square root of multivector with specified complexifier.
Index set class based on std::bitset<> in Gnu standard C++ library.
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
auto sin(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Sine of multivector with specified complexifier.
auto cosh(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Hyperbolic cosine of multivector.
auto max_abs(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Maximum of absolute values of components of multivector: multivector infinity norm.
matrix_multi< scalar_t, lo_ndx, hi_ndx, tuning_promoted > Clifford
auto acos(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse cosine of multivector with specified complexifier.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10.52)].
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].