52 #define PY_SSIZE_T_CLEAN 55 #error Python headers needed to compile C extensions, please install development version of Python. 56 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) 57 #error Cython requires Python 2.6+ or Python 3.2+. 59 #define CYTHON_ABI "0_23_4" 62 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) 64 #if !defined(WIN32) && !defined(MS_WINDOWS) 76 #define DL_IMPORT(t) t 79 #define DL_EXPORT(t) t 82 #define PY_LONG_LONG LONG_LONG 85 #define Py_HUGE_VAL HUGE_VAL 88 #define CYTHON_COMPILING_IN_PYPY 1 89 #define CYTHON_COMPILING_IN_CPYTHON 0 91 #define CYTHON_COMPILING_IN_PYPY 0 92 #define CYTHON_COMPILING_IN_CPYTHON 1 94 #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 95 #define CYTHON_USE_PYLONG_INTERNALS 1 97 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) 98 #define Py_OptimizeFlag 0 100 #define __PYX_BUILD_PY_SSIZE_T "n" 101 #define CYTHON_FORMAT_SSIZE_T "z" 102 #if PY_MAJOR_VERSION < 3 103 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" 104 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 105 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 106 #define __Pyx_DefaultClassType PyClass_Type 108 #define __Pyx_BUILTIN_MODULE_NAME "builtins" 109 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 110 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 111 #define __Pyx_DefaultClassType PyType_Type 113 #ifndef Py_TPFLAGS_CHECKTYPES 114 #define Py_TPFLAGS_CHECKTYPES 0 116 #ifndef Py_TPFLAGS_HAVE_INDEX 117 #define Py_TPFLAGS_HAVE_INDEX 0 119 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER 120 #define Py_TPFLAGS_HAVE_NEWBUFFER 0 122 #ifndef Py_TPFLAGS_HAVE_FINALIZE 123 #define Py_TPFLAGS_HAVE_FINALIZE 0 125 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) 126 #define CYTHON_PEP393_ENABLED 1 127 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 128 0 : _PyUnicode_Ready((PyObject *)(op))) 129 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) 130 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) 131 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) 132 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) 133 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) 135 #define CYTHON_PEP393_ENABLED 0 136 #define __Pyx_PyUnicode_READY(op) (0) 137 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) 138 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) 139 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) 140 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) 141 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) 143 #if CYTHON_COMPILING_IN_PYPY 144 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) 145 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) 147 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) 148 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ 149 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) 151 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) 152 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) 154 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) 155 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) 156 #if PY_MAJOR_VERSION >= 3 157 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) 159 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) 161 #if PY_MAJOR_VERSION >= 3 162 #define PyBaseString_Type PyUnicode_Type 163 #define PyStringObject PyUnicodeObject 164 #define PyString_Type PyUnicode_Type 165 #define PyString_Check PyUnicode_Check 166 #define PyString_CheckExact PyUnicode_CheckExact 168 #if PY_MAJOR_VERSION >= 3 169 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) 170 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) 172 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) 173 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) 175 #ifndef PySet_CheckExact 176 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) 178 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) 179 #if PY_MAJOR_VERSION >= 3 180 #define PyIntObject PyLongObject 181 #define PyInt_Type PyLong_Type 182 #define PyInt_Check(op) PyLong_Check(op) 183 #define PyInt_CheckExact(op) PyLong_CheckExact(op) 184 #define PyInt_FromString PyLong_FromString 185 #define PyInt_FromUnicode PyLong_FromUnicode 186 #define PyInt_FromLong PyLong_FromLong 187 #define PyInt_FromSize_t PyLong_FromSize_t 188 #define PyInt_FromSsize_t PyLong_FromSsize_t 189 #define PyInt_AsLong PyLong_AsLong 190 #define PyInt_AS_LONG PyLong_AS_LONG 191 #define PyInt_AsSsize_t PyLong_AsSsize_t 192 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask 193 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask 194 #define PyNumber_Int PyNumber_Long 196 #if PY_MAJOR_VERSION >= 3 197 #define PyBoolObject PyLongObject 199 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY 200 #ifndef PyUnicode_InternFromString 201 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) 204 #if PY_VERSION_HEX < 0x030200A4 205 typedef long Py_hash_t;
206 #define __Pyx_PyInt_FromHash_t PyInt_FromLong 207 #define __Pyx_PyInt_AsHash_t PyInt_AsLong 209 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t 210 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t 212 #if PY_MAJOR_VERSION >= 3 213 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) 215 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) 217 #if PY_VERSION_HEX >= 0x030500B1 218 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods 219 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) 220 #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 225 } __Pyx_PyAsyncMethodsStruct;
226 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) 228 #define __Pyx_PyType_AsAsync(obj) NULL 230 #ifndef CYTHON_RESTRICT 231 #if defined(__GNUC__) 232 #define CYTHON_RESTRICT __restrict__ 233 #elif defined(_MSC_VER) && _MSC_VER >= 1400 234 #define CYTHON_RESTRICT __restrict 235 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 236 #define CYTHON_RESTRICT restrict 238 #define CYTHON_RESTRICT 241 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) 244 #error "Cython files generated with the C++ option must be compiled with a C++ compiler." 246 #ifndef CYTHON_INLINE 247 #define CYTHON_INLINE inline 250 void __Pyx_call_destructor(T& x) {
254 class __Pyx_FakeReference {
256 __Pyx_FakeReference() : ptr(NULL) { }
257 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<T*>(&ref)) { }
258 T *operator->() {
return ptr; }
259 operator T&() {
return *ptr; }
264 #if defined(WIN32) || defined(MS_WINDOWS) 265 #define _USE_MATH_DEFINES 269 #define __PYX_NAN() ((float) NAN) 271 static CYTHON_INLINE
float __PYX_NAN() {
273 memset(&value, 0xFF,
sizeof(value));
279 #if PY_MAJOR_VERSION >= 3 280 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) 281 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) 283 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) 284 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) 287 #ifndef __PYX_EXTERN_C 289 #define __PYX_EXTERN_C extern "C" 291 #define __PYX_EXTERN_C extern 295 #define __PYX_HAVE__PyClical 296 #define __PYX_HAVE_API__PyClical 307 #ifdef PYREX_WITHOUT_ASSERTIONS 308 #define CYTHON_WITHOUT_ASSERTIONS 311 #ifndef CYTHON_UNUSED 312 # if defined(__GNUC__) 313 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 314 # define CYTHON_UNUSED __attribute__ ((__unused__)) 316 # define CYTHON_UNUSED 318 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) 319 # define CYTHON_UNUSED __attribute__ ((__unused__)) 321 # define CYTHON_UNUSED 324 #ifndef CYTHON_NCP_UNUSED 325 # if CYTHON_COMPILING_IN_CPYTHON 326 # define CYTHON_NCP_UNUSED 328 # define CYTHON_NCP_UNUSED CYTHON_UNUSED 331 typedef struct {PyObject **p;
char *s;
const Py_ssize_t n;
const char* encoding;
332 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
334 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 335 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 336 #define __PYX_DEFAULT_STRING_ENCODING "" 337 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString 338 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 339 #define __Pyx_uchar_cast(c) ((unsigned char)c) 340 #define __Pyx_long_cast(x) ((long)x) 341 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ 342 (sizeof(type) < sizeof(Py_ssize_t)) ||\ 343 (sizeof(type) > sizeof(Py_ssize_t) &&\ 344 likely(v < (type)PY_SSIZE_T_MAX ||\ 345 v == (type)PY_SSIZE_T_MAX) &&\ 346 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ 347 v == (type)PY_SSIZE_T_MIN))) ||\ 348 (sizeof(type) == sizeof(Py_ssize_t) &&\ 349 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ 350 v == (type)PY_SSIZE_T_MAX))) ) 351 #if defined (__cplusplus) && __cplusplus >= 201103L 353 #define __Pyx_sst_abs(value) std::abs(value) 354 #elif SIZEOF_INT >= SIZEOF_SIZE_T 355 #define __Pyx_sst_abs(value) abs(value) 356 #elif SIZEOF_LONG >= SIZEOF_SIZE_T 357 #define __Pyx_sst_abs(value) labs(value) 358 #elif defined (_MSC_VER) && defined (_M_X64) 359 #define __Pyx_sst_abs(value) _abs64(value) 360 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 361 #define __Pyx_sst_abs(value) llabs(value) 362 #elif defined (__GNUC__) 363 #define __Pyx_sst_abs(value) __builtin_llabs(value) 365 #define __Pyx_sst_abs(value) ((value<0) ? -value : value) 367 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject*);
368 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
369 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) 370 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) 371 #define __Pyx_PyBytes_FromString PyBytes_FromString 372 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize 373 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
374 #if PY_MAJOR_VERSION < 3 375 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString 376 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 378 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString 379 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize 381 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) 382 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) 383 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) 384 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) 385 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) 386 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) 387 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) 388 #if PY_MAJOR_VERSION < 3 389 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *u)
391 const Py_UNICODE *u_end = u;
393 return (
size_t)(u_end - u - 1);
396 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen 398 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) 399 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode 400 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode 401 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) 402 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) 403 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) 404 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
405 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
406 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
407 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
408 #if CYTHON_COMPILING_IN_CPYTHON 409 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) 411 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) 413 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) 414 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 415 static int __Pyx_sys_getdefaultencoding_not_ascii;
416 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
418 PyObject* default_encoding = NULL;
419 PyObject* ascii_chars_u = NULL;
420 PyObject* ascii_chars_b = NULL;
421 const char* default_encoding_c;
422 sys = PyImport_ImportModule(
"sys");
424 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
426 if (!default_encoding)
goto bad;
427 default_encoding_c = PyBytes_AsString(default_encoding);
428 if (!default_encoding_c)
goto bad;
429 if (strcmp(default_encoding_c,
"ascii") == 0) {
430 __Pyx_sys_getdefaultencoding_not_ascii = 0;
432 char ascii_chars[128];
434 for (c = 0; c < 128; c++) {
437 __Pyx_sys_getdefaultencoding_not_ascii = 1;
438 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
439 if (!ascii_chars_u)
goto bad;
440 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
441 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
444 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
448 Py_DECREF(ascii_chars_u);
449 Py_DECREF(ascii_chars_b);
451 Py_DECREF(default_encoding);
454 Py_XDECREF(default_encoding);
455 Py_XDECREF(ascii_chars_u);
456 Py_XDECREF(ascii_chars_b);
460 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 461 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) 463 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) 464 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 465 static char* __PYX_DEFAULT_STRING_ENCODING;
466 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
468 PyObject* default_encoding = NULL;
469 char* default_encoding_c;
470 sys = PyImport_ImportModule(
"sys");
472 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
474 if (!default_encoding)
goto bad;
475 default_encoding_c = PyBytes_AsString(default_encoding);
476 if (!default_encoding_c)
goto bad;
477 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c));
478 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
479 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
480 Py_DECREF(default_encoding);
483 Py_XDECREF(default_encoding);
491 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) 492 #define likely(x) __builtin_expect(!!(x), 1) 493 #define unlikely(x) __builtin_expect(!!(x), 0) 495 #define likely(x) (x) 496 #define unlikely(x) (x) 499 static PyObject *__pyx_m;
500 static PyObject *__pyx_d;
501 static PyObject *__pyx_b;
502 static PyObject *__pyx_empty_tuple;
503 static PyObject *__pyx_empty_bytes;
504 static int __pyx_lineno;
505 static int __pyx_clineno = 0;
506 static const char * __pyx_cfilenm= __FILE__;
507 static const char *__pyx_filename;
510 static const char *__pyx_f[] = {
515 struct __pyx_obj_8PyClical_index_set;
516 struct __pyx_obj_8PyClical_clifford;
517 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
518 struct __pyx_opt_args_8PyClical_sqrt;
519 struct __pyx_opt_args_8PyClical_log;
520 struct __pyx_opt_args_8PyClical_cos;
521 struct __pyx_opt_args_8PyClical_acos;
522 struct __pyx_opt_args_8PyClical_acosh;
523 struct __pyx_opt_args_8PyClical_sin;
524 struct __pyx_opt_args_8PyClical_asin;
525 struct __pyx_opt_args_8PyClical_asinh;
526 struct __pyx_opt_args_8PyClical_tan;
527 struct __pyx_opt_args_8PyClical_atan;
528 struct __pyx_opt_args_8PyClical_atanh;
529 struct __pyx_opt_args_8PyClical_random_clifford;
538 struct __pyx_opt_args_8PyClical_sqrt {
550 struct __pyx_opt_args_8PyClical_log {
562 struct __pyx_opt_args_8PyClical_cos {
574 struct __pyx_opt_args_8PyClical_acos {
586 struct __pyx_opt_args_8PyClical_acosh {
598 struct __pyx_opt_args_8PyClical_sin {
610 struct __pyx_opt_args_8PyClical_asin {
622 struct __pyx_opt_args_8PyClical_asinh {
634 struct __pyx_opt_args_8PyClical_tan {
646 struct __pyx_opt_args_8PyClical_atan {
658 struct __pyx_opt_args_8PyClical_atanh {
670 struct __pyx_opt_args_8PyClical_random_clifford {
682 struct __pyx_obj_8PyClical_index_set {
684 struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
696 struct __pyx_obj_8PyClical_clifford {
698 struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
710 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
712 PyObject *__pyx_v_idx;
713 struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
715 Py_ssize_t __pyx_t_1;
716 PyObject *(*__pyx_t_2)(PyObject *);
729 struct __pyx_vtabstruct_8PyClical_index_set {
730 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
731 IndexSet (*unwrap)(
struct __pyx_obj_8PyClical_index_set *);
732 PyObject *(*copy)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch);
734 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
735 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
736 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *);
747 struct __pyx_vtabstruct_8PyClical_clifford {
748 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
749 Clifford (*unwrap)(
struct __pyx_obj_8PyClical_clifford *);
750 PyObject *(*copy)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch);
752 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
753 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
754 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *);
757 #ifndef CYTHON_REFNANNY 758 #define CYTHON_REFNANNY 0 762 void (*INCREF)(
void*, PyObject*, int);
763 void (*DECREF)(
void*, PyObject*, int);
764 void (*GOTREF)(
void*, PyObject*, int);
765 void (*GIVEREF)(
void*, PyObject*, int);
766 void* (*SetupContext)(
const char*, int,
const char*);
767 void (*FinishContext)(
void**);
768 } __Pyx_RefNannyAPIStruct;
769 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
770 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
771 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; 773 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ 775 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ 776 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ 777 PyGILState_Release(__pyx_gilstate_save);\ 779 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ 782 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ 783 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) 785 #define __Pyx_RefNannyFinishContext()\ 786 __Pyx_RefNanny->FinishContext(&__pyx_refnanny) 787 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 788 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 789 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 790 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 791 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) 792 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) 793 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) 794 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) 796 #define __Pyx_RefNannyDeclarations 797 #define __Pyx_RefNannySetupContext(name, acquire_gil) 798 #define __Pyx_RefNannyFinishContext() 799 #define __Pyx_INCREF(r) Py_INCREF(r) 800 #define __Pyx_DECREF(r) Py_DECREF(r) 801 #define __Pyx_GOTREF(r) 802 #define __Pyx_GIVEREF(r) 803 #define __Pyx_XINCREF(r) Py_XINCREF(r) 804 #define __Pyx_XDECREF(r) Py_XDECREF(r) 805 #define __Pyx_XGOTREF(r) 806 #define __Pyx_XGIVEREF(r) 808 #define __Pyx_XDECREF_SET(r, v) do {\ 809 PyObject *tmp = (PyObject *) r;\ 810 r = v; __Pyx_XDECREF(tmp);\ 812 #define __Pyx_DECREF_SET(r, v) do {\ 813 PyObject *tmp = (PyObject *) r;\ 814 r = v; __Pyx_DECREF(tmp);\ 816 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) 817 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) 819 #if CYTHON_COMPILING_IN_CPYTHON 820 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject*
obj, PyObject* attr_name) {
821 PyTypeObject* tp = Py_TYPE(
obj);
822 if (likely(tp->tp_getattro))
823 return tp->tp_getattro(
obj, attr_name);
824 #if PY_MAJOR_VERSION < 3 825 if (likely(tp->tp_getattr))
826 return tp->tp_getattr(
obj, PyString_AS_STRING(attr_name));
828 return PyObject_GetAttr(
obj, attr_name);
831 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) 834 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
836 #if CYTHON_COMPILING_IN_CPYTHON 837 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
839 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) 842 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
843 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
845 static void __Pyx_WriteUnraisable(
const char *name,
int clineno,
846 int lineno,
const char *filename,
847 int full_traceback,
int nogil);
849 #if CYTHON_COMPILING_IN_CPYTHON 850 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
853 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
855 #if CYTHON_COMPILING_IN_CPYTHON 856 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
858 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) 861 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
863 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
864 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
865 const char* function_name);
867 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
868 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
870 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
872 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
873 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
875 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
877 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
879 #if CYTHON_COMPILING_IN_CPYTHON 880 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace);
882 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ 883 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) 886 static CYTHON_INLINE
int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq,
int eq) {
887 int result = PySequence_Contains(seq, item);
888 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
891 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ 892 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ 893 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ 894 (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ 895 __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) 896 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
897 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t
i, PyObject *v,
898 int is_list,
int wraparound,
int boundscheck);
900 static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *
obj, PyTypeObject *type,
int none_allowed,
901 const char *name,
int exact);
903 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
907 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
909 #if CYTHON_COMPILING_IN_CPYTHON 910 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace);
912 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\ 913 ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) 916 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
918 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
920 #if PY_MAJOR_VERSION >= 3 921 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals 923 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals 928 PyCodeObject* code_object;
929 } __Pyx_CodeObjectCacheEntry;
930 struct __Pyx_CodeObjectCache {
933 __Pyx_CodeObjectCacheEntry* entries;
935 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
936 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
937 static PyCodeObject *__pyx_find_code_object(
int code_line);
938 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
940 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
941 int py_line,
const char *filename);
943 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
945 #ifndef __Pyx_CppExn2PyErr 950 static void __Pyx_CppExn2PyErr() {
952 if (PyErr_Occurred())
956 }
catch (
const std::bad_alloc& exn) {
957 PyErr_SetString(PyExc_MemoryError, exn.what());
958 }
catch (
const std::bad_cast& exn) {
959 PyErr_SetString(PyExc_TypeError, exn.what());
960 }
catch (
const std::domain_error& exn) {
961 PyErr_SetString(PyExc_ValueError, exn.what());
962 }
catch (
const std::invalid_argument& exn) {
963 PyErr_SetString(PyExc_ValueError, exn.what());
964 }
catch (
const std::ios_base::failure& exn) {
965 PyErr_SetString(PyExc_IOError, exn.what());
966 }
catch (
const std::out_of_range& exn) {
967 PyErr_SetString(PyExc_IndexError, exn.what());
968 }
catch (
const std::overflow_error& exn) {
969 PyErr_SetString(PyExc_OverflowError, exn.what());
970 }
catch (
const std::range_error& exn) {
971 PyErr_SetString(PyExc_ArithmeticError, exn.what());
972 }
catch (
const std::underflow_error& exn) {
973 PyErr_SetString(PyExc_ArithmeticError, exn.what());
974 }
catch (
const std::exception& exn) {
975 PyErr_SetString(PyExc_RuntimeError, exn.what());
979 PyErr_SetString(PyExc_RuntimeError,
"Unknown exception");
984 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
986 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
988 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
990 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
992 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
994 static PyObject* __Pyx_PyObject_CallMethod1(PyObject*
obj, PyObject* method_name, PyObject* arg);
996 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
999 __pyx_coroutine_body_t body;
1002 PyObject *exc_value;
1003 PyObject *exc_traceback;
1004 PyObject *gi_weakreflist;
1006 PyObject *yieldfrom;
1008 PyObject *gi_qualname;
1011 } __pyx_CoroutineObject;
1012 static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
1013 PyObject *closure, PyObject *name, PyObject *qualname);
1014 static int __Pyx_Coroutine_clear(PyObject *
self);
1015 #if 1 || PY_VERSION_HEX < 0x030300B0 1016 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
1018 #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) 1021 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code);
1023 static int __Pyx_patch_abc(
void);
1025 #define __Pyx_Generator_USED 1026 static PyTypeObject *__pyx_GeneratorType = 0;
1027 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) 1028 #define __Pyx_Generator_New(body, closure, name, qualname)\ 1029 __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname) 1030 static PyObject *__Pyx_Generator_Next(PyObject *
self);
1031 static int __pyx_Generator_init(
void);
1033 static int __Pyx_check_binary_version(
void);
1035 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1037 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other);
1038 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1039 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch);
1040 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other);
1041 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1042 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch);
1049 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1050 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1051 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1052 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *);
1053 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1054 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *,
int __pyx_skip_dispatch);
1055 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *,
int __pyx_skip_dispatch);
1056 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *);
1057 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *);
1058 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *,
int __pyx_skip_dispatch);
1059 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *,
int __pyx_skip_dispatch);
1060 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *,
int __pyx_skip_dispatch);
1061 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *,
int __pyx_skip_dispatch);
1062 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *,
int __pyx_skip_dispatch);
1063 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *,
int __pyx_skip_dispatch);
1064 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *,
int __pyx_skip_dispatch);
1065 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *,
int __pyx_skip_dispatch);
1066 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *,
int __pyx_skip_dispatch);
1067 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *,
int __pyx_skip_dispatch);
1068 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *,
int __pyx_skip_dispatch);
1069 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *,
int __pyx_skip_dispatch);
1070 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *,
int __pyx_skip_dispatch);
1071 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *,
int __pyx_skip_dispatch);
1072 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1073 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1074 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *,
int __pyx_skip_dispatch);
1075 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args);
1076 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *,
int __pyx_skip_dispatch);
1077 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_log *__pyx_optional_args);
1078 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args);
1079 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args);
1080 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *,
int __pyx_skip_dispatch);
1081 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args);
1082 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args);
1083 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args);
1084 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *,
int __pyx_skip_dispatch);
1085 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args);
1086 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args);
1087 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args);
1088 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *,
int __pyx_skip_dispatch);
1089 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args);
1090 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);
1091 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *,
int __pyx_skip_dispatch);
1092 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *,
int __pyx_skip_dispatch);
1093 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *,
int __pyx_skip_dispatch);
1094 #define __Pyx_MODULE_NAME "PyClical" 1095 int __pyx_module_is_main_PyClical = 0;
1098 static PyObject *__pyx_builtin_IndexError;
1099 static PyObject *__pyx_builtin_RuntimeError;
1100 static PyObject *__pyx_builtin_TypeError;
1101 static PyObject *__pyx_builtin_ValueError;
1102 static PyObject *__pyx_builtin_NotImplemented;
1103 static PyObject *__pyx_builtin_range;
1104 static PyObject *__pyx_builtin_xrange;
1105 static char __pyx_k_[] =
".";
1106 static char __pyx_k_e[] =
"e";
1107 static char __pyx_k_i[] =
"i";
1108 static char __pyx_k_m[] =
"m";
1109 static char __pyx_k_p[] =
"p";
1110 static char __pyx_k_q[] =
"q";
1111 static char __pyx_k__2[] =
" ";
1112 static char __pyx_k__3[] =
":";
1113 static char __pyx_k__4[] =
"\n\t";
1114 static char __pyx_k__5[] =
" (";
1115 static char __pyx_k__6[] =
", ";
1116 static char __pyx_k__7[] =
").";
1117 static char __pyx_k_cl[] =
"cl";
1118 static char __pyx_k_pi[] =
"pi";
1119 static char __pyx_k_cos[] =
"cos";
1120 static char __pyx_k_exp[] =
"exp";
1121 static char __pyx_k_frm[] =
"frm";
1122 static char __pyx_k_inv[] =
"inv";
1123 static char __pyx_k_ist[] =
"ist";
1124 static char __pyx_k_ixt[] =
"ixt";
1125 static char __pyx_k_lhs[] =
"lhs";
1126 static char __pyx_k_log[] =
"log";
1127 static char __pyx_k_max[] =
"max";
1128 static char __pyx_k_min[] =
"min";
1129 static char __pyx_k_obj[] =
"obj";
1130 static char __pyx_k_odd[] =
"odd";
1131 static char __pyx_k_pow[] =
"pow";
1132 static char __pyx_k_rhs[] =
"rhs";
1133 static char __pyx_k_sin[] =
"sin";
1134 static char __pyx_k_tan[] =
"tan";
1135 static char __pyx_k_tau[] =
"tau";
1136 static char __pyx_k_Real[] =
"Real";
1137 static char __pyx_k_acos[] =
"acos";
1138 static char __pyx_k_args[] =
"args";
1139 static char __pyx_k_asin[] =
"asin";
1140 static char __pyx_k_atan[] =
"atan";
1141 static char __pyx_k_conj[] =
"conj";
1142 static char __pyx_k_copy[] =
"copy";
1143 static char __pyx_k_cosh[] =
"cosh";
1144 static char __pyx_k_even[] =
"even";
1145 static char __pyx_k_fill[] =
"fill";
1146 static char __pyx_k_from[] =
" from ";
1147 static char __pyx_k_iter[] =
"__iter__";
1148 static char __pyx_k_main[] =
"__main__";
1149 static char __pyx_k_math[] =
"math";
1150 static char __pyx_k_name[] =
"__name__";
1151 static char __pyx_k_norm[] =
"norm";
1152 static char __pyx_k_pure[] =
"pure";
1153 static char __pyx_k_quad[] =
"quad";
1154 static char __pyx_k_send[] =
"send";
1155 static char __pyx_k_sinh[] =
"sinh";
1156 static char __pyx_k_sqrt[] =
"sqrt";
1157 static char __pyx_k_tanh[] =
"tanh";
1158 static char __pyx_k_test[] =
"_test";
1159 static char __pyx_k_0_8_2[] =
"0.8.2";
1160 static char __pyx_k_acosh[] =
"acosh";
1161 static char __pyx_k_asinh[] =
"asinh";
1162 static char __pyx_k_atanh[] =
"atanh";
1163 static char __pyx_k_close[] =
"close";
1164 static char __pyx_k_grade[] =
"grade";
1165 static char __pyx_k_istpq[] =
"istpq";
1166 static char __pyx_k_nbar3[] =
"nbar3";
1167 static char __pyx_k_ninf3[] =
"ninf3";
1168 static char __pyx_k_other[] =
"other";
1169 static char __pyx_k_range[] =
"range";
1170 static char __pyx_k_throw[] =
"throw";
1171 static char __pyx_k_using[] =
" using (";
1172 static char __pyx_k_value[] =
" value ";
1173 static char __pyx_k_import[] =
"__import__";
1174 static char __pyx_k_scalar[] =
"scalar";
1175 static char __pyx_k_test_2[] =
"__test__";
1176 static char __pyx_k_xrange[] =
"xrange";
1177 static char __pyx_k_doctest[] =
"doctest";
1178 static char __pyx_k_invalid[] =
" invalid ";
1179 static char __pyx_k_numbers[] =
"numbers";
1180 static char __pyx_k_reverse[] =
"reverse";
1181 static char __pyx_k_testmod[] =
"testmod";
1182 static char __pyx_k_version[] =
"__version__";
1183 static char __pyx_k_Integral[] =
"Integral";
1184 static char __pyx_k_PyClical[] =
"PyClical";
1185 static char __pyx_k_Sequence[] =
"Sequence";
1186 static char __pyx_k_as_frame[] =
" as frame:\n\t";
1187 static char __pyx_k_involute[] =
"involute";
1188 static char __pyx_k_to_frame[] =
" to frame ";
1189 static char __pyx_k_TypeError[] =
"TypeError";
1190 static char __pyx_k_outer_pow[] =
"outer_pow";
1191 static char __pyx_k_IndexError[] =
"IndexError";
1192 static char __pyx_k_ValueError[] =
"ValueError";
1193 static char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
1194 static char __pyx_k_collections[] =
"collections";
1195 static char __pyx_k_e_line_1887[] =
"e (line 1887)";
1196 static char __pyx_k_RuntimeError[] =
"RuntimeError";
1197 static char __pyx_k_abs_line_1473[] =
"abs (line 1473)";
1198 static char __pyx_k_cos_line_1602[] =
"cos (line 1602)";
1199 static char __pyx_k_exp_line_1565[] =
"exp (line 1565)";
1200 static char __pyx_k_inv_line_1329[] =
"inv (line 1329)";
1201 static char __pyx_k_log_line_1579[] =
"log (line 1579)";
1202 static char __pyx_k_odd_line_1397[] =
"odd (line 1397)";
1203 static char __pyx_k_pow_line_1494[] =
"pow (line 1494)";
1204 static char __pyx_k_sin_line_1679[] =
"sin (line 1679)";
1205 static char __pyx_k_tan_line_1752[] =
"tan (line 1752)";
1206 static char __pyx_k_using_invalid[] =
" using invalid ";
1207 static char __pyx_k_Cannot_reframe[] =
"Cannot reframe";
1208 static char __pyx_k_NotImplemented[] =
"NotImplemented";
1209 static char __pyx_k_Not_applicable[] =
"Not applicable.";
1210 static char __pyx_k_acos_line_1619[] =
"acos (line 1619)";
1211 static char __pyx_k_agc3_line_1844[] =
"agc3 (line 1844)";
1212 static char __pyx_k_asin_line_1698[] =
"asin (line 1698)";
1213 static char __pyx_k_atan_line_1769[] =
"atan (line 1769)";
1214 static char __pyx_k_cga3_line_1824[] =
"cga3 (line 1824)";
1215 static char __pyx_k_conj_line_1436[] =
"conj (line 1436)";
1216 static char __pyx_k_cosh_line_1640[] =
"cosh (line 1640)";
1217 static char __pyx_k_even_line_1388[] =
"even (line 1388)";
1218 static char __pyx_k_imag_line_1366[] =
"imag (line 1366)";
1219 static char __pyx_k_invalid_string[] =
" invalid string ";
1220 static char __pyx_k_norm_line_1462[] =
"norm (line 1462)";
1221 static char __pyx_k_pure_line_1377[] =
"pure (line 1377)";
1222 static char __pyx_k_quad_line_1451[] =
"quad (line 1451)";
1223 static char __pyx_k_real_line_1355[] =
"real (line 1355)";
1224 static char __pyx_k_sinh_line_1719[] =
"sinh (line 1719)";
1225 static char __pyx_k_sqrt_line_1542[] =
"sqrt (line 1542)";
1226 static char __pyx_k_tanh_line_1786[] =
"tanh (line 1786)";
1227 static char __pyx_k_acosh_line_1656[] =
"acosh (line 1656)";
1228 static char __pyx_k_asinh_line_1733[] =
"asinh (line 1733)";
1229 static char __pyx_k_atanh_line_1798[] =
"atanh (line 1798)";
1230 static char __pyx_k_istpq_line_1900[] =
"istpq (line 1900)";
1231 static char __pyx_k_compare_line_490[] =
"compare (line 490)";
1232 static char __pyx_k_index_set___iter[] =
"index_set.__iter__";
1233 static char __pyx_k_max_pos_line_511[] =
"max_pos (line 511)";
1234 static char __pyx_k_min_neg_line_502[] =
"min_neg (line 502)";
1235 static char __pyx_k_scalar_line_1344[] =
"scalar (line 1344)";
1236 static char __pyx_k_cga3std_line_1833[] =
"cga3std (line 1833)";
1237 static char __pyx_k_max_abs_line_1482[] =
"max_abs (line 1482)";
1238 static char __pyx_k_reverse_line_1421[] =
"reverse (line 1421)";
1239 static char __pyx_k_involute_line_1406[] =
"involute (line 1406)";
1240 static char __pyx_k_outer_pow_line_1518[] =
"outer_pow (line 1518)";
1241 static char __pyx_k_clifford_inv_line_925[] =
"clifford.inv (line 925)";
1242 static char __pyx_k_clifford_pow_line_979[] =
"clifford.pow (line 979)";
1243 static char __pyx_k_clifford_abs_line_1174[] =
"clifford.abs (line 1174)";
1244 static char __pyx_k_clifford_copy_line_554[] =
"clifford.copy (line 554)";
1245 static char __pyx_k_clifford_odd_line_1069[] =
"clifford.odd (line 1069)";
1246 static char __pyx_k_complexifier_line_1527[] =
"complexifier (line 1527)";
1247 static char __pyx_k_index_set_copy_line_64[] =
"index_set.copy (line 64)";
1248 static char __pyx_k_index_set_max_line_349[] =
"index_set.max (line 349)";
1249 static char __pyx_k_index_set_min_line_340[] =
"index_set.min (line 340)";
1250 static char __pyx_k_clifford_conj_line_1137[] =
"clifford.conj (line 1137)";
1251 static char __pyx_k_clifford_even_line_1060[] =
"clifford.even (line 1060)";
1252 static char __pyx_k_clifford_norm_line_1163[] =
"clifford.norm (line 1163)";
1253 static char __pyx_k_clifford_pure_line_1049[] =
"clifford.pure (line 1049)";
1254 static char __pyx_k_clifford_quad_line_1152[] =
"clifford.quad (line 1152)";
1255 static char __pyx_k_Unary_print_clifford_1_1[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1256 static char __pyx_k_clifford___or___line_938[] =
"clifford.__or__ (line 938)";
1257 static char __pyx_k_clifford_frame_line_1214[] =
"clifford.frame (line 1214)";
1258 static char __pyx_k_clifford_hidden_doctests[] =
"clifford_hidden_doctests";
1259 static char __pyx_k_clifford_isnan_line_1205[] =
"clifford.isnan (line 1205)";
1260 static char __pyx_k_index_set_count_line_313[] =
"index_set.count (line 313)";
1261 static char __pyx_k_clifford___add___line_739[] =
"clifford.__add__ (line 739)";
1262 static char __pyx_k_clifford___and___line_835[] =
"clifford.__and__ (line 835)";
1263 static char __pyx_k_clifford___div___line_895[] =
"clifford.__div__ (line 895)";
1264 static char __pyx_k_clifford___ior___line_949[] =
"clifford.__ior__ (line 949)";
1265 static char __pyx_k_clifford___mod___line_805[] =
"clifford.__mod__ (line 805)";
1266 static char __pyx_k_clifford___mul___line_779[] =
"clifford.__mul__ (line 779)";
1267 static char __pyx_k_clifford___neg___line_721[] =
"clifford.__neg__ (line 721)";
1268 static char __pyx_k_clifford___pos___line_730[] =
"clifford.__pos__ (line 730)";
1269 static char __pyx_k_clifford___pow___line_960[] =
"clifford.__pow__ (line 960)";
1270 static char __pyx_k_clifford___sub___line_759[] =
"clifford.__sub__ (line 759)";
1271 static char __pyx_k_clifford___xor___line_865[] =
"clifford.__xor__ (line 865)";
1272 static char __pyx_k_clifford_reframe_line_648[] =
"clifford.reframe (line 648)";
1273 static char __pyx_k_clifford_scalar_line_1038[] =
"clifford.scalar (line 1038)";
1274 static char __pyx_k_index_set___or___line_291[] =
"index_set.__or__ (line 291)";
1275 static char __pyx_k_index_set_hidden_doctests[] =
"index_set_hidden_doctests";
1276 static char __pyx_k_random_clifford_line_1815[] =
"random_clifford (line 1815)";
1277 static char __pyx_k_Cannot_take_vector_part_of[] =
"Cannot take vector part of ";
1278 static char __pyx_k_Unary_print_clifford_1_1_2[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1279 static char __pyx_k_clifford___iadd___line_750[] =
"clifford.__iadd__ (line 750)";
1280 static char __pyx_k_clifford___iand___line_850[] =
"clifford.__iand__ (line 850)";
1281 static char __pyx_k_clifford___idiv___line_910[] =
"clifford.__idiv__ (line 910)";
1282 static char __pyx_k_clifford___imod___line_820[] =
"clifford.__imod__ (line 820)";
1283 static char __pyx_k_clifford___imul___line_792[] =
"clifford.__imul__ (line 792)";
1284 static char __pyx_k_clifford___isub___line_770[] =
"clifford.__isub__ (line 770)";
1285 static char __pyx_k_clifford___iter___line_637[] =
"clifford.__iter__ (line 637)";
1286 static char __pyx_k_clifford___ixor___line_880[] =
"clifford.__ixor__ (line 880)";
1287 static char __pyx_k_clifford___str___line_1234[] =
"clifford.__str__ (line 1234)";
1288 static char __pyx_k_clifford_max_abs_line_1183[] =
"clifford.max_abs (line 1183)";
1289 static char __pyx_k_clifford_reverse_line_1122[] =
"clifford.reverse (line 1122)";
1290 static char __pyx_k_index_set___and___line_269[] =
"index_set.__and__ (line 269)";
1291 static char __pyx_k_index_set___ior___line_302[] =
"index_set.__ior__ (line 302)";
1292 static char __pyx_k_index_set___str___line_393[] =
"index_set.__str__ (line 393)";
1293 static char __pyx_k_index_set___xor___line_247[] =
"index_set.__xor__ (line 247)";
1294 static char __pyx_k_clifford___call___line_1019[] =
"clifford.__call__ (line 1019)";
1295 static char __pyx_k_clifford___repr___line_1225[] =
"clifford.__repr__ (line 1225)";
1296 static char __pyx_k_clifford_involute_line_1106[] =
"clifford.involute (line 1106)";
1297 static char __pyx_k_index_set___iand___line_280[] =
"index_set.__iand__ (line 280)";
1298 static char __pyx_k_index_set___iter___line_227[] =
"index_set.__iter__ (line 227)";
1299 static char __pyx_k_index_set___ixor___line_258[] =
"index_set.__ixor__ (line 258)";
1300 static char __pyx_k_index_set___repr___line_382[] =
"index_set.__repr__ (line 382)";
1301 static char __pyx_k_clifford_outer_pow_line_1003[] =
"clifford.outer_pow (line 1003)";
1302 static char __pyx_k_clifford_truncated_line_1194[] =
"clifford.truncated (line 1194)";
1303 static char __pyx_k_index_set_count_neg_line_322[] =
"index_set.count_neg (line 322)";
1304 static char __pyx_k_index_set_count_pos_line_331[] =
"index_set.count_pos (line 331)";
1305 static char __pyx_k_clifford___getitem___line_706[] =
"clifford.__getitem__ (line 706)";
1306 static char __pyx_k_index_set___invert___line_238[] =
"index_set.__invert__ (line 238)";
1307 static 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 ";
1308 static 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 ";
1309 static 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 ";
1310 static 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 ";
1311 static 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 ";
1312 static 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 ";
1313 static 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 ";
1314 static 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,\n -3 4 7\n ";
1315 static char __pyx_k_Maximum_member_index_set_1_1_2[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
1316 static 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 ";
1317 static char __pyx_k_Minimum_member_index_set_1_1_2[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
1318 static 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 ";
1319 static 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 ";
1320 static 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 ";
1321 static 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 ";
1322 static 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 ";
1323 static 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 ";
1324 static 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 ";
1325 static 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 ";
1326 static 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 ";
1327 static 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 ";
1328 static char __pyx_k_clifford_vector_part_line_1078[] =
"clifford.vector_part (line 1078)";
1329 static char __pyx_k_index_set___getitem___line_189[] =
"index_set.__getitem__ (line 189)";
1330 static char __pyx_k_index_set___setitem___line_177[] =
"index_set.__setitem__ (line 177)";
1331 static 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 ";
1332 static 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 ";
1333 static 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 ";
1334 static 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 ";
1335 static 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 ";
1336 static char __pyx_k_Check_if_a_multivector_contains[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
1337 static 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 ";
1338 static 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 ";
1339 static 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 ";
1340 static 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 ";
1341 static 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 ";
1342 static 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 ";
1343 static 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 ";
1344 static 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 ";
1345 static 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 ";
1346 static 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 ";
1347 static 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 ";
1348 static char __pyx_k_Geometric_difference_x_clifford[] =
"\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print x\n 1-{2}\n ";
1349 static 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 ";
1350 static 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 ";
1351 static 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 ";
1352 static 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 ";
1353 static 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 ";
1354 static 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 ";
1355 static 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 ";
1356 static 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 ";
1357 static 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 ";
1358 static 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 ";
1359 static 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 ";
1360 static 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 ";
1361 static 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 ";
1362 static 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 ";
1363 static 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 ";
1364 static 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 ";
1365 static 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 ";
1366 static 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 ";
1367 static 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 ";
1368 static 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 ";
1369 static 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 ";
1370 static 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,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
1371 static 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 ";
1372 static 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 ";
1373 static 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 ";
1374 static 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 ";
1375 static 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 ";
1376 static 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 ";
1377 static 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 ";
1378 static 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 ";
1379 static 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 ";
1380 static 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 ";
1381 static 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 ";
1382 static 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 ";
1383 static 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 ";
1384 static 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 ";
1385 static 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 ";
1386 static 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 ";
1387 static 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 ";
1388 static 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 ";
1389 static 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 ";
1390 static 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 ";
1391 static 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 ";
1392 static 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 ";
1393 static 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 ";
1394 static 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 <type 'PyClical.index_set'>\n ";
1395 static 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 ";
1396 static 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 ";
1397 static 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 ";
1398 static 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 set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type '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_se""t({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 ";
1399 static 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 ";
1400 static 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 ";
1401 static char __pyx_k_This_comparison_operator_is_not[] =
"This comparison operator is not implemented for ";
1402 static 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 ";
1403 static char __pyx_k_home_leopardi_sync_src_glucat_g[] =
"/home/leopardi/sync/src/glucat/git/dist/glucat-git/pyclical/PyClical.pyx";
1404 static char __pyx_k_index_set_sign_of_mult_line_364[] =
"index_set.sign_of_mult (line 364)";
1405 static 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 ";
1406 static char __pyx_k_Cannot_initialize_clifford_objec[] =
"Cannot initialize clifford object from";
1407 static char __pyx_k_Cannot_initialize_index_set_obje[] =
"Cannot initialize index_set object from";
1408 static 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 ";
1409 static 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 ";
1410 static 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 ";
1411 static 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 ";
1412 static 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 ";
1413 static char __pyx_k_clifford_hidden_doctests_line_12[] =
"clifford_hidden_doctests (line 1243)";
1414 static char __pyx_k_index_set_hidden_doctests_line_4[] =
"index_set_hidden_doctests (line 404)";
1415 static char __pyx_k_index_set_sign_of_square_line_37[] =
"index_set.sign_of_square (line 373)";
1416 static 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 ";
1417 static 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 ";
1418 static 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 ";
1419 static 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 ";
1420 static 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(2L)\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 <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type '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 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\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 ";
1421 static 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 ";
1422 static 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 ";
1423 static PyObject *__pyx_kp_s_;
1424 static PyObject *__pyx_kp_s_0_8_2;
1425 static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1426 static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1427 static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1428 static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1429 static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1430 static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1431 static PyObject *__pyx_kp_s_Cannot_reframe;
1432 static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1433 static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1434 static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1435 static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1436 static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1437 static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1438 static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1439 static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1440 static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1441 static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1442 static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1443 static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1444 static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1445 static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1446 static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1447 static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1448 static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1449 static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1450 static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1451 static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1452 static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1453 static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1454 static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1455 static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1456 static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1457 static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1458 static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1459 static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1460 static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1461 static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1462 static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1463 static PyObject *__pyx_n_s_IndexError;
1464 static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1465 static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1466 static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1467 static PyObject *__pyx_n_s_Integral;
1468 static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1469 static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1470 static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1471 static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1472 static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1473 static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1474 static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1475 static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1476 static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1477 static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1478 static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1479 static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1480 static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1481 static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1482 static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1483 static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1484 static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1485 static PyObject *__pyx_n_s_NotImplemented;
1486 static PyObject *__pyx_kp_s_Not_applicable;
1487 static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1488 static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1489 static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1490 static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1491 static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1492 static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1493 static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1494 static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1495 static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1496 static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1497 static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1498 static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1499 static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1500 static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1501 static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1502 static PyObject *__pyx_n_s_PyClical;
1503 static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1504 static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1505 static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1506 static PyObject *__pyx_n_s_Real;
1507 static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1508 static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1509 static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1510 static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1511 static PyObject *__pyx_n_s_RuntimeError;
1512 static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1513 static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1514 static PyObject *__pyx_n_s_Sequence;
1515 static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1516 static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1517 static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1518 static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1519 static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1520 static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1521 static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1522 static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1523 static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1524 static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1525 static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1526 static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1527 static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1528 static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1529 static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1530 static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1531 static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1532 static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1533 static PyObject *__pyx_kp_u_The_informal_string_representat;
1534 static PyObject *__pyx_kp_u_The_informal_string_representat_2;
1535 static PyObject *__pyx_kp_u_The_official_string_representat;
1536 static PyObject *__pyx_kp_u_The_official_string_representat_2;
1537 static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
1538 static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
1539 static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
1540 static PyObject *__pyx_n_s_TypeError;
1541 static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
1542 static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
1543 static PyObject *__pyx_n_s_ValueError;
1544 static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
1545 static PyObject *__pyx_kp_s__2;
1546 static PyObject *__pyx_kp_s__3;
1547 static PyObject *__pyx_kp_s__4;
1548 static PyObject *__pyx_kp_s__5;
1549 static PyObject *__pyx_kp_s__6;
1550 static PyObject *__pyx_kp_s__7;
1551 static PyObject *__pyx_kp_u_abs_line_1473;
1552 static PyObject *__pyx_n_s_acos;
1553 static PyObject *__pyx_kp_u_acos_line_1619;
1554 static PyObject *__pyx_n_s_acosh;
1555 static PyObject *__pyx_kp_u_acosh_line_1656;
1556 static PyObject *__pyx_kp_u_agc3_line_1844;
1557 static PyObject *__pyx_n_s_args;
1558 static PyObject *__pyx_kp_s_as_frame;
1559 static PyObject *__pyx_n_s_asin;
1560 static PyObject *__pyx_kp_u_asin_line_1698;
1561 static PyObject *__pyx_n_s_asinh;
1562 static PyObject *__pyx_kp_u_asinh_line_1733;
1563 static PyObject *__pyx_n_s_atan;
1564 static PyObject *__pyx_kp_u_atan_line_1769;
1565 static PyObject *__pyx_n_s_atanh;
1566 static PyObject *__pyx_kp_u_atanh_line_1798;
1567 static PyObject *__pyx_kp_u_cga3_line_1824;
1568 static PyObject *__pyx_kp_u_cga3std_line_1833;
1569 static PyObject *__pyx_n_s_cl;
1570 static PyObject *__pyx_kp_u_clifford___add___line_739;
1571 static PyObject *__pyx_kp_u_clifford___and___line_835;
1572 static PyObject *__pyx_kp_u_clifford___call___line_1019;
1573 static PyObject *__pyx_kp_u_clifford___div___line_895;
1574 static PyObject *__pyx_kp_u_clifford___getitem___line_706;
1575 static PyObject *__pyx_kp_u_clifford___iadd___line_750;
1576 static PyObject *__pyx_kp_u_clifford___iand___line_850;
1577 static PyObject *__pyx_kp_u_clifford___idiv___line_910;
1578 static PyObject *__pyx_kp_u_clifford___imod___line_820;
1579 static PyObject *__pyx_kp_u_clifford___imul___line_792;
1580 static PyObject *__pyx_kp_u_clifford___ior___line_949;
1581 static PyObject *__pyx_kp_u_clifford___isub___line_770;
1582 static PyObject *__pyx_kp_u_clifford___iter___line_637;
1583 static PyObject *__pyx_kp_u_clifford___ixor___line_880;
1584 static PyObject *__pyx_kp_u_clifford___mod___line_805;
1585 static PyObject *__pyx_kp_u_clifford___mul___line_779;
1586 static PyObject *__pyx_kp_u_clifford___neg___line_721;
1587 static PyObject *__pyx_kp_u_clifford___or___line_938;
1588 static PyObject *__pyx_kp_u_clifford___pos___line_730;
1589 static PyObject *__pyx_kp_u_clifford___pow___line_960;
1590 static PyObject *__pyx_kp_u_clifford___repr___line_1225;
1591 static PyObject *__pyx_kp_u_clifford___str___line_1234;
1592 static PyObject *__pyx_kp_u_clifford___sub___line_759;
1593 static PyObject *__pyx_kp_u_clifford___xor___line_865;
1594 static PyObject *__pyx_kp_u_clifford_abs_line_1174;
1595 static PyObject *__pyx_kp_u_clifford_conj_line_1137;
1596 static PyObject *__pyx_kp_u_clifford_copy_line_554;
1597 static PyObject *__pyx_kp_u_clifford_even_line_1060;
1598 static PyObject *__pyx_kp_u_clifford_frame_line_1214;
1599 static PyObject *__pyx_n_s_clifford_hidden_doctests;
1600 static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
1601 static PyObject *__pyx_kp_u_clifford_inv_line_925;
1602 static PyObject *__pyx_kp_u_clifford_involute_line_1106;
1603 static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
1604 static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
1605 static PyObject *__pyx_kp_u_clifford_norm_line_1163;
1606 static PyObject *__pyx_kp_u_clifford_odd_line_1069;
1607 static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
1608 static PyObject *__pyx_kp_u_clifford_pow_line_979;
1609 static PyObject *__pyx_kp_u_clifford_pure_line_1049;
1610 static PyObject *__pyx_kp_u_clifford_quad_line_1152;
1611 static PyObject *__pyx_kp_u_clifford_reframe_line_648;
1612 static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
1613 static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
1614 static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
1615 static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
1616 static PyObject *__pyx_n_s_close;
1617 static PyObject *__pyx_n_s_collections;
1618 static PyObject *__pyx_kp_u_compare_line_490;
1619 static PyObject *__pyx_kp_u_complexifier_line_1527;
1620 static PyObject *__pyx_n_s_conj;
1621 static PyObject *__pyx_kp_u_conj_line_1436;
1622 static PyObject *__pyx_n_s_copy;
1623 static PyObject *__pyx_n_s_cos;
1624 static PyObject *__pyx_kp_u_cos_line_1602;
1625 static PyObject *__pyx_n_s_cosh;
1626 static PyObject *__pyx_kp_u_cosh_line_1640;
1627 static PyObject *__pyx_n_s_doctest;
1628 static PyObject *__pyx_n_s_e;
1629 static PyObject *__pyx_kp_u_e_line_1887;
1630 static PyObject *__pyx_n_s_even;
1631 static PyObject *__pyx_kp_u_even_line_1388;
1632 static PyObject *__pyx_n_s_exp;
1633 static PyObject *__pyx_kp_u_exp_line_1565;
1634 static PyObject *__pyx_n_s_fill;
1635 static PyObject *__pyx_n_s_frm;
1636 static PyObject *__pyx_kp_s_from;
1637 static PyObject *__pyx_n_s_grade;
1638 static PyObject *__pyx_kp_s_home_leopardi_sync_src_glucat_g;
1639 static PyObject *__pyx_n_s_i;
1640 static PyObject *__pyx_kp_u_imag_line_1366;
1641 static PyObject *__pyx_n_s_import;
1642 static PyObject *__pyx_kp_u_index_set___and___line_269;
1643 static PyObject *__pyx_kp_u_index_set___getitem___line_189;
1644 static PyObject *__pyx_kp_u_index_set___iand___line_280;
1645 static PyObject *__pyx_kp_u_index_set___invert___line_238;
1646 static PyObject *__pyx_kp_u_index_set___ior___line_302;
1647 static PyObject *__pyx_n_s_index_set___iter;
1648 static PyObject *__pyx_kp_u_index_set___iter___line_227;
1649 static PyObject *__pyx_kp_u_index_set___ixor___line_258;
1650 static PyObject *__pyx_kp_u_index_set___or___line_291;
1651 static PyObject *__pyx_kp_u_index_set___repr___line_382;
1652 static PyObject *__pyx_kp_u_index_set___setitem___line_177;
1653 static PyObject *__pyx_kp_u_index_set___str___line_393;
1654 static PyObject *__pyx_kp_u_index_set___xor___line_247;
1655 static PyObject *__pyx_kp_u_index_set_copy_line_64;
1656 static PyObject *__pyx_kp_u_index_set_count_line_313;
1657 static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
1658 static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
1659 static PyObject *__pyx_n_s_index_set_hidden_doctests;
1660 static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
1661 static PyObject *__pyx_kp_u_index_set_max_line_349;
1662 static PyObject *__pyx_kp_u_index_set_min_line_340;
1663 static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
1664 static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
1665 static PyObject *__pyx_n_s_inv;
1666 static PyObject *__pyx_kp_u_inv_line_1329;
1667 static PyObject *__pyx_kp_s_invalid;
1668 static PyObject *__pyx_kp_s_invalid_string;
1669 static PyObject *__pyx_n_s_involute;
1670 static PyObject *__pyx_kp_u_involute_line_1406;
1671 static PyObject *__pyx_n_s_ist;
1672 static PyObject *__pyx_n_s_istpq;
1673 static PyObject *__pyx_kp_u_istpq_line_1900;
1674 static PyObject *__pyx_n_s_iter;
1675 static PyObject *__pyx_n_s_ixt;
1676 static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
1677 static PyObject *__pyx_n_s_lhs;
1678 static PyObject *__pyx_n_s_log;
1679 static PyObject *__pyx_kp_u_log_line_1579;
1680 static PyObject *__pyx_n_s_m;
1681 static PyObject *__pyx_n_s_main;
1682 static PyObject *__pyx_n_s_math;
1683 static PyObject *__pyx_n_s_max;
1684 static PyObject *__pyx_kp_u_max_abs_line_1482;
1685 static PyObject *__pyx_kp_u_max_pos_line_511;
1686 static PyObject *__pyx_n_s_min;
1687 static PyObject *__pyx_kp_u_min_neg_line_502;
1688 static PyObject *__pyx_n_s_name;
1689 static PyObject *__pyx_n_s_nbar3;
1690 static PyObject *__pyx_n_s_ninf3;
1691 static PyObject *__pyx_n_s_norm;
1692 static PyObject *__pyx_kp_u_norm_line_1462;
1693 static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
1694 static PyObject *__pyx_n_s_numbers;
1695 static PyObject *__pyx_n_s_obj;
1696 static PyObject *__pyx_n_s_odd;
1697 static PyObject *__pyx_kp_u_odd_line_1397;
1698 static PyObject *__pyx_n_s_other;
1699 static PyObject *__pyx_n_s_outer_pow;
1700 static PyObject *__pyx_kp_u_outer_pow_line_1518;
1701 static PyObject *__pyx_n_s_p;
1702 static PyObject *__pyx_n_s_pi;
1703 static PyObject *__pyx_n_s_pow;
1704 static PyObject *__pyx_kp_u_pow_line_1494;
1705 static PyObject *__pyx_n_s_pure;
1706 static PyObject *__pyx_kp_u_pure_line_1377;
1707 static PyObject *__pyx_n_s_pyx_vtable;
1708 static PyObject *__pyx_n_s_q;
1709 static PyObject *__pyx_n_s_quad;
1710 static PyObject *__pyx_kp_u_quad_line_1451;
1711 static PyObject *__pyx_kp_u_random_clifford_line_1815;
1712 static PyObject *__pyx_n_s_range;
1713 static PyObject *__pyx_kp_u_real_line_1355;
1714 static PyObject *__pyx_n_s_reverse;
1715 static PyObject *__pyx_kp_u_reverse_line_1421;
1716 static PyObject *__pyx_n_s_rhs;
1717 static PyObject *__pyx_n_s_scalar;
1718 static PyObject *__pyx_kp_u_scalar_line_1344;
1719 static PyObject *__pyx_n_s_send;
1720 static PyObject *__pyx_n_s_sin;
1721 static PyObject *__pyx_kp_u_sin_line_1679;
1722 static PyObject *__pyx_n_s_sinh;
1723 static PyObject *__pyx_kp_u_sinh_line_1719;
1724 static PyObject *__pyx_n_s_sqrt;
1725 static PyObject *__pyx_kp_u_sqrt_line_1542;
1726 static PyObject *__pyx_n_s_tan;
1727 static PyObject *__pyx_kp_u_tan_line_1752;
1728 static PyObject *__pyx_n_s_tanh;
1729 static PyObject *__pyx_kp_u_tanh_line_1786;
1730 static PyObject *__pyx_n_s_tau;
1731 static PyObject *__pyx_n_s_test;
1732 static PyObject *__pyx_n_s_test_2;
1733 static PyObject *__pyx_n_s_testmod;
1734 static PyObject *__pyx_n_s_throw;
1735 static PyObject *__pyx_kp_s_to_frame;
1736 static PyObject *__pyx_kp_s_using;
1737 static PyObject *__pyx_kp_s_using_invalid;
1738 static PyObject *__pyx_kp_s_value;
1739 static PyObject *__pyx_n_s_version;
1740 static PyObject *__pyx_n_s_xrange;
1741 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1742 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other);
1743 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1744 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1745 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);
1746 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
1747 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
1748 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1749 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1750 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1751 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1752 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1753 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1754 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1755 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1756 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1757 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1758 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1759 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1760 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1761 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1762 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1763 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1764 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1765 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1766 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1767 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1768 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1769 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1770 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1771 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt);
1772 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1773 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x);
1774 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1775 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1776 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1777 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1778 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1779 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1780 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1781 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1782 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1783 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1784 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1785 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1786 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1787 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1788 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1789 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1790 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1791 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1792 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 1793 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1795 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 1796 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1798 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1799 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1800 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1801 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy);
1802 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1803 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1804 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade);
1805 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1806 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1807 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1808 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1809 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm);
1810 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1811 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1812 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1813 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1814 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1815 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1816 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1817 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit);
1818 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1819 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1820 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1821 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1822 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1823 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1824 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1825 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1826 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1827 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1828 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1829 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1830 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1831 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1832 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1833 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1834 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1835 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1836 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1837 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1838 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1839 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1840 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1841 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1842 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1843 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1844 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1845 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1846 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1847 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1848 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1849 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1850 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1851 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1852 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1853 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1854 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1855 static PyObject *__pyx_pf_8PyClical_74random_clifford(CYTHON_UNUSED PyObject *__pyx_self,
struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill);
1856 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1857 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1858 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1859 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1860 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q);
1861 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self);
1862 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k);
1863 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k);
1864 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k);
1865 static PyObject *__pyx_float_0_0;
1866 static PyObject *__pyx_float_1_0;
1867 static PyObject *__pyx_float_2_0;
1868 static PyObject *__pyx_float_8_0;
1869 static PyObject *__pyx_int_0;
1870 static PyObject *__pyx_int_1;
1871 static PyObject *__pyx_int_4;
1872 static PyObject *__pyx_int_neg_1;
1873 static PyObject *__pyx_tuple__8;
1874 static PyObject *__pyx_tuple__9;
1875 static PyObject *__pyx_tuple__12;
1876 static PyObject *__pyx_tuple__13;
1877 static PyObject *__pyx_tuple__15;
1878 static PyObject *__pyx_tuple__17;
1879 static PyObject *__pyx_tuple__18;
1880 static PyObject *__pyx_tuple__19;
1881 static PyObject *__pyx_tuple__20;
1882 static PyObject *__pyx_tuple__21;
1883 static PyObject *__pyx_codeobj__10;
1884 static PyObject *__pyx_codeobj__11;
1885 static PyObject *__pyx_codeobj__14;
1886 static PyObject *__pyx_codeobj__16;
1887 static PyObject *__pyx_codeobj__22;
1897 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
1899 __Pyx_RefNannyDeclarations
1900 PyObject *__pyx_t_1 = NULL;
1901 PyObject *__pyx_t_2 = NULL;
1902 int __pyx_lineno = 0;
1903 const char *__pyx_filename = NULL;
1904 int __pyx_clineno = 0;
1905 __Pyx_RefNannySetupContext(
"toIndexSet", 0);
1914 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
1915 __Pyx_GOTREF(__pyx_t_1);
1916 __Pyx_INCREF(__pyx_v_obj);
1917 __Pyx_GIVEREF(__pyx_v_obj);
1918 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
1919 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
1920 __Pyx_GOTREF(__pyx_t_2);
1921 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1922 __pyx_r = (((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
1923 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1936 __Pyx_XDECREF(__pyx_t_1);
1937 __Pyx_XDECREF(__pyx_t_2);
1938 __Pyx_WriteUnraisable(
"PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
1940 __Pyx_RefNannyFinishContext();
1952 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other) {
1953 PyObject *__pyx_r = NULL;
1954 __Pyx_RefNannyDeclarations
1955 __Pyx_RefNannySetupContext(
"wrap", 0);
1964 (__pyx_v_self->instance[0]) = __pyx_v_other;
1973 __Pyx_XDECREF(__pyx_r);
1974 __Pyx_INCREF(((PyObject *)__pyx_v_self));
1975 __pyx_r = ((PyObject *)__pyx_v_self);
1988 __Pyx_XGIVEREF(__pyx_r);
1989 __Pyx_RefNannyFinishContext();
2001 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2003 __Pyx_RefNannyDeclarations
2004 __Pyx_RefNannySetupContext(
"unwrap", 0);
2013 __pyx_r = (__pyx_v_self->instance[0]);
2026 __Pyx_RefNannyFinishContext();
2038 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
2039 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch) {
2040 PyObject *__pyx_r = NULL;
2041 __Pyx_RefNannyDeclarations
2042 PyObject *__pyx_t_1 = NULL;
2043 PyObject *__pyx_t_2 = NULL;
2044 PyObject *__pyx_t_3 = NULL;
2045 PyObject *__pyx_t_4 = NULL;
2046 int __pyx_lineno = 0;
2047 const char *__pyx_filename = NULL;
2048 int __pyx_clineno = 0;
2049 __Pyx_RefNannySetupContext(
"copy", 0);
2051 if (unlikely(__pyx_skip_dispatch)) ;
2053 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2054 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2055 __Pyx_GOTREF(__pyx_t_1);
2056 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2057 __Pyx_XDECREF(__pyx_r);
2058 __Pyx_INCREF(__pyx_t_1);
2059 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2060 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
2061 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2062 if (likely(__pyx_t_4)) {
2063 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
2064 __Pyx_INCREF(__pyx_t_4);
2065 __Pyx_INCREF(
function);
2066 __Pyx_DECREF_SET(__pyx_t_3,
function);
2070 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2071 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2073 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2075 __Pyx_GOTREF(__pyx_t_2);
2076 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2077 __pyx_r = __pyx_t_2;
2079 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2082 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2092 __Pyx_XDECREF(__pyx_r);
2093 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2094 __Pyx_GOTREF(__pyx_t_1);
2095 __Pyx_INCREF(((PyObject *)__pyx_v_self));
2096 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
2097 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
2098 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2099 __Pyx_GOTREF(__pyx_t_2);
2100 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2101 __pyx_r = __pyx_t_2;
2115 __Pyx_XDECREF(__pyx_t_1);
2116 __Pyx_XDECREF(__pyx_t_2);
2117 __Pyx_XDECREF(__pyx_t_3);
2118 __Pyx_XDECREF(__pyx_t_4);
2119 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2122 __Pyx_XGIVEREF(__pyx_r);
2123 __Pyx_RefNannyFinishContext();
2128 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
2129 static char __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 ";
2130 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2131 PyObject *__pyx_r = 0;
2132 __Pyx_RefNannyDeclarations
2133 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
2134 __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2137 __Pyx_RefNannyFinishContext();
2141 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2142 PyObject *__pyx_r = NULL;
2143 __Pyx_RefNannyDeclarations
2144 PyObject *__pyx_t_1 = NULL;
2145 int __pyx_lineno = 0;
2146 const char *__pyx_filename = NULL;
2147 int __pyx_clineno = 0;
2148 __Pyx_RefNannySetupContext(
"copy", 0);
2149 __Pyx_XDECREF(__pyx_r);
2150 __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2151 __Pyx_GOTREF(__pyx_t_1);
2152 __pyx_r = __pyx_t_1;
2158 __Pyx_XDECREF(__pyx_t_1);
2159 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2162 __Pyx_XGIVEREF(__pyx_r);
2163 __Pyx_RefNannyFinishContext();
2176 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2177 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2178 PyObject *__pyx_v_other = 0;
2179 int __pyx_lineno = 0;
2180 const char *__pyx_filename = NULL;
2181 int __pyx_clineno = 0;
2183 __Pyx_RefNannyDeclarations
2184 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
2186 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2187 PyObject* values[1] = {0};
2188 values[0] = ((PyObject *)__pyx_int_0);
2189 if (unlikely(__pyx_kwds)) {
2191 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2193 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2195 default:
goto __pyx_L5_argtuple_error;
2197 kw_args = PyDict_Size(__pyx_kwds);
2201 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2202 if (value) { values[0] = value; kw_args--; }
2205 if (unlikely(kw_args > 0)) {
2206 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
2209 switch (PyTuple_GET_SIZE(__pyx_args)) {
2210 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2212 default:
goto __pyx_L5_argtuple_error;
2215 __pyx_v_other = values[0];
2217 goto __pyx_L4_argument_unpacking_done;
2218 __pyx_L5_argtuple_error:;
2219 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
2221 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2222 __Pyx_RefNannyFinishContext();
2224 __pyx_L4_argument_unpacking_done:;
2225 __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2228 __Pyx_RefNannyFinishContext();
2232 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2233 PyObject *__pyx_v_error_msg_prefix = NULL;
2234 PyObject *__pyx_v_idx = NULL;
2236 __Pyx_RefNannyDeclarations
2240 PyObject *__pyx_t_4 = NULL;
2241 PyObject *__pyx_t_5 = NULL;
2244 PyObject *__pyx_t_8 = NULL;
2245 PyObject *__pyx_t_9 = NULL;
2246 PyObject *__pyx_t_10 = NULL;
2247 Py_ssize_t __pyx_t_11;
2248 PyObject *(*__pyx_t_12)(PyObject *);
2249 PyObject *__pyx_t_13 = NULL;
2250 PyObject *__pyx_t_14 = NULL;
2251 PyObject *__pyx_t_15 = NULL;
2252 PyObject *__pyx_t_16 = NULL;
2254 int __pyx_lineno = 0;
2255 const char *__pyx_filename = NULL;
2256 int __pyx_clineno = 0;
2257 __Pyx_RefNannySetupContext(
"__cinit__", 0);
2266 __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2267 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2276 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2277 __pyx_t_2 = (__pyx_t_1 != 0);
2288 __pyx_t_3 =
new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2290 __Pyx_CppExn2PyErr();
2291 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2293 __pyx_v_self->instance = __pyx_t_3;
2312 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2313 __Pyx_GOTREF(__pyx_t_4);
2314 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2315 __Pyx_GOTREF(__pyx_t_5);
2316 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2317 __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5);
if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2318 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2319 __pyx_t_1 = (__pyx_t_2 != 0);
2329 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other);
if (unlikely((__pyx_t_6 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2331 __pyx_t_3 =
new IndexSet(((
int)__pyx_t_6));
2333 __Pyx_CppExn2PyErr();
2334 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2336 __pyx_v_self->instance = __pyx_t_3;
2355 __pyx_t_2 = PySet_Check(__pyx_v_other);
2356 __pyx_t_7 = (__pyx_t_2 != 0);
2359 __pyx_t_1 = __pyx_t_7;
2360 goto __pyx_L4_bool_binop_done;
2362 __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2363 __pyx_t_2 = (__pyx_t_7 != 0);
2364 __pyx_t_1 = __pyx_t_2;
2365 __pyx_L4_bool_binop_done:;
2366 __pyx_t_2 = (__pyx_t_1 != 0);
2377 __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2378 __Pyx_XGOTREF(__pyx_t_8);
2379 __Pyx_XGOTREF(__pyx_t_9);
2380 __Pyx_XGOTREF(__pyx_t_10);
2390 __pyx_v_self->instance =
new IndexSet();
2399 if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2400 __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2403 __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2404 __Pyx_GOTREF(__pyx_t_5);
2405 __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext;
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2408 if (likely(!__pyx_t_12)) {
2409 if (likely(PyList_CheckExact(__pyx_t_5))) {
2410 if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5))
break;
2411 #if CYTHON_COMPILING_IN_CPYTHON 2412 __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2414 __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++;
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2415 __Pyx_GOTREF(__pyx_t_4);
2418 if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5))
break;
2419 #if CYTHON_COMPILING_IN_CPYTHON 2420 __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2422 __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++;
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2423 __Pyx_GOTREF(__pyx_t_4);
2427 __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2428 if (unlikely(!__pyx_t_4)) {
2429 PyObject* exc_type = PyErr_Occurred();
2431 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2432 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2436 __Pyx_GOTREF(__pyx_t_4);
2438 __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2448 if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2458 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2468 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2469 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2470 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2471 goto __pyx_L13_try_end;
2473 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2474 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2483 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2485 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2486 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2487 __Pyx_GOTREF(__pyx_t_5);
2488 __Pyx_GOTREF(__pyx_t_4);
2489 __Pyx_GOTREF(__pyx_t_13);
2498 __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2499 __Pyx_GOTREF(__pyx_t_14);
2500 __pyx_t_15 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2501 __Pyx_GOTREF(__pyx_t_15);
2502 __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2503 __Pyx_GOTREF(__pyx_t_16);
2504 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2505 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2506 __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2507 __Pyx_GOTREF(__pyx_t_15);
2508 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2509 __pyx_t_16 = PyTuple_New(1);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2510 __Pyx_GOTREF(__pyx_t_16);
2511 __Pyx_GIVEREF(__pyx_t_15);
2512 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2514 __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_16, NULL);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2515 __Pyx_GOTREF(__pyx_t_15);
2516 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2517 __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2518 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2519 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2529 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
2531 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2532 if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2533 __Pyx_GOTREF(__pyx_t_13);
2534 __Pyx_GOTREF(__pyx_t_4);
2535 __Pyx_GOTREF(__pyx_t_5);
2544 __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2545 __Pyx_GOTREF(__pyx_t_15);
2546 __pyx_t_16 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2547 __Pyx_GOTREF(__pyx_t_16);
2548 __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_t_16);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2549 __Pyx_GOTREF(__pyx_t_14);
2550 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2551 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2552 __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2553 __Pyx_GOTREF(__pyx_t_16);
2554 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2555 __pyx_t_14 = PyTuple_New(1);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2556 __Pyx_GOTREF(__pyx_t_14);
2557 __Pyx_GIVEREF(__pyx_t_16);
2558 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
2560 __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_14, NULL);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2561 __Pyx_GOTREF(__pyx_t_16);
2562 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2563 __Pyx_Raise(__pyx_t_16, 0, 0, 0);
2564 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2565 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2567 goto __pyx_L8_except_error;
2568 __pyx_L8_except_error:;
2577 __Pyx_XGIVEREF(__pyx_t_8);
2578 __Pyx_XGIVEREF(__pyx_t_9);
2579 __Pyx_XGIVEREF(__pyx_t_10);
2580 __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
2581 goto __pyx_L1_error;
2602 __pyx_t_2 = PyString_Check(__pyx_v_other);
2603 __pyx_t_1 = (__pyx_t_2 != 0);
2614 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
2615 __Pyx_XGOTREF(__pyx_t_10);
2616 __Pyx_XGOTREF(__pyx_t_9);
2617 __Pyx_XGOTREF(__pyx_t_8);
2627 __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_other);
if (unlikely((!__pyx_t_17) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__;
goto __pyx_L20_error;}
2629 __pyx_t_3 =
new IndexSet(((
char *)__pyx_t_17));
2631 __Pyx_CppExn2PyErr();
2632 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__;
goto __pyx_L20_error;}
2634 __pyx_v_self->instance = __pyx_t_3;
2644 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2645 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2646 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2647 goto __pyx_L27_try_end;
2649 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
2650 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
2651 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
2652 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
2653 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2654 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2663 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
2665 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2666 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2667 __Pyx_GOTREF(__pyx_t_5);
2668 __Pyx_GOTREF(__pyx_t_4);
2669 __Pyx_GOTREF(__pyx_t_13);
2678 __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2679 __Pyx_GOTREF(__pyx_t_16);
2680 __pyx_t_14 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2681 __Pyx_GOTREF(__pyx_t_14);
2682 __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_t_14);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2683 __Pyx_GOTREF(__pyx_t_15);
2684 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2685 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2686 __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2687 __Pyx_GOTREF(__pyx_t_14);
2688 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2689 __pyx_t_15 = PyTuple_New(1);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2690 __Pyx_GOTREF(__pyx_t_15);
2691 __Pyx_GIVEREF(__pyx_t_14);
2692 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
2694 __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_15, NULL);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2695 __Pyx_GOTREF(__pyx_t_14);
2696 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2697 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
2698 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2699 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2701 goto __pyx_L22_except_error;
2702 __pyx_L22_except_error:;
2711 __Pyx_XGIVEREF(__pyx_t_10);
2712 __Pyx_XGIVEREF(__pyx_t_9);
2713 __Pyx_XGIVEREF(__pyx_t_8);
2714 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
2715 goto __pyx_L1_error;
2737 __pyx_t_13 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2738 __Pyx_GOTREF(__pyx_t_13);
2739 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2740 __Pyx_GOTREF(__pyx_t_4);
2741 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2742 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2743 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
2744 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2745 __Pyx_GOTREF(__pyx_t_5);
2746 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2747 __pyx_t_4 = PyNumber_Add(__pyx_t_13, __pyx_t_5);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2748 __Pyx_GOTREF(__pyx_t_4);
2749 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2750 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2751 __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2752 __Pyx_GOTREF(__pyx_t_5);
2753 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2754 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2755 __Pyx_GOTREF(__pyx_t_4);
2756 __Pyx_GIVEREF(__pyx_t_5);
2757 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
2759 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2760 __Pyx_GOTREF(__pyx_t_5);
2761 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2762 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
2763 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2764 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2780 __Pyx_XDECREF(__pyx_t_4);
2781 __Pyx_XDECREF(__pyx_t_5);
2782 __Pyx_XDECREF(__pyx_t_13);
2783 __Pyx_XDECREF(__pyx_t_14);
2784 __Pyx_XDECREF(__pyx_t_15);
2785 __Pyx_XDECREF(__pyx_t_16);
2786 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2789 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
2790 __Pyx_XDECREF(__pyx_v_idx);
2791 __Pyx_RefNannyFinishContext();
2804 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self);
2805 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
2806 __Pyx_RefNannyDeclarations
2807 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
2808 __pyx_pf_8PyClical_9index_set_4__dealloc__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2811 __Pyx_RefNannyFinishContext();
2814 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2815 __Pyx_RefNannyDeclarations
2816 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
2825 delete __pyx_v_self->instance;
2836 __Pyx_RefNannyFinishContext();
2848 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
2849 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2850 PyObject *__pyx_r = 0;
2851 __Pyx_RefNannyDeclarations
2852 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
2853 __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
2856 __Pyx_RefNannyFinishContext();
2860 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2861 PyObject *__pyx_v_eq = NULL;
2862 PyObject *__pyx_v_lt = NULL;
2863 PyObject *__pyx_r = NULL;
2864 __Pyx_RefNannyDeclarations
2868 PyObject *__pyx_t_4 = NULL;
2869 int __pyx_lineno = 0;
2870 const char *__pyx_filename = NULL;
2871 int __pyx_clineno = 0;
2872 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
2881 __pyx_t_2 = (__pyx_v_lhs == Py_None);
2882 __pyx_t_3 = (__pyx_t_2 != 0);
2885 __pyx_t_1 = __pyx_t_3;
2886 goto __pyx_L4_bool_binop_done;
2888 __pyx_t_3 = (__pyx_v_rhs == Py_None);
2889 __pyx_t_2 = (__pyx_t_3 != 0);
2890 __pyx_t_1 = __pyx_t_2;
2891 __pyx_L4_bool_binop_done:;
2901 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
2902 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2903 __Pyx_GOTREF(__pyx_t_4);
2904 __pyx_v_eq = __pyx_t_4;
2914 switch (__pyx_v_op) {
2924 __Pyx_XDECREF(__pyx_r);
2925 __Pyx_INCREF(__pyx_v_eq);
2926 __pyx_r = __pyx_v_eq;
2954 __Pyx_XDECREF(__pyx_r);
2955 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2956 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2957 __Pyx_GOTREF(__pyx_t_4);
2958 __pyx_r = __pyx_t_4;
2979 __pyx_t_1 = ((__pyx_v_op == 0) != 0);
2989 __Pyx_XDECREF(__pyx_r);
2990 __Pyx_INCREF(Py_False);
3010 __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3020 __Pyx_XDECREF(__pyx_r);
3021 __Pyx_INCREF(__pyx_v_eq);
3022 __pyx_r = __pyx_v_eq;
3041 __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3051 __Pyx_XDECREF(__pyx_r);
3052 __Pyx_INCREF(Py_False);
3072 __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3082 __Pyx_XDECREF(__pyx_r);
3083 __Pyx_INCREF(__pyx_v_eq);
3084 __pyx_r = __pyx_v_eq;
3104 __Pyx_XDECREF(__pyx_r);
3105 __Pyx_INCREF(__pyx_builtin_NotImplemented);
3106 __pyx_r = __pyx_builtin_NotImplemented;
3129 __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3130 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3131 __Pyx_GOTREF(__pyx_t_4);
3132 __pyx_v_eq = __pyx_t_4;
3142 switch (__pyx_v_op) {
3152 __Pyx_XDECREF(__pyx_r);
3153 __Pyx_INCREF(__pyx_v_eq);
3154 __pyx_r = __pyx_v_eq;
3182 __Pyx_XDECREF(__pyx_r);
3183 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3184 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3185 __Pyx_GOTREF(__pyx_t_4);
3186 __pyx_r = __pyx_t_4;
3207 __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3208 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3209 __Pyx_GOTREF(__pyx_t_4);
3210 __pyx_v_lt = __pyx_t_4;
3220 __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3230 __Pyx_XDECREF(__pyx_r);
3231 __Pyx_INCREF(__pyx_v_lt);
3232 __pyx_r = __pyx_v_lt;
3251 __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3261 __Pyx_XDECREF(__pyx_r);
3262 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3265 __Pyx_INCREF(__pyx_v_lt);
3266 __pyx_t_4 = __pyx_v_lt;
3267 goto __pyx_L8_bool_binop_done;
3269 __Pyx_INCREF(__pyx_v_eq);
3270 __pyx_t_4 = __pyx_v_eq;
3271 __pyx_L8_bool_binop_done:;
3272 __pyx_r = __pyx_t_4;
3292 __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3302 __Pyx_XDECREF(__pyx_r);
3303 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3306 __pyx_t_1 = __pyx_t_2;
3307 goto __pyx_L10_bool_binop_done;
3309 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3310 __pyx_t_1 = __pyx_t_2;
3311 __pyx_L10_bool_binop_done:;
3312 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3313 __Pyx_GOTREF(__pyx_t_4);
3314 __pyx_r = __pyx_t_4;
3334 __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3344 __Pyx_XDECREF(__pyx_r);
3345 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3346 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3347 __Pyx_GOTREF(__pyx_t_4);
3348 __pyx_r = __pyx_t_4;
3369 __Pyx_XDECREF(__pyx_r);
3370 __Pyx_INCREF(__pyx_builtin_NotImplemented);
3371 __pyx_r = __pyx_builtin_NotImplemented;
3388 __Pyx_XDECREF(__pyx_t_4);
3389 __Pyx_AddTraceback(
"PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3392 __Pyx_XDECREF(__pyx_v_eq);
3393 __Pyx_XDECREF(__pyx_v_lt);
3394 __Pyx_XGIVEREF(__pyx_r);
3395 __Pyx_RefNannyFinishContext();
3408 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val);
3409 static char __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 ";
3410 #if CYTHON_COMPILING_IN_CPYTHON 3411 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3413 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3415 __Pyx_RefNannyDeclarations
3416 __Pyx_RefNannySetupContext(
"__setitem__ (wrapper)", 0);
3417 __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));
3420 __Pyx_RefNannyFinishContext();
3424 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) {
3426 __Pyx_RefNannyDeclarations
3429 int __pyx_lineno = 0;
3430 const char *__pyx_filename = NULL;
3431 int __pyx_clineno = 0;
3432 __Pyx_RefNannySetupContext(
"__setitem__", 0);
3441 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3442 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val);
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3444 __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3446 __Pyx_CppExn2PyErr();
3447 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3470 __Pyx_AddTraceback(
"PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3473 __Pyx_RefNannyFinishContext();
3486 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3487 static char __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 ";
3488 #if CYTHON_COMPILING_IN_CPYTHON 3489 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3491 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3492 PyObject *__pyx_r = 0;
3493 __Pyx_RefNannyDeclarations
3494 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
3495 __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3498 __Pyx_RefNannyFinishContext();
3502 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3503 PyObject *__pyx_r = NULL;
3504 __Pyx_RefNannyDeclarations
3506 PyObject *__pyx_t_2 = NULL;
3507 int __pyx_lineno = 0;
3508 const char *__pyx_filename = NULL;
3509 int __pyx_clineno = 0;
3510 __Pyx_RefNannySetupContext(
"__getitem__", 0);
3519 __Pyx_XDECREF(__pyx_r);
3520 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3521 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3522 __Pyx_GOTREF(__pyx_t_2);
3523 __pyx_r = __pyx_t_2;
3537 __Pyx_XDECREF(__pyx_t_2);
3538 __Pyx_AddTraceback(
"PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3541 __Pyx_XGIVEREF(__pyx_r);
3542 __Pyx_RefNannyFinishContext();
3555 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3556 static char __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 ";
3557 #if CYTHON_COMPILING_IN_CPYTHON 3558 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
3560 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3562 __Pyx_RefNannyDeclarations
3563 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
3564 __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3567 __Pyx_RefNannyFinishContext();
3571 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3573 __Pyx_RefNannyDeclarations
3575 int __pyx_lineno = 0;
3576 const char *__pyx_filename = NULL;
3577 int __pyx_clineno = 0;
3578 __Pyx_RefNannySetupContext(
"__contains__", 0);
3587 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3588 __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
3601 __Pyx_AddTraceback(
"PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3604 __Pyx_RefNannyFinishContext();
3607 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value);
3618 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self);
3619 static char __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,\n -3 4 7\n ";
3620 #if CYTHON_COMPILING_IN_CPYTHON 3621 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
3623 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
3624 PyObject *__pyx_r = 0;
3625 __Pyx_RefNannyDeclarations
3626 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
3627 __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3630 __Pyx_RefNannyFinishContext();
3634 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3635 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
3636 PyObject *__pyx_r = NULL;
3637 __Pyx_RefNannyDeclarations
3638 int __pyx_lineno = 0;
3639 const char *__pyx_filename = NULL;
3640 int __pyx_clineno = 0;
3641 __Pyx_RefNannySetupContext(
"__iter__", 0);
3642 __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);
3643 if (unlikely(!__pyx_cur_scope)) {
3644 __Pyx_RefNannyFinishContext();
3647 __Pyx_GOTREF(__pyx_cur_scope);
3648 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
3649 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3650 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3652 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8PyClical_9index_set_16generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_index_set___iter);
if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3653 __Pyx_DECREF(__pyx_cur_scope);
3654 __Pyx_RefNannyFinishContext();
3655 return (PyObject *) gen;
3660 __Pyx_AddTraceback(
"PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3662 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
3663 __Pyx_XGIVEREF(__pyx_r);
3664 __Pyx_RefNannyFinishContext();
3668 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value)
3670 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
3671 PyObject *__pyx_r = NULL;
3672 PyObject *__pyx_t_1 = NULL;
3673 PyObject *__pyx_t_2 = NULL;
3674 PyObject *__pyx_t_3 = NULL;
3675 PyObject *__pyx_t_4 = NULL;
3676 Py_ssize_t __pyx_t_5;
3677 PyObject *(*__pyx_t_6)(PyObject *);
3680 int __pyx_lineno = 0;
3681 const char *__pyx_filename = NULL;
3682 int __pyx_clineno = 0;
3683 __Pyx_RefNannyDeclarations
3684 __Pyx_RefNannySetupContext(
"None", 0);
3685 switch (__pyx_generator->resume_label) {
3686 case 0:
goto __pyx_L3_first_run;
3687 case 1:
goto __pyx_L7_resume_from_yield;
3689 __Pyx_RefNannyFinishContext();
3692 __pyx_L3_first_run:;
3693 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3702 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_min);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3703 __Pyx_GOTREF(__pyx_t_2);
3705 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
3706 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3707 if (likely(__pyx_t_3)) {
3708 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3709 __Pyx_INCREF(__pyx_t_3);
3710 __Pyx_INCREF(
function);
3711 __Pyx_DECREF_SET(__pyx_t_2,
function);
3715 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3716 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3718 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3720 __Pyx_GOTREF(__pyx_t_1);
3721 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3722 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_max);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3723 __Pyx_GOTREF(__pyx_t_3);
3725 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
3726 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3727 if (likely(__pyx_t_4)) {
3728 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3729 __Pyx_INCREF(__pyx_t_4);
3730 __Pyx_INCREF(
function);
3731 __Pyx_DECREF_SET(__pyx_t_3,
function);
3735 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3736 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3738 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3740 __Pyx_GOTREF(__pyx_t_2);
3741 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3742 __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3743 __Pyx_GOTREF(__pyx_t_3);
3744 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3745 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3746 __Pyx_GOTREF(__pyx_t_2);
3747 __Pyx_GIVEREF(__pyx_t_1);
3748 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
3749 __Pyx_GIVEREF(__pyx_t_3);
3750 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
3753 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3754 __Pyx_GOTREF(__pyx_t_3);
3755 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3756 if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
3757 __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
3760 __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3761 __Pyx_GOTREF(__pyx_t_2);
3762 __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3764 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3766 if (likely(!__pyx_t_6)) {
3767 if (likely(PyList_CheckExact(__pyx_t_2))) {
3768 if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2))
break;
3769 #if CYTHON_COMPILING_IN_CPYTHON 3770 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3772 __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++;
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3773 __Pyx_GOTREF(__pyx_t_3);
3776 if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2))
break;
3777 #if CYTHON_COMPILING_IN_CPYTHON 3778 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3780 __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++;
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3781 __Pyx_GOTREF(__pyx_t_3);
3785 __pyx_t_3 = __pyx_t_6(__pyx_t_2);
3786 if (unlikely(!__pyx_t_3)) {
3787 PyObject* exc_type = PyErr_Occurred();
3789 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3790 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3794 __Pyx_GOTREF(__pyx_t_3);
3796 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
3797 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
3798 __Pyx_GIVEREF(__pyx_t_3);
3808 __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_idx, ((PyObject *)__pyx_cur_scope->__pyx_v_self), Py_EQ));
if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3809 __pyx_t_8 = (__pyx_t_7 != 0);
3819 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
3820 __pyx_r = __pyx_cur_scope->__pyx_v_idx;
3821 __Pyx_XGIVEREF(__pyx_t_2);
3822 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
3823 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
3824 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
3825 __Pyx_XGIVEREF(__pyx_r);
3826 __Pyx_RefNannyFinishContext();
3828 __pyx_generator->resume_label = 1;
3830 __pyx_L7_resume_from_yield:;
3831 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
3832 __pyx_cur_scope->__pyx_t_0 = 0;
3833 __Pyx_XGOTREF(__pyx_t_2);
3834 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
3835 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
3836 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3855 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3866 PyErr_SetNone(PyExc_StopIteration);
3869 __Pyx_XDECREF(__pyx_t_1);
3870 __Pyx_XDECREF(__pyx_t_2);
3871 __Pyx_XDECREF(__pyx_t_3);
3872 __Pyx_XDECREF(__pyx_t_4);
3873 __Pyx_AddTraceback(
"__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3875 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
3876 __pyx_generator->resume_label = -1;
3877 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
3878 __Pyx_RefNannyFinishContext();
3891 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self);
3892 static char __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 ";
3893 #if CYTHON_COMPILING_IN_CPYTHON 3894 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
3896 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
3897 PyObject *__pyx_r = 0;
3898 __Pyx_RefNannyDeclarations
3899 __Pyx_RefNannySetupContext(
"__invert__ (wrapper)", 0);
3900 __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3903 __Pyx_RefNannyFinishContext();
3907 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3908 PyObject *__pyx_r = NULL;
3909 __Pyx_RefNannyDeclarations
3910 PyObject *__pyx_t_1 = NULL;
3911 PyObject *__pyx_t_2 = NULL;
3912 int __pyx_lineno = 0;
3913 const char *__pyx_filename = NULL;
3914 int __pyx_clineno = 0;
3915 __Pyx_RefNannySetupContext(
"__invert__", 0);
3924 __Pyx_XDECREF(__pyx_r);
3925 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3926 __Pyx_GOTREF(__pyx_t_1);
3927 __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_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3928 __Pyx_GOTREF(__pyx_t_2);
3929 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3930 __pyx_r = __pyx_t_2;
3944 __Pyx_XDECREF(__pyx_t_1);
3945 __Pyx_XDECREF(__pyx_t_2);
3946 __Pyx_AddTraceback(
"PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3949 __Pyx_XGIVEREF(__pyx_r);
3950 __Pyx_RefNannyFinishContext();
3963 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3964 static char __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 ";
3965 #if CYTHON_COMPILING_IN_CPYTHON 3966 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
3968 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3969 PyObject *__pyx_r = 0;
3970 __Pyx_RefNannyDeclarations
3971 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
3972 __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3975 __Pyx_RefNannyFinishContext();
3979 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3980 PyObject *__pyx_r = NULL;
3981 __Pyx_RefNannyDeclarations
3982 PyObject *__pyx_t_1 = NULL;
3983 PyObject *__pyx_t_2 = NULL;
3984 int __pyx_lineno = 0;
3985 const char *__pyx_filename = NULL;
3986 int __pyx_clineno = 0;
3987 __Pyx_RefNannySetupContext(
"__xor__", 0);
3996 __Pyx_XDECREF(__pyx_r);
3997 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3998 __Pyx_GOTREF(__pyx_t_1);
3999 __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) ^ __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4000 __Pyx_GOTREF(__pyx_t_2);
4001 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4002 __pyx_r = __pyx_t_2;
4016 __Pyx_XDECREF(__pyx_t_1);
4017 __Pyx_XDECREF(__pyx_t_2);
4018 __Pyx_AddTraceback(
"PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4021 __Pyx_XGIVEREF(__pyx_r);
4022 __Pyx_RefNannyFinishContext();
4035 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4036 static char __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 ";
4037 #if CYTHON_COMPILING_IN_CPYTHON 4038 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4040 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4041 PyObject *__pyx_r = 0;
4042 __Pyx_RefNannyDeclarations
4043 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
4044 __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4047 __Pyx_RefNannyFinishContext();
4051 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4052 PyObject *__pyx_r = NULL;
4053 __Pyx_RefNannyDeclarations
4054 PyObject *__pyx_t_1 = NULL;
4055 int __pyx_lineno = 0;
4056 const char *__pyx_filename = NULL;
4057 int __pyx_clineno = 0;
4058 __Pyx_RefNannySetupContext(
"__ixor__", 0);
4067 __Pyx_XDECREF(__pyx_r);
4068 __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) ^ __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4069 __Pyx_GOTREF(__pyx_t_1);
4070 __pyx_r = __pyx_t_1;
4084 __Pyx_XDECREF(__pyx_t_1);
4085 __Pyx_AddTraceback(
"PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4088 __Pyx_XGIVEREF(__pyx_r);
4089 __Pyx_RefNannyFinishContext();
4102 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
4103 static char __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 ";
4104 #if CYTHON_COMPILING_IN_CPYTHON 4105 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4107 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4108 PyObject *__pyx_r = 0;
4109 __Pyx_RefNannyDeclarations
4110 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
4111 __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4114 __Pyx_RefNannyFinishContext();
4118 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4119 PyObject *__pyx_r = NULL;
4120 __Pyx_RefNannyDeclarations
4121 PyObject *__pyx_t_1 = NULL;
4122 PyObject *__pyx_t_2 = NULL;
4123 int __pyx_lineno = 0;
4124 const char *__pyx_filename = NULL;
4125 int __pyx_clineno = 0;
4126 __Pyx_RefNannySetupContext(
"__and__", 0);
4135 __Pyx_XDECREF(__pyx_r);
4136 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4137 __Pyx_GOTREF(__pyx_t_1);
4138 __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) & __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4139 __Pyx_GOTREF(__pyx_t_2);
4140 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4141 __pyx_r = __pyx_t_2;
4155 __Pyx_XDECREF(__pyx_t_1);
4156 __Pyx_XDECREF(__pyx_t_2);
4157 __Pyx_AddTraceback(
"PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4160 __Pyx_XGIVEREF(__pyx_r);
4161 __Pyx_RefNannyFinishContext();
4174 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4175 static char __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 ";
4176 #if CYTHON_COMPILING_IN_CPYTHON 4177 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4179 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4180 PyObject *__pyx_r = 0;
4181 __Pyx_RefNannyDeclarations
4182 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
4183 __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4186 __Pyx_RefNannyFinishContext();
4190 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4191 PyObject *__pyx_r = NULL;
4192 __Pyx_RefNannyDeclarations
4193 PyObject *__pyx_t_1 = NULL;
4194 int __pyx_lineno = 0;
4195 const char *__pyx_filename = NULL;
4196 int __pyx_clineno = 0;
4197 __Pyx_RefNannySetupContext(
"__iand__", 0);
4206 __Pyx_XDECREF(__pyx_r);
4207 __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) & __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4208 __Pyx_GOTREF(__pyx_t_1);
4209 __pyx_r = __pyx_t_1;
4223 __Pyx_XDECREF(__pyx_t_1);
4224 __Pyx_AddTraceback(
"PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4227 __Pyx_XGIVEREF(__pyx_r);
4228 __Pyx_RefNannyFinishContext();
4241 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
4242 static char __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 ";
4243 #if CYTHON_COMPILING_IN_CPYTHON 4244 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4246 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4247 PyObject *__pyx_r = 0;
4248 __Pyx_RefNannyDeclarations
4249 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
4250 __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4253 __Pyx_RefNannyFinishContext();
4257 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4258 PyObject *__pyx_r = NULL;
4259 __Pyx_RefNannyDeclarations
4260 PyObject *__pyx_t_1 = NULL;
4261 PyObject *__pyx_t_2 = NULL;
4262 int __pyx_lineno = 0;
4263 const char *__pyx_filename = NULL;
4264 int __pyx_clineno = 0;
4265 __Pyx_RefNannySetupContext(
"__or__", 0);
4274 __Pyx_XDECREF(__pyx_r);
4275 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4276 __Pyx_GOTREF(__pyx_t_1);
4277 __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) | __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4278 __Pyx_GOTREF(__pyx_t_2);
4279 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4280 __pyx_r = __pyx_t_2;
4294 __Pyx_XDECREF(__pyx_t_1);
4295 __Pyx_XDECREF(__pyx_t_2);
4296 __Pyx_AddTraceback(
"PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4299 __Pyx_XGIVEREF(__pyx_r);
4300 __Pyx_RefNannyFinishContext();
4313 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4314 static char __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 ";
4315 #if CYTHON_COMPILING_IN_CPYTHON 4316 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4318 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4319 PyObject *__pyx_r = 0;
4320 __Pyx_RefNannyDeclarations
4321 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
4322 __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4325 __Pyx_RefNannyFinishContext();
4329 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4330 PyObject *__pyx_r = NULL;
4331 __Pyx_RefNannyDeclarations
4332 PyObject *__pyx_t_1 = NULL;
4333 int __pyx_lineno = 0;
4334 const char *__pyx_filename = NULL;
4335 int __pyx_clineno = 0;
4336 __Pyx_RefNannySetupContext(
"__ior__", 0);
4345 __Pyx_XDECREF(__pyx_r);
4346 __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) | __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4347 __Pyx_GOTREF(__pyx_t_1);
4348 __pyx_r = __pyx_t_1;
4362 __Pyx_XDECREF(__pyx_t_1);
4363 __Pyx_AddTraceback(
"PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4366 __Pyx_XGIVEREF(__pyx_r);
4367 __Pyx_RefNannyFinishContext();
4380 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4381 static char __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 ";
4382 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4383 PyObject *__pyx_r = 0;
4384 __Pyx_RefNannyDeclarations
4385 __Pyx_RefNannySetupContext(
"count (wrapper)", 0);
4386 __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4389 __Pyx_RefNannyFinishContext();
4393 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4394 PyObject *__pyx_r = NULL;
4395 __Pyx_RefNannyDeclarations
4396 PyObject *__pyx_t_1 = NULL;
4397 int __pyx_lineno = 0;
4398 const char *__pyx_filename = NULL;
4399 int __pyx_clineno = 0;
4400 __Pyx_RefNannySetupContext(
"count", 0);
4409 __Pyx_XDECREF(__pyx_r);
4410 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4411 __Pyx_GOTREF(__pyx_t_1);
4412 __pyx_r = __pyx_t_1;
4426 __Pyx_XDECREF(__pyx_t_1);
4427 __Pyx_AddTraceback(
"PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4430 __Pyx_XGIVEREF(__pyx_r);
4431 __Pyx_RefNannyFinishContext();
4444 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4445 static char __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 ";
4446 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4447 PyObject *__pyx_r = 0;
4448 __Pyx_RefNannyDeclarations
4449 __Pyx_RefNannySetupContext(
"count_neg (wrapper)", 0);
4450 __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4453 __Pyx_RefNannyFinishContext();
4457 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4458 PyObject *__pyx_r = NULL;
4459 __Pyx_RefNannyDeclarations
4460 PyObject *__pyx_t_1 = NULL;
4461 int __pyx_lineno = 0;
4462 const char *__pyx_filename = NULL;
4463 int __pyx_clineno = 0;
4464 __Pyx_RefNannySetupContext(
"count_neg", 0);
4473 __Pyx_XDECREF(__pyx_r);
4474 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4475 __Pyx_GOTREF(__pyx_t_1);
4476 __pyx_r = __pyx_t_1;
4490 __Pyx_XDECREF(__pyx_t_1);
4491 __Pyx_AddTraceback(
"PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4494 __Pyx_XGIVEREF(__pyx_r);
4495 __Pyx_RefNannyFinishContext();
4508 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4509 static char __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 ";
4510 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4511 PyObject *__pyx_r = 0;
4512 __Pyx_RefNannyDeclarations
4513 __Pyx_RefNannySetupContext(
"count_pos (wrapper)", 0);
4514 __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4517 __Pyx_RefNannyFinishContext();
4521 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4522 PyObject *__pyx_r = NULL;
4523 __Pyx_RefNannyDeclarations
4524 PyObject *__pyx_t_1 = NULL;
4525 int __pyx_lineno = 0;
4526 const char *__pyx_filename = NULL;
4527 int __pyx_clineno = 0;
4528 __Pyx_RefNannySetupContext(
"count_pos", 0);
4537 __Pyx_XDECREF(__pyx_r);
4538 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4539 __Pyx_GOTREF(__pyx_t_1);
4540 __pyx_r = __pyx_t_1;
4554 __Pyx_XDECREF(__pyx_t_1);
4555 __Pyx_AddTraceback(
"PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4558 __Pyx_XGIVEREF(__pyx_r);
4559 __Pyx_RefNannyFinishContext();
4572 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4573 static char __pyx_doc_8PyClical_9index_set_37min[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
4574 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4575 PyObject *__pyx_r = 0;
4576 __Pyx_RefNannyDeclarations
4577 __Pyx_RefNannySetupContext(
"min (wrapper)", 0);
4578 __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4581 __Pyx_RefNannyFinishContext();
4585 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4586 PyObject *__pyx_r = NULL;
4587 __Pyx_RefNannyDeclarations
4588 PyObject *__pyx_t_1 = NULL;
4589 int __pyx_lineno = 0;
4590 const char *__pyx_filename = NULL;
4591 int __pyx_clineno = 0;
4592 __Pyx_RefNannySetupContext(
"min", 0);
4601 __Pyx_XDECREF(__pyx_r);
4602 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4603 __Pyx_GOTREF(__pyx_t_1);
4604 __pyx_r = __pyx_t_1;
4618 __Pyx_XDECREF(__pyx_t_1);
4619 __Pyx_AddTraceback(
"PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
4622 __Pyx_XGIVEREF(__pyx_r);
4623 __Pyx_RefNannyFinishContext();
4636 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4637 static char __pyx_doc_8PyClical_9index_set_39max[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
4638 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4639 PyObject *__pyx_r = 0;
4640 __Pyx_RefNannyDeclarations
4641 __Pyx_RefNannySetupContext(
"max (wrapper)", 0);
4642 __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4645 __Pyx_RefNannyFinishContext();
4649 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4650 PyObject *__pyx_r = NULL;
4651 __Pyx_RefNannyDeclarations
4652 PyObject *__pyx_t_1 = NULL;
4653 int __pyx_lineno = 0;
4654 const char *__pyx_filename = NULL;
4655 int __pyx_clineno = 0;
4656 __Pyx_RefNannySetupContext(
"max", 0);
4665 __Pyx_XDECREF(__pyx_r);
4666 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4667 __Pyx_GOTREF(__pyx_t_1);
4668 __pyx_r = __pyx_t_1;
4682 __Pyx_XDECREF(__pyx_t_1);
4683 __Pyx_AddTraceback(
"PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
4686 __Pyx_XGIVEREF(__pyx_r);
4687 __Pyx_RefNannyFinishContext();
4700 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4701 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] =
"\n Hash function.\n ";
4702 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4703 PyObject *__pyx_r = 0;
4704 __Pyx_RefNannyDeclarations
4705 __Pyx_RefNannySetupContext(
"hash_fn (wrapper)", 0);
4706 __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4709 __Pyx_RefNannyFinishContext();
4713 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4714 PyObject *__pyx_r = NULL;
4715 __Pyx_RefNannyDeclarations
4716 PyObject *__pyx_t_1 = NULL;
4717 int __pyx_lineno = 0;
4718 const char *__pyx_filename = NULL;
4719 int __pyx_clineno = 0;
4720 __Pyx_RefNannySetupContext(
"hash_fn", 0);
4729 __Pyx_XDECREF(__pyx_r);
4730 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4731 __Pyx_GOTREF(__pyx_t_1);
4732 __pyx_r = __pyx_t_1;
4746 __Pyx_XDECREF(__pyx_t_1);
4747 __Pyx_AddTraceback(
"PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
4750 __Pyx_XGIVEREF(__pyx_r);
4751 __Pyx_RefNannyFinishContext();
4764 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4765 static char __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 ";
4766 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4767 PyObject *__pyx_r = 0;
4768 __Pyx_RefNannyDeclarations
4769 __Pyx_RefNannySetupContext(
"sign_of_mult (wrapper)", 0);
4770 __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4773 __Pyx_RefNannyFinishContext();
4777 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4778 PyObject *__pyx_r = NULL;
4779 __Pyx_RefNannyDeclarations
4780 PyObject *__pyx_t_1 = NULL;
4781 int __pyx_lineno = 0;
4782 const char *__pyx_filename = NULL;
4783 int __pyx_clineno = 0;
4784 __Pyx_RefNannySetupContext(
"sign_of_mult", 0);
4793 __Pyx_XDECREF(__pyx_r);
4794 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_mult(__pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4795 __Pyx_GOTREF(__pyx_t_1);
4796 __pyx_r = __pyx_t_1;
4810 __Pyx_XDECREF(__pyx_t_1);
4811 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
4814 __Pyx_XGIVEREF(__pyx_r);
4815 __Pyx_RefNannyFinishContext();
4828 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4829 static char __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 ";
4830 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4831 PyObject *__pyx_r = 0;
4832 __Pyx_RefNannyDeclarations
4833 __Pyx_RefNannySetupContext(
"sign_of_square (wrapper)", 0);
4834 __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4837 __Pyx_RefNannyFinishContext();
4841 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4842 PyObject *__pyx_r = NULL;
4843 __Pyx_RefNannyDeclarations
4844 PyObject *__pyx_t_1 = NULL;
4845 int __pyx_lineno = 0;
4846 const char *__pyx_filename = NULL;
4847 int __pyx_clineno = 0;
4848 __Pyx_RefNannySetupContext(
"sign_of_square", 0);
4857 __Pyx_XDECREF(__pyx_r);
4858 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4859 __Pyx_GOTREF(__pyx_t_1);
4860 __pyx_r = __pyx_t_1;
4874 __Pyx_XDECREF(__pyx_t_1);
4875 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
4878 __Pyx_XGIVEREF(__pyx_r);
4879 __Pyx_RefNannyFinishContext();
4892 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self);
4893 static char __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 ";
4894 #if CYTHON_COMPILING_IN_CPYTHON 4895 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
4897 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
4898 PyObject *__pyx_r = 0;
4899 __Pyx_RefNannyDeclarations
4900 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
4901 __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4904 __Pyx_RefNannyFinishContext();
4908 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4909 PyObject *__pyx_r = NULL;
4910 __Pyx_RefNannyDeclarations
4911 PyObject *__pyx_t_1 = NULL;
4912 int __pyx_lineno = 0;
4913 const char *__pyx_filename = NULL;
4914 int __pyx_clineno = 0;
4915 __Pyx_RefNannySetupContext(
"__repr__", 0);
4924 __Pyx_XDECREF(__pyx_r);
4925 __pyx_t_1 = __Pyx_PyBytes_FromString(
index_set_to_repr(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4926 __Pyx_GOTREF(__pyx_t_1);
4927 __pyx_r = __pyx_t_1;
4941 __Pyx_XDECREF(__pyx_t_1);
4942 __Pyx_AddTraceback(
"PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4945 __Pyx_XGIVEREF(__pyx_r);
4946 __Pyx_RefNannyFinishContext();
4959 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self);
4960 static char __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 ";
4961 #if CYTHON_COMPILING_IN_CPYTHON 4962 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
4964 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
4965 PyObject *__pyx_r = 0;
4966 __Pyx_RefNannyDeclarations
4967 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
4968 __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4971 __Pyx_RefNannyFinishContext();
4975 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4976 PyObject *__pyx_r = NULL;
4977 __Pyx_RefNannyDeclarations
4978 PyObject *__pyx_t_1 = NULL;
4979 int __pyx_lineno = 0;
4980 const char *__pyx_filename = NULL;
4981 int __pyx_clineno = 0;
4982 __Pyx_RefNannySetupContext(
"__str__", 0);
4991 __Pyx_XDECREF(__pyx_r);
4992 __pyx_t_1 = __Pyx_PyBytes_FromString(
index_set_to_str(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4993 __Pyx_GOTREF(__pyx_t_1);
4994 __pyx_r = __pyx_t_1;
5008 __Pyx_XDECREF(__pyx_t_1);
5009 __Pyx_AddTraceback(
"PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5012 __Pyx_XGIVEREF(__pyx_r);
5013 __Pyx_RefNannyFinishContext();
5026 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
5027 static char __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 set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type '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_se""t({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 ";
5028 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};
5029 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5030 PyObject *__pyx_r = 0;
5031 __Pyx_RefNannyDeclarations
5032 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests (wrapper)", 0);
5033 __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5036 __Pyx_RefNannyFinishContext();
5040 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5041 PyObject *__pyx_r = NULL;
5042 __Pyx_RefNannyDeclarations
5043 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests", 0);
5052 __Pyx_XDECREF(__pyx_r);
5053 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5066 __Pyx_XGIVEREF(__pyx_r);
5067 __Pyx_RefNannyFinishContext();
5079 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5080 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5081 PyObject *__pyx_r = NULL;
5082 __Pyx_RefNannyDeclarations
5083 PyObject *__pyx_t_1 = NULL;
5084 int __pyx_lineno = 0;
5085 const char *__pyx_filename = NULL;
5086 int __pyx_clineno = 0;
5087 __Pyx_RefNannySetupContext(
"compare", 0);
5096 __Pyx_XDECREF(__pyx_r);
5097 __pyx_t_1 = __Pyx_PyInt_From_int(
compare(__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs), __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5098 __Pyx_GOTREF(__pyx_t_1);
5099 __pyx_r = __pyx_t_1;
5113 __Pyx_XDECREF(__pyx_t_1);
5114 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5117 __Pyx_XGIVEREF(__pyx_r);
5118 __Pyx_RefNannyFinishContext();
5123 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5124 static char __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 ";
5125 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5126 PyObject *__pyx_v_lhs = 0;
5127 PyObject *__pyx_v_rhs = 0;
5128 int __pyx_lineno = 0;
5129 const char *__pyx_filename = NULL;
5130 int __pyx_clineno = 0;
5131 PyObject *__pyx_r = 0;
5132 __Pyx_RefNannyDeclarations
5133 __Pyx_RefNannySetupContext(
"compare (wrapper)", 0);
5135 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5136 PyObject* values[2] = {0,0};
5137 if (unlikely(__pyx_kwds)) {
5139 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5141 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5142 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5144 default:
goto __pyx_L5_argtuple_error;
5146 kw_args = PyDict_Size(__pyx_kwds);
5149 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5150 else goto __pyx_L5_argtuple_error;
5152 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5154 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
5157 if (unlikely(kw_args > 0)) {
5158 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"compare") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
5160 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5161 goto __pyx_L5_argtuple_error;
5163 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5164 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5166 __pyx_v_lhs = values[0];
5167 __pyx_v_rhs = values[1];
5169 goto __pyx_L4_argument_unpacking_done;
5170 __pyx_L5_argtuple_error:;
5171 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
5173 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5174 __Pyx_RefNannyFinishContext();
5176 __pyx_L4_argument_unpacking_done:;
5177 __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5180 __Pyx_RefNannyFinishContext();
5184 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5185 PyObject *__pyx_r = NULL;
5186 __Pyx_RefNannyDeclarations
5187 PyObject *__pyx_t_1 = NULL;
5188 int __pyx_lineno = 0;
5189 const char *__pyx_filename = NULL;
5190 int __pyx_clineno = 0;
5191 __Pyx_RefNannySetupContext(
"compare", 0);
5192 __Pyx_XDECREF(__pyx_r);
5193 __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5194 __Pyx_GOTREF(__pyx_t_1);
5195 __pyx_r = __pyx_t_1;
5201 __Pyx_XDECREF(__pyx_t_1);
5202 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5205 __Pyx_XGIVEREF(__pyx_r);
5206 __Pyx_RefNannyFinishContext();
5218 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5219 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5220 PyObject *__pyx_r = NULL;
5221 __Pyx_RefNannyDeclarations
5222 PyObject *__pyx_t_1 = NULL;
5223 int __pyx_lineno = 0;
5224 const char *__pyx_filename = NULL;
5225 int __pyx_clineno = 0;
5226 __Pyx_RefNannySetupContext(
"min_neg", 0);
5235 __Pyx_XDECREF(__pyx_r);
5236 __pyx_t_1 = __Pyx_PyInt_From_int(
min_neg(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5237 __Pyx_GOTREF(__pyx_t_1);
5238 __pyx_r = __pyx_t_1;
5252 __Pyx_XDECREF(__pyx_t_1);
5253 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5256 __Pyx_XGIVEREF(__pyx_r);
5257 __Pyx_RefNannyFinishContext();
5262 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5263 static char __pyx_doc_8PyClical_4min_neg[] =
"\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ";
5264 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5265 PyObject *__pyx_r = 0;
5266 __Pyx_RefNannyDeclarations
5267 __Pyx_RefNannySetupContext(
"min_neg (wrapper)", 0);
5268 __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5271 __Pyx_RefNannyFinishContext();
5275 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5276 PyObject *__pyx_r = NULL;
5277 __Pyx_RefNannyDeclarations
5278 PyObject *__pyx_t_1 = NULL;
5279 int __pyx_lineno = 0;
5280 const char *__pyx_filename = NULL;
5281 int __pyx_clineno = 0;
5282 __Pyx_RefNannySetupContext(
"min_neg", 0);
5283 __Pyx_XDECREF(__pyx_r);
5284 __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5285 __Pyx_GOTREF(__pyx_t_1);
5286 __pyx_r = __pyx_t_1;
5292 __Pyx_XDECREF(__pyx_t_1);
5293 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5296 __Pyx_XGIVEREF(__pyx_r);
5297 __Pyx_RefNannyFinishContext();
5309 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5310 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5311 PyObject *__pyx_r = NULL;
5312 __Pyx_RefNannyDeclarations
5313 PyObject *__pyx_t_1 = NULL;
5314 int __pyx_lineno = 0;
5315 const char *__pyx_filename = NULL;
5316 int __pyx_clineno = 0;
5317 __Pyx_RefNannySetupContext(
"max_pos", 0);
5326 __Pyx_XDECREF(__pyx_r);
5327 __pyx_t_1 = __Pyx_PyInt_From_int(
max_pos(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5328 __Pyx_GOTREF(__pyx_t_1);
5329 __pyx_r = __pyx_t_1;
5343 __Pyx_XDECREF(__pyx_t_1);
5344 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5347 __Pyx_XGIVEREF(__pyx_r);
5348 __Pyx_RefNannyFinishContext();
5353 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5354 static char __pyx_doc_8PyClical_6max_pos[] =
"\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ";
5355 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5356 PyObject *__pyx_r = 0;
5357 __Pyx_RefNannyDeclarations
5358 __Pyx_RefNannySetupContext(
"max_pos (wrapper)", 0);
5359 __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5362 __Pyx_RefNannyFinishContext();
5366 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5367 PyObject *__pyx_r = NULL;
5368 __Pyx_RefNannyDeclarations
5369 PyObject *__pyx_t_1 = NULL;
5370 int __pyx_lineno = 0;
5371 const char *__pyx_filename = NULL;
5372 int __pyx_clineno = 0;
5373 __Pyx_RefNannySetupContext(
"max_pos", 0);
5374 __Pyx_XDECREF(__pyx_r);
5375 __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5376 __Pyx_GOTREF(__pyx_t_1);
5377 __pyx_r = __pyx_t_1;
5383 __Pyx_XDECREF(__pyx_t_1);
5384 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5387 __Pyx_XGIVEREF(__pyx_r);
5388 __Pyx_RefNannyFinishContext();
5400 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5401 std::vector<scalar_t> __pyx_v_v;
5402 PyObject *__pyx_v_s = NULL;
5403 std::vector<scalar_t> __pyx_r;
5404 __Pyx_RefNannyDeclarations
5405 PyObject *__pyx_t_1 = NULL;
5406 Py_ssize_t __pyx_t_2;
5407 PyObject *(*__pyx_t_3)(PyObject *);
5408 PyObject *__pyx_t_4 = NULL;
5410 int __pyx_lineno = 0;
5411 const char *__pyx_filename = NULL;
5412 int __pyx_clineno = 0;
5413 __Pyx_RefNannySetupContext(
"list_to_vector", 0);
5422 if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5423 __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5426 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5427 __Pyx_GOTREF(__pyx_t_1);
5428 __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5431 if (likely(!__pyx_t_3)) {
5432 if (likely(PyList_CheckExact(__pyx_t_1))) {
5433 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1))
break;
5434 #if CYTHON_COMPILING_IN_CPYTHON 5435 __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_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5437 __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++;
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5438 __Pyx_GOTREF(__pyx_t_4);
5441 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1))
break;
5442 #if CYTHON_COMPILING_IN_CPYTHON 5443 __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_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5445 __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++;
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5446 __Pyx_GOTREF(__pyx_t_4);
5450 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5451 if (unlikely(!__pyx_t_4)) {
5452 PyObject* exc_type = PyErr_Occurred();
5454 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5455 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5459 __Pyx_GOTREF(__pyx_t_4);
5461 __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5471 __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s);
if (unlikely((__pyx_t_5 == (
scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5473 __pyx_v_v.push_back(((
scalar_t)__pyx_t_5));
5475 __Pyx_CppExn2PyErr();
5476 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5487 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5496 __pyx_r = __pyx_v_v;
5509 __Pyx_XDECREF(__pyx_t_1);
5510 __Pyx_XDECREF(__pyx_t_4);
5511 __Pyx_WriteUnraisable(
"PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
5513 __Pyx_XDECREF(__pyx_v_s);
5514 __Pyx_RefNannyFinishContext();
5526 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
5528 __Pyx_RefNannyDeclarations
5529 PyObject *__pyx_t_1 = NULL;
5530 PyObject *__pyx_t_2 = NULL;
5531 int __pyx_lineno = 0;
5532 const char *__pyx_filename = NULL;
5533 int __pyx_clineno = 0;
5534 __Pyx_RefNannySetupContext(
"toClifford", 0);
5543 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5544 __Pyx_GOTREF(__pyx_t_1);
5545 __Pyx_INCREF(__pyx_v_obj);
5546 __Pyx_GIVEREF(__pyx_v_obj);
5547 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
5548 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5549 __Pyx_GOTREF(__pyx_t_2);
5550 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5551 __pyx_r = (((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
5552 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5565 __Pyx_XDECREF(__pyx_t_1);
5566 __Pyx_XDECREF(__pyx_t_2);
5567 __Pyx_WriteUnraisable(
"PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
5569 __Pyx_RefNannyFinishContext();
5581 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other) {
5582 PyObject *__pyx_r = NULL;
5583 __Pyx_RefNannyDeclarations
5584 __Pyx_RefNannySetupContext(
"wrap", 0);
5593 (__pyx_v_self->instance[0]) = __pyx_v_other;
5602 __Pyx_XDECREF(__pyx_r);
5603 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5604 __pyx_r = ((PyObject *)__pyx_v_self);
5617 __Pyx_XGIVEREF(__pyx_r);
5618 __Pyx_RefNannyFinishContext();
5630 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5632 __Pyx_RefNannyDeclarations
5633 __Pyx_RefNannySetupContext(
"unwrap", 0);
5642 __pyx_r = (__pyx_v_self->instance[0]);
5655 __Pyx_RefNannyFinishContext();
5667 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5668 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch) {
5669 PyObject *__pyx_r = NULL;
5670 __Pyx_RefNannyDeclarations
5671 PyObject *__pyx_t_1 = NULL;
5672 PyObject *__pyx_t_2 = NULL;
5673 PyObject *__pyx_t_3 = NULL;
5674 PyObject *__pyx_t_4 = NULL;
5675 int __pyx_lineno = 0;
5676 const char *__pyx_filename = NULL;
5677 int __pyx_clineno = 0;
5678 __Pyx_RefNannySetupContext(
"copy", 0);
5680 if (unlikely(__pyx_skip_dispatch)) ;
5682 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
5683 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5684 __Pyx_GOTREF(__pyx_t_1);
5685 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
5686 __Pyx_XDECREF(__pyx_r);
5687 __Pyx_INCREF(__pyx_t_1);
5688 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
5689 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
5690 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5691 if (likely(__pyx_t_4)) {
5692 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
5693 __Pyx_INCREF(__pyx_t_4);
5694 __Pyx_INCREF(
function);
5695 __Pyx_DECREF_SET(__pyx_t_3,
function);
5699 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5700 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5702 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5704 __Pyx_GOTREF(__pyx_t_2);
5705 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5706 __pyx_r = __pyx_t_2;
5708 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5711 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5721 __Pyx_XDECREF(__pyx_r);
5722 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5723 __Pyx_GOTREF(__pyx_t_1);
5724 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5725 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5726 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
5727 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5728 __Pyx_GOTREF(__pyx_t_2);
5729 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5730 __pyx_r = __pyx_t_2;
5744 __Pyx_XDECREF(__pyx_t_1);
5745 __Pyx_XDECREF(__pyx_t_2);
5746 __Pyx_XDECREF(__pyx_t_3);
5747 __Pyx_XDECREF(__pyx_t_4);
5748 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5751 __Pyx_XGIVEREF(__pyx_r);
5752 __Pyx_RefNannyFinishContext();
5757 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5758 static char __pyx_doc_8PyClical_8clifford_copy[] =
"\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print y\n {2}\n ";
5759 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5760 PyObject *__pyx_r = 0;
5761 __Pyx_RefNannyDeclarations
5762 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
5763 __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
5766 __Pyx_RefNannyFinishContext();
5770 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5771 PyObject *__pyx_r = NULL;
5772 __Pyx_RefNannyDeclarations
5773 PyObject *__pyx_t_1 = NULL;
5774 int __pyx_lineno = 0;
5775 const char *__pyx_filename = NULL;
5776 int __pyx_clineno = 0;
5777 __Pyx_RefNannySetupContext(
"copy", 0);
5778 __Pyx_XDECREF(__pyx_r);
5779 __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5780 __Pyx_GOTREF(__pyx_t_1);
5781 __pyx_r = __pyx_t_1;
5787 __Pyx_XDECREF(__pyx_t_1);
5788 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5791 __Pyx_XGIVEREF(__pyx_r);
5792 __Pyx_RefNannyFinishContext();
5805 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5806 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5807 PyObject *__pyx_v_other = 0;
5808 PyObject *__pyx_v_ixt = 0;
5809 int __pyx_lineno = 0;
5810 const char *__pyx_filename = NULL;
5811 int __pyx_clineno = 0;
5813 __Pyx_RefNannyDeclarations
5814 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
5816 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
5817 PyObject* values[2] = {0,0};
5818 values[0] = ((PyObject *)__pyx_int_0);
5819 values[1] = ((PyObject *)Py_None);
5820 if (unlikely(__pyx_kwds)) {
5822 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5824 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5825 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5827 default:
goto __pyx_L5_argtuple_error;
5829 kw_args = PyDict_Size(__pyx_kwds);
5833 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
5834 if (value) { values[0] = value; kw_args--; }
5838 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
5839 if (value) { values[1] = value; kw_args--; }
5842 if (unlikely(kw_args > 0)) {
5843 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
5846 switch (PyTuple_GET_SIZE(__pyx_args)) {
5847 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5848 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5850 default:
goto __pyx_L5_argtuple_error;
5853 __pyx_v_other = values[0];
5854 __pyx_v_ixt = values[1];
5856 goto __pyx_L4_argument_unpacking_done;
5857 __pyx_L5_argtuple_error:;
5858 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
5860 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5861 __Pyx_RefNannyFinishContext();
5863 __pyx_L4_argument_unpacking_done:;
5864 __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
5867 __Pyx_RefNannyFinishContext();
5871 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
5872 PyObject *__pyx_v_error_msg_prefix = NULL;
5873 PyObject *__pyx_v_err = NULL;
5875 __Pyx_RefNannyDeclarations
5878 PyObject *__pyx_t_3 = NULL;
5879 PyObject *__pyx_t_4 = NULL;
5880 PyObject *__pyx_t_5 = NULL;
5882 PyObject *__pyx_t_7 = NULL;
5883 PyObject *__pyx_t_8 = NULL;
5885 PyObject *__pyx_t_10 = NULL;
5886 PyObject *__pyx_t_11 = NULL;
5887 PyObject *__pyx_t_12 = NULL;
5890 PyObject *__pyx_t_15 = NULL;
5891 PyObject *__pyx_t_16 = NULL;
5892 PyObject *__pyx_t_17 = NULL;
5893 PyObject *__pyx_t_18 = NULL;
5894 int __pyx_lineno = 0;
5895 const char *__pyx_filename = NULL;
5896 int __pyx_clineno = 0;
5897 __Pyx_RefNannySetupContext(
"__cinit__", 0);
5906 __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
5907 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
5916 __pyx_t_1 = (__pyx_v_ixt == Py_None);
5917 __pyx_t_2 = (__pyx_t_1 != 0);
5928 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
5929 __Pyx_XGOTREF(__pyx_t_3);
5930 __Pyx_XGOTREF(__pyx_t_4);
5931 __Pyx_XGOTREF(__pyx_t_5);
5941 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
5942 __pyx_t_1 = (__pyx_t_2 != 0);
5953 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
5955 __Pyx_CppExn2PyErr();
5956 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5958 __pyx_v_self->instance = __pyx_t_6;
5977 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
5978 __pyx_t_2 = (__pyx_t_1 != 0);
5989 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((
scalar_t)1.0));
5991 __Pyx_CppExn2PyErr();
5992 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5994 __pyx_v_self->instance = __pyx_t_6;
6013 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6014 __Pyx_GOTREF(__pyx_t_7);
6015 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Real);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6016 __Pyx_GOTREF(__pyx_t_8);
6017 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6018 __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8);
if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6019 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6020 __pyx_t_1 = (__pyx_t_2 != 0);
6030 __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other);
if (unlikely((__pyx_t_9 == (
scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6034 __Pyx_CppExn2PyErr();
6035 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6037 __pyx_v_self->instance = __pyx_t_6;
6056 __pyx_t_1 = PyString_Check(__pyx_v_other);
6057 __pyx_t_2 = (__pyx_t_1 != 0);
6068 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6069 __Pyx_XGOTREF(__pyx_t_10);
6070 __Pyx_XGOTREF(__pyx_t_11);
6071 __Pyx_XGOTREF(__pyx_t_12);
6081 __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_v_other);
if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__;
goto __pyx_L13_error;}
6083 __pyx_t_6 =
new Clifford(((
char *)__pyx_t_13));
6085 __Pyx_CppExn2PyErr();
6086 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__;
goto __pyx_L13_error;}
6088 __pyx_v_self->instance = __pyx_t_6;
6098 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6099 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6100 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6101 goto __pyx_L20_try_end;
6103 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6104 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6113 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6115 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6116 if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6117 __Pyx_GOTREF(__pyx_t_8);
6118 __Pyx_GOTREF(__pyx_t_7);
6119 __Pyx_GOTREF(__pyx_t_15);
6128 __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6129 __Pyx_GOTREF(__pyx_t_16);
6130 __pyx_t_17 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6131 __Pyx_GOTREF(__pyx_t_17);
6132 __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6133 __Pyx_GOTREF(__pyx_t_18);
6134 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6135 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6136 __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_);
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6137 __Pyx_GOTREF(__pyx_t_17);
6138 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6139 __pyx_t_18 = PyTuple_New(1);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6140 __Pyx_GOTREF(__pyx_t_18);
6141 __Pyx_GIVEREF(__pyx_t_17);
6142 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
6144 __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_18, NULL);
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6145 __Pyx_GOTREF(__pyx_t_17);
6146 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6147 __Pyx_Raise(__pyx_t_17, 0, 0, 0);
6148 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6149 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6151 goto __pyx_L15_except_error;
6152 __pyx_L15_except_error:;
6161 __Pyx_XGIVEREF(__pyx_t_10);
6162 __Pyx_XGIVEREF(__pyx_t_11);
6163 __Pyx_XGIVEREF(__pyx_t_12);
6164 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6165 goto __pyx_L4_error;
6187 __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6188 __Pyx_GOTREF(__pyx_t_15);
6189 __pyx_t_7 = PyTuple_New(1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6190 __Pyx_GOTREF(__pyx_t_7);
6191 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6192 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6193 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6194 __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6195 __Pyx_GOTREF(__pyx_t_8);
6196 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6197 __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6198 __Pyx_GOTREF(__pyx_t_7);
6199 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6200 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6201 __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6202 __Pyx_GOTREF(__pyx_t_8);
6203 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6204 __pyx_t_7 = PyTuple_New(1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6205 __Pyx_GOTREF(__pyx_t_7);
6206 __Pyx_GIVEREF(__pyx_t_8);
6207 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
6209 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6210 __Pyx_GOTREF(__pyx_t_8);
6211 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6212 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6213 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6214 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6226 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6227 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6228 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6229 goto __pyx_L11_try_end;
6231 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6232 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6233 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6234 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6235 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6236 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6245 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6247 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6248 if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6249 __Pyx_GOTREF(__pyx_t_8);
6250 __Pyx_GOTREF(__pyx_t_7);
6251 __Pyx_GOTREF(__pyx_t_15);
6252 __Pyx_INCREF(__pyx_t_7);
6253 __pyx_v_err = __pyx_t_7;
6262 __pyx_t_17 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2);
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6263 __Pyx_GOTREF(__pyx_t_17);
6264 __pyx_t_18 = PyTuple_New(1);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6265 __Pyx_GOTREF(__pyx_t_18);
6266 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6267 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6268 PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6269 __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_18, NULL);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6270 __Pyx_GOTREF(__pyx_t_16);
6271 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6272 __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6273 __Pyx_GOTREF(__pyx_t_18);
6274 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6275 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6284 __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_value);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6285 __Pyx_GOTREF(__pyx_t_16);
6286 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6287 __pyx_t_18 = PyObject_Repr(__pyx_v_other);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6288 __Pyx_GOTREF(__pyx_t_18);
6289 __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_t_18);
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6290 __Pyx_GOTREF(__pyx_t_17);
6291 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6292 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6293 __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_kp_s__3);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6294 __Pyx_GOTREF(__pyx_t_18);
6295 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6304 __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s__4);
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6305 __Pyx_GOTREF(__pyx_t_17);
6306 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6307 __pyx_t_18 = PyTuple_New(1);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6308 __Pyx_GOTREF(__pyx_t_18);
6309 __Pyx_INCREF(__pyx_v_err);
6310 __Pyx_GIVEREF(__pyx_v_err);
6311 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
6312 __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_18, NULL);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6313 __Pyx_GOTREF(__pyx_t_16);
6314 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6315 __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6316 __Pyx_GOTREF(__pyx_t_18);
6317 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6318 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6327 __pyx_t_16 = PyTuple_New(1);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6328 __Pyx_GOTREF(__pyx_t_16);
6329 __Pyx_GIVEREF(__pyx_t_18);
6330 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
6332 __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_16, NULL);
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6333 __Pyx_GOTREF(__pyx_t_18);
6334 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6335 __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6336 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6337 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6339 goto __pyx_L6_except_error;
6340 __pyx_L6_except_error:;
6349 __Pyx_XGIVEREF(__pyx_t_3);
6350 __Pyx_XGIVEREF(__pyx_t_4);
6351 __Pyx_XGIVEREF(__pyx_t_5);
6352 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6353 goto __pyx_L1_error;
6374 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6375 __pyx_t_1 = (__pyx_t_2 != 0);
6385 __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6386 __Pyx_GOTREF(__pyx_t_15);
6387 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_Real);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6388 __Pyx_GOTREF(__pyx_t_7);
6389 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6390 __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7);
if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6391 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6392 __pyx_t_2 = (__pyx_t_1 != 0);
6402 __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other);
if (unlikely((__pyx_t_9 == (
scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6404 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt)), ((
scalar_t)__pyx_t_9));
6406 __Pyx_CppExn2PyErr();
6407 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6409 __pyx_v_self->instance = __pyx_t_6;
6428 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6429 __Pyx_GOTREF(__pyx_t_7);
6430 __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Sequence);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6431 __Pyx_GOTREF(__pyx_t_15);
6432 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6433 __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_15);
if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6434 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6435 __pyx_t_1 = (__pyx_t_2 != 0);
6446 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_list_to_vector(__pyx_v_other), __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt)));
6448 __Pyx_CppExn2PyErr();
6449 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6451 __pyx_v_self->instance = __pyx_t_6;
6471 __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__5);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6472 __Pyx_GOTREF(__pyx_t_15);
6473 __pyx_t_7 = PyTuple_New(1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6474 __Pyx_GOTREF(__pyx_t_7);
6475 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6476 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6477 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6478 __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6479 __Pyx_GOTREF(__pyx_t_8);
6480 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6481 __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6482 __Pyx_GOTREF(__pyx_t_7);
6483 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6484 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6493 __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__6);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6494 __Pyx_GOTREF(__pyx_t_8);
6495 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6496 __pyx_t_7 = PyObject_Repr(__pyx_v_ixt);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6497 __Pyx_GOTREF(__pyx_t_7);
6498 __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6499 __Pyx_GOTREF(__pyx_t_15);
6500 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6501 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6502 __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__7);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6503 __Pyx_GOTREF(__pyx_t_7);
6504 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6513 __pyx_t_15 = PyTuple_New(1);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6514 __Pyx_GOTREF(__pyx_t_15);
6515 __Pyx_GIVEREF(__pyx_t_7);
6516 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6518 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_15, NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6519 __Pyx_GOTREF(__pyx_t_7);
6520 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6521 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6522 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6523 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6545 __pyx_t_7 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__5);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6546 __Pyx_GOTREF(__pyx_t_7);
6547 __pyx_t_15 = PyTuple_New(1);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6548 __Pyx_GOTREF(__pyx_t_15);
6549 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6550 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6551 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6552 __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_15, NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6553 __Pyx_GOTREF(__pyx_t_8);
6554 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6555 __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6556 __Pyx_GOTREF(__pyx_t_15);
6557 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6558 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6567 __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__6);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6568 __Pyx_GOTREF(__pyx_t_8);
6569 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6570 __pyx_t_15 = PyTuple_New(1);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6571 __Pyx_GOTREF(__pyx_t_15);
6572 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6573 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6574 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6575 __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_15, NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6576 __Pyx_GOTREF(__pyx_t_7);
6577 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6578 __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6579 __Pyx_GOTREF(__pyx_t_15);
6580 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6581 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6582 __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__7);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6583 __Pyx_GOTREF(__pyx_t_7);
6584 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6593 __pyx_t_15 = PyTuple_New(1);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6594 __Pyx_GOTREF(__pyx_t_15);
6595 __Pyx_GIVEREF(__pyx_t_7);
6596 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6598 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_15, NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6599 __Pyx_GOTREF(__pyx_t_7);
6600 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6601 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6602 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6603 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6619 __Pyx_XDECREF(__pyx_t_7);
6620 __Pyx_XDECREF(__pyx_t_8);
6621 __Pyx_XDECREF(__pyx_t_15);
6622 __Pyx_XDECREF(__pyx_t_16);
6623 __Pyx_XDECREF(__pyx_t_17);
6624 __Pyx_XDECREF(__pyx_t_18);
6625 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6628 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6629 __Pyx_XDECREF(__pyx_v_err);
6630 __Pyx_RefNannyFinishContext();
6643 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self);
6644 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
6645 __Pyx_RefNannyDeclarations
6646 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
6647 __pyx_pf_8PyClical_8clifford_4__dealloc__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6650 __Pyx_RefNannyFinishContext();
6653 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6654 __Pyx_RefNannyDeclarations
6655 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
6664 delete __pyx_v_self->instance;
6675 __Pyx_RefNannyFinishContext();
6687 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x);
6688 static char __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 ";
6689 #if CYTHON_COMPILING_IN_CPYTHON 6690 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
6692 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
6694 __Pyx_RefNannyDeclarations
6695 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
6696 __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
6699 __Pyx_RefNannyFinishContext();
6703 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
6705 __Pyx_RefNannyDeclarations
6706 PyObject *__pyx_t_1 = NULL;
6707 int __pyx_lineno = 0;
6708 const char *__pyx_filename = NULL;
6709 int __pyx_clineno = 0;
6710 __Pyx_RefNannySetupContext(
"__contains__", 0);
6719 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6720 __Pyx_GOTREF(__pyx_t_1);
6721 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6722 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6723 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6735 __Pyx_XDECREF(__pyx_t_1);
6736 __Pyx_AddTraceback(
"PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6738 __Pyx_RefNannyFinishContext();
6751 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self);
6752 static char __pyx_doc_8PyClical_8clifford_8__iter__[] =
"\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})): print a,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
6753 #if CYTHON_COMPILING_IN_CPYTHON 6754 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
6756 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
6757 PyObject *__pyx_r = 0;
6758 __Pyx_RefNannyDeclarations
6759 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
6760 __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6763 __Pyx_RefNannyFinishContext();
6767 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6768 PyObject *__pyx_r = NULL;
6769 __Pyx_RefNannyDeclarations
6770 PyObject *__pyx_t_1 = NULL;
6771 int __pyx_lineno = 0;
6772 const char *__pyx_filename = NULL;
6773 int __pyx_clineno = 0;
6774 __Pyx_RefNannySetupContext(
"__iter__", 0);
6783 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6784 __Pyx_GOTREF(__pyx_t_1);
6785 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6786 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6787 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6799 __Pyx_XDECREF(__pyx_t_1);
6800 __Pyx_AddTraceback(
"PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6802 __Pyx_XGIVEREF(__pyx_r);
6803 __Pyx_RefNannyFinishContext();
6816 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
6817 static char __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 ";
6818 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
6819 PyObject *__pyx_r = 0;
6820 __Pyx_RefNannyDeclarations
6821 __Pyx_RefNannySetupContext(
"reframe (wrapper)", 0);
6822 __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
6825 __Pyx_RefNannyFinishContext();
6829 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
6830 PyObject *__pyx_v_error_msg_prefix = NULL;
6831 struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
6832 PyObject *__pyx_v_err = NULL;
6833 PyObject *__pyx_r = NULL;
6834 __Pyx_RefNannyDeclarations
6837 PyObject *__pyx_t_3 = NULL;
6838 PyObject *__pyx_t_4 = NULL;
6839 PyObject *__pyx_t_5 = NULL;
6840 PyObject *__pyx_t_6 = NULL;
6843 PyObject *__pyx_t_9 = NULL;
6844 PyObject *__pyx_t_10 = NULL;
6845 PyObject *__pyx_t_11 = NULL;
6846 PyObject *__pyx_t_12 = NULL;
6847 PyObject *__pyx_t_13 = NULL;
6848 int __pyx_lineno = 0;
6849 const char *__pyx_filename = NULL;
6850 int __pyx_clineno = 0;
6851 __Pyx_RefNannySetupContext(
"reframe", 0);
6860 __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
6861 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
6870 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6871 __pyx_t_2 = (__pyx_t_1 != 0);
6882 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6883 __Pyx_XGOTREF(__pyx_t_3);
6884 __Pyx_XGOTREF(__pyx_t_4);
6885 __Pyx_XGOTREF(__pyx_t_5);
6895 __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6896 __Pyx_GOTREF(__pyx_t_6);
6897 __pyx_v_result = ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
6908 __pyx_t_7 =
new Clifford(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self), __pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt)));
6910 __Pyx_CppExn2PyErr();
6911 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6913 __pyx_v_result->instance = __pyx_t_7;
6923 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6924 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6925 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6926 goto __pyx_L11_try_end;
6928 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6937 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6939 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6940 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6941 __Pyx_GOTREF(__pyx_t_6);
6942 __Pyx_GOTREF(__pyx_t_9);
6943 __Pyx_GOTREF(__pyx_t_10);
6944 __Pyx_INCREF(__pyx_t_9);
6945 __pyx_v_err = __pyx_t_9;
6954 __pyx_t_11 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_from);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6955 __Pyx_GOTREF(__pyx_t_11);
6956 __pyx_t_12 = PyTuple_New(1);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6957 __Pyx_GOTREF(__pyx_t_12);
6958 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6959 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6960 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
6961 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_12, NULL);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6962 __Pyx_GOTREF(__pyx_t_13);
6963 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6964 __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6965 __Pyx_GOTREF(__pyx_t_12);
6966 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6967 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6968 __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_kp_s_to_frame);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6969 __Pyx_GOTREF(__pyx_t_13);
6970 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6979 __pyx_t_12 = PyTuple_New(1);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6980 __Pyx_GOTREF(__pyx_t_12);
6981 __Pyx_INCREF(__pyx_v_ixt);
6982 __Pyx_GIVEREF(__pyx_v_ixt);
6983 PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
6984 __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_12, NULL);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6985 __Pyx_GOTREF(__pyx_t_11);
6986 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6987 __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_t_11);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6988 __Pyx_GOTREF(__pyx_t_12);
6989 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6990 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6991 __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_kp_s__3);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6992 __Pyx_GOTREF(__pyx_t_11);
6993 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7002 __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__4);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7003 __Pyx_GOTREF(__pyx_t_12);
7004 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7005 __pyx_t_11 = PyTuple_New(1);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7006 __Pyx_GOTREF(__pyx_t_11);
7007 __Pyx_INCREF(__pyx_v_err);
7008 __Pyx_GIVEREF(__pyx_v_err);
7009 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
7010 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_11, NULL);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7011 __Pyx_GOTREF(__pyx_t_13);
7012 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7013 __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7014 __Pyx_GOTREF(__pyx_t_11);
7015 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7016 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7025 __pyx_t_13 = PyTuple_New(1);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7026 __Pyx_GOTREF(__pyx_t_13);
7027 __Pyx_GIVEREF(__pyx_t_11);
7028 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
7030 __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7031 __Pyx_GOTREF(__pyx_t_11);
7032 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7033 __Pyx_Raise(__pyx_t_11, 0, 0, 0);
7034 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7035 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7037 goto __pyx_L6_except_error;
7038 __pyx_L6_except_error:;
7047 __Pyx_XGIVEREF(__pyx_t_3);
7048 __Pyx_XGIVEREF(__pyx_t_4);
7049 __Pyx_XGIVEREF(__pyx_t_5);
7050 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7051 goto __pyx_L1_error;
7073 __pyx_t_10 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_using);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7074 __Pyx_GOTREF(__pyx_t_10);
7075 __pyx_t_9 = PyTuple_New(1);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7076 __Pyx_GOTREF(__pyx_t_9);
7077 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7078 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7079 PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7080 __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_9, NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7081 __Pyx_GOTREF(__pyx_t_6);
7082 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7083 __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_6);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7084 __Pyx_GOTREF(__pyx_t_9);
7085 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7086 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7087 __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__7);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7088 __Pyx_GOTREF(__pyx_t_6);
7089 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7090 __pyx_t_9 = PyTuple_New(1);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7091 __Pyx_GOTREF(__pyx_t_9);
7092 __Pyx_GIVEREF(__pyx_t_6);
7093 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
7095 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7096 __Pyx_GOTREF(__pyx_t_6);
7097 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7098 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7099 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7100 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7111 __Pyx_XDECREF(__pyx_r);
7112 __Pyx_INCREF(((PyObject *)__pyx_v_result));
7113 __pyx_r = ((PyObject *)__pyx_v_result);
7126 __Pyx_XDECREF(__pyx_t_6);
7127 __Pyx_XDECREF(__pyx_t_9);
7128 __Pyx_XDECREF(__pyx_t_10);
7129 __Pyx_XDECREF(__pyx_t_11);
7130 __Pyx_XDECREF(__pyx_t_12);
7131 __Pyx_XDECREF(__pyx_t_13);
7132 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7135 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7136 __Pyx_XDECREF((PyObject *)__pyx_v_result);
7137 __Pyx_XDECREF(__pyx_v_err);
7138 __Pyx_XGIVEREF(__pyx_r);
7139 __Pyx_RefNannyFinishContext();
7152 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
7153 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
7154 PyObject *__pyx_r = 0;
7155 __Pyx_RefNannyDeclarations
7156 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
7157 __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
7160 __Pyx_RefNannyFinishContext();
7164 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
7165 PyObject *__pyx_r = NULL;
7166 __Pyx_RefNannyDeclarations
7170 PyObject *__pyx_t_4 = NULL;
7171 PyObject *__pyx_t_5 = NULL;
7172 PyObject *__pyx_t_6 = NULL;
7173 int __pyx_lineno = 0;
7174 const char *__pyx_filename = NULL;
7175 int __pyx_clineno = 0;
7176 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
7185 __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7195 __pyx_t_2 = (__pyx_v_lhs == Py_None);
7196 __pyx_t_3 = (__pyx_t_2 != 0);
7199 __pyx_t_1 = __pyx_t_3;
7200 goto __pyx_L5_bool_binop_done;
7202 __pyx_t_3 = (__pyx_v_rhs == Py_None);
7203 __pyx_t_2 = (__pyx_t_3 != 0);
7204 __pyx_t_1 = __pyx_t_2;
7205 __pyx_L5_bool_binop_done:;
7215 __Pyx_XDECREF(__pyx_r);
7216 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7217 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7218 __Pyx_GOTREF(__pyx_t_4);
7219 __pyx_r = __pyx_t_4;
7240 __Pyx_XDECREF(__pyx_r);
7241 __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7242 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7243 __Pyx_GOTREF(__pyx_t_4);
7244 __pyx_r = __pyx_t_4;
7265 __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7275 __pyx_t_2 = (__pyx_v_lhs == Py_None);
7276 __pyx_t_3 = (__pyx_t_2 != 0);
7279 __pyx_t_1 = __pyx_t_3;
7280 goto __pyx_L8_bool_binop_done;
7282 __pyx_t_3 = (__pyx_v_rhs == Py_None);
7283 __pyx_t_2 = (__pyx_t_3 != 0);
7284 __pyx_t_1 = __pyx_t_2;
7285 __pyx_L8_bool_binop_done:;
7295 __Pyx_XDECREF(__pyx_r);
7296 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7297 __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7298 __Pyx_GOTREF(__pyx_t_4);
7299 __pyx_r = __pyx_t_4;
7320 __Pyx_XDECREF(__pyx_r);
7321 __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7322 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7323 __Pyx_GOTREF(__pyx_t_4);
7324 __pyx_r = __pyx_t_4;
7345 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, __pyx_ptype_8PyClical_clifford);
7346 __pyx_t_3 = (__pyx_t_2 != 0);
7349 __pyx_t_1 = __pyx_t_3;
7350 goto __pyx_L10_bool_binop_done;
7352 __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7353 __pyx_t_2 = (__pyx_t_3 != 0);
7354 __pyx_t_1 = __pyx_t_2;
7355 __pyx_L10_bool_binop_done:;
7365 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7366 __Pyx_GOTREF(__pyx_t_4);
7367 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7368 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7369 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
7370 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7371 __Pyx_GOTREF(__pyx_t_5);
7372 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7373 __pyx_t_4 = PyNumber_Add(__pyx_kp_s_This_comparison_operator_is_not, __pyx_t_5);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7374 __Pyx_GOTREF(__pyx_t_4);
7375 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7376 __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__6);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7377 __Pyx_GOTREF(__pyx_t_5);
7378 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7379 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7380 __Pyx_GOTREF(__pyx_t_4);
7381 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7382 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7383 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
7384 __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7385 __Pyx_GOTREF(__pyx_t_6);
7386 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7387 __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_6);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7388 __Pyx_GOTREF(__pyx_t_4);
7389 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7390 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7391 __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7392 __Pyx_GOTREF(__pyx_t_6);
7393 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7402 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7403 __Pyx_GOTREF(__pyx_t_4);
7404 __Pyx_GIVEREF(__pyx_t_6);
7405 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
7407 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7408 __Pyx_GOTREF(__pyx_t_6);
7409 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7410 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7411 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7412 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7431 __Pyx_XDECREF(__pyx_r);
7432 __Pyx_INCREF(__pyx_builtin_NotImplemented);
7433 __pyx_r = __pyx_builtin_NotImplemented;
7447 __Pyx_XDECREF(__pyx_t_4);
7448 __Pyx_XDECREF(__pyx_t_5);
7449 __Pyx_XDECREF(__pyx_t_6);
7450 __Pyx_AddTraceback(
"PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7453 __Pyx_XGIVEREF(__pyx_r);
7454 __Pyx_RefNannyFinishContext();
7467 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
7468 static char __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 ";
7469 #if CYTHON_COMPILING_IN_CPYTHON 7470 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7472 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7473 PyObject *__pyx_r = 0;
7474 __Pyx_RefNannyDeclarations
7475 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
7476 __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7479 __Pyx_RefNannyFinishContext();
7483 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7484 PyObject *__pyx_r = NULL;
7485 __Pyx_RefNannyDeclarations
7486 PyObject *__pyx_t_1 = NULL;
7487 int __pyx_lineno = 0;
7488 const char *__pyx_filename = NULL;
7489 int __pyx_clineno = 0;
7490 __Pyx_RefNannySetupContext(
"__getitem__", 0);
7499 __Pyx_XDECREF(__pyx_r);
7500 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->operator[](__pyx_f_8PyClical_toIndexSet(__pyx_v_ixt)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7501 __Pyx_GOTREF(__pyx_t_1);
7502 __pyx_r = __pyx_t_1;
7516 __Pyx_XDECREF(__pyx_t_1);
7517 __Pyx_AddTraceback(
"PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7520 __Pyx_XGIVEREF(__pyx_r);
7521 __Pyx_RefNannyFinishContext();
7534 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self);
7535 static char __pyx_doc_8PyClical_8clifford_16__neg__[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7536 #if CYTHON_COMPILING_IN_CPYTHON 7537 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7539 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7540 PyObject *__pyx_r = 0;
7541 __Pyx_RefNannyDeclarations
7542 __Pyx_RefNannySetupContext(
"__neg__ (wrapper)", 0);
7543 __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7546 __Pyx_RefNannyFinishContext();
7550 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7551 PyObject *__pyx_r = NULL;
7552 __Pyx_RefNannyDeclarations
7553 PyObject *__pyx_t_1 = NULL;
7554 PyObject *__pyx_t_2 = NULL;
7555 int __pyx_lineno = 0;
7556 const char *__pyx_filename = NULL;
7557 int __pyx_clineno = 0;
7558 __Pyx_RefNannySetupContext(
"__neg__", 0);
7567 __Pyx_XDECREF(__pyx_r);
7568 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7569 __Pyx_GOTREF(__pyx_t_1);
7570 __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_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7571 __Pyx_GOTREF(__pyx_t_2);
7572 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7573 __pyx_r = __pyx_t_2;
7587 __Pyx_XDECREF(__pyx_t_1);
7588 __Pyx_XDECREF(__pyx_t_2);
7589 __Pyx_AddTraceback(
"PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7592 __Pyx_XGIVEREF(__pyx_r);
7593 __Pyx_RefNannyFinishContext();
7606 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self);
7607 static char __pyx_doc_8PyClical_8clifford_18__pos__[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
7608 #if CYTHON_COMPILING_IN_CPYTHON 7609 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
7611 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
7612 PyObject *__pyx_r = 0;
7613 __Pyx_RefNannyDeclarations
7614 __Pyx_RefNannySetupContext(
"__pos__ (wrapper)", 0);
7615 __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7618 __Pyx_RefNannyFinishContext();
7622 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7623 PyObject *__pyx_r = NULL;
7624 __Pyx_RefNannyDeclarations
7625 PyObject *__pyx_t_1 = NULL;
7626 PyObject *__pyx_t_2 = NULL;
7627 int __pyx_lineno = 0;
7628 const char *__pyx_filename = NULL;
7629 int __pyx_clineno = 0;
7630 __Pyx_RefNannySetupContext(
"__pos__", 0);
7639 __Pyx_XDECREF(__pyx_r);
7640 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7641 __Pyx_GOTREF(__pyx_t_1);
7642 __Pyx_INCREF(((PyObject *)__pyx_v_self));
7643 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7644 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
7645 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7646 __Pyx_GOTREF(__pyx_t_2);
7647 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7648 __pyx_r = __pyx_t_2;
7662 __Pyx_XDECREF(__pyx_t_1);
7663 __Pyx_XDECREF(__pyx_t_2);
7664 __Pyx_AddTraceback(
"PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7667 __Pyx_XGIVEREF(__pyx_r);
7668 __Pyx_RefNannyFinishContext();
7681 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7682 static char __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 ";
7683 #if CYTHON_COMPILING_IN_CPYTHON 7684 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
7686 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7687 PyObject *__pyx_r = 0;
7688 __Pyx_RefNannyDeclarations
7689 __Pyx_RefNannySetupContext(
"__add__ (wrapper)", 0);
7690 __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7693 __Pyx_RefNannyFinishContext();
7697 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7698 PyObject *__pyx_r = NULL;
7699 __Pyx_RefNannyDeclarations
7700 PyObject *__pyx_t_1 = NULL;
7701 PyObject *__pyx_t_2 = NULL;
7702 int __pyx_lineno = 0;
7703 const char *__pyx_filename = NULL;
7704 int __pyx_clineno = 0;
7705 __Pyx_RefNannySetupContext(
"__add__", 0);
7714 __Pyx_XDECREF(__pyx_r);
7715 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7716 __Pyx_GOTREF(__pyx_t_1);
7717 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) + __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7718 __Pyx_GOTREF(__pyx_t_2);
7719 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7720 __pyx_r = __pyx_t_2;
7734 __Pyx_XDECREF(__pyx_t_1);
7735 __Pyx_XDECREF(__pyx_t_2);
7736 __Pyx_AddTraceback(
"PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7739 __Pyx_XGIVEREF(__pyx_r);
7740 __Pyx_RefNannyFinishContext();
7753 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7754 static char __pyx_doc_8PyClical_8clifford_22__iadd__[] =
"\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print x\n 1+{2}\n ";
7755 #if CYTHON_COMPILING_IN_CPYTHON 7756 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
7758 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7759 PyObject *__pyx_r = 0;
7760 __Pyx_RefNannyDeclarations
7761 __Pyx_RefNannySetupContext(
"__iadd__ (wrapper)", 0);
7762 __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7765 __Pyx_RefNannyFinishContext();
7769 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7770 PyObject *__pyx_r = NULL;
7771 __Pyx_RefNannyDeclarations
7772 PyObject *__pyx_t_1 = NULL;
7773 int __pyx_lineno = 0;
7774 const char *__pyx_filename = NULL;
7775 int __pyx_clineno = 0;
7776 __Pyx_RefNannySetupContext(
"__iadd__", 0);
7785 __Pyx_XDECREF(__pyx_r);
7786 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) + __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7787 __Pyx_GOTREF(__pyx_t_1);
7788 __pyx_r = __pyx_t_1;
7802 __Pyx_XDECREF(__pyx_t_1);
7803 __Pyx_AddTraceback(
"PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7806 __Pyx_XGIVEREF(__pyx_r);
7807 __Pyx_RefNannyFinishContext();
7820 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7821 static char __pyx_doc_8PyClical_8clifford_24__sub__[] =
"\n Geometric difference.\n\n >>> print clifford(1) - clifford(\"{2}\")\n 1-{2}\n >>> print clifford(\"{1}\") - clifford(\"{2}\")\n {1}-{2}\n ";
7822 #if CYTHON_COMPILING_IN_CPYTHON 7823 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
7825 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7826 PyObject *__pyx_r = 0;
7827 __Pyx_RefNannyDeclarations
7828 __Pyx_RefNannySetupContext(
"__sub__ (wrapper)", 0);
7829 __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7832 __Pyx_RefNannyFinishContext();
7836 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7837 PyObject *__pyx_r = NULL;
7838 __Pyx_RefNannyDeclarations
7839 PyObject *__pyx_t_1 = NULL;
7840 PyObject *__pyx_t_2 = NULL;
7841 int __pyx_lineno = 0;
7842 const char *__pyx_filename = NULL;
7843 int __pyx_clineno = 0;
7844 __Pyx_RefNannySetupContext(
"__sub__", 0);
7853 __Pyx_XDECREF(__pyx_r);
7854 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7855 __Pyx_GOTREF(__pyx_t_1);
7856 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) - __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7857 __Pyx_GOTREF(__pyx_t_2);
7858 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7859 __pyx_r = __pyx_t_2;
7873 __Pyx_XDECREF(__pyx_t_1);
7874 __Pyx_XDECREF(__pyx_t_2);
7875 __Pyx_AddTraceback(
"PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7878 __Pyx_XGIVEREF(__pyx_r);
7879 __Pyx_RefNannyFinishContext();
7892 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7893 static char __pyx_doc_8PyClical_8clifford_26__isub__[] =
"\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print x\n 1-{2}\n ";
7894 #if CYTHON_COMPILING_IN_CPYTHON 7895 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
7897 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7898 PyObject *__pyx_r = 0;
7899 __Pyx_RefNannyDeclarations
7900 __Pyx_RefNannySetupContext(
"__isub__ (wrapper)", 0);
7901 __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7904 __Pyx_RefNannyFinishContext();
7908 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7909 PyObject *__pyx_r = NULL;
7910 __Pyx_RefNannyDeclarations
7911 PyObject *__pyx_t_1 = NULL;
7912 int __pyx_lineno = 0;
7913 const char *__pyx_filename = NULL;
7914 int __pyx_clineno = 0;
7915 __Pyx_RefNannySetupContext(
"__isub__", 0);
7924 __Pyx_XDECREF(__pyx_r);
7925 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) - __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7926 __Pyx_GOTREF(__pyx_t_1);
7927 __pyx_r = __pyx_t_1;
7941 __Pyx_XDECREF(__pyx_t_1);
7942 __Pyx_AddTraceback(
"PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7945 __Pyx_XGIVEREF(__pyx_r);
7946 __Pyx_RefNannyFinishContext();
7959 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7960 static char __pyx_doc_8PyClical_8clifford_28__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 ";
7961 #if CYTHON_COMPILING_IN_CPYTHON 7962 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
7964 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7965 PyObject *__pyx_r = 0;
7966 __Pyx_RefNannyDeclarations
7967 __Pyx_RefNannySetupContext(
"__mul__ (wrapper)", 0);
7968 __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7971 __Pyx_RefNannyFinishContext();
7975 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7976 PyObject *__pyx_r = NULL;
7977 __Pyx_RefNannyDeclarations
7978 PyObject *__pyx_t_1 = NULL;
7979 PyObject *__pyx_t_2 = NULL;
7980 int __pyx_lineno = 0;
7981 const char *__pyx_filename = NULL;
7982 int __pyx_clineno = 0;
7983 __Pyx_RefNannySetupContext(
"__mul__", 0);
7992 __Pyx_XDECREF(__pyx_r);
7993 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7994 __Pyx_GOTREF(__pyx_t_1);
7995 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) * __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7996 __Pyx_GOTREF(__pyx_t_2);
7997 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7998 __pyx_r = __pyx_t_2;
8012 __Pyx_XDECREF(__pyx_t_1);
8013 __Pyx_XDECREF(__pyx_t_2);
8014 __Pyx_AddTraceback(
"PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8017 __Pyx_XGIVEREF(__pyx_r);
8018 __Pyx_RefNannyFinishContext();
8031 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8032 static char __pyx_doc_8PyClical_8clifford_30__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 ";
8033 #if CYTHON_COMPILING_IN_CPYTHON 8034 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8036 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8037 PyObject *__pyx_r = 0;
8038 __Pyx_RefNannyDeclarations
8039 __Pyx_RefNannySetupContext(
"__imul__ (wrapper)", 0);
8040 __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8043 __Pyx_RefNannyFinishContext();
8047 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8048 PyObject *__pyx_r = NULL;
8049 __Pyx_RefNannyDeclarations
8050 PyObject *__pyx_t_1 = NULL;
8051 int __pyx_lineno = 0;
8052 const char *__pyx_filename = NULL;
8053 int __pyx_clineno = 0;
8054 __Pyx_RefNannySetupContext(
"__imul__", 0);
8063 __Pyx_XDECREF(__pyx_r);
8064 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) * __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8065 __Pyx_GOTREF(__pyx_t_1);
8066 __pyx_r = __pyx_t_1;
8080 __Pyx_XDECREF(__pyx_t_1);
8081 __Pyx_AddTraceback(
"PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8084 __Pyx_XGIVEREF(__pyx_r);
8085 __Pyx_RefNannyFinishContext();
8098 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8099 static char __pyx_doc_8PyClical_8clifford_32__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 ";
8100 #if CYTHON_COMPILING_IN_CPYTHON 8101 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8103 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8104 PyObject *__pyx_r = 0;
8105 __Pyx_RefNannyDeclarations
8106 __Pyx_RefNannySetupContext(
"__mod__ (wrapper)", 0);
8107 __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8110 __Pyx_RefNannyFinishContext();
8114 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8115 PyObject *__pyx_r = NULL;
8116 __Pyx_RefNannyDeclarations
8117 PyObject *__pyx_t_1 = NULL;
8118 PyObject *__pyx_t_2 = NULL;
8119 int __pyx_lineno = 0;
8120 const char *__pyx_filename = NULL;
8121 int __pyx_clineno = 0;
8122 __Pyx_RefNannySetupContext(
"__mod__", 0);
8131 __Pyx_XDECREF(__pyx_r);
8132 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8133 __Pyx_GOTREF(__pyx_t_1);
8134 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) % __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8135 __Pyx_GOTREF(__pyx_t_2);
8136 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8137 __pyx_r = __pyx_t_2;
8151 __Pyx_XDECREF(__pyx_t_1);
8152 __Pyx_XDECREF(__pyx_t_2);
8153 __Pyx_AddTraceback(
"PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8156 __Pyx_XGIVEREF(__pyx_r);
8157 __Pyx_RefNannyFinishContext();
8170 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8171 static char __pyx_doc_8PyClical_8clifford_34__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 ";
8172 #if CYTHON_COMPILING_IN_CPYTHON 8173 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8175 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8176 PyObject *__pyx_r = 0;
8177 __Pyx_RefNannyDeclarations
8178 __Pyx_RefNannySetupContext(
"__imod__ (wrapper)", 0);
8179 __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8182 __Pyx_RefNannyFinishContext();
8186 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8187 PyObject *__pyx_r = NULL;
8188 __Pyx_RefNannyDeclarations
8189 PyObject *__pyx_t_1 = NULL;
8190 int __pyx_lineno = 0;
8191 const char *__pyx_filename = NULL;
8192 int __pyx_clineno = 0;
8193 __Pyx_RefNannySetupContext(
"__imod__", 0);
8202 __Pyx_XDECREF(__pyx_r);
8203 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) % __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8204 __Pyx_GOTREF(__pyx_t_1);
8205 __pyx_r = __pyx_t_1;
8219 __Pyx_XDECREF(__pyx_t_1);
8220 __Pyx_AddTraceback(
"PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8223 __Pyx_XGIVEREF(__pyx_r);
8224 __Pyx_RefNannyFinishContext();
8237 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8238 static char __pyx_doc_8PyClical_8clifford_36__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 ";
8239 #if CYTHON_COMPILING_IN_CPYTHON 8240 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8242 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8243 PyObject *__pyx_r = 0;
8244 __Pyx_RefNannyDeclarations
8245 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
8246 __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8249 __Pyx_RefNannyFinishContext();
8253 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8254 PyObject *__pyx_r = NULL;
8255 __Pyx_RefNannyDeclarations
8256 PyObject *__pyx_t_1 = NULL;
8257 PyObject *__pyx_t_2 = NULL;
8258 int __pyx_lineno = 0;
8259 const char *__pyx_filename = NULL;
8260 int __pyx_clineno = 0;
8261 __Pyx_RefNannySetupContext(
"__and__", 0);
8270 __Pyx_XDECREF(__pyx_r);
8271 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8272 __Pyx_GOTREF(__pyx_t_1);
8273 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) & __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8274 __Pyx_GOTREF(__pyx_t_2);
8275 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8276 __pyx_r = __pyx_t_2;
8290 __Pyx_XDECREF(__pyx_t_1);
8291 __Pyx_XDECREF(__pyx_t_2);
8292 __Pyx_AddTraceback(
"PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8295 __Pyx_XGIVEREF(__pyx_r);
8296 __Pyx_RefNannyFinishContext();
8309 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8310 static char __pyx_doc_8PyClical_8clifford_38__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 ";
8311 #if CYTHON_COMPILING_IN_CPYTHON 8312 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8314 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8315 PyObject *__pyx_r = 0;
8316 __Pyx_RefNannyDeclarations
8317 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
8318 __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8321 __Pyx_RefNannyFinishContext();
8325 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8326 PyObject *__pyx_r = NULL;
8327 __Pyx_RefNannyDeclarations
8328 PyObject *__pyx_t_1 = NULL;
8329 int __pyx_lineno = 0;
8330 const char *__pyx_filename = NULL;
8331 int __pyx_clineno = 0;
8332 __Pyx_RefNannySetupContext(
"__iand__", 0);
8341 __Pyx_XDECREF(__pyx_r);
8342 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) & __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8343 __Pyx_GOTREF(__pyx_t_1);
8344 __pyx_r = __pyx_t_1;
8358 __Pyx_XDECREF(__pyx_t_1);
8359 __Pyx_AddTraceback(
"PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8362 __Pyx_XGIVEREF(__pyx_r);
8363 __Pyx_RefNannyFinishContext();
8376 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8377 static char __pyx_doc_8PyClical_8clifford_40__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 ";
8378 #if CYTHON_COMPILING_IN_CPYTHON 8379 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8381 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8382 PyObject *__pyx_r = 0;
8383 __Pyx_RefNannyDeclarations
8384 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
8385 __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8388 __Pyx_RefNannyFinishContext();
8392 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8393 PyObject *__pyx_r = NULL;
8394 __Pyx_RefNannyDeclarations
8395 PyObject *__pyx_t_1 = NULL;
8396 PyObject *__pyx_t_2 = NULL;
8397 int __pyx_lineno = 0;
8398 const char *__pyx_filename = NULL;
8399 int __pyx_clineno = 0;
8400 __Pyx_RefNannySetupContext(
"__xor__", 0);
8409 __Pyx_XDECREF(__pyx_r);
8410 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8411 __Pyx_GOTREF(__pyx_t_1);
8412 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) ^ __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8413 __Pyx_GOTREF(__pyx_t_2);
8414 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8415 __pyx_r = __pyx_t_2;
8429 __Pyx_XDECREF(__pyx_t_1);
8430 __Pyx_XDECREF(__pyx_t_2);
8431 __Pyx_AddTraceback(
"PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8434 __Pyx_XGIVEREF(__pyx_r);
8435 __Pyx_RefNannyFinishContext();
8448 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8449 static char __pyx_doc_8PyClical_8clifford_42__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 ";
8450 #if CYTHON_COMPILING_IN_CPYTHON 8451 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8453 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8454 PyObject *__pyx_r = 0;
8455 __Pyx_RefNannyDeclarations
8456 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
8457 __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8460 __Pyx_RefNannyFinishContext();
8464 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8465 PyObject *__pyx_r = NULL;
8466 __Pyx_RefNannyDeclarations
8467 PyObject *__pyx_t_1 = NULL;
8468 int __pyx_lineno = 0;
8469 const char *__pyx_filename = NULL;
8470 int __pyx_clineno = 0;
8471 __Pyx_RefNannySetupContext(
"__ixor__", 0);
8480 __Pyx_XDECREF(__pyx_r);
8481 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) ^ __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8482 __Pyx_GOTREF(__pyx_t_1);
8483 __pyx_r = __pyx_t_1;
8497 __Pyx_XDECREF(__pyx_t_1);
8498 __Pyx_AddTraceback(
"PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8501 __Pyx_XGIVEREF(__pyx_r);
8502 __Pyx_RefNannyFinishContext();
8515 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8516 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8517 static char __pyx_doc_8PyClical_8clifford_44__div__[] =
"\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 ";
8518 #if CYTHON_COMPILING_IN_CPYTHON 8519 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8521 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8522 PyObject *__pyx_r = 0;
8523 __Pyx_RefNannyDeclarations
8524 __Pyx_RefNannySetupContext(
"__div__ (wrapper)", 0);
8525 __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8528 __Pyx_RefNannyFinishContext();
8533 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8534 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8535 PyObject *__pyx_r = NULL;
8536 __Pyx_RefNannyDeclarations
8537 PyObject *__pyx_t_1 = NULL;
8538 PyObject *__pyx_t_2 = NULL;
8539 int __pyx_lineno = 0;
8540 const char *__pyx_filename = NULL;
8541 int __pyx_clineno = 0;
8542 __Pyx_RefNannySetupContext(
"__div__", 0);
8551 __Pyx_XDECREF(__pyx_r);
8552 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8553 __Pyx_GOTREF(__pyx_t_1);
8554 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8555 __Pyx_GOTREF(__pyx_t_2);
8556 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8557 __pyx_r = __pyx_t_2;
8571 __Pyx_XDECREF(__pyx_t_1);
8572 __Pyx_XDECREF(__pyx_t_2);
8573 __Pyx_AddTraceback(
"PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8576 __Pyx_XGIVEREF(__pyx_r);
8577 __Pyx_RefNannyFinishContext();
8591 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8592 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8593 static char __pyx_doc_8PyClical_8clifford_46__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 ";
8594 #if CYTHON_COMPILING_IN_CPYTHON 8595 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8597 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8598 PyObject *__pyx_r = 0;
8599 __Pyx_RefNannyDeclarations
8600 __Pyx_RefNannySetupContext(
"__idiv__ (wrapper)", 0);
8601 __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8604 __Pyx_RefNannyFinishContext();
8609 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8610 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8611 PyObject *__pyx_r = NULL;
8612 __Pyx_RefNannyDeclarations
8613 PyObject *__pyx_t_1 = NULL;
8614 int __pyx_lineno = 0;
8615 const char *__pyx_filename = NULL;
8616 int __pyx_clineno = 0;
8617 __Pyx_RefNannySetupContext(
"__idiv__", 0);
8626 __Pyx_XDECREF(__pyx_r);
8627 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8628 __Pyx_GOTREF(__pyx_t_1);
8629 __pyx_r = __pyx_t_1;
8643 __Pyx_XDECREF(__pyx_t_1);
8644 __Pyx_AddTraceback(
"PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8647 __Pyx_XGIVEREF(__pyx_r);
8648 __Pyx_RefNannyFinishContext();
8662 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8663 static char __pyx_doc_8PyClical_8clifford_48inv[] =
"\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 ";
8664 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8665 PyObject *__pyx_r = 0;
8666 __Pyx_RefNannyDeclarations
8667 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
8668 __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8671 __Pyx_RefNannyFinishContext();
8675 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8676 PyObject *__pyx_r = NULL;
8677 __Pyx_RefNannyDeclarations
8678 PyObject *__pyx_t_1 = NULL;
8679 PyObject *__pyx_t_2 = NULL;
8680 int __pyx_lineno = 0;
8681 const char *__pyx_filename = NULL;
8682 int __pyx_clineno = 0;
8683 __Pyx_RefNannySetupContext(
"inv", 0);
8692 __Pyx_XDECREF(__pyx_r);
8693 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8694 __Pyx_GOTREF(__pyx_t_1);
8695 __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_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8696 __Pyx_GOTREF(__pyx_t_2);
8697 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8698 __pyx_r = __pyx_t_2;
8712 __Pyx_XDECREF(__pyx_t_1);
8713 __Pyx_XDECREF(__pyx_t_2);
8714 __Pyx_AddTraceback(
"PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
8717 __Pyx_XGIVEREF(__pyx_r);
8718 __Pyx_RefNannyFinishContext();
8731 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8732 static char __pyx_doc_8PyClical_8clifford_50__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 ";
8733 #if CYTHON_COMPILING_IN_CPYTHON 8734 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
8736 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8737 PyObject *__pyx_r = 0;
8738 __Pyx_RefNannyDeclarations
8739 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
8740 __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8743 __Pyx_RefNannyFinishContext();
8747 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8748 PyObject *__pyx_r = NULL;
8749 __Pyx_RefNannyDeclarations
8750 PyObject *__pyx_t_1 = NULL;
8751 PyObject *__pyx_t_2 = NULL;
8752 int __pyx_lineno = 0;
8753 const char *__pyx_filename = NULL;
8754 int __pyx_clineno = 0;
8755 __Pyx_RefNannySetupContext(
"__or__", 0);
8764 __Pyx_XDECREF(__pyx_r);
8765 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8766 __Pyx_GOTREF(__pyx_t_1);
8767 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) | __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8768 __Pyx_GOTREF(__pyx_t_2);
8769 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8770 __pyx_r = __pyx_t_2;
8784 __Pyx_XDECREF(__pyx_t_1);
8785 __Pyx_XDECREF(__pyx_t_2);
8786 __Pyx_AddTraceback(
"PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8789 __Pyx_XGIVEREF(__pyx_r);
8790 __Pyx_RefNannyFinishContext();
8803 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8804 static char __pyx_doc_8PyClical_8clifford_52__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 ";
8805 #if CYTHON_COMPILING_IN_CPYTHON 8806 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
8808 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8809 PyObject *__pyx_r = 0;
8810 __Pyx_RefNannyDeclarations
8811 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
8812 __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8815 __Pyx_RefNannyFinishContext();
8819 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8820 PyObject *__pyx_r = NULL;
8821 __Pyx_RefNannyDeclarations
8822 PyObject *__pyx_t_1 = NULL;
8823 int __pyx_lineno = 0;
8824 const char *__pyx_filename = NULL;
8825 int __pyx_clineno = 0;
8826 __Pyx_RefNannySetupContext(
"__ior__", 0);
8835 __Pyx_XDECREF(__pyx_r);
8836 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) | __pyx_f_8PyClical_toClifford(__pyx_v_rhs)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8837 __Pyx_GOTREF(__pyx_t_1);
8838 __pyx_r = __pyx_t_1;
8852 __Pyx_XDECREF(__pyx_t_1);
8853 __Pyx_AddTraceback(
"PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8856 __Pyx_XGIVEREF(__pyx_r);
8857 __Pyx_RefNannyFinishContext();
8870 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy);
8871 static char __pyx_doc_8PyClical_8clifford_54__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 ";
8872 #if CYTHON_COMPILING_IN_CPYTHON 8873 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
8875 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
8876 PyObject *__pyx_r = 0;
8877 __Pyx_RefNannyDeclarations
8878 __Pyx_RefNannySetupContext(
"__pow__ (wrapper)", 0);
8879 __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
8882 __Pyx_RefNannyFinishContext();
8886 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
8887 PyObject *__pyx_r = NULL;
8888 __Pyx_RefNannyDeclarations
8889 PyObject *__pyx_t_1 = NULL;
8890 int __pyx_lineno = 0;
8891 const char *__pyx_filename = NULL;
8892 int __pyx_clineno = 0;
8893 __Pyx_RefNannySetupContext(
"__pow__", 0);
8902 __Pyx_XDECREF(__pyx_r);
8903 __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_self, __pyx_v_m, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8904 __Pyx_GOTREF(__pyx_t_1);
8905 __pyx_r = __pyx_t_1;
8919 __Pyx_XDECREF(__pyx_t_1);
8920 __Pyx_AddTraceback(
"PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8923 __Pyx_XGIVEREF(__pyx_r);
8924 __Pyx_RefNannyFinishContext();
8937 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
8938 static char __pyx_doc_8PyClical_8clifford_56pow[] =
"\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 ";
8939 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8940 PyObject *__pyx_r = 0;
8941 __Pyx_RefNannyDeclarations
8942 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
8943 __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8946 __Pyx_RefNannyFinishContext();
8950 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8951 PyObject *__pyx_r = NULL;
8952 __Pyx_RefNannyDeclarations
8953 PyObject *__pyx_t_1 = NULL;
8954 PyObject *__pyx_t_2 = NULL;
8958 int __pyx_lineno = 0;
8959 const char *__pyx_filename = NULL;
8960 int __pyx_clineno = 0;
8961 __Pyx_RefNannySetupContext(
"pow", 0);
8970 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8971 __Pyx_GOTREF(__pyx_t_1);
8972 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8973 __Pyx_GOTREF(__pyx_t_2);
8974 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8975 __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2);
if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8976 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8977 __pyx_t_4 = (__pyx_t_3 != 0);
8987 __Pyx_XDECREF(__pyx_r);
8988 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8989 __Pyx_GOTREF(__pyx_t_2);
8990 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_m);
if (unlikely((__pyx_t_5 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8991 __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __pyx_v_self->instance->pow(__pyx_t_5));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8992 __Pyx_GOTREF(__pyx_t_1);
8993 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8994 __pyx_r = __pyx_t_1;
9015 __Pyx_XDECREF(__pyx_r);
9016 __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9017 __Pyx_GOTREF(__pyx_t_1);
9018 __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9019 __Pyx_GOTREF(__pyx_t_2);
9020 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9021 __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9022 __Pyx_GOTREF(__pyx_t_1);
9023 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9024 __pyx_r = __pyx_t_1;
9039 __Pyx_XDECREF(__pyx_t_1);
9040 __Pyx_XDECREF(__pyx_t_2);
9041 __Pyx_AddTraceback(
"PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9044 __Pyx_XGIVEREF(__pyx_r);
9045 __Pyx_RefNannyFinishContext();
9058 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
9059 static char __pyx_doc_8PyClical_8clifford_58outer_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 ";
9060 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9061 PyObject *__pyx_r = 0;
9062 __Pyx_RefNannyDeclarations
9063 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
9064 __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9067 __Pyx_RefNannyFinishContext();
9071 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9072 PyObject *__pyx_r = NULL;
9073 __Pyx_RefNannyDeclarations
9074 PyObject *__pyx_t_1 = NULL;
9076 PyObject *__pyx_t_3 = NULL;
9077 int __pyx_lineno = 0;
9078 const char *__pyx_filename = NULL;
9079 int __pyx_clineno = 0;
9080 __Pyx_RefNannySetupContext(
"outer_pow", 0);
9089 __Pyx_XDECREF(__pyx_r);
9090 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9091 __Pyx_GOTREF(__pyx_t_1);
9092 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m);
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9093 __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_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9094 __Pyx_GOTREF(__pyx_t_3);
9095 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9096 __pyx_r = __pyx_t_3;
9110 __Pyx_XDECREF(__pyx_t_1);
9111 __Pyx_XDECREF(__pyx_t_3);
9112 __Pyx_AddTraceback(
"PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9115 __Pyx_XGIVEREF(__pyx_r);
9116 __Pyx_RefNannyFinishContext();
9129 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9130 static char __pyx_doc_8PyClical_8clifford_60__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 ";
9131 #if CYTHON_COMPILING_IN_CPYTHON 9132 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9134 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9135 PyObject *__pyx_v_grade = 0;
9136 int __pyx_lineno = 0;
9137 const char *__pyx_filename = NULL;
9138 int __pyx_clineno = 0;
9139 PyObject *__pyx_r = 0;
9140 __Pyx_RefNannyDeclarations
9141 __Pyx_RefNannySetupContext(
"__call__ (wrapper)", 0);
9143 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9144 PyObject* values[1] = {0};
9145 if (unlikely(__pyx_kwds)) {
9147 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9149 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9151 default:
goto __pyx_L5_argtuple_error;
9153 kw_args = PyDict_Size(__pyx_kwds);
9156 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9157 else goto __pyx_L5_argtuple_error;
9159 if (unlikely(kw_args > 0)) {
9160 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9162 }
else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9163 goto __pyx_L5_argtuple_error;
9165 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9167 __pyx_v_grade = values[0];
9169 goto __pyx_L4_argument_unpacking_done;
9170 __pyx_L5_argtuple_error:;
9171 __Pyx_RaiseArgtupleInvalid(
"__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9173 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9174 __Pyx_RefNannyFinishContext();
9176 __pyx_L4_argument_unpacking_done:;
9177 __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9180 __Pyx_RefNannyFinishContext();
9184 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9185 PyObject *__pyx_r = NULL;
9186 __Pyx_RefNannyDeclarations
9187 PyObject *__pyx_t_1 = NULL;
9189 PyObject *__pyx_t_3 = NULL;
9190 int __pyx_lineno = 0;
9191 const char *__pyx_filename = NULL;
9192 int __pyx_clineno = 0;
9193 __Pyx_RefNannySetupContext(
"__call__", 0);
9202 __Pyx_XDECREF(__pyx_r);
9203 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9204 __Pyx_GOTREF(__pyx_t_1);
9205 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade);
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9206 __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_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9207 __Pyx_GOTREF(__pyx_t_3);
9208 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9209 __pyx_r = __pyx_t_3;
9223 __Pyx_XDECREF(__pyx_t_1);
9224 __Pyx_XDECREF(__pyx_t_3);
9225 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9228 __Pyx_XGIVEREF(__pyx_r);
9229 __Pyx_RefNannyFinishContext();
9242 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9243 static char __pyx_doc_8PyClical_8clifford_62scalar[] =
"\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ";
9244 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9245 PyObject *__pyx_r = 0;
9246 __Pyx_RefNannyDeclarations
9247 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
9248 __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9251 __Pyx_RefNannyFinishContext();
9255 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9256 PyObject *__pyx_r = NULL;
9257 __Pyx_RefNannyDeclarations
9258 PyObject *__pyx_t_1 = NULL;
9259 int __pyx_lineno = 0;
9260 const char *__pyx_filename = NULL;
9261 int __pyx_clineno = 0;
9262 __Pyx_RefNannySetupContext(
"scalar", 0);
9271 __Pyx_XDECREF(__pyx_r);
9272 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->scalar());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9273 __Pyx_GOTREF(__pyx_t_1);
9274 __pyx_r = __pyx_t_1;
9288 __Pyx_XDECREF(__pyx_t_1);
9289 __Pyx_AddTraceback(
"PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9292 __Pyx_XGIVEREF(__pyx_r);
9293 __Pyx_RefNannyFinishContext();
9306 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9307 static char __pyx_doc_8PyClical_8clifford_64pure[] =
"\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 ";
9308 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9309 PyObject *__pyx_r = 0;
9310 __Pyx_RefNannyDeclarations
9311 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
9312 __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9315 __Pyx_RefNannyFinishContext();
9319 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9320 PyObject *__pyx_r = NULL;
9321 __Pyx_RefNannyDeclarations
9322 PyObject *__pyx_t_1 = NULL;
9323 PyObject *__pyx_t_2 = NULL;
9324 int __pyx_lineno = 0;
9325 const char *__pyx_filename = NULL;
9326 int __pyx_clineno = 0;
9327 __Pyx_RefNannySetupContext(
"pure", 0);
9336 __Pyx_XDECREF(__pyx_r);
9337 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9338 __Pyx_GOTREF(__pyx_t_1);
9339 __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_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9340 __Pyx_GOTREF(__pyx_t_2);
9341 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9342 __pyx_r = __pyx_t_2;
9356 __Pyx_XDECREF(__pyx_t_1);
9357 __Pyx_XDECREF(__pyx_t_2);
9358 __Pyx_AddTraceback(
"PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9361 __Pyx_XGIVEREF(__pyx_r);
9362 __Pyx_RefNannyFinishContext();
9375 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9376 static char __pyx_doc_8PyClical_8clifford_66even[] =
"\n Even part of multivector, sum of even grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").even()\n 1+{1,2}\n ";
9377 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9378 PyObject *__pyx_r = 0;
9379 __Pyx_RefNannyDeclarations
9380 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
9381 __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9384 __Pyx_RefNannyFinishContext();
9388 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9389 PyObject *__pyx_r = NULL;
9390 __Pyx_RefNannyDeclarations
9391 PyObject *__pyx_t_1 = NULL;
9392 PyObject *__pyx_t_2 = NULL;
9393 int __pyx_lineno = 0;
9394 const char *__pyx_filename = NULL;
9395 int __pyx_clineno = 0;
9396 __Pyx_RefNannySetupContext(
"even", 0);
9405 __Pyx_XDECREF(__pyx_r);
9406 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9407 __Pyx_GOTREF(__pyx_t_1);
9408 __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_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9409 __Pyx_GOTREF(__pyx_t_2);
9410 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9411 __pyx_r = __pyx_t_2;
9425 __Pyx_XDECREF(__pyx_t_1);
9426 __Pyx_XDECREF(__pyx_t_2);
9427 __Pyx_AddTraceback(
"PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9430 __Pyx_XGIVEREF(__pyx_r);
9431 __Pyx_RefNannyFinishContext();
9444 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9445 static char __pyx_doc_8PyClical_8clifford_68odd[] =
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").odd()\n {1}\n ";
9446 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9447 PyObject *__pyx_r = 0;
9448 __Pyx_RefNannyDeclarations
9449 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
9450 __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9453 __Pyx_RefNannyFinishContext();
9457 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9458 PyObject *__pyx_r = NULL;
9459 __Pyx_RefNannyDeclarations
9460 PyObject *__pyx_t_1 = NULL;
9461 PyObject *__pyx_t_2 = NULL;
9462 int __pyx_lineno = 0;
9463 const char *__pyx_filename = NULL;
9464 int __pyx_clineno = 0;
9465 __Pyx_RefNannySetupContext(
"odd", 0);
9474 __Pyx_XDECREF(__pyx_r);
9475 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9476 __Pyx_GOTREF(__pyx_t_1);
9477 __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_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9478 __Pyx_GOTREF(__pyx_t_2);
9479 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9480 __pyx_r = __pyx_t_2;
9494 __Pyx_XDECREF(__pyx_t_1);
9495 __Pyx_XDECREF(__pyx_t_2);
9496 __Pyx_AddTraceback(
"PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9499 __Pyx_XGIVEREF(__pyx_r);
9500 __Pyx_RefNannyFinishContext();
9513 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9514 static char __pyx_doc_8PyClical_8clifford_70vector_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 ";
9515 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9516 PyObject *__pyx_v_frm = 0;
9517 int __pyx_lineno = 0;
9518 const char *__pyx_filename = NULL;
9519 int __pyx_clineno = 0;
9520 PyObject *__pyx_r = 0;
9521 __Pyx_RefNannyDeclarations
9522 __Pyx_RefNannySetupContext(
"vector_part (wrapper)", 0);
9524 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9525 PyObject* values[1] = {0};
9526 values[0] = ((PyObject *)Py_None);
9527 if (unlikely(__pyx_kwds)) {
9529 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9531 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9533 default:
goto __pyx_L5_argtuple_error;
9535 kw_args = PyDict_Size(__pyx_kwds);
9539 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9540 if (value) { values[0] = value; kw_args--; }
9543 if (unlikely(kw_args > 0)) {
9544 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"vector_part") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9547 switch (PyTuple_GET_SIZE(__pyx_args)) {
9548 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9550 default:
goto __pyx_L5_argtuple_error;
9553 __pyx_v_frm = values[0];
9555 goto __pyx_L4_argument_unpacking_done;
9556 __pyx_L5_argtuple_error:;
9557 __Pyx_RaiseArgtupleInvalid(
"vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9559 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9560 __Pyx_RefNannyFinishContext();
9562 __pyx_L4_argument_unpacking_done:;
9563 __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9566 __Pyx_RefNannyFinishContext();
9570 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9571 PyObject *__pyx_v_error_msg_prefix = NULL;
9572 std::vector<scalar_t> __pyx_v_vec;
9575 PyObject *__pyx_v_lst = NULL;
9576 PyObject *__pyx_v_err = NULL;
9577 PyObject *__pyx_r = NULL;
9578 __Pyx_RefNannyDeclarations
9579 PyObject *__pyx_t_1 = NULL;
9580 PyObject *__pyx_t_2 = NULL;
9581 PyObject *__pyx_t_3 = NULL;
9584 std::vector<scalar_t> __pyx_t_6;
9585 PyObject *__pyx_t_7 = NULL;
9588 PyObject *__pyx_t_10 = NULL;
9589 PyObject *__pyx_t_11 = NULL;
9590 PyObject *__pyx_t_12 = NULL;
9591 PyObject *__pyx_t_13 = NULL;
9592 PyObject *__pyx_t_14 = NULL;
9593 int __pyx_lineno = 0;
9594 const char *__pyx_filename = NULL;
9595 int __pyx_clineno = 0;
9596 __Pyx_RefNannySetupContext(
"vector_part", 0);
9605 __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9606 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9616 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9617 __Pyx_XGOTREF(__pyx_t_1);
9618 __Pyx_XGOTREF(__pyx_t_2);
9619 __Pyx_XGOTREF(__pyx_t_3);
9629 __pyx_t_4 = (__pyx_v_frm == Py_None);
9630 __pyx_t_5 = (__pyx_t_4 != 0);
9640 __pyx_v_vec = __pyx_v_self->instance->vector_part();
9661 __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9663 __Pyx_CppExn2PyErr();
9664 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9666 __pyx_v_vec = __pyx_t_6;
9677 __pyx_v_n = __pyx_v_vec.size();
9686 __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n));
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9687 __Pyx_GOTREF(__pyx_t_7);
9688 { Py_ssize_t __pyx_temp;
9689 for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
9690 __Pyx_INCREF(__pyx_float_0_0);
9691 __Pyx_GIVEREF(__pyx_float_0_0);
9692 PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
9695 __pyx_v_lst = ((PyObject*)__pyx_t_7);
9705 __pyx_t_8 = __pyx_v_n;
9706 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
9707 __pyx_v_i = __pyx_t_9;
9716 __pyx_t_7 =
PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i]));
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9717 __Pyx_GOTREF(__pyx_t_7);
9718 if (unlikely(__Pyx_SetItemInt(__pyx_v_lst, __pyx_v_i, __pyx_t_7,
int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9719 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9729 __Pyx_XDECREF(__pyx_r);
9730 __Pyx_INCREF(__pyx_v_lst);
9731 __pyx_r = __pyx_v_lst;
9732 goto __pyx_L7_try_return;
9743 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9752 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
9754 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9755 if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9756 __Pyx_GOTREF(__pyx_t_7);
9757 __Pyx_GOTREF(__pyx_t_10);
9758 __Pyx_GOTREF(__pyx_t_11);
9759 __Pyx_INCREF(__pyx_t_10);
9760 __pyx_v_err = __pyx_t_10;
9769 __pyx_t_12 = PyTuple_New(1);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9770 __Pyx_GOTREF(__pyx_t_12);
9771 __Pyx_INCREF(((PyObject *)__pyx_v_self));
9772 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
9773 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
9774 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_12, NULL);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9775 __Pyx_GOTREF(__pyx_t_13);
9776 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9777 __pyx_t_12 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_t_13);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9778 __Pyx_GOTREF(__pyx_t_12);
9779 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9780 __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_kp_s_using_invalid);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9781 __Pyx_GOTREF(__pyx_t_13);
9782 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9791 __pyx_t_12 = PyObject_Repr(__pyx_v_frm);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9792 __Pyx_GOTREF(__pyx_t_12);
9793 __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_t_12);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9794 __Pyx_GOTREF(__pyx_t_14);
9795 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9796 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9797 __pyx_t_12 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_as_frame);
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9798 __Pyx_GOTREF(__pyx_t_12);
9799 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9808 __pyx_t_14 = PyTuple_New(1);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9809 __Pyx_GOTREF(__pyx_t_14);
9810 __Pyx_INCREF(__pyx_v_err);
9811 __Pyx_GIVEREF(__pyx_v_err);
9812 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
9813 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_14, NULL);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9814 __Pyx_GOTREF(__pyx_t_13);
9815 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9816 __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_13);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9817 __Pyx_GOTREF(__pyx_t_14);
9818 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9819 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9828 __pyx_t_13 = PyTuple_New(1);
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9829 __Pyx_GOTREF(__pyx_t_13);
9830 __Pyx_GIVEREF(__pyx_t_14);
9831 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
9833 __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9834 __Pyx_GOTREF(__pyx_t_14);
9835 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9836 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
9837 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9838 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9840 goto __pyx_L5_except_error;
9841 __pyx_L5_except_error:;
9850 __Pyx_XGIVEREF(__pyx_t_1);
9851 __Pyx_XGIVEREF(__pyx_t_2);
9852 __Pyx_XGIVEREF(__pyx_t_3);
9853 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9854 goto __pyx_L1_error;
9855 __pyx_L7_try_return:;
9856 __Pyx_XGIVEREF(__pyx_t_1);
9857 __Pyx_XGIVEREF(__pyx_t_2);
9858 __Pyx_XGIVEREF(__pyx_t_3);
9859 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9873 __Pyx_XDECREF(__pyx_t_7);
9874 __Pyx_XDECREF(__pyx_t_10);
9875 __Pyx_XDECREF(__pyx_t_11);
9876 __Pyx_XDECREF(__pyx_t_12);
9877 __Pyx_XDECREF(__pyx_t_13);
9878 __Pyx_XDECREF(__pyx_t_14);
9879 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9882 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
9883 __Pyx_XDECREF(__pyx_v_lst);
9884 __Pyx_XDECREF(__pyx_v_err);
9885 __Pyx_XGIVEREF(__pyx_r);
9886 __Pyx_RefNannyFinishContext();
9899 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9900 static char __pyx_doc_8PyClical_8clifford_72involute[] =
"\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 ";
9901 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9902 PyObject *__pyx_r = 0;
9903 __Pyx_RefNannyDeclarations
9904 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
9905 __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9908 __Pyx_RefNannyFinishContext();
9912 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9913 PyObject *__pyx_r = NULL;
9914 __Pyx_RefNannyDeclarations
9915 PyObject *__pyx_t_1 = NULL;
9916 PyObject *__pyx_t_2 = NULL;
9917 int __pyx_lineno = 0;
9918 const char *__pyx_filename = NULL;
9919 int __pyx_clineno = 0;
9920 __Pyx_RefNannySetupContext(
"involute", 0);
9929 __Pyx_XDECREF(__pyx_r);
9930 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9931 __Pyx_GOTREF(__pyx_t_1);
9932 __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_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9933 __Pyx_GOTREF(__pyx_t_2);
9934 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9935 __pyx_r = __pyx_t_2;
9949 __Pyx_XDECREF(__pyx_t_1);
9950 __Pyx_XDECREF(__pyx_t_2);
9951 __Pyx_AddTraceback(
"PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
9954 __Pyx_XGIVEREF(__pyx_r);
9955 __Pyx_RefNannyFinishContext();
9968 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9969 static char __pyx_doc_8PyClical_8clifford_74reverse[] =
"\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 ";
9970 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9971 PyObject *__pyx_r = 0;
9972 __Pyx_RefNannyDeclarations
9973 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
9974 __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9977 __Pyx_RefNannyFinishContext();
9981 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9982 PyObject *__pyx_r = NULL;
9983 __Pyx_RefNannyDeclarations
9984 PyObject *__pyx_t_1 = NULL;
9985 PyObject *__pyx_t_2 = NULL;
9986 int __pyx_lineno = 0;
9987 const char *__pyx_filename = NULL;
9988 int __pyx_clineno = 0;
9989 __Pyx_RefNannySetupContext(
"reverse", 0);
9998 __Pyx_XDECREF(__pyx_r);
9999 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10000 __Pyx_GOTREF(__pyx_t_1);
10001 __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_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10002 __Pyx_GOTREF(__pyx_t_2);
10003 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10004 __pyx_r = __pyx_t_2;
10018 __Pyx_XDECREF(__pyx_t_1);
10019 __Pyx_XDECREF(__pyx_t_2);
10020 __Pyx_AddTraceback(
"PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10023 __Pyx_XGIVEREF(__pyx_r);
10024 __Pyx_RefNannyFinishContext();
10037 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10038 static char __pyx_doc_8PyClical_8clifford_76conj[] =
"\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 ";
10039 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10040 PyObject *__pyx_r = 0;
10041 __Pyx_RefNannyDeclarations
10042 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
10043 __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10046 __Pyx_RefNannyFinishContext();
10050 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10051 PyObject *__pyx_r = NULL;
10052 __Pyx_RefNannyDeclarations
10053 PyObject *__pyx_t_1 = NULL;
10054 PyObject *__pyx_t_2 = NULL;
10055 int __pyx_lineno = 0;
10056 const char *__pyx_filename = NULL;
10057 int __pyx_clineno = 0;
10058 __Pyx_RefNannySetupContext(
"conj", 0);
10067 __Pyx_XDECREF(__pyx_r);
10068 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10069 __Pyx_GOTREF(__pyx_t_1);
10070 __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_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10071 __Pyx_GOTREF(__pyx_t_2);
10072 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10073 __pyx_r = __pyx_t_2;
10087 __Pyx_XDECREF(__pyx_t_1);
10088 __Pyx_XDECREF(__pyx_t_2);
10089 __Pyx_AddTraceback(
"PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10092 __Pyx_XGIVEREF(__pyx_r);
10093 __Pyx_RefNannyFinishContext();
10106 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10107 static char __pyx_doc_8PyClical_8clifford_78quad[] =
"\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 ";
10108 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10109 PyObject *__pyx_r = 0;
10110 __Pyx_RefNannyDeclarations
10111 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
10112 __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10115 __Pyx_RefNannyFinishContext();
10119 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10120 PyObject *__pyx_r = NULL;
10121 __Pyx_RefNannyDeclarations
10122 PyObject *__pyx_t_1 = NULL;
10123 int __pyx_lineno = 0;
10124 const char *__pyx_filename = NULL;
10125 int __pyx_clineno = 0;
10126 __Pyx_RefNannySetupContext(
"quad", 0);
10135 __Pyx_XDECREF(__pyx_r);
10136 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->quad());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10137 __Pyx_GOTREF(__pyx_t_1);
10138 __pyx_r = __pyx_t_1;
10152 __Pyx_XDECREF(__pyx_t_1);
10153 __Pyx_AddTraceback(
"PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10156 __Pyx_XGIVEREF(__pyx_r);
10157 __Pyx_RefNannyFinishContext();
10170 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10171 static char __pyx_doc_8PyClical_8clifford_80norm[] =
"\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 ";
10172 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10173 PyObject *__pyx_r = 0;
10174 __Pyx_RefNannyDeclarations
10175 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
10176 __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10179 __Pyx_RefNannyFinishContext();
10183 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10184 PyObject *__pyx_r = NULL;
10185 __Pyx_RefNannyDeclarations
10186 PyObject *__pyx_t_1 = NULL;
10187 int __pyx_lineno = 0;
10188 const char *__pyx_filename = NULL;
10189 int __pyx_clineno = 0;
10190 __Pyx_RefNannySetupContext(
"norm", 0);
10199 __Pyx_XDECREF(__pyx_r);
10200 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->norm());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10201 __Pyx_GOTREF(__pyx_t_1);
10202 __pyx_r = __pyx_t_1;
10216 __Pyx_XDECREF(__pyx_t_1);
10217 __Pyx_AddTraceback(
"PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10220 __Pyx_XGIVEREF(__pyx_r);
10221 __Pyx_RefNannyFinishContext();
10234 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10235 static char __pyx_doc_8PyClical_8clifford_82abs[] =
"\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ";
10236 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10237 PyObject *__pyx_r = 0;
10238 __Pyx_RefNannyDeclarations
10239 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
10240 __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10243 __Pyx_RefNannyFinishContext();
10247 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10248 PyObject *__pyx_r = NULL;
10249 __Pyx_RefNannyDeclarations
10250 PyObject *__pyx_t_1 = NULL;
10251 int __pyx_lineno = 0;
10252 const char *__pyx_filename = NULL;
10253 int __pyx_clineno = 0;
10254 __Pyx_RefNannySetupContext(
"abs", 0);
10263 __Pyx_XDECREF(__pyx_r);
10264 __pyx_t_1 =
PyFloat_FromDouble(
abs(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10265 __Pyx_GOTREF(__pyx_t_1);
10266 __pyx_r = __pyx_t_1;
10280 __Pyx_XDECREF(__pyx_t_1);
10281 __Pyx_AddTraceback(
"PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10284 __Pyx_XGIVEREF(__pyx_r);
10285 __Pyx_RefNannyFinishContext();
10298 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10299 static char __pyx_doc_8PyClical_8clifford_84max_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 ";
10300 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10301 PyObject *__pyx_r = 0;
10302 __Pyx_RefNannyDeclarations
10303 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
10304 __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10307 __Pyx_RefNannyFinishContext();
10311 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10312 PyObject *__pyx_r = NULL;
10313 __Pyx_RefNannyDeclarations
10314 PyObject *__pyx_t_1 = NULL;
10315 int __pyx_lineno = 0;
10316 const char *__pyx_filename = NULL;
10317 int __pyx_clineno = 0;
10318 __Pyx_RefNannySetupContext(
"max_abs", 0);
10327 __Pyx_XDECREF(__pyx_r);
10328 __pyx_t_1 =
PyFloat_FromDouble(__pyx_v_self->instance->max_abs());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10329 __Pyx_GOTREF(__pyx_t_1);
10330 __pyx_r = __pyx_t_1;
10344 __Pyx_XDECREF(__pyx_t_1);
10345 __Pyx_AddTraceback(
"PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10348 __Pyx_XGIVEREF(__pyx_r);
10349 __Pyx_RefNannyFinishContext();
10362 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit);
10363 static char __pyx_doc_8PyClical_8clifford_86truncated[] =
"\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 ";
10364 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10365 PyObject *__pyx_r = 0;
10366 __Pyx_RefNannyDeclarations
10367 __Pyx_RefNannySetupContext(
"truncated (wrapper)", 0);
10368 __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10371 __Pyx_RefNannyFinishContext();
10375 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10376 PyObject *__pyx_r = NULL;
10377 __Pyx_RefNannyDeclarations
10378 PyObject *__pyx_t_1 = NULL;
10380 PyObject *__pyx_t_3 = NULL;
10381 int __pyx_lineno = 0;
10382 const char *__pyx_filename = NULL;
10383 int __pyx_clineno = 0;
10384 __Pyx_RefNannySetupContext(
"truncated", 0);
10393 __Pyx_XDECREF(__pyx_r);
10394 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10395 __Pyx_GOTREF(__pyx_t_1);
10396 __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit);
if (unlikely((__pyx_t_2 == (
scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10397 __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_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10398 __Pyx_GOTREF(__pyx_t_3);
10399 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10400 __pyx_r = __pyx_t_3;
10414 __Pyx_XDECREF(__pyx_t_1);
10415 __Pyx_XDECREF(__pyx_t_3);
10416 __Pyx_AddTraceback(
"PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10419 __Pyx_XGIVEREF(__pyx_r);
10420 __Pyx_RefNannyFinishContext();
10433 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10434 static char __pyx_doc_8PyClical_8clifford_88isnan[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10435 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10436 PyObject *__pyx_r = 0;
10437 __Pyx_RefNannyDeclarations
10438 __Pyx_RefNannySetupContext(
"isnan (wrapper)", 0);
10439 __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10442 __Pyx_RefNannyFinishContext();
10446 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10447 PyObject *__pyx_r = NULL;
10448 __Pyx_RefNannyDeclarations
10449 PyObject *__pyx_t_1 = NULL;
10450 int __pyx_lineno = 0;
10451 const char *__pyx_filename = NULL;
10452 int __pyx_clineno = 0;
10453 __Pyx_RefNannySetupContext(
"isnan", 0);
10462 __Pyx_XDECREF(__pyx_r);
10463 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10464 __Pyx_GOTREF(__pyx_t_1);
10465 __pyx_r = __pyx_t_1;
10479 __Pyx_XDECREF(__pyx_t_1);
10480 __Pyx_AddTraceback(
"PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10483 __Pyx_XGIVEREF(__pyx_r);
10484 __Pyx_RefNannyFinishContext();
10497 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10498 static char __pyx_doc_8PyClical_8clifford_90frame[] =
"\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 <type 'PyClical.index_set'>\n ";
10499 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10500 PyObject *__pyx_r = 0;
10501 __Pyx_RefNannyDeclarations
10502 __Pyx_RefNannySetupContext(
"frame (wrapper)", 0);
10503 __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10506 __Pyx_RefNannyFinishContext();
10510 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10511 PyObject *__pyx_r = NULL;
10512 __Pyx_RefNannyDeclarations
10513 PyObject *__pyx_t_1 = NULL;
10514 PyObject *__pyx_t_2 = NULL;
10515 int __pyx_lineno = 0;
10516 const char *__pyx_filename = NULL;
10517 int __pyx_clineno = 0;
10518 __Pyx_RefNannySetupContext(
"frame", 0);
10527 __Pyx_XDECREF(__pyx_r);
10528 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10529 __Pyx_GOTREF(__pyx_t_1);
10530 __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_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10531 __Pyx_GOTREF(__pyx_t_2);
10532 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10533 __pyx_r = __pyx_t_2;
10547 __Pyx_XDECREF(__pyx_t_1);
10548 __Pyx_XDECREF(__pyx_t_2);
10549 __Pyx_AddTraceback(
"PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10552 __Pyx_XGIVEREF(__pyx_r);
10553 __Pyx_RefNannyFinishContext();
10566 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self);
10567 static char __pyx_doc_8PyClical_8clifford_92__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 ";
10568 #if CYTHON_COMPILING_IN_CPYTHON 10569 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10571 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10572 PyObject *__pyx_r = 0;
10573 __Pyx_RefNannyDeclarations
10574 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
10575 __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10578 __Pyx_RefNannyFinishContext();
10582 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10583 PyObject *__pyx_r = NULL;
10584 __Pyx_RefNannyDeclarations
10585 PyObject *__pyx_t_1 = NULL;
10586 int __pyx_lineno = 0;
10587 const char *__pyx_filename = NULL;
10588 int __pyx_clineno = 0;
10589 __Pyx_RefNannySetupContext(
"__repr__", 0);
10598 __Pyx_XDECREF(__pyx_r);
10599 __pyx_t_1 = __Pyx_PyBytes_FromString(
clifford_to_repr(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10600 __Pyx_GOTREF(__pyx_t_1);
10601 __pyx_r = __pyx_t_1;
10615 __Pyx_XDECREF(__pyx_t_1);
10616 __Pyx_AddTraceback(
"PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10619 __Pyx_XGIVEREF(__pyx_r);
10620 __Pyx_RefNannyFinishContext();
10633 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self);
10634 static char __pyx_doc_8PyClical_8clifford_94__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 ";
10635 #if CYTHON_COMPILING_IN_CPYTHON 10636 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10638 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10639 PyObject *__pyx_r = 0;
10640 __Pyx_RefNannyDeclarations
10641 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
10642 __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10645 __Pyx_RefNannyFinishContext();
10649 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10650 PyObject *__pyx_r = NULL;
10651 __Pyx_RefNannyDeclarations
10652 PyObject *__pyx_t_1 = NULL;
10653 int __pyx_lineno = 0;
10654 const char *__pyx_filename = NULL;
10655 int __pyx_clineno = 0;
10656 __Pyx_RefNannySetupContext(
"__str__", 0);
10665 __Pyx_XDECREF(__pyx_r);
10666 __pyx_t_1 = __Pyx_PyBytes_FromString(
clifford_to_str(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str());
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10667 __Pyx_GOTREF(__pyx_t_1);
10668 __pyx_r = __pyx_t_1;
10682 __Pyx_XDECREF(__pyx_t_1);
10683 __Pyx_AddTraceback(
"PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10686 __Pyx_XGIVEREF(__pyx_r);
10687 __Pyx_RefNannyFinishContext();
10700 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
10701 static char __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(2L)\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 <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type '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 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\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 ";
10702 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};
10703 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
10704 PyObject *__pyx_r = 0;
10705 __Pyx_RefNannyDeclarations
10706 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests (wrapper)", 0);
10707 __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
10710 __Pyx_RefNannyFinishContext();
10714 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
10715 PyObject *__pyx_r = NULL;
10716 __Pyx_RefNannyDeclarations
10717 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests", 0);
10726 __Pyx_XDECREF(__pyx_r);
10727 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10740 __Pyx_XGIVEREF(__pyx_r);
10741 __Pyx_RefNannyFinishContext();
10753 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10754 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10755 PyObject *__pyx_r = NULL;
10756 __Pyx_RefNannyDeclarations
10757 PyObject *__pyx_t_1 = NULL;
10758 PyObject *__pyx_t_2 = NULL;
10759 PyObject *__pyx_t_3 = NULL;
10760 int __pyx_lineno = 0;
10761 const char *__pyx_filename = NULL;
10762 int __pyx_clineno = 0;
10763 __Pyx_RefNannySetupContext(
"inv", 0);
10772 __Pyx_XDECREF(__pyx_r);
10773 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10774 __Pyx_GOTREF(__pyx_t_2);
10775 __Pyx_INCREF(__pyx_v_obj);
10776 __Pyx_GIVEREF(__pyx_v_obj);
10777 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10778 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10779 __Pyx_GOTREF(__pyx_t_3);
10780 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10781 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inv);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10782 __Pyx_GOTREF(__pyx_t_2);
10783 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10785 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10786 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10787 if (likely(__pyx_t_3)) {
10788 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10789 __Pyx_INCREF(__pyx_t_3);
10790 __Pyx_INCREF(
function);
10791 __Pyx_DECREF_SET(__pyx_t_2,
function);
10795 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10796 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10798 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10800 __Pyx_GOTREF(__pyx_t_1);
10801 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10802 __pyx_r = __pyx_t_1;
10816 __Pyx_XDECREF(__pyx_t_1);
10817 __Pyx_XDECREF(__pyx_t_2);
10818 __Pyx_XDECREF(__pyx_t_3);
10819 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10822 __Pyx_XGIVEREF(__pyx_r);
10823 __Pyx_RefNannyFinishContext();
10828 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10829 static char __pyx_doc_8PyClical_10inv[] =
"\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 ";
10830 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10831 PyObject *__pyx_r = 0;
10832 __Pyx_RefNannyDeclarations
10833 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
10834 __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
10837 __Pyx_RefNannyFinishContext();
10841 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10842 PyObject *__pyx_r = NULL;
10843 __Pyx_RefNannyDeclarations
10844 PyObject *__pyx_t_1 = NULL;
10845 int __pyx_lineno = 0;
10846 const char *__pyx_filename = NULL;
10847 int __pyx_clineno = 0;
10848 __Pyx_RefNannySetupContext(
"inv", 0);
10849 __Pyx_XDECREF(__pyx_r);
10850 __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10851 __Pyx_GOTREF(__pyx_t_1);
10852 __pyx_r = __pyx_t_1;
10858 __Pyx_XDECREF(__pyx_t_1);
10859 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10862 __Pyx_XGIVEREF(__pyx_r);
10863 __Pyx_RefNannyFinishContext();
10875 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10876 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10877 PyObject *__pyx_r = NULL;
10878 __Pyx_RefNannyDeclarations
10879 PyObject *__pyx_t_1 = NULL;
10880 PyObject *__pyx_t_2 = NULL;
10881 PyObject *__pyx_t_3 = NULL;
10882 int __pyx_lineno = 0;
10883 const char *__pyx_filename = NULL;
10884 int __pyx_clineno = 0;
10885 __Pyx_RefNannySetupContext(
"scalar", 0);
10894 __Pyx_XDECREF(__pyx_r);
10895 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10896 __Pyx_GOTREF(__pyx_t_2);
10897 __Pyx_INCREF(__pyx_v_obj);
10898 __Pyx_GIVEREF(__pyx_v_obj);
10899 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10900 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10901 __Pyx_GOTREF(__pyx_t_3);
10902 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10903 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10904 __Pyx_GOTREF(__pyx_t_2);
10905 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10907 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10908 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10909 if (likely(__pyx_t_3)) {
10910 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10911 __Pyx_INCREF(__pyx_t_3);
10912 __Pyx_INCREF(
function);
10913 __Pyx_DECREF_SET(__pyx_t_2,
function);
10917 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10918 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10920 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10922 __Pyx_GOTREF(__pyx_t_1);
10923 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10924 __pyx_r = __pyx_t_1;
10938 __Pyx_XDECREF(__pyx_t_1);
10939 __Pyx_XDECREF(__pyx_t_2);
10940 __Pyx_XDECREF(__pyx_t_3);
10941 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10944 __Pyx_XGIVEREF(__pyx_r);
10945 __Pyx_RefNannyFinishContext();
10950 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10951 static char __pyx_doc_8PyClical_12scalar[] =
"\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
10952 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10953 PyObject *__pyx_r = 0;
10954 __Pyx_RefNannyDeclarations
10955 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
10956 __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
10959 __Pyx_RefNannyFinishContext();
10963 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10964 PyObject *__pyx_r = NULL;
10965 __Pyx_RefNannyDeclarations
10966 PyObject *__pyx_t_1 = NULL;
10967 int __pyx_lineno = 0;
10968 const char *__pyx_filename = NULL;
10969 int __pyx_clineno = 0;
10970 __Pyx_RefNannySetupContext(
"scalar", 0);
10971 __Pyx_XDECREF(__pyx_r);
10972 __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10973 __Pyx_GOTREF(__pyx_t_1);
10974 __pyx_r = __pyx_t_1;
10980 __Pyx_XDECREF(__pyx_t_1);
10981 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10984 __Pyx_XGIVEREF(__pyx_r);
10985 __Pyx_RefNannyFinishContext();
10997 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10998 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10999 PyObject *__pyx_r = NULL;
11000 __Pyx_RefNannyDeclarations
11001 PyObject *__pyx_t_1 = NULL;
11002 PyObject *__pyx_t_2 = NULL;
11003 PyObject *__pyx_t_3 = NULL;
11004 int __pyx_lineno = 0;
11005 const char *__pyx_filename = NULL;
11006 int __pyx_clineno = 0;
11007 __Pyx_RefNannySetupContext(
"real", 0);
11016 __Pyx_XDECREF(__pyx_r);
11017 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11018 __Pyx_GOTREF(__pyx_t_2);
11019 __Pyx_INCREF(__pyx_v_obj);
11020 __Pyx_GIVEREF(__pyx_v_obj);
11021 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11022 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11023 __Pyx_GOTREF(__pyx_t_3);
11024 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11025 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11026 __Pyx_GOTREF(__pyx_t_2);
11027 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11029 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11030 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11031 if (likely(__pyx_t_3)) {
11032 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11033 __Pyx_INCREF(__pyx_t_3);
11034 __Pyx_INCREF(
function);
11035 __Pyx_DECREF_SET(__pyx_t_2,
function);
11039 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11040 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11042 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11044 __Pyx_GOTREF(__pyx_t_1);
11045 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11046 __pyx_r = __pyx_t_1;
11060 __Pyx_XDECREF(__pyx_t_1);
11061 __Pyx_XDECREF(__pyx_t_2);
11062 __Pyx_XDECREF(__pyx_t_3);
11063 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11066 __Pyx_XGIVEREF(__pyx_r);
11067 __Pyx_RefNannyFinishContext();
11072 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11073 static char __pyx_doc_8PyClical_14real[] =
"\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 ";
11074 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11075 PyObject *__pyx_r = 0;
11076 __Pyx_RefNannyDeclarations
11077 __Pyx_RefNannySetupContext(
"real (wrapper)", 0);
11078 __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11081 __Pyx_RefNannyFinishContext();
11085 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11086 PyObject *__pyx_r = NULL;
11087 __Pyx_RefNannyDeclarations
11088 PyObject *__pyx_t_1 = NULL;
11089 int __pyx_lineno = 0;
11090 const char *__pyx_filename = NULL;
11091 int __pyx_clineno = 0;
11092 __Pyx_RefNannySetupContext(
"real", 0);
11093 __Pyx_XDECREF(__pyx_r);
11094 __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11095 __Pyx_GOTREF(__pyx_t_1);
11096 __pyx_r = __pyx_t_1;
11102 __Pyx_XDECREF(__pyx_t_1);
11103 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11106 __Pyx_XGIVEREF(__pyx_r);
11107 __Pyx_RefNannyFinishContext();
11119 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11120 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11121 PyObject *__pyx_r = NULL;
11122 __Pyx_RefNannyDeclarations
11123 __Pyx_RefNannySetupContext(
"imag", 0);
11132 __Pyx_XDECREF(__pyx_r);
11133 __Pyx_INCREF(__pyx_float_0_0);
11134 __pyx_r = __pyx_float_0_0;
11147 __Pyx_XGIVEREF(__pyx_r);
11148 __Pyx_RefNannyFinishContext();
11153 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11154 static char __pyx_doc_8PyClical_16imag[] =
"\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 ";
11155 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11156 PyObject *__pyx_r = 0;
11157 __Pyx_RefNannyDeclarations
11158 __Pyx_RefNannySetupContext(
"imag (wrapper)", 0);
11159 __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11162 __Pyx_RefNannyFinishContext();
11166 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11167 PyObject *__pyx_r = NULL;
11168 __Pyx_RefNannyDeclarations
11169 PyObject *__pyx_t_1 = NULL;
11170 int __pyx_lineno = 0;
11171 const char *__pyx_filename = NULL;
11172 int __pyx_clineno = 0;
11173 __Pyx_RefNannySetupContext(
"imag", 0);
11174 __Pyx_XDECREF(__pyx_r);
11175 __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11176 __Pyx_GOTREF(__pyx_t_1);
11177 __pyx_r = __pyx_t_1;
11183 __Pyx_XDECREF(__pyx_t_1);
11184 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11187 __Pyx_XGIVEREF(__pyx_r);
11188 __Pyx_RefNannyFinishContext();
11200 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11201 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11202 PyObject *__pyx_r = NULL;
11203 __Pyx_RefNannyDeclarations
11204 PyObject *__pyx_t_1 = NULL;
11205 PyObject *__pyx_t_2 = NULL;
11206 PyObject *__pyx_t_3 = NULL;
11207 int __pyx_lineno = 0;
11208 const char *__pyx_filename = NULL;
11209 int __pyx_clineno = 0;
11210 __Pyx_RefNannySetupContext(
"pure", 0);
11219 __Pyx_XDECREF(__pyx_r);
11220 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11221 __Pyx_GOTREF(__pyx_t_2);
11222 __Pyx_INCREF(__pyx_v_obj);
11223 __Pyx_GIVEREF(__pyx_v_obj);
11224 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11225 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11226 __Pyx_GOTREF(__pyx_t_3);
11227 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11228 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pure);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11229 __Pyx_GOTREF(__pyx_t_2);
11230 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11232 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11233 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11234 if (likely(__pyx_t_3)) {
11235 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11236 __Pyx_INCREF(__pyx_t_3);
11237 __Pyx_INCREF(
function);
11238 __Pyx_DECREF_SET(__pyx_t_2,
function);
11242 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11243 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11245 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11247 __Pyx_GOTREF(__pyx_t_1);
11248 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11249 __pyx_r = __pyx_t_1;
11263 __Pyx_XDECREF(__pyx_t_1);
11264 __Pyx_XDECREF(__pyx_t_2);
11265 __Pyx_XDECREF(__pyx_t_3);
11266 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11269 __Pyx_XGIVEREF(__pyx_r);
11270 __Pyx_RefNannyFinishContext();
11275 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11276 static char __pyx_doc_8PyClical_18pure[] =
"\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 ";
11277 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11278 PyObject *__pyx_r = 0;
11279 __Pyx_RefNannyDeclarations
11280 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
11281 __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11284 __Pyx_RefNannyFinishContext();
11288 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11289 PyObject *__pyx_r = NULL;
11290 __Pyx_RefNannyDeclarations
11291 PyObject *__pyx_t_1 = NULL;
11292 int __pyx_lineno = 0;
11293 const char *__pyx_filename = NULL;
11294 int __pyx_clineno = 0;
11295 __Pyx_RefNannySetupContext(
"pure", 0);
11296 __Pyx_XDECREF(__pyx_r);
11297 __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11298 __Pyx_GOTREF(__pyx_t_1);
11299 __pyx_r = __pyx_t_1;
11305 __Pyx_XDECREF(__pyx_t_1);
11306 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11309 __Pyx_XGIVEREF(__pyx_r);
11310 __Pyx_RefNannyFinishContext();
11322 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11323 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11324 PyObject *__pyx_r = NULL;
11325 __Pyx_RefNannyDeclarations
11326 PyObject *__pyx_t_1 = NULL;
11327 PyObject *__pyx_t_2 = NULL;
11328 PyObject *__pyx_t_3 = NULL;
11329 int __pyx_lineno = 0;
11330 const char *__pyx_filename = NULL;
11331 int __pyx_clineno = 0;
11332 __Pyx_RefNannySetupContext(
"even", 0);
11341 __Pyx_XDECREF(__pyx_r);
11342 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11343 __Pyx_GOTREF(__pyx_t_2);
11344 __Pyx_INCREF(__pyx_v_obj);
11345 __Pyx_GIVEREF(__pyx_v_obj);
11346 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11347 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11348 __Pyx_GOTREF(__pyx_t_3);
11349 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11350 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_even);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11351 __Pyx_GOTREF(__pyx_t_2);
11352 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11354 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11355 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11356 if (likely(__pyx_t_3)) {
11357 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11358 __Pyx_INCREF(__pyx_t_3);
11359 __Pyx_INCREF(
function);
11360 __Pyx_DECREF_SET(__pyx_t_2,
function);
11364 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11365 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11367 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11369 __Pyx_GOTREF(__pyx_t_1);
11370 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11371 __pyx_r = __pyx_t_1;
11385 __Pyx_XDECREF(__pyx_t_1);
11386 __Pyx_XDECREF(__pyx_t_2);
11387 __Pyx_XDECREF(__pyx_t_3);
11388 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11391 __Pyx_XGIVEREF(__pyx_r);
11392 __Pyx_RefNannyFinishContext();
11397 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11398 static char __pyx_doc_8PyClical_20even[] =
"\n Even part of multivector, sum of even grade terms.\n\n >>> print even(clifford(\"1+{1}+{1,2}\"))\n 1+{1,2}\n ";
11399 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11400 PyObject *__pyx_r = 0;
11401 __Pyx_RefNannyDeclarations
11402 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
11403 __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11406 __Pyx_RefNannyFinishContext();
11410 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11411 PyObject *__pyx_r = NULL;
11412 __Pyx_RefNannyDeclarations
11413 PyObject *__pyx_t_1 = NULL;
11414 int __pyx_lineno = 0;
11415 const char *__pyx_filename = NULL;
11416 int __pyx_clineno = 0;
11417 __Pyx_RefNannySetupContext(
"even", 0);
11418 __Pyx_XDECREF(__pyx_r);
11419 __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11420 __Pyx_GOTREF(__pyx_t_1);
11421 __pyx_r = __pyx_t_1;
11427 __Pyx_XDECREF(__pyx_t_1);
11428 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11431 __Pyx_XGIVEREF(__pyx_r);
11432 __Pyx_RefNannyFinishContext();
11444 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11445 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11446 PyObject *__pyx_r = NULL;
11447 __Pyx_RefNannyDeclarations
11448 PyObject *__pyx_t_1 = NULL;
11449 PyObject *__pyx_t_2 = NULL;
11450 PyObject *__pyx_t_3 = NULL;
11451 int __pyx_lineno = 0;
11452 const char *__pyx_filename = NULL;
11453 int __pyx_clineno = 0;
11454 __Pyx_RefNannySetupContext(
"odd", 0);
11463 __Pyx_XDECREF(__pyx_r);
11464 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11465 __Pyx_GOTREF(__pyx_t_2);
11466 __Pyx_INCREF(__pyx_v_obj);
11467 __Pyx_GIVEREF(__pyx_v_obj);
11468 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11469 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11470 __Pyx_GOTREF(__pyx_t_3);
11471 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11472 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_odd);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11473 __Pyx_GOTREF(__pyx_t_2);
11474 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11476 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11477 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11478 if (likely(__pyx_t_3)) {
11479 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11480 __Pyx_INCREF(__pyx_t_3);
11481 __Pyx_INCREF(
function);
11482 __Pyx_DECREF_SET(__pyx_t_2,
function);
11486 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11487 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11489 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11491 __Pyx_GOTREF(__pyx_t_1);
11492 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11493 __pyx_r = __pyx_t_1;
11507 __Pyx_XDECREF(__pyx_t_1);
11508 __Pyx_XDECREF(__pyx_t_2);
11509 __Pyx_XDECREF(__pyx_t_3);
11510 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11513 __Pyx_XGIVEREF(__pyx_r);
11514 __Pyx_RefNannyFinishContext();
11519 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11520 static char __pyx_doc_8PyClical_22odd[] =
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print odd(clifford(\"1+{1}+{1,2}\"))\n {1}\n ";
11521 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11522 PyObject *__pyx_r = 0;
11523 __Pyx_RefNannyDeclarations
11524 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
11525 __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11528 __Pyx_RefNannyFinishContext();
11532 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11533 PyObject *__pyx_r = NULL;
11534 __Pyx_RefNannyDeclarations
11535 PyObject *__pyx_t_1 = NULL;
11536 int __pyx_lineno = 0;
11537 const char *__pyx_filename = NULL;
11538 int __pyx_clineno = 0;
11539 __Pyx_RefNannySetupContext(
"odd", 0);
11540 __Pyx_XDECREF(__pyx_r);
11541 __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11542 __Pyx_GOTREF(__pyx_t_1);
11543 __pyx_r = __pyx_t_1;
11549 __Pyx_XDECREF(__pyx_t_1);
11550 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11553 __Pyx_XGIVEREF(__pyx_r);
11554 __Pyx_RefNannyFinishContext();
11566 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11567 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11568 PyObject *__pyx_r = NULL;
11569 __Pyx_RefNannyDeclarations
11570 PyObject *__pyx_t_1 = NULL;
11571 PyObject *__pyx_t_2 = NULL;
11572 PyObject *__pyx_t_3 = NULL;
11573 int __pyx_lineno = 0;
11574 const char *__pyx_filename = NULL;
11575 int __pyx_clineno = 0;
11576 __Pyx_RefNannySetupContext(
"involute", 0);
11585 __Pyx_XDECREF(__pyx_r);
11586 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11587 __Pyx_GOTREF(__pyx_t_2);
11588 __Pyx_INCREF(__pyx_v_obj);
11589 __Pyx_GIVEREF(__pyx_v_obj);
11590 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11591 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11592 __Pyx_GOTREF(__pyx_t_3);
11593 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11594 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_involute);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11595 __Pyx_GOTREF(__pyx_t_2);
11596 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11598 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11599 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11600 if (likely(__pyx_t_3)) {
11601 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11602 __Pyx_INCREF(__pyx_t_3);
11603 __Pyx_INCREF(
function);
11604 __Pyx_DECREF_SET(__pyx_t_2,
function);
11608 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11609 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11611 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11613 __Pyx_GOTREF(__pyx_t_1);
11614 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11615 __pyx_r = __pyx_t_1;
11629 __Pyx_XDECREF(__pyx_t_1);
11630 __Pyx_XDECREF(__pyx_t_2);
11631 __Pyx_XDECREF(__pyx_t_3);
11632 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11635 __Pyx_XGIVEREF(__pyx_r);
11636 __Pyx_RefNannyFinishContext();
11641 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11642 static char __pyx_doc_8PyClical_24involute[] =
"\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 ";
11643 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11644 PyObject *__pyx_r = 0;
11645 __Pyx_RefNannyDeclarations
11646 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
11647 __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11650 __Pyx_RefNannyFinishContext();
11654 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11655 PyObject *__pyx_r = NULL;
11656 __Pyx_RefNannyDeclarations
11657 PyObject *__pyx_t_1 = NULL;
11658 int __pyx_lineno = 0;
11659 const char *__pyx_filename = NULL;
11660 int __pyx_clineno = 0;
11661 __Pyx_RefNannySetupContext(
"involute", 0);
11662 __Pyx_XDECREF(__pyx_r);
11663 __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11664 __Pyx_GOTREF(__pyx_t_1);
11665 __pyx_r = __pyx_t_1;
11671 __Pyx_XDECREF(__pyx_t_1);
11672 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11675 __Pyx_XGIVEREF(__pyx_r);
11676 __Pyx_RefNannyFinishContext();
11688 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11690 PyObject *__pyx_r = NULL;
11691 __Pyx_RefNannyDeclarations
11692 PyObject *__pyx_t_1 = NULL;
11693 PyObject *__pyx_t_2 = NULL;
11694 PyObject *__pyx_t_3 = NULL;
11695 int __pyx_lineno = 0;
11696 const char *__pyx_filename = NULL;
11697 int __pyx_clineno = 0;
11698 __Pyx_RefNannySetupContext(
"reverse", 0);
11707 __Pyx_XDECREF(__pyx_r);
11708 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11709 __Pyx_GOTREF(__pyx_t_2);
11710 __Pyx_INCREF(__pyx_v_obj);
11711 __Pyx_GIVEREF(__pyx_v_obj);
11712 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11713 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11714 __Pyx_GOTREF(__pyx_t_3);
11715 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11716 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverse);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11717 __Pyx_GOTREF(__pyx_t_2);
11718 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11720 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11721 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11722 if (likely(__pyx_t_3)) {
11723 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11724 __Pyx_INCREF(__pyx_t_3);
11725 __Pyx_INCREF(
function);
11726 __Pyx_DECREF_SET(__pyx_t_2,
function);
11730 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11731 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11733 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11735 __Pyx_GOTREF(__pyx_t_1);
11736 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11737 __pyx_r = __pyx_t_1;
11751 __Pyx_XDECREF(__pyx_t_1);
11752 __Pyx_XDECREF(__pyx_t_2);
11753 __Pyx_XDECREF(__pyx_t_3);
11754 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11757 __Pyx_XGIVEREF(__pyx_r);
11758 __Pyx_RefNannyFinishContext();
11763 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11764 static char __pyx_doc_8PyClical_26reverse[] =
"\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 ";
11765 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11766 PyObject *__pyx_r = 0;
11767 __Pyx_RefNannyDeclarations
11768 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
11769 __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
11772 __Pyx_RefNannyFinishContext();
11776 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11777 PyObject *__pyx_r = NULL;
11778 __Pyx_RefNannyDeclarations
11779 PyObject *__pyx_t_1 = NULL;
11780 int __pyx_lineno = 0;
11781 const char *__pyx_filename = NULL;
11782 int __pyx_clineno = 0;
11783 __Pyx_RefNannySetupContext(
"reverse", 0);
11784 __Pyx_XDECREF(__pyx_r);
11785 __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11786 __Pyx_GOTREF(__pyx_t_1);
11787 __pyx_r = __pyx_t_1;
11793 __Pyx_XDECREF(__pyx_t_1);
11794 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11797 __Pyx_XGIVEREF(__pyx_r);
11798 __Pyx_RefNannyFinishContext();
11810 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11811 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11812 PyObject *__pyx_r = NULL;
11813 __Pyx_RefNannyDeclarations
11814 PyObject *__pyx_t_1 = NULL;
11815 PyObject *__pyx_t_2 = NULL;
11816 PyObject *__pyx_t_3 = NULL;
11817 int __pyx_lineno = 0;
11818 const char *__pyx_filename = NULL;
11819 int __pyx_clineno = 0;
11820 __Pyx_RefNannySetupContext(
"conj", 0);
11829 __Pyx_XDECREF(__pyx_r);
11830 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11831 __Pyx_GOTREF(__pyx_t_2);
11832 __Pyx_INCREF(__pyx_v_obj);
11833 __Pyx_GIVEREF(__pyx_v_obj);
11834 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11835 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11836 __Pyx_GOTREF(__pyx_t_3);
11837 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11838 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_conj);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11839 __Pyx_GOTREF(__pyx_t_2);
11840 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11842 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11843 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11844 if (likely(__pyx_t_3)) {
11845 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11846 __Pyx_INCREF(__pyx_t_3);
11847 __Pyx_INCREF(
function);
11848 __Pyx_DECREF_SET(__pyx_t_2,
function);
11852 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11853 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11855 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11857 __Pyx_GOTREF(__pyx_t_1);
11858 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11859 __pyx_r = __pyx_t_1;
11873 __Pyx_XDECREF(__pyx_t_1);
11874 __Pyx_XDECREF(__pyx_t_2);
11875 __Pyx_XDECREF(__pyx_t_3);
11876 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11879 __Pyx_XGIVEREF(__pyx_r);
11880 __Pyx_RefNannyFinishContext();
11885 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11886 static char __pyx_doc_8PyClical_28conj[] =
"\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 ";
11887 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11888 PyObject *__pyx_r = 0;
11889 __Pyx_RefNannyDeclarations
11890 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
11891 __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
11894 __Pyx_RefNannyFinishContext();
11898 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11899 PyObject *__pyx_r = NULL;
11900 __Pyx_RefNannyDeclarations
11901 PyObject *__pyx_t_1 = NULL;
11902 int __pyx_lineno = 0;
11903 const char *__pyx_filename = NULL;
11904 int __pyx_clineno = 0;
11905 __Pyx_RefNannySetupContext(
"conj", 0);
11906 __Pyx_XDECREF(__pyx_r);
11907 __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11908 __Pyx_GOTREF(__pyx_t_1);
11909 __pyx_r = __pyx_t_1;
11915 __Pyx_XDECREF(__pyx_t_1);
11916 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11919 __Pyx_XGIVEREF(__pyx_r);
11920 __Pyx_RefNannyFinishContext();
11932 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11933 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11934 PyObject *__pyx_r = NULL;
11935 __Pyx_RefNannyDeclarations
11936 PyObject *__pyx_t_1 = NULL;
11937 PyObject *__pyx_t_2 = NULL;
11938 PyObject *__pyx_t_3 = NULL;
11939 int __pyx_lineno = 0;
11940 const char *__pyx_filename = NULL;
11941 int __pyx_clineno = 0;
11942 __Pyx_RefNannySetupContext(
"quad", 0);
11951 __Pyx_XDECREF(__pyx_r);
11952 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11953 __Pyx_GOTREF(__pyx_t_2);
11954 __Pyx_INCREF(__pyx_v_obj);
11955 __Pyx_GIVEREF(__pyx_v_obj);
11956 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11957 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11958 __Pyx_GOTREF(__pyx_t_3);
11959 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11960 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_quad);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11961 __Pyx_GOTREF(__pyx_t_2);
11962 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11964 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11965 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11966 if (likely(__pyx_t_3)) {
11967 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11968 __Pyx_INCREF(__pyx_t_3);
11969 __Pyx_INCREF(
function);
11970 __Pyx_DECREF_SET(__pyx_t_2,
function);
11974 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11975 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11977 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11979 __Pyx_GOTREF(__pyx_t_1);
11980 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11981 __pyx_r = __pyx_t_1;
11995 __Pyx_XDECREF(__pyx_t_1);
11996 __Pyx_XDECREF(__pyx_t_2);
11997 __Pyx_XDECREF(__pyx_t_3);
11998 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12001 __Pyx_XGIVEREF(__pyx_r);
12002 __Pyx_RefNannyFinishContext();
12007 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12008 static char __pyx_doc_8PyClical_30quad[] =
"\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 ";
12009 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12010 PyObject *__pyx_r = 0;
12011 __Pyx_RefNannyDeclarations
12012 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
12013 __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12016 __Pyx_RefNannyFinishContext();
12020 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12021 PyObject *__pyx_r = NULL;
12022 __Pyx_RefNannyDeclarations
12023 PyObject *__pyx_t_1 = NULL;
12024 int __pyx_lineno = 0;
12025 const char *__pyx_filename = NULL;
12026 int __pyx_clineno = 0;
12027 __Pyx_RefNannySetupContext(
"quad", 0);
12028 __Pyx_XDECREF(__pyx_r);
12029 __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12030 __Pyx_GOTREF(__pyx_t_1);
12031 __pyx_r = __pyx_t_1;
12037 __Pyx_XDECREF(__pyx_t_1);
12038 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12041 __Pyx_XGIVEREF(__pyx_r);
12042 __Pyx_RefNannyFinishContext();
12054 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12055 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12056 PyObject *__pyx_r = NULL;
12057 __Pyx_RefNannyDeclarations
12058 PyObject *__pyx_t_1 = NULL;
12059 PyObject *__pyx_t_2 = NULL;
12060 PyObject *__pyx_t_3 = NULL;
12061 int __pyx_lineno = 0;
12062 const char *__pyx_filename = NULL;
12063 int __pyx_clineno = 0;
12064 __Pyx_RefNannySetupContext(
"norm", 0);
12073 __Pyx_XDECREF(__pyx_r);
12074 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12075 __Pyx_GOTREF(__pyx_t_2);
12076 __Pyx_INCREF(__pyx_v_obj);
12077 __Pyx_GIVEREF(__pyx_v_obj);
12078 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12079 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12080 __Pyx_GOTREF(__pyx_t_3);
12081 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12082 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_norm);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12083 __Pyx_GOTREF(__pyx_t_2);
12084 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12086 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
12087 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12088 if (likely(__pyx_t_3)) {
12089 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
12090 __Pyx_INCREF(__pyx_t_3);
12091 __Pyx_INCREF(
function);
12092 __Pyx_DECREF_SET(__pyx_t_2,
function);
12096 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12097 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12099 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12101 __Pyx_GOTREF(__pyx_t_1);
12102 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12103 __pyx_r = __pyx_t_1;
12117 __Pyx_XDECREF(__pyx_t_1);
12118 __Pyx_XDECREF(__pyx_t_2);
12119 __Pyx_XDECREF(__pyx_t_3);
12120 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12123 __Pyx_XGIVEREF(__pyx_r);
12124 __Pyx_RefNannyFinishContext();
12129 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12130 static char __pyx_doc_8PyClical_32norm[] =
"\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 ";
12131 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12132 PyObject *__pyx_r = 0;
12133 __Pyx_RefNannyDeclarations
12134 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
12135 __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12138 __Pyx_RefNannyFinishContext();
12142 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12143 PyObject *__pyx_r = NULL;
12144 __Pyx_RefNannyDeclarations
12145 PyObject *__pyx_t_1 = NULL;
12146 int __pyx_lineno = 0;
12147 const char *__pyx_filename = NULL;
12148 int __pyx_clineno = 0;
12149 __Pyx_RefNannySetupContext(
"norm", 0);
12150 __Pyx_XDECREF(__pyx_r);
12151 __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12152 __Pyx_GOTREF(__pyx_t_1);
12153 __pyx_r = __pyx_t_1;
12159 __Pyx_XDECREF(__pyx_t_1);
12160 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12163 __Pyx_XGIVEREF(__pyx_r);
12164 __Pyx_RefNannyFinishContext();
12176 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12177 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12178 PyObject *__pyx_r = NULL;
12179 __Pyx_RefNannyDeclarations
12180 PyObject *__pyx_t_1 = NULL;
12181 int __pyx_lineno = 0;
12182 const char *__pyx_filename = NULL;
12183 int __pyx_clineno = 0;
12184 __Pyx_RefNannySetupContext(
"abs", 0);
12193 __Pyx_XDECREF(__pyx_r);
12194 __pyx_t_1 =
PyFloat_FromDouble(
abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12195 __Pyx_GOTREF(__pyx_t_1);
12196 __pyx_r = __pyx_t_1;
12210 __Pyx_XDECREF(__pyx_t_1);
12211 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12214 __Pyx_XGIVEREF(__pyx_r);
12215 __Pyx_RefNannyFinishContext();
12220 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12221 static char __pyx_doc_8PyClical_34abs[] =
"\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
12222 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12223 PyObject *__pyx_r = 0;
12224 __Pyx_RefNannyDeclarations
12225 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
12226 __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12229 __Pyx_RefNannyFinishContext();
12233 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12234 PyObject *__pyx_r = NULL;
12235 __Pyx_RefNannyDeclarations
12236 PyObject *__pyx_t_1 = NULL;
12237 int __pyx_lineno = 0;
12238 const char *__pyx_filename = NULL;
12239 int __pyx_clineno = 0;
12240 __Pyx_RefNannySetupContext(
"abs", 0);
12241 __Pyx_XDECREF(__pyx_r);
12242 __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12243 __Pyx_GOTREF(__pyx_t_1);
12244 __pyx_r = __pyx_t_1;
12250 __Pyx_XDECREF(__pyx_t_1);
12251 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12254 __Pyx_XGIVEREF(__pyx_r);
12255 __Pyx_RefNannyFinishContext();
12267 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12268 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12269 PyObject *__pyx_r = NULL;
12270 __Pyx_RefNannyDeclarations
12271 PyObject *__pyx_t_1 = NULL;
12272 int __pyx_lineno = 0;
12273 const char *__pyx_filename = NULL;
12274 int __pyx_clineno = 0;
12275 __Pyx_RefNannySetupContext(
"max_abs", 0);
12284 __Pyx_XDECREF(__pyx_r);
12285 __pyx_t_1 =
PyFloat_FromDouble(
max_abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12286 __Pyx_GOTREF(__pyx_t_1);
12287 __pyx_r = __pyx_t_1;
12301 __Pyx_XDECREF(__pyx_t_1);
12302 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12305 __Pyx_XGIVEREF(__pyx_r);
12306 __Pyx_RefNannyFinishContext();
12311 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12312 static char __pyx_doc_8PyClical_36max_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 ";
12313 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12314 PyObject *__pyx_r = 0;
12315 __Pyx_RefNannyDeclarations
12316 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
12317 __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12320 __Pyx_RefNannyFinishContext();
12324 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12325 PyObject *__pyx_r = NULL;
12326 __Pyx_RefNannyDeclarations
12327 PyObject *__pyx_t_1 = NULL;
12328 int __pyx_lineno = 0;
12329 const char *__pyx_filename = NULL;
12330 int __pyx_clineno = 0;
12331 __Pyx_RefNannySetupContext(
"max_abs", 0);
12332 __Pyx_XDECREF(__pyx_r);
12333 __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12334 __Pyx_GOTREF(__pyx_t_1);
12335 __pyx_r = __pyx_t_1;
12341 __Pyx_XDECREF(__pyx_t_1);
12342 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12345 __Pyx_XGIVEREF(__pyx_r);
12346 __Pyx_RefNannyFinishContext();
12358 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12359 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12360 PyObject *__pyx_r = NULL;
12361 __Pyx_RefNannyDeclarations
12362 PyObject *__pyx_t_1 = NULL;
12363 PyObject *__pyx_t_2 = NULL;
12364 PyObject *__pyx_t_3 = NULL;
12365 PyObject *__pyx_t_4 = NULL;
12366 PyObject *__pyx_t_5 = NULL;
12367 PyObject *__pyx_t_6 = NULL;
12368 Py_ssize_t __pyx_t_7;
12369 PyObject *__pyx_t_8 = NULL;
12370 PyObject *__pyx_t_9 = NULL;
12371 PyObject *__pyx_t_10 = NULL;
12372 PyObject *__pyx_t_11 = NULL;
12373 int __pyx_lineno = 0;
12374 const char *__pyx_filename = NULL;
12375 int __pyx_clineno = 0;
12376 __Pyx_RefNannySetupContext(
"pow", 0);
12386 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12387 __Pyx_XGOTREF(__pyx_t_1);
12388 __Pyx_XGOTREF(__pyx_t_2);
12389 __Pyx_XGOTREF(__pyx_t_3);
12399 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12400 __Pyx_GOTREF(__pyx_t_5);
12401 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12402 __Pyx_GOTREF(__pyx_t_6);
12403 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12406 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
12407 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12408 if (likely(__pyx_t_5)) {
12409 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
12410 __Pyx_INCREF(__pyx_t_5);
12411 __Pyx_INCREF(
function);
12412 __Pyx_DECREF_SET(__pyx_t_6,
function);
12416 __pyx_t_8 = PyTuple_New(2+__pyx_t_7);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12417 __Pyx_GOTREF(__pyx_t_8);
12419 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12421 __Pyx_INCREF(__pyx_v_obj);
12422 __Pyx_GIVEREF(__pyx_v_obj);
12423 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12424 __Pyx_INCREF(__pyx_v_m);
12425 __Pyx_GIVEREF(__pyx_v_m);
12426 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12427 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12428 __Pyx_GOTREF(__pyx_t_4);
12429 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12430 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12431 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12441 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12442 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12443 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12444 goto __pyx_L10_try_end;
12446 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12447 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12448 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12449 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12459 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12460 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12461 __Pyx_GOTREF(__pyx_t_4);
12462 __Pyx_GOTREF(__pyx_t_6);
12463 __Pyx_GOTREF(__pyx_t_8);
12472 __Pyx_XDECREF(__pyx_r);
12473 __pyx_t_9 = PyTuple_New(1);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12474 __Pyx_GOTREF(__pyx_t_9);
12475 __Pyx_INCREF(__pyx_v_obj);
12476 __Pyx_GIVEREF(__pyx_v_obj);
12477 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12478 __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_9, NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12479 __Pyx_GOTREF(__pyx_t_10);
12480 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12481 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_pow);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12482 __Pyx_GOTREF(__pyx_t_9);
12483 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12485 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
12486 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12487 if (likely(__pyx_t_10)) {
12488 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
12489 __Pyx_INCREF(__pyx_t_10);
12490 __Pyx_INCREF(
function);
12491 __Pyx_DECREF_SET(__pyx_t_9,
function);
12495 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_m);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12496 __Pyx_GOTREF(__pyx_t_5);
12498 __pyx_t_11 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12499 __Pyx_GOTREF(__pyx_t_11);
12500 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
12501 __Pyx_INCREF(__pyx_v_m);
12502 __Pyx_GIVEREF(__pyx_v_m);
12503 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12504 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12505 __Pyx_GOTREF(__pyx_t_5);
12506 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12508 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12509 __pyx_r = __pyx_t_5;
12511 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12512 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12513 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12514 goto __pyx_L6_except_return;
12516 __pyx_L5_except_error:;
12525 __Pyx_XGIVEREF(__pyx_t_1);
12526 __Pyx_XGIVEREF(__pyx_t_2);
12527 __Pyx_XGIVEREF(__pyx_t_3);
12528 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12529 goto __pyx_L1_error;
12530 __pyx_L6_except_return:;
12531 __Pyx_XGIVEREF(__pyx_t_1);
12532 __Pyx_XGIVEREF(__pyx_t_2);
12533 __Pyx_XGIVEREF(__pyx_t_3);
12534 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12536 __pyx_L10_try_end:;
12548 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12551 __Pyx_XDECREF(__pyx_t_4);
12552 __Pyx_XDECREF(__pyx_t_5);
12553 __Pyx_XDECREF(__pyx_t_6);
12554 __Pyx_XDECREF(__pyx_t_8);
12555 __Pyx_XDECREF(__pyx_t_9);
12556 __Pyx_XDECREF(__pyx_t_10);
12557 __Pyx_XDECREF(__pyx_t_11);
12558 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12561 __Pyx_XGIVEREF(__pyx_r);
12562 __Pyx_RefNannyFinishContext();
12567 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12568 static char __pyx_doc_8PyClical_38pow[] =
"\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 ";
12569 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12570 PyObject *__pyx_v_obj = 0;
12571 PyObject *__pyx_v_m = 0;
12572 int __pyx_lineno = 0;
12573 const char *__pyx_filename = NULL;
12574 int __pyx_clineno = 0;
12575 PyObject *__pyx_r = 0;
12576 __Pyx_RefNannyDeclarations
12577 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
12579 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12580 PyObject* values[2] = {0,0};
12581 if (unlikely(__pyx_kwds)) {
12582 Py_ssize_t kw_args;
12583 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12584 switch (pos_args) {
12585 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12586 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12588 default:
goto __pyx_L5_argtuple_error;
12590 kw_args = PyDict_Size(__pyx_kwds);
12591 switch (pos_args) {
12593 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12594 else goto __pyx_L5_argtuple_error;
12596 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12598 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12601 if (unlikely(kw_args > 0)) {
12602 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"pow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12604 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12605 goto __pyx_L5_argtuple_error;
12607 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12608 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12610 __pyx_v_obj = values[0];
12611 __pyx_v_m = values[1];
12613 goto __pyx_L4_argument_unpacking_done;
12614 __pyx_L5_argtuple_error:;
12615 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12617 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12618 __Pyx_RefNannyFinishContext();
12620 __pyx_L4_argument_unpacking_done:;
12621 __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12624 __Pyx_RefNannyFinishContext();
12628 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12629 PyObject *__pyx_r = NULL;
12630 __Pyx_RefNannyDeclarations
12631 PyObject *__pyx_t_1 = NULL;
12632 int __pyx_lineno = 0;
12633 const char *__pyx_filename = NULL;
12634 int __pyx_clineno = 0;
12635 __Pyx_RefNannySetupContext(
"pow", 0);
12636 __Pyx_XDECREF(__pyx_r);
12637 __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12638 __Pyx_GOTREF(__pyx_t_1);
12639 __pyx_r = __pyx_t_1;
12645 __Pyx_XDECREF(__pyx_t_1);
12646 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12649 __Pyx_XGIVEREF(__pyx_r);
12650 __Pyx_RefNannyFinishContext();
12662 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12663 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12664 PyObject *__pyx_r = NULL;
12665 __Pyx_RefNannyDeclarations
12666 PyObject *__pyx_t_1 = NULL;
12667 PyObject *__pyx_t_2 = NULL;
12668 PyObject *__pyx_t_3 = NULL;
12669 PyObject *__pyx_t_4 = NULL;
12670 int __pyx_lineno = 0;
12671 const char *__pyx_filename = NULL;
12672 int __pyx_clineno = 0;
12673 __Pyx_RefNannySetupContext(
"outer_pow", 0);
12682 __Pyx_XDECREF(__pyx_r);
12683 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12684 __Pyx_GOTREF(__pyx_t_2);
12685 __Pyx_INCREF(__pyx_v_obj);
12686 __Pyx_GIVEREF(__pyx_v_obj);
12687 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12688 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12689 __Pyx_GOTREF(__pyx_t_3);
12690 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12691 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outer_pow);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12692 __Pyx_GOTREF(__pyx_t_2);
12693 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12695 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
12696 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12697 if (likely(__pyx_t_3)) {
12698 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
12699 __Pyx_INCREF(__pyx_t_3);
12700 __Pyx_INCREF(
function);
12701 __Pyx_DECREF_SET(__pyx_t_2,
function);
12705 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_m);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12706 __Pyx_GOTREF(__pyx_t_1);
12708 __pyx_t_4 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12709 __Pyx_GOTREF(__pyx_t_4);
12710 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
12711 __Pyx_INCREF(__pyx_v_m);
12712 __Pyx_GIVEREF(__pyx_v_m);
12713 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
12714 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12715 __Pyx_GOTREF(__pyx_t_1);
12716 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12719 __pyx_r = __pyx_t_1;
12733 __Pyx_XDECREF(__pyx_t_1);
12734 __Pyx_XDECREF(__pyx_t_2);
12735 __Pyx_XDECREF(__pyx_t_3);
12736 __Pyx_XDECREF(__pyx_t_4);
12737 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12740 __Pyx_XGIVEREF(__pyx_r);
12741 __Pyx_RefNannyFinishContext();
12746 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12747 static char __pyx_doc_8PyClical_40outer_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 ";
12748 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12749 PyObject *__pyx_v_obj = 0;
12750 PyObject *__pyx_v_m = 0;
12751 int __pyx_lineno = 0;
12752 const char *__pyx_filename = NULL;
12753 int __pyx_clineno = 0;
12754 PyObject *__pyx_r = 0;
12755 __Pyx_RefNannyDeclarations
12756 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
12758 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12759 PyObject* values[2] = {0,0};
12760 if (unlikely(__pyx_kwds)) {
12761 Py_ssize_t kw_args;
12762 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12763 switch (pos_args) {
12764 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12765 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12767 default:
goto __pyx_L5_argtuple_error;
12769 kw_args = PyDict_Size(__pyx_kwds);
12770 switch (pos_args) {
12772 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12773 else goto __pyx_L5_argtuple_error;
12775 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12777 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12780 if (unlikely(kw_args > 0)) {
12781 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"outer_pow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12783 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12784 goto __pyx_L5_argtuple_error;
12786 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12787 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12789 __pyx_v_obj = values[0];
12790 __pyx_v_m = values[1];
12792 goto __pyx_L4_argument_unpacking_done;
12793 __pyx_L5_argtuple_error:;
12794 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12796 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12797 __Pyx_RefNannyFinishContext();
12799 __pyx_L4_argument_unpacking_done:;
12800 __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12803 __Pyx_RefNannyFinishContext();
12807 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12808 PyObject *__pyx_r = NULL;
12809 __Pyx_RefNannyDeclarations
12810 PyObject *__pyx_t_1 = NULL;
12811 int __pyx_lineno = 0;
12812 const char *__pyx_filename = NULL;
12813 int __pyx_clineno = 0;
12814 __Pyx_RefNannySetupContext(
"outer_pow", 0);
12815 __Pyx_XDECREF(__pyx_r);
12816 __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12817 __Pyx_GOTREF(__pyx_t_1);
12818 __pyx_r = __pyx_t_1;
12824 __Pyx_XDECREF(__pyx_t_1);
12825 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12828 __Pyx_XGIVEREF(__pyx_r);
12829 __Pyx_RefNannyFinishContext();
12841 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12842 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12843 PyObject *__pyx_r = NULL;
12844 __Pyx_RefNannyDeclarations
12845 PyObject *__pyx_t_1 = NULL;
12846 PyObject *__pyx_t_2 = NULL;
12847 int __pyx_lineno = 0;
12848 const char *__pyx_filename = NULL;
12849 int __pyx_clineno = 0;
12850 __Pyx_RefNannySetupContext(
"complexifier", 0);
12859 __Pyx_XDECREF(__pyx_r);
12860 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12861 __Pyx_GOTREF(__pyx_t_1);
12862 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
complexifier(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12863 __Pyx_GOTREF(__pyx_t_2);
12864 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12865 __pyx_r = __pyx_t_2;
12879 __Pyx_XDECREF(__pyx_t_1);
12880 __Pyx_XDECREF(__pyx_t_2);
12881 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12884 __Pyx_XGIVEREF(__pyx_r);
12885 __Pyx_RefNannyFinishContext();
12890 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12891 static char __pyx_doc_8PyClical_42complexifier[] =
"\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 ";
12892 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12893 PyObject *__pyx_r = 0;
12894 __Pyx_RefNannyDeclarations
12895 __Pyx_RefNannySetupContext(
"complexifier (wrapper)", 0);
12896 __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
12899 __Pyx_RefNannyFinishContext();
12903 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12904 PyObject *__pyx_r = NULL;
12905 __Pyx_RefNannyDeclarations
12906 PyObject *__pyx_t_1 = NULL;
12907 int __pyx_lineno = 0;
12908 const char *__pyx_filename = NULL;
12909 int __pyx_clineno = 0;
12910 __Pyx_RefNannySetupContext(
"complexifier", 0);
12911 __Pyx_XDECREF(__pyx_r);
12912 __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12913 __Pyx_GOTREF(__pyx_t_1);
12914 __pyx_r = __pyx_t_1;
12920 __Pyx_XDECREF(__pyx_t_1);
12921 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12924 __Pyx_XGIVEREF(__pyx_r);
12925 __Pyx_RefNannyFinishContext();
12937 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12938 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) {
12939 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12940 PyObject *__pyx_r = NULL;
12941 __Pyx_RefNannyDeclarations
12944 PyObject *__pyx_t_3 = NULL;
12946 PyObject *__pyx_t_5 = NULL;
12947 PyObject *__pyx_t_6 = NULL;
12948 PyObject *__pyx_t_7 = NULL;
12949 PyObject *__pyx_t_8 = NULL;
12950 PyObject *__pyx_t_9 = NULL;
12951 PyObject *__pyx_t_10 = NULL;
12952 PyObject *__pyx_t_11 = NULL;
12953 int __pyx_lineno = 0;
12954 const char *__pyx_filename = NULL;
12955 int __pyx_clineno = 0;
12956 __Pyx_RefNannySetupContext(
"sqrt", 0);
12957 if (__pyx_optional_args) {
12958 if (__pyx_optional_args->__pyx_n > 0) {
12959 __pyx_v_i = __pyx_optional_args->i;
12970 __pyx_t_1 = (__pyx_v_i != Py_None);
12971 __pyx_t_2 = (__pyx_t_1 != 0);
12981 __Pyx_XDECREF(__pyx_r);
12982 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12983 __Pyx_GOTREF(__pyx_t_3);
12985 __pyx_t_4 =
sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12987 __Pyx_CppExn2PyErr();
12988 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12990 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12991 __Pyx_GOTREF(__pyx_t_5);
12992 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12993 __pyx_r = __pyx_t_5;
13015 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13016 __Pyx_XGOTREF(__pyx_t_6);
13017 __Pyx_XGOTREF(__pyx_t_7);
13018 __Pyx_XGOTREF(__pyx_t_8);
13028 __Pyx_XDECREF(__pyx_r);
13029 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13030 __Pyx_GOTREF(__pyx_t_3);
13031 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13032 __Pyx_GOTREF(__pyx_t_9);
13033 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13035 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13036 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13037 if (likely(__pyx_t_3)) {
13038 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13039 __Pyx_INCREF(__pyx_t_3);
13040 __Pyx_INCREF(
function);
13041 __Pyx_DECREF_SET(__pyx_t_9,
function);
13045 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13046 __Pyx_GOTREF(__pyx_t_5);
13048 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13049 __Pyx_GOTREF(__pyx_t_10);
13050 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13051 __Pyx_INCREF(__pyx_v_obj);
13052 __Pyx_GIVEREF(__pyx_v_obj);
13053 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13054 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13055 __Pyx_GOTREF(__pyx_t_5);
13056 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13058 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13059 __pyx_r = __pyx_t_5;
13061 goto __pyx_L8_try_return;
13072 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13073 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13074 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13075 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13085 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13086 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13087 __Pyx_GOTREF(__pyx_t_5);
13088 __Pyx_GOTREF(__pyx_t_9);
13089 __Pyx_GOTREF(__pyx_t_10);
13098 __Pyx_XDECREF(__pyx_r);
13099 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13100 __Pyx_GOTREF(__pyx_t_3);
13101 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13102 __Pyx_GOTREF(__pyx_t_11);
13103 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13104 __pyx_r = __pyx_t_11;
13106 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13107 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13108 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13109 goto __pyx_L7_except_return;
13111 __pyx_L6_except_error:;
13120 __Pyx_XGIVEREF(__pyx_t_6);
13121 __Pyx_XGIVEREF(__pyx_t_7);
13122 __Pyx_XGIVEREF(__pyx_t_8);
13123 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13124 goto __pyx_L1_error;
13125 __pyx_L8_try_return:;
13126 __Pyx_XGIVEREF(__pyx_t_6);
13127 __Pyx_XGIVEREF(__pyx_t_7);
13128 __Pyx_XGIVEREF(__pyx_t_8);
13129 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13131 __pyx_L7_except_return:;
13132 __Pyx_XGIVEREF(__pyx_t_6);
13133 __Pyx_XGIVEREF(__pyx_t_7);
13134 __Pyx_XGIVEREF(__pyx_t_8);
13135 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13150 __Pyx_XDECREF(__pyx_t_3);
13151 __Pyx_XDECREF(__pyx_t_5);
13152 __Pyx_XDECREF(__pyx_t_9);
13153 __Pyx_XDECREF(__pyx_t_10);
13154 __Pyx_XDECREF(__pyx_t_11);
13155 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13158 __Pyx_XGIVEREF(__pyx_r);
13159 __Pyx_RefNannyFinishContext();
13164 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13165 static char __pyx_doc_8PyClical_44sqrt[] =
"\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 ";
13166 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13167 PyObject *__pyx_v_obj = 0;
13168 PyObject *__pyx_v_i = 0;
13169 int __pyx_lineno = 0;
13170 const char *__pyx_filename = NULL;
13171 int __pyx_clineno = 0;
13172 PyObject *__pyx_r = 0;
13173 __Pyx_RefNannyDeclarations
13174 __Pyx_RefNannySetupContext(
"sqrt (wrapper)", 0);
13176 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13177 PyObject* values[2] = {0,0};
13178 values[1] = ((PyObject *)Py_None);
13179 if (unlikely(__pyx_kwds)) {
13180 Py_ssize_t kw_args;
13181 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13182 switch (pos_args) {
13183 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13184 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13186 default:
goto __pyx_L5_argtuple_error;
13188 kw_args = PyDict_Size(__pyx_kwds);
13189 switch (pos_args) {
13191 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13192 else goto __pyx_L5_argtuple_error;
13195 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13196 if (value) { values[1] = value; kw_args--; }
13199 if (unlikely(kw_args > 0)) {
13200 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"sqrt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13203 switch (PyTuple_GET_SIZE(__pyx_args)) {
13204 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13205 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13207 default:
goto __pyx_L5_argtuple_error;
13210 __pyx_v_obj = values[0];
13211 __pyx_v_i = values[1];
13213 goto __pyx_L4_argument_unpacking_done;
13214 __pyx_L5_argtuple_error:;
13215 __Pyx_RaiseArgtupleInvalid(
"sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13217 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13218 __Pyx_RefNannyFinishContext();
13220 __pyx_L4_argument_unpacking_done:;
13221 __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13224 __Pyx_RefNannyFinishContext();
13228 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13229 PyObject *__pyx_r = NULL;
13230 __Pyx_RefNannyDeclarations
13231 PyObject *__pyx_t_1 = NULL;
13232 struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13233 int __pyx_lineno = 0;
13234 const char *__pyx_filename = NULL;
13235 int __pyx_clineno = 0;
13236 __Pyx_RefNannySetupContext(
"sqrt", 0);
13237 __Pyx_XDECREF(__pyx_r);
13238 __pyx_t_2.__pyx_n = 1;
13239 __pyx_t_2.i = __pyx_v_i;
13240 __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13241 __Pyx_GOTREF(__pyx_t_1);
13242 __pyx_r = __pyx_t_1;
13248 __Pyx_XDECREF(__pyx_t_1);
13249 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13252 __Pyx_XGIVEREF(__pyx_r);
13253 __Pyx_RefNannyFinishContext();
13265 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
13266 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
13267 PyObject *__pyx_r = NULL;
13268 __Pyx_RefNannyDeclarations
13269 PyObject *__pyx_t_1 = NULL;
13270 PyObject *__pyx_t_2 = NULL;
13271 PyObject *__pyx_t_3 = NULL;
13272 PyObject *__pyx_t_4 = NULL;
13273 PyObject *__pyx_t_5 = NULL;
13274 PyObject *__pyx_t_6 = NULL;
13275 PyObject *__pyx_t_7 = NULL;
13276 PyObject *__pyx_t_8 = NULL;
13277 int __pyx_lineno = 0;
13278 const char *__pyx_filename = NULL;
13279 int __pyx_clineno = 0;
13280 __Pyx_RefNannySetupContext(
"exp", 0);
13290 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13291 __Pyx_XGOTREF(__pyx_t_1);
13292 __Pyx_XGOTREF(__pyx_t_2);
13293 __Pyx_XGOTREF(__pyx_t_3);
13303 __Pyx_XDECREF(__pyx_r);
13304 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13305 __Pyx_GOTREF(__pyx_t_5);
13306 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13307 __Pyx_GOTREF(__pyx_t_6);
13308 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13310 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
13311 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13312 if (likely(__pyx_t_5)) {
13313 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
13314 __Pyx_INCREF(__pyx_t_5);
13315 __Pyx_INCREF(
function);
13316 __Pyx_DECREF_SET(__pyx_t_6,
function);
13320 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13321 __Pyx_GOTREF(__pyx_t_4);
13323 __pyx_t_7 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13324 __Pyx_GOTREF(__pyx_t_7);
13325 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13326 __Pyx_INCREF(__pyx_v_obj);
13327 __Pyx_GIVEREF(__pyx_v_obj);
13328 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13329 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13330 __Pyx_GOTREF(__pyx_t_4);
13331 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13333 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13334 __pyx_r = __pyx_t_4;
13336 goto __pyx_L7_try_return;
13347 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13348 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13349 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13350 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13360 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13361 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
13362 __Pyx_GOTREF(__pyx_t_4);
13363 __Pyx_GOTREF(__pyx_t_6);
13364 __Pyx_GOTREF(__pyx_t_7);
13373 __Pyx_XDECREF(__pyx_r);
13374 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
13375 __Pyx_GOTREF(__pyx_t_5);
13376 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_5),
exp(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
13377 __Pyx_GOTREF(__pyx_t_8);
13378 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13379 __pyx_r = __pyx_t_8;
13381 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13382 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13383 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13384 goto __pyx_L6_except_return;
13386 __pyx_L5_except_error:;
13395 __Pyx_XGIVEREF(__pyx_t_1);
13396 __Pyx_XGIVEREF(__pyx_t_2);
13397 __Pyx_XGIVEREF(__pyx_t_3);
13398 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13399 goto __pyx_L1_error;
13400 __pyx_L7_try_return:;
13401 __Pyx_XGIVEREF(__pyx_t_1);
13402 __Pyx_XGIVEREF(__pyx_t_2);
13403 __Pyx_XGIVEREF(__pyx_t_3);
13404 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13406 __pyx_L6_except_return:;
13407 __Pyx_XGIVEREF(__pyx_t_1);
13408 __Pyx_XGIVEREF(__pyx_t_2);
13409 __Pyx_XGIVEREF(__pyx_t_3);
13410 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13424 __Pyx_XDECREF(__pyx_t_4);
13425 __Pyx_XDECREF(__pyx_t_5);
13426 __Pyx_XDECREF(__pyx_t_6);
13427 __Pyx_XDECREF(__pyx_t_7);
13428 __Pyx_XDECREF(__pyx_t_8);
13429 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13432 __Pyx_XGIVEREF(__pyx_r);
13433 __Pyx_RefNannyFinishContext();
13438 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
13439 static char __pyx_doc_8PyClical_46exp[] =
"\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 ";
13440 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13441 PyObject *__pyx_r = 0;
13442 __Pyx_RefNannyDeclarations
13443 __Pyx_RefNannySetupContext(
"exp (wrapper)", 0);
13444 __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13447 __Pyx_RefNannyFinishContext();
13451 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13452 PyObject *__pyx_r = NULL;
13453 __Pyx_RefNannyDeclarations
13454 PyObject *__pyx_t_1 = NULL;
13455 int __pyx_lineno = 0;
13456 const char *__pyx_filename = NULL;
13457 int __pyx_clineno = 0;
13458 __Pyx_RefNannySetupContext(
"exp", 0);
13459 __Pyx_XDECREF(__pyx_r);
13460 __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13461 __Pyx_GOTREF(__pyx_t_1);
13462 __pyx_r = __pyx_t_1;
13468 __Pyx_XDECREF(__pyx_t_1);
13469 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13472 __Pyx_XGIVEREF(__pyx_r);
13473 __Pyx_RefNannyFinishContext();
13485 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13486 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) {
13487 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13488 PyObject *__pyx_r = NULL;
13489 __Pyx_RefNannyDeclarations
13492 PyObject *__pyx_t_3 = NULL;
13494 PyObject *__pyx_t_5 = NULL;
13495 PyObject *__pyx_t_6 = NULL;
13496 PyObject *__pyx_t_7 = NULL;
13497 PyObject *__pyx_t_8 = NULL;
13498 PyObject *__pyx_t_9 = NULL;
13499 PyObject *__pyx_t_10 = NULL;
13500 PyObject *__pyx_t_11 = NULL;
13501 int __pyx_lineno = 0;
13502 const char *__pyx_filename = NULL;
13503 int __pyx_clineno = 0;
13504 __Pyx_RefNannySetupContext(
"log", 0);
13505 if (__pyx_optional_args) {
13506 if (__pyx_optional_args->__pyx_n > 0) {
13507 __pyx_v_i = __pyx_optional_args->i;
13518 __pyx_t_1 = (__pyx_v_i != Py_None);
13519 __pyx_t_2 = (__pyx_t_1 != 0);
13529 __Pyx_XDECREF(__pyx_r);
13530 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13531 __Pyx_GOTREF(__pyx_t_3);
13533 __pyx_t_4 =
log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13535 __Pyx_CppExn2PyErr();
13536 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13538 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13539 __Pyx_GOTREF(__pyx_t_5);
13540 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13541 __pyx_r = __pyx_t_5;
13563 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13564 __Pyx_XGOTREF(__pyx_t_6);
13565 __Pyx_XGOTREF(__pyx_t_7);
13566 __Pyx_XGOTREF(__pyx_t_8);
13576 __Pyx_XDECREF(__pyx_r);
13577 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13578 __Pyx_GOTREF(__pyx_t_3);
13579 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13580 __Pyx_GOTREF(__pyx_t_9);
13581 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13583 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13584 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13585 if (likely(__pyx_t_3)) {
13586 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13587 __Pyx_INCREF(__pyx_t_3);
13588 __Pyx_INCREF(
function);
13589 __Pyx_DECREF_SET(__pyx_t_9,
function);
13593 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13594 __Pyx_GOTREF(__pyx_t_5);
13596 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13597 __Pyx_GOTREF(__pyx_t_10);
13598 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13599 __Pyx_INCREF(__pyx_v_obj);
13600 __Pyx_GIVEREF(__pyx_v_obj);
13601 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13602 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13603 __Pyx_GOTREF(__pyx_t_5);
13604 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13606 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13607 __pyx_r = __pyx_t_5;
13609 goto __pyx_L8_try_return;
13620 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13621 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13622 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13623 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13633 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13634 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13635 __Pyx_GOTREF(__pyx_t_5);
13636 __Pyx_GOTREF(__pyx_t_9);
13637 __Pyx_GOTREF(__pyx_t_10);
13646 __Pyx_XDECREF(__pyx_r);
13647 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13648 __Pyx_GOTREF(__pyx_t_3);
13649 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
log(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13650 __Pyx_GOTREF(__pyx_t_11);
13651 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13652 __pyx_r = __pyx_t_11;
13654 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13655 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13656 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13657 goto __pyx_L7_except_return;
13659 __pyx_L6_except_error:;
13668 __Pyx_XGIVEREF(__pyx_t_6);
13669 __Pyx_XGIVEREF(__pyx_t_7);
13670 __Pyx_XGIVEREF(__pyx_t_8);
13671 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13672 goto __pyx_L1_error;
13673 __pyx_L8_try_return:;
13674 __Pyx_XGIVEREF(__pyx_t_6);
13675 __Pyx_XGIVEREF(__pyx_t_7);
13676 __Pyx_XGIVEREF(__pyx_t_8);
13677 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13679 __pyx_L7_except_return:;
13680 __Pyx_XGIVEREF(__pyx_t_6);
13681 __Pyx_XGIVEREF(__pyx_t_7);
13682 __Pyx_XGIVEREF(__pyx_t_8);
13683 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13698 __Pyx_XDECREF(__pyx_t_3);
13699 __Pyx_XDECREF(__pyx_t_5);
13700 __Pyx_XDECREF(__pyx_t_9);
13701 __Pyx_XDECREF(__pyx_t_10);
13702 __Pyx_XDECREF(__pyx_t_11);
13703 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13706 __Pyx_XGIVEREF(__pyx_r);
13707 __Pyx_RefNannyFinishContext();
13712 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13713 static char __pyx_doc_8PyClical_48log[] =
"\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 ";
13714 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13715 PyObject *__pyx_v_obj = 0;
13716 PyObject *__pyx_v_i = 0;
13717 int __pyx_lineno = 0;
13718 const char *__pyx_filename = NULL;
13719 int __pyx_clineno = 0;
13720 PyObject *__pyx_r = 0;
13721 __Pyx_RefNannyDeclarations
13722 __Pyx_RefNannySetupContext(
"log (wrapper)", 0);
13724 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13725 PyObject* values[2] = {0,0};
13726 values[1] = ((PyObject *)Py_None);
13727 if (unlikely(__pyx_kwds)) {
13728 Py_ssize_t kw_args;
13729 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13730 switch (pos_args) {
13731 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13732 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13734 default:
goto __pyx_L5_argtuple_error;
13736 kw_args = PyDict_Size(__pyx_kwds);
13737 switch (pos_args) {
13739 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13740 else goto __pyx_L5_argtuple_error;
13743 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13744 if (value) { values[1] = value; kw_args--; }
13747 if (unlikely(kw_args > 0)) {
13748 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"log") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13751 switch (PyTuple_GET_SIZE(__pyx_args)) {
13752 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13753 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13755 default:
goto __pyx_L5_argtuple_error;
13758 __pyx_v_obj = values[0];
13759 __pyx_v_i = values[1];
13761 goto __pyx_L4_argument_unpacking_done;
13762 __pyx_L5_argtuple_error:;
13763 __Pyx_RaiseArgtupleInvalid(
"log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
13765 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13766 __Pyx_RefNannyFinishContext();
13768 __pyx_L4_argument_unpacking_done:;
13769 __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13772 __Pyx_RefNannyFinishContext();
13776 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13777 PyObject *__pyx_r = NULL;
13778 __Pyx_RefNannyDeclarations
13779 PyObject *__pyx_t_1 = NULL;
13780 struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13781 int __pyx_lineno = 0;
13782 const char *__pyx_filename = NULL;
13783 int __pyx_clineno = 0;
13784 __Pyx_RefNannySetupContext(
"log", 0);
13785 __Pyx_XDECREF(__pyx_r);
13786 __pyx_t_2.__pyx_n = 1;
13787 __pyx_t_2.i = __pyx_v_i;
13788 __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13789 __Pyx_GOTREF(__pyx_t_1);
13790 __pyx_r = __pyx_t_1;
13796 __Pyx_XDECREF(__pyx_t_1);
13797 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13800 __Pyx_XGIVEREF(__pyx_r);
13801 __Pyx_RefNannyFinishContext();
13813 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13814 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) {
13815 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13816 PyObject *__pyx_r = NULL;
13817 __Pyx_RefNannyDeclarations
13820 PyObject *__pyx_t_3 = NULL;
13822 PyObject *__pyx_t_5 = NULL;
13823 PyObject *__pyx_t_6 = NULL;
13824 PyObject *__pyx_t_7 = NULL;
13825 PyObject *__pyx_t_8 = NULL;
13826 PyObject *__pyx_t_9 = NULL;
13827 PyObject *__pyx_t_10 = NULL;
13828 PyObject *__pyx_t_11 = NULL;
13829 int __pyx_lineno = 0;
13830 const char *__pyx_filename = NULL;
13831 int __pyx_clineno = 0;
13832 __Pyx_RefNannySetupContext(
"cos", 0);
13833 if (__pyx_optional_args) {
13834 if (__pyx_optional_args->__pyx_n > 0) {
13835 __pyx_v_i = __pyx_optional_args->i;
13846 __pyx_t_1 = (__pyx_v_i != Py_None);
13847 __pyx_t_2 = (__pyx_t_1 != 0);
13857 __Pyx_XDECREF(__pyx_r);
13858 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13859 __Pyx_GOTREF(__pyx_t_3);
13861 __pyx_t_4 =
cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13863 __Pyx_CppExn2PyErr();
13864 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13866 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13867 __Pyx_GOTREF(__pyx_t_5);
13868 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13869 __pyx_r = __pyx_t_5;
13891 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13892 __Pyx_XGOTREF(__pyx_t_6);
13893 __Pyx_XGOTREF(__pyx_t_7);
13894 __Pyx_XGOTREF(__pyx_t_8);
13904 __Pyx_XDECREF(__pyx_r);
13905 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13906 __Pyx_GOTREF(__pyx_t_3);
13907 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13908 __Pyx_GOTREF(__pyx_t_9);
13909 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13911 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13912 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13913 if (likely(__pyx_t_3)) {
13914 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13915 __Pyx_INCREF(__pyx_t_3);
13916 __Pyx_INCREF(
function);
13917 __Pyx_DECREF_SET(__pyx_t_9,
function);
13921 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13922 __Pyx_GOTREF(__pyx_t_5);
13924 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13925 __Pyx_GOTREF(__pyx_t_10);
13926 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13927 __Pyx_INCREF(__pyx_v_obj);
13928 __Pyx_GIVEREF(__pyx_v_obj);
13929 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13930 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13931 __Pyx_GOTREF(__pyx_t_5);
13932 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13934 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13935 __pyx_r = __pyx_t_5;
13937 goto __pyx_L8_try_return;
13948 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13949 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13950 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13951 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13961 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13962 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13963 __Pyx_GOTREF(__pyx_t_5);
13964 __Pyx_GOTREF(__pyx_t_9);
13965 __Pyx_GOTREF(__pyx_t_10);
13974 __Pyx_XDECREF(__pyx_r);
13975 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13976 __Pyx_GOTREF(__pyx_t_3);
13977 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13978 __Pyx_GOTREF(__pyx_t_11);
13979 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13980 __pyx_r = __pyx_t_11;
13982 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13983 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13984 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13985 goto __pyx_L7_except_return;
13987 __pyx_L6_except_error:;
13996 __Pyx_XGIVEREF(__pyx_t_6);
13997 __Pyx_XGIVEREF(__pyx_t_7);
13998 __Pyx_XGIVEREF(__pyx_t_8);
13999 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14000 goto __pyx_L1_error;
14001 __pyx_L8_try_return:;
14002 __Pyx_XGIVEREF(__pyx_t_6);
14003 __Pyx_XGIVEREF(__pyx_t_7);
14004 __Pyx_XGIVEREF(__pyx_t_8);
14005 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14007 __pyx_L7_except_return:;
14008 __Pyx_XGIVEREF(__pyx_t_6);
14009 __Pyx_XGIVEREF(__pyx_t_7);
14010 __Pyx_XGIVEREF(__pyx_t_8);
14011 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14026 __Pyx_XDECREF(__pyx_t_3);
14027 __Pyx_XDECREF(__pyx_t_5);
14028 __Pyx_XDECREF(__pyx_t_9);
14029 __Pyx_XDECREF(__pyx_t_10);
14030 __Pyx_XDECREF(__pyx_t_11);
14031 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14034 __Pyx_XGIVEREF(__pyx_r);
14035 __Pyx_RefNannyFinishContext();
14040 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14041 static char __pyx_doc_8PyClical_50cos[] =
"\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 ";
14042 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14043 PyObject *__pyx_v_obj = 0;
14044 PyObject *__pyx_v_i = 0;
14045 int __pyx_lineno = 0;
14046 const char *__pyx_filename = NULL;
14047 int __pyx_clineno = 0;
14048 PyObject *__pyx_r = 0;
14049 __Pyx_RefNannyDeclarations
14050 __Pyx_RefNannySetupContext(
"cos (wrapper)", 0);
14052 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14053 PyObject* values[2] = {0,0};
14054 values[1] = ((PyObject *)Py_None);
14055 if (unlikely(__pyx_kwds)) {
14056 Py_ssize_t kw_args;
14057 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14058 switch (pos_args) {
14059 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14060 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14062 default:
goto __pyx_L5_argtuple_error;
14064 kw_args = PyDict_Size(__pyx_kwds);
14065 switch (pos_args) {
14067 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14068 else goto __pyx_L5_argtuple_error;
14071 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14072 if (value) { values[1] = value; kw_args--; }
14075 if (unlikely(kw_args > 0)) {
14076 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"cos") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14079 switch (PyTuple_GET_SIZE(__pyx_args)) {
14080 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14081 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14083 default:
goto __pyx_L5_argtuple_error;
14086 __pyx_v_obj = values[0];
14087 __pyx_v_i = values[1];
14089 goto __pyx_L4_argument_unpacking_done;
14090 __pyx_L5_argtuple_error:;
14091 __Pyx_RaiseArgtupleInvalid(
"cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14093 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14094 __Pyx_RefNannyFinishContext();
14096 __pyx_L4_argument_unpacking_done:;
14097 __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14100 __Pyx_RefNannyFinishContext();
14104 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14105 PyObject *__pyx_r = NULL;
14106 __Pyx_RefNannyDeclarations
14107 PyObject *__pyx_t_1 = NULL;
14108 struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14109 int __pyx_lineno = 0;
14110 const char *__pyx_filename = NULL;
14111 int __pyx_clineno = 0;
14112 __Pyx_RefNannySetupContext(
"cos", 0);
14113 __Pyx_XDECREF(__pyx_r);
14114 __pyx_t_2.__pyx_n = 1;
14115 __pyx_t_2.i = __pyx_v_i;
14116 __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14117 __Pyx_GOTREF(__pyx_t_1);
14118 __pyx_r = __pyx_t_1;
14124 __Pyx_XDECREF(__pyx_t_1);
14125 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14128 __Pyx_XGIVEREF(__pyx_r);
14129 __Pyx_RefNannyFinishContext();
14141 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14142 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) {
14143 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14144 PyObject *__pyx_r = NULL;
14145 __Pyx_RefNannyDeclarations
14148 PyObject *__pyx_t_3 = NULL;
14150 PyObject *__pyx_t_5 = NULL;
14151 PyObject *__pyx_t_6 = NULL;
14152 PyObject *__pyx_t_7 = NULL;
14153 PyObject *__pyx_t_8 = NULL;
14154 PyObject *__pyx_t_9 = NULL;
14155 PyObject *__pyx_t_10 = NULL;
14156 PyObject *__pyx_t_11 = NULL;
14157 int __pyx_lineno = 0;
14158 const char *__pyx_filename = NULL;
14159 int __pyx_clineno = 0;
14160 __Pyx_RefNannySetupContext(
"acos", 0);
14161 if (__pyx_optional_args) {
14162 if (__pyx_optional_args->__pyx_n > 0) {
14163 __pyx_v_i = __pyx_optional_args->i;
14174 __pyx_t_1 = (__pyx_v_i != Py_None);
14175 __pyx_t_2 = (__pyx_t_1 != 0);
14185 __Pyx_XDECREF(__pyx_r);
14186 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14187 __Pyx_GOTREF(__pyx_t_3);
14189 __pyx_t_4 =
acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14191 __Pyx_CppExn2PyErr();
14192 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14194 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14195 __Pyx_GOTREF(__pyx_t_5);
14196 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14197 __pyx_r = __pyx_t_5;
14219 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14220 __Pyx_XGOTREF(__pyx_t_6);
14221 __Pyx_XGOTREF(__pyx_t_7);
14222 __Pyx_XGOTREF(__pyx_t_8);
14232 __Pyx_XDECREF(__pyx_r);
14233 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14234 __Pyx_GOTREF(__pyx_t_3);
14235 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acos);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14236 __Pyx_GOTREF(__pyx_t_9);
14237 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14239 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14240 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14241 if (likely(__pyx_t_3)) {
14242 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14243 __Pyx_INCREF(__pyx_t_3);
14244 __Pyx_INCREF(
function);
14245 __Pyx_DECREF_SET(__pyx_t_9,
function);
14249 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14250 __Pyx_GOTREF(__pyx_t_5);
14252 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14253 __Pyx_GOTREF(__pyx_t_10);
14254 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14255 __Pyx_INCREF(__pyx_v_obj);
14256 __Pyx_GIVEREF(__pyx_v_obj);
14257 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14258 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14259 __Pyx_GOTREF(__pyx_t_5);
14260 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14262 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14263 __pyx_r = __pyx_t_5;
14265 goto __pyx_L8_try_return;
14276 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14277 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14278 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14279 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14289 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14290 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14291 __Pyx_GOTREF(__pyx_t_5);
14292 __Pyx_GOTREF(__pyx_t_9);
14293 __Pyx_GOTREF(__pyx_t_10);
14302 __Pyx_XDECREF(__pyx_r);
14303 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14304 __Pyx_GOTREF(__pyx_t_3);
14305 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14306 __Pyx_GOTREF(__pyx_t_11);
14307 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14308 __pyx_r = __pyx_t_11;
14310 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14311 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14312 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14313 goto __pyx_L7_except_return;
14315 __pyx_L6_except_error:;
14324 __Pyx_XGIVEREF(__pyx_t_6);
14325 __Pyx_XGIVEREF(__pyx_t_7);
14326 __Pyx_XGIVEREF(__pyx_t_8);
14327 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14328 goto __pyx_L1_error;
14329 __pyx_L8_try_return:;
14330 __Pyx_XGIVEREF(__pyx_t_6);
14331 __Pyx_XGIVEREF(__pyx_t_7);
14332 __Pyx_XGIVEREF(__pyx_t_8);
14333 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14335 __pyx_L7_except_return:;
14336 __Pyx_XGIVEREF(__pyx_t_6);
14337 __Pyx_XGIVEREF(__pyx_t_7);
14338 __Pyx_XGIVEREF(__pyx_t_8);
14339 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14354 __Pyx_XDECREF(__pyx_t_3);
14355 __Pyx_XDECREF(__pyx_t_5);
14356 __Pyx_XDECREF(__pyx_t_9);
14357 __Pyx_XDECREF(__pyx_t_10);
14358 __Pyx_XDECREF(__pyx_t_11);
14359 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14362 __Pyx_XGIVEREF(__pyx_r);
14363 __Pyx_RefNannyFinishContext();
14368 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14369 static char __pyx_doc_8PyClical_52acos[] =
"\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 ";
14370 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14371 PyObject *__pyx_v_obj = 0;
14372 PyObject *__pyx_v_i = 0;
14373 int __pyx_lineno = 0;
14374 const char *__pyx_filename = NULL;
14375 int __pyx_clineno = 0;
14376 PyObject *__pyx_r = 0;
14377 __Pyx_RefNannyDeclarations
14378 __Pyx_RefNannySetupContext(
"acos (wrapper)", 0);
14380 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14381 PyObject* values[2] = {0,0};
14382 values[1] = ((PyObject *)Py_None);
14383 if (unlikely(__pyx_kwds)) {
14384 Py_ssize_t kw_args;
14385 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14386 switch (pos_args) {
14387 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14388 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14390 default:
goto __pyx_L5_argtuple_error;
14392 kw_args = PyDict_Size(__pyx_kwds);
14393 switch (pos_args) {
14395 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14396 else goto __pyx_L5_argtuple_error;
14399 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14400 if (value) { values[1] = value; kw_args--; }
14403 if (unlikely(kw_args > 0)) {
14404 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"acos") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14407 switch (PyTuple_GET_SIZE(__pyx_args)) {
14408 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14409 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14411 default:
goto __pyx_L5_argtuple_error;
14414 __pyx_v_obj = values[0];
14415 __pyx_v_i = values[1];
14417 goto __pyx_L4_argument_unpacking_done;
14418 __pyx_L5_argtuple_error:;
14419 __Pyx_RaiseArgtupleInvalid(
"acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14421 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14422 __Pyx_RefNannyFinishContext();
14424 __pyx_L4_argument_unpacking_done:;
14425 __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14428 __Pyx_RefNannyFinishContext();
14432 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14433 PyObject *__pyx_r = NULL;
14434 __Pyx_RefNannyDeclarations
14435 PyObject *__pyx_t_1 = NULL;
14436 struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14437 int __pyx_lineno = 0;
14438 const char *__pyx_filename = NULL;
14439 int __pyx_clineno = 0;
14440 __Pyx_RefNannySetupContext(
"acos", 0);
14441 __Pyx_XDECREF(__pyx_r);
14442 __pyx_t_2.__pyx_n = 1;
14443 __pyx_t_2.i = __pyx_v_i;
14444 __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14445 __Pyx_GOTREF(__pyx_t_1);
14446 __pyx_r = __pyx_t_1;
14452 __Pyx_XDECREF(__pyx_t_1);
14453 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14456 __Pyx_XGIVEREF(__pyx_r);
14457 __Pyx_RefNannyFinishContext();
14469 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14470 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
14471 PyObject *__pyx_r = NULL;
14472 __Pyx_RefNannyDeclarations
14473 PyObject *__pyx_t_1 = NULL;
14474 PyObject *__pyx_t_2 = NULL;
14475 PyObject *__pyx_t_3 = NULL;
14476 PyObject *__pyx_t_4 = NULL;
14477 PyObject *__pyx_t_5 = NULL;
14478 PyObject *__pyx_t_6 = NULL;
14479 PyObject *__pyx_t_7 = NULL;
14480 PyObject *__pyx_t_8 = NULL;
14481 int __pyx_lineno = 0;
14482 const char *__pyx_filename = NULL;
14483 int __pyx_clineno = 0;
14484 __Pyx_RefNannySetupContext(
"cosh", 0);
14494 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14495 __Pyx_XGOTREF(__pyx_t_1);
14496 __Pyx_XGOTREF(__pyx_t_2);
14497 __Pyx_XGOTREF(__pyx_t_3);
14507 __Pyx_XDECREF(__pyx_r);
14508 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14509 __Pyx_GOTREF(__pyx_t_5);
14510 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14511 __Pyx_GOTREF(__pyx_t_6);
14512 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14514 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
14515 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14516 if (likely(__pyx_t_5)) {
14517 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
14518 __Pyx_INCREF(__pyx_t_5);
14519 __Pyx_INCREF(
function);
14520 __Pyx_DECREF_SET(__pyx_t_6,
function);
14524 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14525 __Pyx_GOTREF(__pyx_t_4);
14527 __pyx_t_7 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14528 __Pyx_GOTREF(__pyx_t_7);
14529 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
14530 __Pyx_INCREF(__pyx_v_obj);
14531 __Pyx_GIVEREF(__pyx_v_obj);
14532 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
14533 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14534 __Pyx_GOTREF(__pyx_t_4);
14535 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14537 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14538 __pyx_r = __pyx_t_4;
14540 goto __pyx_L7_try_return;
14551 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14552 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14553 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14554 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14564 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14565 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
14566 __Pyx_GOTREF(__pyx_t_4);
14567 __Pyx_GOTREF(__pyx_t_6);
14568 __Pyx_GOTREF(__pyx_t_7);
14577 __Pyx_XDECREF(__pyx_r);
14578 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
14579 __Pyx_GOTREF(__pyx_t_5);
14580 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_5),
cosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
14581 __Pyx_GOTREF(__pyx_t_8);
14582 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14583 __pyx_r = __pyx_t_8;
14585 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14586 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14587 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14588 goto __pyx_L6_except_return;
14590 __pyx_L5_except_error:;
14599 __Pyx_XGIVEREF(__pyx_t_1);
14600 __Pyx_XGIVEREF(__pyx_t_2);
14601 __Pyx_XGIVEREF(__pyx_t_3);
14602 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14603 goto __pyx_L1_error;
14604 __pyx_L7_try_return:;
14605 __Pyx_XGIVEREF(__pyx_t_1);
14606 __Pyx_XGIVEREF(__pyx_t_2);
14607 __Pyx_XGIVEREF(__pyx_t_3);
14608 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14610 __pyx_L6_except_return:;
14611 __Pyx_XGIVEREF(__pyx_t_1);
14612 __Pyx_XGIVEREF(__pyx_t_2);
14613 __Pyx_XGIVEREF(__pyx_t_3);
14614 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14628 __Pyx_XDECREF(__pyx_t_4);
14629 __Pyx_XDECREF(__pyx_t_5);
14630 __Pyx_XDECREF(__pyx_t_6);
14631 __Pyx_XDECREF(__pyx_t_7);
14632 __Pyx_XDECREF(__pyx_t_8);
14633 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14636 __Pyx_XGIVEREF(__pyx_r);
14637 __Pyx_RefNannyFinishContext();
14642 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14643 static char __pyx_doc_8PyClical_54cosh[] =
"\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 ";
14644 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14645 PyObject *__pyx_r = 0;
14646 __Pyx_RefNannyDeclarations
14647 __Pyx_RefNannySetupContext(
"cosh (wrapper)", 0);
14648 __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14651 __Pyx_RefNannyFinishContext();
14655 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14656 PyObject *__pyx_r = NULL;
14657 __Pyx_RefNannyDeclarations
14658 PyObject *__pyx_t_1 = NULL;
14659 int __pyx_lineno = 0;
14660 const char *__pyx_filename = NULL;
14661 int __pyx_clineno = 0;
14662 __Pyx_RefNannySetupContext(
"cosh", 0);
14663 __Pyx_XDECREF(__pyx_r);
14664 __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14665 __Pyx_GOTREF(__pyx_t_1);
14666 __pyx_r = __pyx_t_1;
14672 __Pyx_XDECREF(__pyx_t_1);
14673 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14676 __Pyx_XGIVEREF(__pyx_r);
14677 __Pyx_RefNannyFinishContext();
14689 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14690 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) {
14691 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14692 PyObject *__pyx_r = NULL;
14693 __Pyx_RefNannyDeclarations
14696 PyObject *__pyx_t_3 = NULL;
14698 PyObject *__pyx_t_5 = NULL;
14699 PyObject *__pyx_t_6 = NULL;
14700 PyObject *__pyx_t_7 = NULL;
14701 PyObject *__pyx_t_8 = NULL;
14702 PyObject *__pyx_t_9 = NULL;
14703 PyObject *__pyx_t_10 = NULL;
14704 PyObject *__pyx_t_11 = NULL;
14705 int __pyx_lineno = 0;
14706 const char *__pyx_filename = NULL;
14707 int __pyx_clineno = 0;
14708 __Pyx_RefNannySetupContext(
"acosh", 0);
14709 if (__pyx_optional_args) {
14710 if (__pyx_optional_args->__pyx_n > 0) {
14711 __pyx_v_i = __pyx_optional_args->i;
14722 __pyx_t_1 = (__pyx_v_i != Py_None);
14723 __pyx_t_2 = (__pyx_t_1 != 0);
14733 __Pyx_XDECREF(__pyx_r);
14734 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14735 __Pyx_GOTREF(__pyx_t_3);
14737 __pyx_t_4 =
acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14739 __Pyx_CppExn2PyErr();
14740 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14742 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14743 __Pyx_GOTREF(__pyx_t_5);
14744 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14745 __pyx_r = __pyx_t_5;
14767 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14768 __Pyx_XGOTREF(__pyx_t_6);
14769 __Pyx_XGOTREF(__pyx_t_7);
14770 __Pyx_XGOTREF(__pyx_t_8);
14780 __Pyx_XDECREF(__pyx_r);
14781 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14782 __Pyx_GOTREF(__pyx_t_3);
14783 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acosh);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14784 __Pyx_GOTREF(__pyx_t_9);
14785 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14787 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14788 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14789 if (likely(__pyx_t_3)) {
14790 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14791 __Pyx_INCREF(__pyx_t_3);
14792 __Pyx_INCREF(
function);
14793 __Pyx_DECREF_SET(__pyx_t_9,
function);
14797 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14798 __Pyx_GOTREF(__pyx_t_5);
14800 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14801 __Pyx_GOTREF(__pyx_t_10);
14802 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14803 __Pyx_INCREF(__pyx_v_obj);
14804 __Pyx_GIVEREF(__pyx_v_obj);
14805 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14806 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14807 __Pyx_GOTREF(__pyx_t_5);
14808 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14810 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14811 __pyx_r = __pyx_t_5;
14813 goto __pyx_L8_try_return;
14824 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14825 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14826 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14827 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14837 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14838 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14839 __Pyx_GOTREF(__pyx_t_5);
14840 __Pyx_GOTREF(__pyx_t_9);
14841 __Pyx_GOTREF(__pyx_t_10);
14850 __Pyx_XDECREF(__pyx_r);
14851 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14852 __Pyx_GOTREF(__pyx_t_3);
14853 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14854 __Pyx_GOTREF(__pyx_t_11);
14855 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14856 __pyx_r = __pyx_t_11;
14858 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14859 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14860 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14861 goto __pyx_L7_except_return;
14863 __pyx_L6_except_error:;
14872 __Pyx_XGIVEREF(__pyx_t_6);
14873 __Pyx_XGIVEREF(__pyx_t_7);
14874 __Pyx_XGIVEREF(__pyx_t_8);
14875 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14876 goto __pyx_L1_error;
14877 __pyx_L8_try_return:;
14878 __Pyx_XGIVEREF(__pyx_t_6);
14879 __Pyx_XGIVEREF(__pyx_t_7);
14880 __Pyx_XGIVEREF(__pyx_t_8);
14881 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14883 __pyx_L7_except_return:;
14884 __Pyx_XGIVEREF(__pyx_t_6);
14885 __Pyx_XGIVEREF(__pyx_t_7);
14886 __Pyx_XGIVEREF(__pyx_t_8);
14887 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14902 __Pyx_XDECREF(__pyx_t_3);
14903 __Pyx_XDECREF(__pyx_t_5);
14904 __Pyx_XDECREF(__pyx_t_9);
14905 __Pyx_XDECREF(__pyx_t_10);
14906 __Pyx_XDECREF(__pyx_t_11);
14907 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14910 __Pyx_XGIVEREF(__pyx_r);
14911 __Pyx_RefNannyFinishContext();
14916 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14917 static char __pyx_doc_8PyClical_56acosh[] =
"\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 ";
14918 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14919 PyObject *__pyx_v_obj = 0;
14920 PyObject *__pyx_v_i = 0;
14921 int __pyx_lineno = 0;
14922 const char *__pyx_filename = NULL;
14923 int __pyx_clineno = 0;
14924 PyObject *__pyx_r = 0;
14925 __Pyx_RefNannyDeclarations
14926 __Pyx_RefNannySetupContext(
"acosh (wrapper)", 0);
14928 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14929 PyObject* values[2] = {0,0};
14930 values[1] = ((PyObject *)Py_None);
14931 if (unlikely(__pyx_kwds)) {
14932 Py_ssize_t kw_args;
14933 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14934 switch (pos_args) {
14935 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14936 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14938 default:
goto __pyx_L5_argtuple_error;
14940 kw_args = PyDict_Size(__pyx_kwds);
14941 switch (pos_args) {
14943 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14944 else goto __pyx_L5_argtuple_error;
14947 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14948 if (value) { values[1] = value; kw_args--; }
14951 if (unlikely(kw_args > 0)) {
14952 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"acosh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14955 switch (PyTuple_GET_SIZE(__pyx_args)) {
14956 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14957 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14959 default:
goto __pyx_L5_argtuple_error;
14962 __pyx_v_obj = values[0];
14963 __pyx_v_i = values[1];
14965 goto __pyx_L4_argument_unpacking_done;
14966 __pyx_L5_argtuple_error:;
14967 __Pyx_RaiseArgtupleInvalid(
"acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14969 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14970 __Pyx_RefNannyFinishContext();
14972 __pyx_L4_argument_unpacking_done:;
14973 __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
14976 __Pyx_RefNannyFinishContext();
14980 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14981 PyObject *__pyx_r = NULL;
14982 __Pyx_RefNannyDeclarations
14983 PyObject *__pyx_t_1 = NULL;
14984 struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
14985 int __pyx_lineno = 0;
14986 const char *__pyx_filename = NULL;
14987 int __pyx_clineno = 0;
14988 __Pyx_RefNannySetupContext(
"acosh", 0);
14989 __Pyx_XDECREF(__pyx_r);
14990 __pyx_t_2.__pyx_n = 1;
14991 __pyx_t_2.i = __pyx_v_i;
14992 __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14993 __Pyx_GOTREF(__pyx_t_1);
14994 __pyx_r = __pyx_t_1;
15000 __Pyx_XDECREF(__pyx_t_1);
15001 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15004 __Pyx_XGIVEREF(__pyx_r);
15005 __Pyx_RefNannyFinishContext();
15017 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15018 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) {
15019 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15020 PyObject *__pyx_r = NULL;
15021 __Pyx_RefNannyDeclarations
15024 PyObject *__pyx_t_3 = NULL;
15026 PyObject *__pyx_t_5 = NULL;
15027 PyObject *__pyx_t_6 = NULL;
15028 PyObject *__pyx_t_7 = NULL;
15029 PyObject *__pyx_t_8 = NULL;
15030 PyObject *__pyx_t_9 = NULL;
15031 PyObject *__pyx_t_10 = NULL;
15032 PyObject *__pyx_t_11 = NULL;
15033 int __pyx_lineno = 0;
15034 const char *__pyx_filename = NULL;
15035 int __pyx_clineno = 0;
15036 __Pyx_RefNannySetupContext(
"sin", 0);
15037 if (__pyx_optional_args) {
15038 if (__pyx_optional_args->__pyx_n > 0) {
15039 __pyx_v_i = __pyx_optional_args->i;
15050 __pyx_t_1 = (__pyx_v_i != Py_None);
15051 __pyx_t_2 = (__pyx_t_1 != 0);
15061 __Pyx_XDECREF(__pyx_r);
15062 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15063 __Pyx_GOTREF(__pyx_t_3);
15065 __pyx_t_4 =
sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15067 __Pyx_CppExn2PyErr();
15068 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15070 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15071 __Pyx_GOTREF(__pyx_t_5);
15072 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15073 __pyx_r = __pyx_t_5;
15095 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15096 __Pyx_XGOTREF(__pyx_t_6);
15097 __Pyx_XGOTREF(__pyx_t_7);
15098 __Pyx_XGOTREF(__pyx_t_8);
15108 __Pyx_XDECREF(__pyx_r);
15109 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15110 __Pyx_GOTREF(__pyx_t_3);
15111 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15112 __Pyx_GOTREF(__pyx_t_9);
15113 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15115 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15116 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15117 if (likely(__pyx_t_3)) {
15118 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15119 __Pyx_INCREF(__pyx_t_3);
15120 __Pyx_INCREF(
function);
15121 __Pyx_DECREF_SET(__pyx_t_9,
function);
15125 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15126 __Pyx_GOTREF(__pyx_t_5);
15128 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15129 __Pyx_GOTREF(__pyx_t_10);
15130 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15131 __Pyx_INCREF(__pyx_v_obj);
15132 __Pyx_GIVEREF(__pyx_v_obj);
15133 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15134 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15135 __Pyx_GOTREF(__pyx_t_5);
15136 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15138 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15139 __pyx_r = __pyx_t_5;
15141 goto __pyx_L8_try_return;
15152 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15153 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15154 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15155 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15165 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15166 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15167 __Pyx_GOTREF(__pyx_t_5);
15168 __Pyx_GOTREF(__pyx_t_9);
15169 __Pyx_GOTREF(__pyx_t_10);
15178 __Pyx_XDECREF(__pyx_r);
15179 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15180 __Pyx_GOTREF(__pyx_t_3);
15181 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15182 __Pyx_GOTREF(__pyx_t_11);
15183 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15184 __pyx_r = __pyx_t_11;
15186 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15187 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15188 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15189 goto __pyx_L7_except_return;
15191 __pyx_L6_except_error:;
15200 __Pyx_XGIVEREF(__pyx_t_6);
15201 __Pyx_XGIVEREF(__pyx_t_7);
15202 __Pyx_XGIVEREF(__pyx_t_8);
15203 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15204 goto __pyx_L1_error;
15205 __pyx_L8_try_return:;
15206 __Pyx_XGIVEREF(__pyx_t_6);
15207 __Pyx_XGIVEREF(__pyx_t_7);
15208 __Pyx_XGIVEREF(__pyx_t_8);
15209 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15211 __pyx_L7_except_return:;
15212 __Pyx_XGIVEREF(__pyx_t_6);
15213 __Pyx_XGIVEREF(__pyx_t_7);
15214 __Pyx_XGIVEREF(__pyx_t_8);
15215 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15230 __Pyx_XDECREF(__pyx_t_3);
15231 __Pyx_XDECREF(__pyx_t_5);
15232 __Pyx_XDECREF(__pyx_t_9);
15233 __Pyx_XDECREF(__pyx_t_10);
15234 __Pyx_XDECREF(__pyx_t_11);
15235 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15238 __Pyx_XGIVEREF(__pyx_r);
15239 __Pyx_RefNannyFinishContext();
15244 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15245 static char __pyx_doc_8PyClical_58sin[] =
"\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 ";
15246 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15247 PyObject *__pyx_v_obj = 0;
15248 PyObject *__pyx_v_i = 0;
15249 int __pyx_lineno = 0;
15250 const char *__pyx_filename = NULL;
15251 int __pyx_clineno = 0;
15252 PyObject *__pyx_r = 0;
15253 __Pyx_RefNannyDeclarations
15254 __Pyx_RefNannySetupContext(
"sin (wrapper)", 0);
15256 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15257 PyObject* values[2] = {0,0};
15258 values[1] = ((PyObject *)Py_None);
15259 if (unlikely(__pyx_kwds)) {
15260 Py_ssize_t kw_args;
15261 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15262 switch (pos_args) {
15263 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15264 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15266 default:
goto __pyx_L5_argtuple_error;
15268 kw_args = PyDict_Size(__pyx_kwds);
15269 switch (pos_args) {
15271 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15272 else goto __pyx_L5_argtuple_error;
15275 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15276 if (value) { values[1] = value; kw_args--; }
15279 if (unlikely(kw_args > 0)) {
15280 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"sin") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15283 switch (PyTuple_GET_SIZE(__pyx_args)) {
15284 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15285 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15287 default:
goto __pyx_L5_argtuple_error;
15290 __pyx_v_obj = values[0];
15291 __pyx_v_i = values[1];
15293 goto __pyx_L4_argument_unpacking_done;
15294 __pyx_L5_argtuple_error:;
15295 __Pyx_RaiseArgtupleInvalid(
"sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15297 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15298 __Pyx_RefNannyFinishContext();
15300 __pyx_L4_argument_unpacking_done:;
15301 __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15304 __Pyx_RefNannyFinishContext();
15308 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15309 PyObject *__pyx_r = NULL;
15310 __Pyx_RefNannyDeclarations
15311 PyObject *__pyx_t_1 = NULL;
15312 struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15313 int __pyx_lineno = 0;
15314 const char *__pyx_filename = NULL;
15315 int __pyx_clineno = 0;
15316 __Pyx_RefNannySetupContext(
"sin", 0);
15317 __Pyx_XDECREF(__pyx_r);
15318 __pyx_t_2.__pyx_n = 1;
15319 __pyx_t_2.i = __pyx_v_i;
15320 __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15321 __Pyx_GOTREF(__pyx_t_1);
15322 __pyx_r = __pyx_t_1;
15328 __Pyx_XDECREF(__pyx_t_1);
15329 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15332 __Pyx_XGIVEREF(__pyx_r);
15333 __Pyx_RefNannyFinishContext();
15345 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15346 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) {
15347 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15348 PyObject *__pyx_r = NULL;
15349 __Pyx_RefNannyDeclarations
15352 PyObject *__pyx_t_3 = NULL;
15354 PyObject *__pyx_t_5 = NULL;
15355 PyObject *__pyx_t_6 = NULL;
15356 PyObject *__pyx_t_7 = NULL;
15357 PyObject *__pyx_t_8 = NULL;
15358 PyObject *__pyx_t_9 = NULL;
15359 PyObject *__pyx_t_10 = NULL;
15360 PyObject *__pyx_t_11 = NULL;
15361 int __pyx_lineno = 0;
15362 const char *__pyx_filename = NULL;
15363 int __pyx_clineno = 0;
15364 __Pyx_RefNannySetupContext(
"asin", 0);
15365 if (__pyx_optional_args) {
15366 if (__pyx_optional_args->__pyx_n > 0) {
15367 __pyx_v_i = __pyx_optional_args->i;
15378 __pyx_t_1 = (__pyx_v_i != Py_None);
15379 __pyx_t_2 = (__pyx_t_1 != 0);
15389 __Pyx_XDECREF(__pyx_r);
15390 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15391 __Pyx_GOTREF(__pyx_t_3);
15393 __pyx_t_4 =
asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15395 __Pyx_CppExn2PyErr();
15396 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15398 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15399 __Pyx_GOTREF(__pyx_t_5);
15400 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15401 __pyx_r = __pyx_t_5;
15423 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15424 __Pyx_XGOTREF(__pyx_t_6);
15425 __Pyx_XGOTREF(__pyx_t_7);
15426 __Pyx_XGOTREF(__pyx_t_8);
15436 __Pyx_XDECREF(__pyx_r);
15437 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15438 __Pyx_GOTREF(__pyx_t_3);
15439 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asin);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15440 __Pyx_GOTREF(__pyx_t_9);
15441 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15443 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15444 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15445 if (likely(__pyx_t_3)) {
15446 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15447 __Pyx_INCREF(__pyx_t_3);
15448 __Pyx_INCREF(
function);
15449 __Pyx_DECREF_SET(__pyx_t_9,
function);
15453 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15454 __Pyx_GOTREF(__pyx_t_5);
15456 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15457 __Pyx_GOTREF(__pyx_t_10);
15458 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15459 __Pyx_INCREF(__pyx_v_obj);
15460 __Pyx_GIVEREF(__pyx_v_obj);
15461 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15462 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15463 __Pyx_GOTREF(__pyx_t_5);
15464 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15466 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15467 __pyx_r = __pyx_t_5;
15469 goto __pyx_L8_try_return;
15480 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15481 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15482 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15483 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15493 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15494 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15495 __Pyx_GOTREF(__pyx_t_5);
15496 __Pyx_GOTREF(__pyx_t_9);
15497 __Pyx_GOTREF(__pyx_t_10);
15506 __Pyx_XDECREF(__pyx_r);
15507 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15508 __Pyx_GOTREF(__pyx_t_3);
15509 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15510 __Pyx_GOTREF(__pyx_t_11);
15511 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15512 __pyx_r = __pyx_t_11;
15514 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15515 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15516 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15517 goto __pyx_L7_except_return;
15519 __pyx_L6_except_error:;
15528 __Pyx_XGIVEREF(__pyx_t_6);
15529 __Pyx_XGIVEREF(__pyx_t_7);
15530 __Pyx_XGIVEREF(__pyx_t_8);
15531 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15532 goto __pyx_L1_error;
15533 __pyx_L8_try_return:;
15534 __Pyx_XGIVEREF(__pyx_t_6);
15535 __Pyx_XGIVEREF(__pyx_t_7);
15536 __Pyx_XGIVEREF(__pyx_t_8);
15537 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15539 __pyx_L7_except_return:;
15540 __Pyx_XGIVEREF(__pyx_t_6);
15541 __Pyx_XGIVEREF(__pyx_t_7);
15542 __Pyx_XGIVEREF(__pyx_t_8);
15543 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15558 __Pyx_XDECREF(__pyx_t_3);
15559 __Pyx_XDECREF(__pyx_t_5);
15560 __Pyx_XDECREF(__pyx_t_9);
15561 __Pyx_XDECREF(__pyx_t_10);
15562 __Pyx_XDECREF(__pyx_t_11);
15563 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15566 __Pyx_XGIVEREF(__pyx_r);
15567 __Pyx_RefNannyFinishContext();
15572 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15573 static char __pyx_doc_8PyClical_60asin[] =
"\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 ";
15574 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15575 PyObject *__pyx_v_obj = 0;
15576 PyObject *__pyx_v_i = 0;
15577 int __pyx_lineno = 0;
15578 const char *__pyx_filename = NULL;
15579 int __pyx_clineno = 0;
15580 PyObject *__pyx_r = 0;
15581 __Pyx_RefNannyDeclarations
15582 __Pyx_RefNannySetupContext(
"asin (wrapper)", 0);
15584 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15585 PyObject* values[2] = {0,0};
15586 values[1] = ((PyObject *)Py_None);
15587 if (unlikely(__pyx_kwds)) {
15588 Py_ssize_t kw_args;
15589 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15590 switch (pos_args) {
15591 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15592 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15594 default:
goto __pyx_L5_argtuple_error;
15596 kw_args = PyDict_Size(__pyx_kwds);
15597 switch (pos_args) {
15599 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15600 else goto __pyx_L5_argtuple_error;
15603 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15604 if (value) { values[1] = value; kw_args--; }
15607 if (unlikely(kw_args > 0)) {
15608 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"asin") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15611 switch (PyTuple_GET_SIZE(__pyx_args)) {
15612 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15613 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15615 default:
goto __pyx_L5_argtuple_error;
15618 __pyx_v_obj = values[0];
15619 __pyx_v_i = values[1];
15621 goto __pyx_L4_argument_unpacking_done;
15622 __pyx_L5_argtuple_error:;
15623 __Pyx_RaiseArgtupleInvalid(
"asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15625 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15626 __Pyx_RefNannyFinishContext();
15628 __pyx_L4_argument_unpacking_done:;
15629 __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15632 __Pyx_RefNannyFinishContext();
15636 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15637 PyObject *__pyx_r = NULL;
15638 __Pyx_RefNannyDeclarations
15639 PyObject *__pyx_t_1 = NULL;
15640 struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15641 int __pyx_lineno = 0;
15642 const char *__pyx_filename = NULL;
15643 int __pyx_clineno = 0;
15644 __Pyx_RefNannySetupContext(
"asin", 0);
15645 __Pyx_XDECREF(__pyx_r);
15646 __pyx_t_2.__pyx_n = 1;
15647 __pyx_t_2.i = __pyx_v_i;
15648 __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15649 __Pyx_GOTREF(__pyx_t_1);
15650 __pyx_r = __pyx_t_1;
15656 __Pyx_XDECREF(__pyx_t_1);
15657 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15660 __Pyx_XGIVEREF(__pyx_r);
15661 __Pyx_RefNannyFinishContext();
15673 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15674 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
15675 PyObject *__pyx_r = NULL;
15676 __Pyx_RefNannyDeclarations
15677 PyObject *__pyx_t_1 = NULL;
15678 PyObject *__pyx_t_2 = NULL;
15679 PyObject *__pyx_t_3 = NULL;
15680 PyObject *__pyx_t_4 = NULL;
15681 PyObject *__pyx_t_5 = NULL;
15682 PyObject *__pyx_t_6 = NULL;
15683 PyObject *__pyx_t_7 = NULL;
15684 PyObject *__pyx_t_8 = NULL;
15685 int __pyx_lineno = 0;
15686 const char *__pyx_filename = NULL;
15687 int __pyx_clineno = 0;
15688 __Pyx_RefNannySetupContext(
"sinh", 0);
15698 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15699 __Pyx_XGOTREF(__pyx_t_1);
15700 __Pyx_XGOTREF(__pyx_t_2);
15701 __Pyx_XGOTREF(__pyx_t_3);
15711 __Pyx_XDECREF(__pyx_r);
15712 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15713 __Pyx_GOTREF(__pyx_t_5);
15714 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15715 __Pyx_GOTREF(__pyx_t_6);
15716 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15718 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
15719 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15720 if (likely(__pyx_t_5)) {
15721 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
15722 __Pyx_INCREF(__pyx_t_5);
15723 __Pyx_INCREF(
function);
15724 __Pyx_DECREF_SET(__pyx_t_6,
function);
15728 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15729 __Pyx_GOTREF(__pyx_t_4);
15731 __pyx_t_7 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15732 __Pyx_GOTREF(__pyx_t_7);
15733 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
15734 __Pyx_INCREF(__pyx_v_obj);
15735 __Pyx_GIVEREF(__pyx_v_obj);
15736 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15737 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15738 __Pyx_GOTREF(__pyx_t_4);
15739 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15741 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15742 __pyx_r = __pyx_t_4;
15744 goto __pyx_L7_try_return;
15755 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15756 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15757 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15758 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15768 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15769 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
15770 __Pyx_GOTREF(__pyx_t_4);
15771 __Pyx_GOTREF(__pyx_t_6);
15772 __Pyx_GOTREF(__pyx_t_7);
15781 __Pyx_XDECREF(__pyx_r);
15782 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
15783 __Pyx_GOTREF(__pyx_t_5);
15784 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_5),
sinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
15785 __Pyx_GOTREF(__pyx_t_8);
15786 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15787 __pyx_r = __pyx_t_8;
15789 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15790 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15791 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15792 goto __pyx_L6_except_return;
15794 __pyx_L5_except_error:;
15803 __Pyx_XGIVEREF(__pyx_t_1);
15804 __Pyx_XGIVEREF(__pyx_t_2);
15805 __Pyx_XGIVEREF(__pyx_t_3);
15806 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15807 goto __pyx_L1_error;
15808 __pyx_L7_try_return:;
15809 __Pyx_XGIVEREF(__pyx_t_1);
15810 __Pyx_XGIVEREF(__pyx_t_2);
15811 __Pyx_XGIVEREF(__pyx_t_3);
15812 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15814 __pyx_L6_except_return:;
15815 __Pyx_XGIVEREF(__pyx_t_1);
15816 __Pyx_XGIVEREF(__pyx_t_2);
15817 __Pyx_XGIVEREF(__pyx_t_3);
15818 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15832 __Pyx_XDECREF(__pyx_t_4);
15833 __Pyx_XDECREF(__pyx_t_5);
15834 __Pyx_XDECREF(__pyx_t_6);
15835 __Pyx_XDECREF(__pyx_t_7);
15836 __Pyx_XDECREF(__pyx_t_8);
15837 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15840 __Pyx_XGIVEREF(__pyx_r);
15841 __Pyx_RefNannyFinishContext();
15846 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15847 static char __pyx_doc_8PyClical_62sinh[] =
"\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 ";
15848 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15849 PyObject *__pyx_r = 0;
15850 __Pyx_RefNannyDeclarations
15851 __Pyx_RefNannySetupContext(
"sinh (wrapper)", 0);
15852 __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15855 __Pyx_RefNannyFinishContext();
15859 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15860 PyObject *__pyx_r = NULL;
15861 __Pyx_RefNannyDeclarations
15862 PyObject *__pyx_t_1 = NULL;
15863 int __pyx_lineno = 0;
15864 const char *__pyx_filename = NULL;
15865 int __pyx_clineno = 0;
15866 __Pyx_RefNannySetupContext(
"sinh", 0);
15867 __Pyx_XDECREF(__pyx_r);
15868 __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15869 __Pyx_GOTREF(__pyx_t_1);
15870 __pyx_r = __pyx_t_1;
15876 __Pyx_XDECREF(__pyx_t_1);
15877 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15880 __Pyx_XGIVEREF(__pyx_r);
15881 __Pyx_RefNannyFinishContext();
15893 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15894 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) {
15895 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15896 PyObject *__pyx_r = NULL;
15897 __Pyx_RefNannyDeclarations
15900 PyObject *__pyx_t_3 = NULL;
15902 PyObject *__pyx_t_5 = NULL;
15903 PyObject *__pyx_t_6 = NULL;
15904 PyObject *__pyx_t_7 = NULL;
15905 PyObject *__pyx_t_8 = NULL;
15906 PyObject *__pyx_t_9 = NULL;
15907 PyObject *__pyx_t_10 = NULL;
15908 PyObject *__pyx_t_11 = NULL;
15909 int __pyx_lineno = 0;
15910 const char *__pyx_filename = NULL;
15911 int __pyx_clineno = 0;
15912 __Pyx_RefNannySetupContext(
"asinh", 0);
15913 if (__pyx_optional_args) {
15914 if (__pyx_optional_args->__pyx_n > 0) {
15915 __pyx_v_i = __pyx_optional_args->i;
15926 __pyx_t_1 = (__pyx_v_i != Py_None);
15927 __pyx_t_2 = (__pyx_t_1 != 0);
15937 __Pyx_XDECREF(__pyx_r);
15938 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15939 __Pyx_GOTREF(__pyx_t_3);
15941 __pyx_t_4 =
asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15943 __Pyx_CppExn2PyErr();
15944 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15946 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15947 __Pyx_GOTREF(__pyx_t_5);
15948 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15949 __pyx_r = __pyx_t_5;
15971 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15972 __Pyx_XGOTREF(__pyx_t_6);
15973 __Pyx_XGOTREF(__pyx_t_7);
15974 __Pyx_XGOTREF(__pyx_t_8);
15984 __Pyx_XDECREF(__pyx_r);
15985 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15986 __Pyx_GOTREF(__pyx_t_3);
15987 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asinh);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15988 __Pyx_GOTREF(__pyx_t_9);
15989 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15991 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15992 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15993 if (likely(__pyx_t_3)) {
15994 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15995 __Pyx_INCREF(__pyx_t_3);
15996 __Pyx_INCREF(
function);
15997 __Pyx_DECREF_SET(__pyx_t_9,
function);
16001 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16002 __Pyx_GOTREF(__pyx_t_5);
16004 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16005 __Pyx_GOTREF(__pyx_t_10);
16006 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16007 __Pyx_INCREF(__pyx_v_obj);
16008 __Pyx_GIVEREF(__pyx_v_obj);
16009 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16010 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16011 __Pyx_GOTREF(__pyx_t_5);
16012 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16014 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16015 __pyx_r = __pyx_t_5;
16017 goto __pyx_L8_try_return;
16028 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16029 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16030 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16031 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16041 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16042 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16043 __Pyx_GOTREF(__pyx_t_5);
16044 __Pyx_GOTREF(__pyx_t_9);
16045 __Pyx_GOTREF(__pyx_t_10);
16054 __Pyx_XDECREF(__pyx_r);
16055 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16056 __Pyx_GOTREF(__pyx_t_3);
16057 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16058 __Pyx_GOTREF(__pyx_t_11);
16059 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16060 __pyx_r = __pyx_t_11;
16062 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16063 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16064 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16065 goto __pyx_L7_except_return;
16067 __pyx_L6_except_error:;
16076 __Pyx_XGIVEREF(__pyx_t_6);
16077 __Pyx_XGIVEREF(__pyx_t_7);
16078 __Pyx_XGIVEREF(__pyx_t_8);
16079 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16080 goto __pyx_L1_error;
16081 __pyx_L8_try_return:;
16082 __Pyx_XGIVEREF(__pyx_t_6);
16083 __Pyx_XGIVEREF(__pyx_t_7);
16084 __Pyx_XGIVEREF(__pyx_t_8);
16085 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16087 __pyx_L7_except_return:;
16088 __Pyx_XGIVEREF(__pyx_t_6);
16089 __Pyx_XGIVEREF(__pyx_t_7);
16090 __Pyx_XGIVEREF(__pyx_t_8);
16091 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16106 __Pyx_XDECREF(__pyx_t_3);
16107 __Pyx_XDECREF(__pyx_t_5);
16108 __Pyx_XDECREF(__pyx_t_9);
16109 __Pyx_XDECREF(__pyx_t_10);
16110 __Pyx_XDECREF(__pyx_t_11);
16111 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16114 __Pyx_XGIVEREF(__pyx_r);
16115 __Pyx_RefNannyFinishContext();
16120 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16121 static char __pyx_doc_8PyClical_64asinh[] =
"\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 ";
16122 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16123 PyObject *__pyx_v_obj = 0;
16124 PyObject *__pyx_v_i = 0;
16125 int __pyx_lineno = 0;
16126 const char *__pyx_filename = NULL;
16127 int __pyx_clineno = 0;
16128 PyObject *__pyx_r = 0;
16129 __Pyx_RefNannyDeclarations
16130 __Pyx_RefNannySetupContext(
"asinh (wrapper)", 0);
16132 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16133 PyObject* values[2] = {0,0};
16134 values[1] = ((PyObject *)Py_None);
16135 if (unlikely(__pyx_kwds)) {
16136 Py_ssize_t kw_args;
16137 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16138 switch (pos_args) {
16139 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16140 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16142 default:
goto __pyx_L5_argtuple_error;
16144 kw_args = PyDict_Size(__pyx_kwds);
16145 switch (pos_args) {
16147 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16148 else goto __pyx_L5_argtuple_error;
16151 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16152 if (value) { values[1] = value; kw_args--; }
16155 if (unlikely(kw_args > 0)) {
16156 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"asinh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16159 switch (PyTuple_GET_SIZE(__pyx_args)) {
16160 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16161 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16163 default:
goto __pyx_L5_argtuple_error;
16166 __pyx_v_obj = values[0];
16167 __pyx_v_i = values[1];
16169 goto __pyx_L4_argument_unpacking_done;
16170 __pyx_L5_argtuple_error:;
16171 __Pyx_RaiseArgtupleInvalid(
"asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16173 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16174 __Pyx_RefNannyFinishContext();
16176 __pyx_L4_argument_unpacking_done:;
16177 __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16180 __Pyx_RefNannyFinishContext();
16184 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16185 PyObject *__pyx_r = NULL;
16186 __Pyx_RefNannyDeclarations
16187 PyObject *__pyx_t_1 = NULL;
16188 struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16189 int __pyx_lineno = 0;
16190 const char *__pyx_filename = NULL;
16191 int __pyx_clineno = 0;
16192 __Pyx_RefNannySetupContext(
"asinh", 0);
16193 __Pyx_XDECREF(__pyx_r);
16194 __pyx_t_2.__pyx_n = 1;
16195 __pyx_t_2.i = __pyx_v_i;
16196 __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16197 __Pyx_GOTREF(__pyx_t_1);
16198 __pyx_r = __pyx_t_1;
16204 __Pyx_XDECREF(__pyx_t_1);
16205 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16208 __Pyx_XGIVEREF(__pyx_r);
16209 __Pyx_RefNannyFinishContext();
16221 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16222 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) {
16223 PyObject *__pyx_v_i = ((PyObject *)Py_None);
16224 PyObject *__pyx_r = NULL;
16225 __Pyx_RefNannyDeclarations
16228 PyObject *__pyx_t_3 = NULL;
16230 PyObject *__pyx_t_5 = NULL;
16231 PyObject *__pyx_t_6 = NULL;
16232 PyObject *__pyx_t_7 = NULL;
16233 PyObject *__pyx_t_8 = NULL;
16234 PyObject *__pyx_t_9 = NULL;
16235 PyObject *__pyx_t_10 = NULL;
16236 PyObject *__pyx_t_11 = NULL;
16237 int __pyx_lineno = 0;
16238 const char *__pyx_filename = NULL;
16239 int __pyx_clineno = 0;
16240 __Pyx_RefNannySetupContext(
"tan", 0);
16241 if (__pyx_optional_args) {
16242 if (__pyx_optional_args->__pyx_n > 0) {
16243 __pyx_v_i = __pyx_optional_args->i;
16254 __pyx_t_1 = (__pyx_v_i != Py_None);
16255 __pyx_t_2 = (__pyx_t_1 != 0);
16265 __Pyx_XDECREF(__pyx_r);
16266 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16267 __Pyx_GOTREF(__pyx_t_3);
16269 __pyx_t_4 =
tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16271 __Pyx_CppExn2PyErr();
16272 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16274 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16275 __Pyx_GOTREF(__pyx_t_5);
16276 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16277 __pyx_r = __pyx_t_5;
16299 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16300 __Pyx_XGOTREF(__pyx_t_6);
16301 __Pyx_XGOTREF(__pyx_t_7);
16302 __Pyx_XGOTREF(__pyx_t_8);
16312 __Pyx_XDECREF(__pyx_r);
16313 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16314 __Pyx_GOTREF(__pyx_t_3);
16315 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16316 __Pyx_GOTREF(__pyx_t_9);
16317 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16319 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
16320 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16321 if (likely(__pyx_t_3)) {
16322 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
16323 __Pyx_INCREF(__pyx_t_3);
16324 __Pyx_INCREF(
function);
16325 __Pyx_DECREF_SET(__pyx_t_9,
function);
16329 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16330 __Pyx_GOTREF(__pyx_t_5);
16332 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16333 __Pyx_GOTREF(__pyx_t_10);
16334 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16335 __Pyx_INCREF(__pyx_v_obj);
16336 __Pyx_GIVEREF(__pyx_v_obj);
16337 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16338 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16339 __Pyx_GOTREF(__pyx_t_5);
16340 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16342 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16343 __pyx_r = __pyx_t_5;
16345 goto __pyx_L8_try_return;
16356 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16357 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16358 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16359 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16369 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16370 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16371 __Pyx_GOTREF(__pyx_t_5);
16372 __Pyx_GOTREF(__pyx_t_9);
16373 __Pyx_GOTREF(__pyx_t_10);
16382 __Pyx_XDECREF(__pyx_r);
16383 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16384 __Pyx_GOTREF(__pyx_t_3);
16385 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16386 __Pyx_GOTREF(__pyx_t_11);
16387 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16388 __pyx_r = __pyx_t_11;
16390 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16391 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16392 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16393 goto __pyx_L7_except_return;
16395 __pyx_L6_except_error:;
16404 __Pyx_XGIVEREF(__pyx_t_6);
16405 __Pyx_XGIVEREF(__pyx_t_7);
16406 __Pyx_XGIVEREF(__pyx_t_8);
16407 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16408 goto __pyx_L1_error;
16409 __pyx_L8_try_return:;
16410 __Pyx_XGIVEREF(__pyx_t_6);
16411 __Pyx_XGIVEREF(__pyx_t_7);
16412 __Pyx_XGIVEREF(__pyx_t_8);
16413 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16415 __pyx_L7_except_return:;
16416 __Pyx_XGIVEREF(__pyx_t_6);
16417 __Pyx_XGIVEREF(__pyx_t_7);
16418 __Pyx_XGIVEREF(__pyx_t_8);
16419 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16434 __Pyx_XDECREF(__pyx_t_3);
16435 __Pyx_XDECREF(__pyx_t_5);
16436 __Pyx_XDECREF(__pyx_t_9);
16437 __Pyx_XDECREF(__pyx_t_10);
16438 __Pyx_XDECREF(__pyx_t_11);
16439 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16442 __Pyx_XGIVEREF(__pyx_r);
16443 __Pyx_RefNannyFinishContext();
16448 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16449 static char __pyx_doc_8PyClical_66tan[] =
"\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 ";
16450 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16451 PyObject *__pyx_v_obj = 0;
16452 PyObject *__pyx_v_i = 0;
16453 int __pyx_lineno = 0;
16454 const char *__pyx_filename = NULL;
16455 int __pyx_clineno = 0;
16456 PyObject *__pyx_r = 0;
16457 __Pyx_RefNannyDeclarations
16458 __Pyx_RefNannySetupContext(
"tan (wrapper)", 0);
16460 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16461 PyObject* values[2] = {0,0};
16462 values[1] = ((PyObject *)Py_None);
16463 if (unlikely(__pyx_kwds)) {
16464 Py_ssize_t kw_args;
16465 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16466 switch (pos_args) {
16467 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16468 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16470 default:
goto __pyx_L5_argtuple_error;
16472 kw_args = PyDict_Size(__pyx_kwds);
16473 switch (pos_args) {
16475 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16476 else goto __pyx_L5_argtuple_error;
16479 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16480 if (value) { values[1] = value; kw_args--; }
16483 if (unlikely(kw_args > 0)) {
16484 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"tan") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16487 switch (PyTuple_GET_SIZE(__pyx_args)) {
16488 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16489 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16491 default:
goto __pyx_L5_argtuple_error;
16494 __pyx_v_obj = values[0];
16495 __pyx_v_i = values[1];
16497 goto __pyx_L4_argument_unpacking_done;
16498 __pyx_L5_argtuple_error:;
16499 __Pyx_RaiseArgtupleInvalid(
"tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16501 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16502 __Pyx_RefNannyFinishContext();
16504 __pyx_L4_argument_unpacking_done:;
16505 __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16508 __Pyx_RefNannyFinishContext();
16512 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16513 PyObject *__pyx_r = NULL;
16514 __Pyx_RefNannyDeclarations
16515 PyObject *__pyx_t_1 = NULL;
16516 struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16517 int __pyx_lineno = 0;
16518 const char *__pyx_filename = NULL;
16519 int __pyx_clineno = 0;
16520 __Pyx_RefNannySetupContext(
"tan", 0);
16521 __Pyx_XDECREF(__pyx_r);
16522 __pyx_t_2.__pyx_n = 1;
16523 __pyx_t_2.i = __pyx_v_i;
16524 __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16525 __Pyx_GOTREF(__pyx_t_1);
16526 __pyx_r = __pyx_t_1;
16532 __Pyx_XDECREF(__pyx_t_1);
16533 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16536 __Pyx_XGIVEREF(__pyx_r);
16537 __Pyx_RefNannyFinishContext();
16549 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16550 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) {
16551 PyObject *__pyx_v_i = ((PyObject *)Py_None);
16552 PyObject *__pyx_r = NULL;
16553 __Pyx_RefNannyDeclarations
16556 PyObject *__pyx_t_3 = NULL;
16558 PyObject *__pyx_t_5 = NULL;
16559 PyObject *__pyx_t_6 = NULL;
16560 PyObject *__pyx_t_7 = NULL;
16561 PyObject *__pyx_t_8 = NULL;
16562 PyObject *__pyx_t_9 = NULL;
16563 PyObject *__pyx_t_10 = NULL;
16564 PyObject *__pyx_t_11 = NULL;
16565 int __pyx_lineno = 0;
16566 const char *__pyx_filename = NULL;
16567 int __pyx_clineno = 0;
16568 __Pyx_RefNannySetupContext(
"atan", 0);
16569 if (__pyx_optional_args) {
16570 if (__pyx_optional_args->__pyx_n > 0) {
16571 __pyx_v_i = __pyx_optional_args->i;
16582 __pyx_t_1 = (__pyx_v_i != Py_None);
16583 __pyx_t_2 = (__pyx_t_1 != 0);
16593 __Pyx_XDECREF(__pyx_r);
16594 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16595 __Pyx_GOTREF(__pyx_t_3);
16597 __pyx_t_4 =
atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16599 __Pyx_CppExn2PyErr();
16600 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16602 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16603 __Pyx_GOTREF(__pyx_t_5);
16604 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16605 __pyx_r = __pyx_t_5;
16627 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16628 __Pyx_XGOTREF(__pyx_t_6);
16629 __Pyx_XGOTREF(__pyx_t_7);
16630 __Pyx_XGOTREF(__pyx_t_8);
16640 __Pyx_XDECREF(__pyx_r);
16641 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16642 __Pyx_GOTREF(__pyx_t_3);
16643 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atan);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16644 __Pyx_GOTREF(__pyx_t_9);
16645 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16647 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
16648 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16649 if (likely(__pyx_t_3)) {
16650 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
16651 __Pyx_INCREF(__pyx_t_3);
16652 __Pyx_INCREF(
function);
16653 __Pyx_DECREF_SET(__pyx_t_9,
function);
16657 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16658 __Pyx_GOTREF(__pyx_t_5);
16660 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16661 __Pyx_GOTREF(__pyx_t_10);
16662 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16663 __Pyx_INCREF(__pyx_v_obj);
16664 __Pyx_GIVEREF(__pyx_v_obj);
16665 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16666 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
16667 __Pyx_GOTREF(__pyx_t_5);
16668 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16670 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16671 __pyx_r = __pyx_t_5;
16673 goto __pyx_L8_try_return;
16684 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16685 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16686 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16687 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16697 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16698 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16699 __Pyx_GOTREF(__pyx_t_5);
16700 __Pyx_GOTREF(__pyx_t_9);
16701 __Pyx_GOTREF(__pyx_t_10);
16710 __Pyx_XDECREF(__pyx_r);
16711 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16712 __Pyx_GOTREF(__pyx_t_3);
16713 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
16714 __Pyx_GOTREF(__pyx_t_11);
16715 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16716 __pyx_r = __pyx_t_11;
16718 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16719 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16720 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16721 goto __pyx_L7_except_return;
16723 __pyx_L6_except_error:;
16732 __Pyx_XGIVEREF(__pyx_t_6);
16733 __Pyx_XGIVEREF(__pyx_t_7);
16734 __Pyx_XGIVEREF(__pyx_t_8);
16735 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16736 goto __pyx_L1_error;
16737 __pyx_L8_try_return:;
16738 __Pyx_XGIVEREF(__pyx_t_6);
16739 __Pyx_XGIVEREF(__pyx_t_7);
16740 __Pyx_XGIVEREF(__pyx_t_8);
16741 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16743 __pyx_L7_except_return:;
16744 __Pyx_XGIVEREF(__pyx_t_6);
16745 __Pyx_XGIVEREF(__pyx_t_7);
16746 __Pyx_XGIVEREF(__pyx_t_8);
16747 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16762 __Pyx_XDECREF(__pyx_t_3);
16763 __Pyx_XDECREF(__pyx_t_5);
16764 __Pyx_XDECREF(__pyx_t_9);
16765 __Pyx_XDECREF(__pyx_t_10);
16766 __Pyx_XDECREF(__pyx_t_11);
16767 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16770 __Pyx_XGIVEREF(__pyx_r);
16771 __Pyx_RefNannyFinishContext();
16776 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16777 static char __pyx_doc_8PyClical_68atan[] =
"\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 ";
16778 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16779 PyObject *__pyx_v_obj = 0;
16780 PyObject *__pyx_v_i = 0;
16781 int __pyx_lineno = 0;
16782 const char *__pyx_filename = NULL;
16783 int __pyx_clineno = 0;
16784 PyObject *__pyx_r = 0;
16785 __Pyx_RefNannyDeclarations
16786 __Pyx_RefNannySetupContext(
"atan (wrapper)", 0);
16788 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16789 PyObject* values[2] = {0,0};
16790 values[1] = ((PyObject *)Py_None);
16791 if (unlikely(__pyx_kwds)) {
16792 Py_ssize_t kw_args;
16793 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16794 switch (pos_args) {
16795 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16796 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16798 default:
goto __pyx_L5_argtuple_error;
16800 kw_args = PyDict_Size(__pyx_kwds);
16801 switch (pos_args) {
16803 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16804 else goto __pyx_L5_argtuple_error;
16807 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16808 if (value) { values[1] = value; kw_args--; }
16811 if (unlikely(kw_args > 0)) {
16812 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"atan") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16815 switch (PyTuple_GET_SIZE(__pyx_args)) {
16816 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16817 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16819 default:
goto __pyx_L5_argtuple_error;
16822 __pyx_v_obj = values[0];
16823 __pyx_v_i = values[1];
16825 goto __pyx_L4_argument_unpacking_done;
16826 __pyx_L5_argtuple_error:;
16827 __Pyx_RaiseArgtupleInvalid(
"atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16829 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16830 __Pyx_RefNannyFinishContext();
16832 __pyx_L4_argument_unpacking_done:;
16833 __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16836 __Pyx_RefNannyFinishContext();
16840 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16841 PyObject *__pyx_r = NULL;
16842 __Pyx_RefNannyDeclarations
16843 PyObject *__pyx_t_1 = NULL;
16844 struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16845 int __pyx_lineno = 0;
16846 const char *__pyx_filename = NULL;
16847 int __pyx_clineno = 0;
16848 __Pyx_RefNannySetupContext(
"atan", 0);
16849 __Pyx_XDECREF(__pyx_r);
16850 __pyx_t_2.__pyx_n = 1;
16851 __pyx_t_2.i = __pyx_v_i;
16852 __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16853 __Pyx_GOTREF(__pyx_t_1);
16854 __pyx_r = __pyx_t_1;
16860 __Pyx_XDECREF(__pyx_t_1);
16861 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16864 __Pyx_XGIVEREF(__pyx_r);
16865 __Pyx_RefNannyFinishContext();
16877 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16878 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16879 PyObject *__pyx_r = NULL;
16880 __Pyx_RefNannyDeclarations
16881 PyObject *__pyx_t_1 = NULL;
16882 PyObject *__pyx_t_2 = NULL;
16883 PyObject *__pyx_t_3 = NULL;
16884 PyObject *__pyx_t_4 = NULL;
16885 PyObject *__pyx_t_5 = NULL;
16886 PyObject *__pyx_t_6 = NULL;
16887 PyObject *__pyx_t_7 = NULL;
16888 PyObject *__pyx_t_8 = NULL;
16889 int __pyx_lineno = 0;
16890 const char *__pyx_filename = NULL;
16891 int __pyx_clineno = 0;
16892 __Pyx_RefNannySetupContext(
"tanh", 0);
16902 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16903 __Pyx_XGOTREF(__pyx_t_1);
16904 __Pyx_XGOTREF(__pyx_t_2);
16905 __Pyx_XGOTREF(__pyx_t_3);
16915 __Pyx_XDECREF(__pyx_r);
16916 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16917 __Pyx_GOTREF(__pyx_t_5);
16918 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16919 __Pyx_GOTREF(__pyx_t_6);
16920 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16922 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
16923 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16924 if (likely(__pyx_t_5)) {
16925 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
16926 __Pyx_INCREF(__pyx_t_5);
16927 __Pyx_INCREF(
function);
16928 __Pyx_DECREF_SET(__pyx_t_6,
function);
16932 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16933 __Pyx_GOTREF(__pyx_t_4);
16935 __pyx_t_7 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16936 __Pyx_GOTREF(__pyx_t_7);
16937 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16938 __Pyx_INCREF(__pyx_v_obj);
16939 __Pyx_GIVEREF(__pyx_v_obj);
16940 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16941 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16942 __Pyx_GOTREF(__pyx_t_4);
16943 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16945 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16946 __pyx_r = __pyx_t_4;
16948 goto __pyx_L7_try_return;
16959 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16960 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16961 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16962 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16972 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16973 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
16974 __Pyx_GOTREF(__pyx_t_4);
16975 __Pyx_GOTREF(__pyx_t_6);
16976 __Pyx_GOTREF(__pyx_t_7);
16985 __Pyx_XDECREF(__pyx_r);
16986 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
16987 __Pyx_GOTREF(__pyx_t_5);
16988 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_5),
tanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
16989 __Pyx_GOTREF(__pyx_t_8);
16990 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16991 __pyx_r = __pyx_t_8;
16993 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16994 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16995 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16996 goto __pyx_L6_except_return;
16998 __pyx_L5_except_error:;
17007 __Pyx_XGIVEREF(__pyx_t_1);
17008 __Pyx_XGIVEREF(__pyx_t_2);
17009 __Pyx_XGIVEREF(__pyx_t_3);
17010 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17011 goto __pyx_L1_error;
17012 __pyx_L7_try_return:;
17013 __Pyx_XGIVEREF(__pyx_t_1);
17014 __Pyx_XGIVEREF(__pyx_t_2);
17015 __Pyx_XGIVEREF(__pyx_t_3);
17016 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17018 __pyx_L6_except_return:;
17019 __Pyx_XGIVEREF(__pyx_t_1);
17020 __Pyx_XGIVEREF(__pyx_t_2);
17021 __Pyx_XGIVEREF(__pyx_t_3);
17022 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17036 __Pyx_XDECREF(__pyx_t_4);
17037 __Pyx_XDECREF(__pyx_t_5);
17038 __Pyx_XDECREF(__pyx_t_6);
17039 __Pyx_XDECREF(__pyx_t_7);
17040 __Pyx_XDECREF(__pyx_t_8);
17041 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17044 __Pyx_XGIVEREF(__pyx_r);
17045 __Pyx_RefNannyFinishContext();
17050 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17051 static char __pyx_doc_8PyClical_70tanh[] =
"\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print tanh(x)\n {1,2}\n ";
17052 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17053 PyObject *__pyx_r = 0;
17054 __Pyx_RefNannyDeclarations
17055 __Pyx_RefNannySetupContext(
"tanh (wrapper)", 0);
17056 __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17059 __Pyx_RefNannyFinishContext();
17063 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17064 PyObject *__pyx_r = NULL;
17065 __Pyx_RefNannyDeclarations
17066 PyObject *__pyx_t_1 = NULL;
17067 int __pyx_lineno = 0;
17068 const char *__pyx_filename = NULL;
17069 int __pyx_clineno = 0;
17070 __Pyx_RefNannySetupContext(
"tanh", 0);
17071 __Pyx_XDECREF(__pyx_r);
17072 __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17073 __Pyx_GOTREF(__pyx_t_1);
17074 __pyx_r = __pyx_t_1;
17080 __Pyx_XDECREF(__pyx_t_1);
17081 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17084 __Pyx_XGIVEREF(__pyx_r);
17085 __Pyx_RefNannyFinishContext();
17097 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17098 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) {
17099 PyObject *__pyx_v_i = ((PyObject *)Py_None);
17100 PyObject *__pyx_r = NULL;
17101 __Pyx_RefNannyDeclarations
17104 PyObject *__pyx_t_3 = NULL;
17106 PyObject *__pyx_t_5 = NULL;
17107 PyObject *__pyx_t_6 = NULL;
17108 PyObject *__pyx_t_7 = NULL;
17109 PyObject *__pyx_t_8 = NULL;
17110 PyObject *__pyx_t_9 = NULL;
17111 PyObject *__pyx_t_10 = NULL;
17112 PyObject *__pyx_t_11 = NULL;
17113 int __pyx_lineno = 0;
17114 const char *__pyx_filename = NULL;
17115 int __pyx_clineno = 0;
17116 __Pyx_RefNannySetupContext(
"atanh", 0);
17117 if (__pyx_optional_args) {
17118 if (__pyx_optional_args->__pyx_n > 0) {
17119 __pyx_v_i = __pyx_optional_args->i;
17130 __pyx_t_1 = (__pyx_v_i != Py_None);
17131 __pyx_t_2 = (__pyx_t_1 != 0);
17141 __Pyx_XDECREF(__pyx_r);
17142 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17143 __Pyx_GOTREF(__pyx_t_3);
17145 __pyx_t_4 =
atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17147 __Pyx_CppExn2PyErr();
17148 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17150 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17151 __Pyx_GOTREF(__pyx_t_5);
17152 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17153 __pyx_r = __pyx_t_5;
17175 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17176 __Pyx_XGOTREF(__pyx_t_6);
17177 __Pyx_XGOTREF(__pyx_t_7);
17178 __Pyx_XGOTREF(__pyx_t_8);
17188 __Pyx_XDECREF(__pyx_r);
17189 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
17190 __Pyx_GOTREF(__pyx_t_3);
17191 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atanh);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
17192 __Pyx_GOTREF(__pyx_t_9);
17193 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17195 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
17196 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17197 if (likely(__pyx_t_3)) {
17198 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
17199 __Pyx_INCREF(__pyx_t_3);
17200 __Pyx_INCREF(
function);
17201 __Pyx_DECREF_SET(__pyx_t_9,
function);
17205 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
17206 __Pyx_GOTREF(__pyx_t_5);
17208 __pyx_t_10 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
17209 __Pyx_GOTREF(__pyx_t_10);
17210 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17211 __Pyx_INCREF(__pyx_v_obj);
17212 __Pyx_GIVEREF(__pyx_v_obj);
17213 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17214 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
17215 __Pyx_GOTREF(__pyx_t_5);
17216 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17218 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17219 __pyx_r = __pyx_t_5;
17221 goto __pyx_L8_try_return;
17232 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17233 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17234 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17235 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17245 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17246 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
17247 __Pyx_GOTREF(__pyx_t_5);
17248 __Pyx_GOTREF(__pyx_t_9);
17249 __Pyx_GOTREF(__pyx_t_10);
17258 __Pyx_XDECREF(__pyx_r);
17259 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
17260 __Pyx_GOTREF(__pyx_t_3);
17261 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3),
atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
17262 __Pyx_GOTREF(__pyx_t_11);
17263 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17264 __pyx_r = __pyx_t_11;
17266 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17267 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17268 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17269 goto __pyx_L7_except_return;
17271 __pyx_L6_except_error:;
17280 __Pyx_XGIVEREF(__pyx_t_6);
17281 __Pyx_XGIVEREF(__pyx_t_7);
17282 __Pyx_XGIVEREF(__pyx_t_8);
17283 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17284 goto __pyx_L1_error;
17285 __pyx_L8_try_return:;
17286 __Pyx_XGIVEREF(__pyx_t_6);
17287 __Pyx_XGIVEREF(__pyx_t_7);
17288 __Pyx_XGIVEREF(__pyx_t_8);
17289 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17291 __pyx_L7_except_return:;
17292 __Pyx_XGIVEREF(__pyx_t_6);
17293 __Pyx_XGIVEREF(__pyx_t_7);
17294 __Pyx_XGIVEREF(__pyx_t_8);
17295 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17310 __Pyx_XDECREF(__pyx_t_3);
17311 __Pyx_XDECREF(__pyx_t_5);
17312 __Pyx_XDECREF(__pyx_t_9);
17313 __Pyx_XDECREF(__pyx_t_10);
17314 __Pyx_XDECREF(__pyx_t_11);
17315 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17318 __Pyx_XGIVEREF(__pyx_r);
17319 __Pyx_RefNannyFinishContext();
17324 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17325 static char __pyx_doc_8PyClical_72atanh[] =
"\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 ";
17326 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17327 PyObject *__pyx_v_obj = 0;
17328 PyObject *__pyx_v_i = 0;
17329 int __pyx_lineno = 0;
17330 const char *__pyx_filename = NULL;
17331 int __pyx_clineno = 0;
17332 PyObject *__pyx_r = 0;
17333 __Pyx_RefNannyDeclarations
17334 __Pyx_RefNannySetupContext(
"atanh (wrapper)", 0);
17336 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17337 PyObject* values[2] = {0,0};
17338 values[1] = ((PyObject *)Py_None);
17339 if (unlikely(__pyx_kwds)) {
17340 Py_ssize_t kw_args;
17341 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17342 switch (pos_args) {
17343 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17344 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17346 default:
goto __pyx_L5_argtuple_error;
17348 kw_args = PyDict_Size(__pyx_kwds);
17349 switch (pos_args) {
17351 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17352 else goto __pyx_L5_argtuple_error;
17355 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17356 if (value) { values[1] = value; kw_args--; }
17359 if (unlikely(kw_args > 0)) {
17360 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"atanh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17363 switch (PyTuple_GET_SIZE(__pyx_args)) {
17364 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17365 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17367 default:
goto __pyx_L5_argtuple_error;
17370 __pyx_v_obj = values[0];
17371 __pyx_v_i = values[1];
17373 goto __pyx_L4_argument_unpacking_done;
17374 __pyx_L5_argtuple_error:;
17375 __Pyx_RaiseArgtupleInvalid(
"atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17377 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17378 __Pyx_RefNannyFinishContext();
17380 __pyx_L4_argument_unpacking_done:;
17381 __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17384 __Pyx_RefNannyFinishContext();
17388 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17389 PyObject *__pyx_r = NULL;
17390 __Pyx_RefNannyDeclarations
17391 PyObject *__pyx_t_1 = NULL;
17392 struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17393 int __pyx_lineno = 0;
17394 const char *__pyx_filename = NULL;
17395 int __pyx_clineno = 0;
17396 __Pyx_RefNannySetupContext(
"atanh", 0);
17397 __Pyx_XDECREF(__pyx_r);
17398 __pyx_t_2.__pyx_n = 1;
17399 __pyx_t_2.i = __pyx_v_i;
17400 __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17401 __Pyx_GOTREF(__pyx_t_1);
17402 __pyx_r = __pyx_t_1;
17408 __Pyx_XDECREF(__pyx_t_1);
17409 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17412 __Pyx_XGIVEREF(__pyx_r);
17413 __Pyx_RefNannyFinishContext();
17425 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17426 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) {
17427 PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17428 PyObject *__pyx_r = NULL;
17429 __Pyx_RefNannyDeclarations
17430 PyObject *__pyx_t_1 = NULL;
17431 PyObject *__pyx_t_2 = NULL;
17433 PyObject *__pyx_t_4 = NULL;
17434 int __pyx_lineno = 0;
17435 const char *__pyx_filename = NULL;
17436 int __pyx_clineno = 0;
17437 __Pyx_RefNannySetupContext(
"random_clifford", 0);
17438 if (__pyx_optional_args) {
17439 if (__pyx_optional_args->__pyx_n > 0) {
17440 __pyx_v_fill = __pyx_optional_args->fill;
17451 __Pyx_XDECREF(__pyx_r);
17452 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17453 __Pyx_GOTREF(__pyx_t_1);
17454 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17455 __Pyx_GOTREF(__pyx_t_2);
17456 __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fill);
if (unlikely((__pyx_t_3 == (
scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17457 __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance->random(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_ixt), ((
scalar_t)__pyx_t_3)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17458 __Pyx_GOTREF(__pyx_t_4);
17459 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17460 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17461 __pyx_r = __pyx_t_4;
17475 __Pyx_XDECREF(__pyx_t_1);
17476 __Pyx_XDECREF(__pyx_t_2);
17477 __Pyx_XDECREF(__pyx_t_4);
17478 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17481 __Pyx_XGIVEREF(__pyx_r);
17482 __Pyx_RefNannyFinishContext();
17487 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17488 static char __pyx_doc_8PyClical_74random_clifford[] =
"\n Random multivector within a frame.\n\n >>> print random_clifford(index_set({-3,-1,2})).frame()\n {-3,-1,2}\n ";
17489 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17490 struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17491 PyObject *__pyx_v_fill = 0;
17492 int __pyx_lineno = 0;
17493 const char *__pyx_filename = NULL;
17494 int __pyx_clineno = 0;
17495 PyObject *__pyx_r = 0;
17496 __Pyx_RefNannyDeclarations
17497 __Pyx_RefNannySetupContext(
"random_clifford (wrapper)", 0);
17499 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17500 PyObject* values[2] = {0,0};
17501 values[1] = ((PyObject *)__pyx_float_1_0);
17502 if (unlikely(__pyx_kwds)) {
17503 Py_ssize_t kw_args;
17504 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17505 switch (pos_args) {
17506 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17507 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17509 default:
goto __pyx_L5_argtuple_error;
17511 kw_args = PyDict_Size(__pyx_kwds);
17512 switch (pos_args) {
17514 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17515 else goto __pyx_L5_argtuple_error;
17518 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
17519 if (value) { values[1] = value; kw_args--; }
17522 if (unlikely(kw_args > 0)) {
17523 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"random_clifford") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17526 switch (PyTuple_GET_SIZE(__pyx_args)) {
17527 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17528 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17530 default:
goto __pyx_L5_argtuple_error;
17533 __pyx_v_ixt = ((
struct __pyx_obj_8PyClical_index_set *)values[0]);
17534 __pyx_v_fill = values[1];
17536 goto __pyx_L4_argument_unpacking_done;
17537 __pyx_L5_argtuple_error:;
17538 __Pyx_RaiseArgtupleInvalid(
"random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17540 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17541 __Pyx_RefNannyFinishContext();
17543 __pyx_L4_argument_unpacking_done:;
17544 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1,
"ixt", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17545 __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17552 __Pyx_RefNannyFinishContext();
17556 static PyObject *__pyx_pf_8PyClical_74random_clifford(CYTHON_UNUSED PyObject *__pyx_self,
struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill) {
17557 PyObject *__pyx_r = NULL;
17558 __Pyx_RefNannyDeclarations
17559 PyObject *__pyx_t_1 = NULL;
17560 struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17561 int __pyx_lineno = 0;
17562 const char *__pyx_filename = NULL;
17563 int __pyx_clineno = 0;
17564 __Pyx_RefNannySetupContext(
"random_clifford", 0);
17565 __Pyx_XDECREF(__pyx_r);
17566 __pyx_t_2.__pyx_n = 1;
17567 __pyx_t_2.fill = __pyx_v_fill;
17568 __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17569 __Pyx_GOTREF(__pyx_t_1);
17570 __pyx_r = __pyx_t_1;
17576 __Pyx_XDECREF(__pyx_t_1);
17577 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17580 __Pyx_XGIVEREF(__pyx_r);
17581 __Pyx_RefNannyFinishContext();
17593 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17594 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17595 PyObject *__pyx_r = NULL;
17596 __Pyx_RefNannyDeclarations
17597 PyObject *__pyx_t_1 = NULL;
17598 PyObject *__pyx_t_2 = NULL;
17599 int __pyx_lineno = 0;
17600 const char *__pyx_filename = NULL;
17601 int __pyx_clineno = 0;
17602 __Pyx_RefNannySetupContext(
"cga3", 0);
17611 __Pyx_XDECREF(__pyx_r);
17612 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17613 __Pyx_GOTREF(__pyx_t_1);
17614 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
cga3::cga3(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17615 __Pyx_GOTREF(__pyx_t_2);
17616 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17617 __pyx_r = __pyx_t_2;
17631 __Pyx_XDECREF(__pyx_t_1);
17632 __Pyx_XDECREF(__pyx_t_2);
17633 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17636 __Pyx_XGIVEREF(__pyx_r);
17637 __Pyx_RefNannyFinishContext();
17642 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17643 static char __pyx_doc_8PyClical_76cga3[] =
"\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 ";
17644 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17645 PyObject *__pyx_r = 0;
17646 __Pyx_RefNannyDeclarations
17647 __Pyx_RefNannySetupContext(
"cga3 (wrapper)", 0);
17648 __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17651 __Pyx_RefNannyFinishContext();
17655 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17656 PyObject *__pyx_r = NULL;
17657 __Pyx_RefNannyDeclarations
17658 PyObject *__pyx_t_1 = NULL;
17659 int __pyx_lineno = 0;
17660 const char *__pyx_filename = NULL;
17661 int __pyx_clineno = 0;
17662 __Pyx_RefNannySetupContext(
"cga3", 0);
17663 __Pyx_XDECREF(__pyx_r);
17664 __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17665 __Pyx_GOTREF(__pyx_t_1);
17666 __pyx_r = __pyx_t_1;
17672 __Pyx_XDECREF(__pyx_t_1);
17673 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17676 __Pyx_XGIVEREF(__pyx_r);
17677 __Pyx_RefNannyFinishContext();
17689 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17691 PyObject *__pyx_r = NULL;
17692 __Pyx_RefNannyDeclarations
17693 PyObject *__pyx_t_1 = NULL;
17694 PyObject *__pyx_t_2 = NULL;
17695 int __pyx_lineno = 0;
17696 const char *__pyx_filename = NULL;
17697 int __pyx_clineno = 0;
17698 __Pyx_RefNannySetupContext(
"cga3std", 0);
17707 __Pyx_XDECREF(__pyx_r);
17708 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17709 __Pyx_GOTREF(__pyx_t_1);
17710 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
cga3::cga3std(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17711 __Pyx_GOTREF(__pyx_t_2);
17712 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17713 __pyx_r = __pyx_t_2;
17727 __Pyx_XDECREF(__pyx_t_1);
17728 __Pyx_XDECREF(__pyx_t_2);
17729 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17732 __Pyx_XGIVEREF(__pyx_r);
17733 __Pyx_RefNannyFinishContext();
17738 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17739 static char __pyx_doc_8PyClical_78cga3std[] =
"\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 ";
17740 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17741 PyObject *__pyx_r = 0;
17742 __Pyx_RefNannyDeclarations
17743 __Pyx_RefNannySetupContext(
"cga3std (wrapper)", 0);
17744 __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17747 __Pyx_RefNannyFinishContext();
17751 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17752 PyObject *__pyx_r = NULL;
17753 __Pyx_RefNannyDeclarations
17754 PyObject *__pyx_t_1 = NULL;
17755 int __pyx_lineno = 0;
17756 const char *__pyx_filename = NULL;
17757 int __pyx_clineno = 0;
17758 __Pyx_RefNannySetupContext(
"cga3std", 0);
17759 __Pyx_XDECREF(__pyx_r);
17760 __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17761 __Pyx_GOTREF(__pyx_t_1);
17762 __pyx_r = __pyx_t_1;
17768 __Pyx_XDECREF(__pyx_t_1);
17769 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17772 __Pyx_XGIVEREF(__pyx_r);
17773 __Pyx_RefNannyFinishContext();
17785 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17786 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17787 PyObject *__pyx_r = NULL;
17788 __Pyx_RefNannyDeclarations
17789 PyObject *__pyx_t_1 = NULL;
17790 PyObject *__pyx_t_2 = NULL;
17791 int __pyx_lineno = 0;
17792 const char *__pyx_filename = NULL;
17793 int __pyx_clineno = 0;
17794 __Pyx_RefNannySetupContext(
"agc3", 0);
17803 __Pyx_XDECREF(__pyx_r);
17804 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17805 __Pyx_GOTREF(__pyx_t_1);
17806 __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_1),
cga3::agc3(__pyx_f_8PyClical_toClifford(__pyx_v_obj)));
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17807 __Pyx_GOTREF(__pyx_t_2);
17808 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17809 __pyx_r = __pyx_t_2;
17823 __Pyx_XDECREF(__pyx_t_1);
17824 __Pyx_XDECREF(__pyx_t_2);
17825 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17828 __Pyx_XGIVEREF(__pyx_r);
17829 __Pyx_RefNannyFinishContext();
17834 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17835 static char __pyx_doc_8PyClical_80agc3[] =
"\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 ";
17836 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17837 PyObject *__pyx_r = 0;
17838 __Pyx_RefNannyDeclarations
17839 __Pyx_RefNannySetupContext(
"agc3 (wrapper)", 0);
17840 __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17843 __Pyx_RefNannyFinishContext();
17847 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17848 PyObject *__pyx_r = NULL;
17849 __Pyx_RefNannyDeclarations
17850 PyObject *__pyx_t_1 = NULL;
17851 int __pyx_lineno = 0;
17852 const char *__pyx_filename = NULL;
17853 int __pyx_clineno = 0;
17854 __Pyx_RefNannySetupContext(
"agc3", 0);
17855 __Pyx_XDECREF(__pyx_r);
17856 __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1844; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17857 __Pyx_GOTREF(__pyx_t_1);
17858 __pyx_r = __pyx_t_1;
17864 __Pyx_XDECREF(__pyx_t_1);
17865 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17868 __Pyx_XGIVEREF(__pyx_r);
17869 __Pyx_RefNannyFinishContext();
17882 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17883 static char __pyx_doc_8PyClical_82e[] =
"\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 ";
17884 static PyMethodDef __pyx_mdef_8PyClical_83e = {
"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17885 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17886 PyObject *__pyx_r = 0;
17887 __Pyx_RefNannyDeclarations
17888 __Pyx_RefNannySetupContext(
"e (wrapper)", 0);
17889 __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17892 __Pyx_RefNannyFinishContext();
17896 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17897 PyObject *__pyx_r = NULL;
17898 __Pyx_RefNannyDeclarations
17899 PyObject *__pyx_t_1 = NULL;
17900 PyObject *__pyx_t_2 = NULL;
17901 int __pyx_lineno = 0;
17902 const char *__pyx_filename = NULL;
17903 int __pyx_clineno = 0;
17904 __Pyx_RefNannySetupContext(
"e", 0);
17913 __Pyx_XDECREF(__pyx_r);
17914 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17915 __Pyx_GOTREF(__pyx_t_1);
17916 __Pyx_INCREF(__pyx_v_obj);
17917 __Pyx_GIVEREF(__pyx_v_obj);
17918 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
17919 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17920 __Pyx_GOTREF(__pyx_t_2);
17921 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17922 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17923 __Pyx_GOTREF(__pyx_t_1);
17924 __Pyx_GIVEREF(__pyx_t_2);
17925 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
17927 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17928 __Pyx_GOTREF(__pyx_t_2);
17929 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17930 __pyx_r = __pyx_t_2;
17944 __Pyx_XDECREF(__pyx_t_1);
17945 __Pyx_XDECREF(__pyx_t_2);
17946 __Pyx_AddTraceback(
"PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17949 __Pyx_XGIVEREF(__pyx_r);
17950 __Pyx_RefNannyFinishContext();
17963 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17964 static char __pyx_doc_8PyClical_84istpq[] =
"\n Abbreviation for index_set({-q,...p}).\n\n >>> print istpq(2,3)\n {-3,-2,-1,1,2}\n ";
17965 static PyMethodDef __pyx_mdef_8PyClical_85istpq = {
"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17966 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17967 PyObject *__pyx_v_p = 0;
17968 PyObject *__pyx_v_q = 0;
17969 int __pyx_lineno = 0;
17970 const char *__pyx_filename = NULL;
17971 int __pyx_clineno = 0;
17972 PyObject *__pyx_r = 0;
17973 __Pyx_RefNannyDeclarations
17974 __Pyx_RefNannySetupContext(
"istpq (wrapper)", 0);
17976 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17977 PyObject* values[2] = {0,0};
17978 if (unlikely(__pyx_kwds)) {
17979 Py_ssize_t kw_args;
17980 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17981 switch (pos_args) {
17982 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17983 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17985 default:
goto __pyx_L5_argtuple_error;
17987 kw_args = PyDict_Size(__pyx_kwds);
17988 switch (pos_args) {
17990 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17991 else goto __pyx_L5_argtuple_error;
17993 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17995 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17998 if (unlikely(kw_args > 0)) {
17999 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"istpq") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
18001 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18002 goto __pyx_L5_argtuple_error;
18004 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18005 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18007 __pyx_v_p = values[0];
18008 __pyx_v_q = values[1];
18010 goto __pyx_L4_argument_unpacking_done;
18011 __pyx_L5_argtuple_error:;
18012 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
18014 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18015 __Pyx_RefNannyFinishContext();
18017 __pyx_L4_argument_unpacking_done:;
18018 __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18021 __Pyx_RefNannyFinishContext();
18025 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18026 PyObject *__pyx_r = NULL;
18027 __Pyx_RefNannyDeclarations
18028 PyObject *__pyx_t_1 = NULL;
18029 PyObject *__pyx_t_2 = NULL;
18030 PyObject *__pyx_t_3 = NULL;
18031 int __pyx_lineno = 0;
18032 const char *__pyx_filename = NULL;
18033 int __pyx_clineno = 0;
18034 __Pyx_RefNannySetupContext(
"istpq", 0);
18043 __Pyx_XDECREF(__pyx_r);
18044 __pyx_t_1 = PyNumber_Negative(__pyx_v_q);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18045 __Pyx_GOTREF(__pyx_t_1);
18046 __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18047 __Pyx_GOTREF(__pyx_t_2);
18048 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18049 __Pyx_GOTREF(__pyx_t_3);
18050 __Pyx_GIVEREF(__pyx_t_1);
18051 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18052 __Pyx_GIVEREF(__pyx_t_2);
18053 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18056 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18057 __Pyx_GOTREF(__pyx_t_2);
18058 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18059 __pyx_t_3 = PySet_New(__pyx_t_2);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18060 __Pyx_GOTREF(__pyx_t_3);
18061 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18062 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18063 __Pyx_GOTREF(__pyx_t_2);
18064 __Pyx_GIVEREF(__pyx_t_3);
18065 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
18067 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_2, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18068 __Pyx_GOTREF(__pyx_t_3);
18069 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18070 __pyx_r = __pyx_t_3;
18084 __Pyx_XDECREF(__pyx_t_1);
18085 __Pyx_XDECREF(__pyx_t_2);
18086 __Pyx_XDECREF(__pyx_t_3);
18087 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18090 __Pyx_XGIVEREF(__pyx_r);
18091 __Pyx_RefNannyFinishContext();
18104 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
18105 static PyMethodDef __pyx_mdef_8PyClical_87_test = {
"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18106 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18107 PyObject *__pyx_r = 0;
18108 __Pyx_RefNannyDeclarations
18109 __Pyx_RefNannySetupContext(
"_test (wrapper)", 0);
18110 __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18113 __Pyx_RefNannyFinishContext();
18117 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18118 PyObject *__pyx_v_PyClical = NULL;
18119 PyObject *__pyx_v_doctest = NULL;
18120 PyObject *__pyx_r = NULL;
18121 __Pyx_RefNannyDeclarations
18122 PyObject *__pyx_t_1 = NULL;
18123 PyObject *__pyx_t_2 = NULL;
18124 PyObject *__pyx_t_3 = NULL;
18125 PyObject *__pyx_t_4 = NULL;
18126 int __pyx_lineno = 0;
18127 const char *__pyx_filename = NULL;
18128 int __pyx_clineno = 0;
18129 __Pyx_RefNannySetupContext(
"_test", 0);
18138 __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1914; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18139 __Pyx_GOTREF(__pyx_t_1);
18140 __pyx_v_PyClical = __pyx_t_1;
18142 __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1914; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18143 __Pyx_GOTREF(__pyx_t_1);
18144 __pyx_v_doctest = __pyx_t_1;
18154 __Pyx_XDECREF(__pyx_r);
18155 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18156 __Pyx_GOTREF(__pyx_t_2);
18158 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
18159 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18160 if (likely(__pyx_t_3)) {
18161 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
18162 __Pyx_INCREF(__pyx_t_3);
18163 __Pyx_INCREF(
function);
18164 __Pyx_DECREF_SET(__pyx_t_2,
function);
18168 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18169 __Pyx_GOTREF(__pyx_t_1);
18171 __pyx_t_4 = PyTuple_New(1+1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18172 __Pyx_GOTREF(__pyx_t_4);
18173 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18174 __Pyx_INCREF(__pyx_v_PyClical);
18175 __Pyx_GIVEREF(__pyx_v_PyClical);
18176 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18177 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18178 __Pyx_GOTREF(__pyx_t_1);
18179 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18181 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18182 __pyx_r = __pyx_t_1;
18196 __Pyx_XDECREF(__pyx_t_1);
18197 __Pyx_XDECREF(__pyx_t_2);
18198 __Pyx_XDECREF(__pyx_t_3);
18199 __Pyx_XDECREF(__pyx_t_4);
18200 __Pyx_AddTraceback(
"PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18203 __Pyx_XDECREF(__pyx_v_PyClical);
18204 __Pyx_XDECREF(__pyx_v_doctest);
18205 __Pyx_XGIVEREF(__pyx_r);
18206 __Pyx_RefNannyFinishContext();
18209 static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18211 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18212 struct __pyx_obj_8PyClical_index_set *p;
18214 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18215 o = (*t->tp_alloc)(t, 0);
18217 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18219 if (unlikely(!o))
return 0;
18220 p = ((
struct __pyx_obj_8PyClical_index_set *)o);
18221 p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18222 if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) {
18223 Py_DECREF(o); o = 0;
18228 static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18229 #if PY_VERSION_HEX >= 0x030400a1 18230 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18231 if (PyObject_CallFinalizerFromDealloc(o))
return;
18235 PyObject *etype, *eval, *etb;
18236 PyErr_Fetch(&etype, &eval, &etb);
18238 __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18240 PyErr_Restore(etype, eval, etb);
18242 (*Py_TYPE(o)->tp_free)(o);
18244 static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t
i) {
18246 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
18247 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18252 static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *
i, PyObject *v) {
18254 return __pyx_pw_8PyClical_9index_set_9__setitem__(o,
i, v);
18257 PyErr_Format(PyExc_NotImplementedError,
18258 "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18263 static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18264 {
"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18265 {
"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18266 {
"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18267 {
"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18268 {
"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18269 {
"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18270 {
"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18271 {
"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18272 {
"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18276 static PyNumberMethods __pyx_tp_as_number_index_set = {
18280 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18290 __pyx_pw_8PyClical_9index_set_18__invert__,
18293 __pyx_pw_8PyClical_9index_set_24__and__,
18294 __pyx_pw_8PyClical_9index_set_20__xor__,
18295 __pyx_pw_8PyClical_9index_set_28__or__,
18296 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18300 #if PY_MAJOR_VERSION < 3 18306 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18309 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18315 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18322 __pyx_pw_8PyClical_9index_set_26__iand__,
18323 __pyx_pw_8PyClical_9index_set_22__ixor__,
18324 __pyx_pw_8PyClical_9index_set_30__ior__,
18330 #if PY_VERSION_HEX >= 0x03050000 18333 #if PY_VERSION_HEX >= 0x03050000 18338 static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18342 __pyx_sq_item_8PyClical_index_set,
18346 __pyx_pw_8PyClical_9index_set_13__contains__,
18351 static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18353 __pyx_pw_8PyClical_9index_set_11__getitem__,
18354 __pyx_mp_ass_subscript_8PyClical_index_set,
18357 static PyTypeObject __pyx_type_8PyClical_index_set = {
18358 PyVarObject_HEAD_INIT(0, 0)
18359 "PyClical.index_set",
18360 sizeof(
struct __pyx_obj_8PyClical_index_set),
18362 __pyx_tp_dealloc_8PyClical_index_set,
18366 #if PY_MAJOR_VERSION < 3
18369 #if PY_MAJOR_VERSION >= 3
18372 __pyx_pw_8PyClical_9index_set_48__repr__,
18373 &__pyx_tp_as_number_index_set,
18374 &__pyx_tp_as_sequence_index_set,
18375 &__pyx_tp_as_mapping_index_set,
18378 __pyx_pw_8PyClical_9index_set_50__str__,
18382 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
18383 "\n Python class index_set wraps C++ class IndexSet.\n ",
18386 __pyx_pw_8PyClical_9index_set_7__richcmp__,
18388 __pyx_pw_8PyClical_9index_set_15__iter__,
18390 __pyx_methods_8PyClical_index_set,
18400 __pyx_tp_new_8PyClical_index_set,
18410 #if PY_VERSION_HEX >= 0x030400a1 18414 static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18416 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18417 struct __pyx_obj_8PyClical_clifford *p;
18419 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18420 o = (*t->tp_alloc)(t, 0);
18422 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18424 if (unlikely(!o))
return 0;
18425 p = ((
struct __pyx_obj_8PyClical_clifford *)o);
18426 p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18427 if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) {
18428 Py_DECREF(o); o = 0;
18433 static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18434 #if PY_VERSION_HEX >= 0x030400a1 18435 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18436 if (PyObject_CallFinalizerFromDealloc(o))
return;
18440 PyObject *etype, *eval, *etb;
18441 PyErr_Fetch(&etype, &eval, &etb);
18443 __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18445 PyErr_Restore(etype, eval, etb);
18447 (*Py_TYPE(o)->tp_free)(o);
18449 static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t
i) {
18451 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
18452 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18457 static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18458 {
"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18459 {
"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18460 {
"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18461 {
"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18462 {
"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18463 {
"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18464 {
"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18465 {
"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18466 {
"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18467 {
"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18468 {
"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18469 {
"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18470 {
"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18471 {
"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18472 {
"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18473 {
"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18474 {
"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18475 {
"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18476 {
"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18477 {
"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18481 static PyNumberMethods __pyx_tp_as_number_clifford = {
18482 __pyx_pw_8PyClical_8clifford_21__add__,
18483 __pyx_pw_8PyClical_8clifford_25__sub__,
18484 __pyx_pw_8PyClical_8clifford_29__mul__,
18485 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18486 __pyx_pw_8PyClical_8clifford_45__div__,
18488 __pyx_pw_8PyClical_8clifford_33__mod__,
18490 __pyx_pw_8PyClical_8clifford_55__pow__,
18491 __pyx_pw_8PyClical_8clifford_17__neg__,
18492 __pyx_pw_8PyClical_8clifford_19__pos__,
18498 __pyx_pw_8PyClical_8clifford_37__and__,
18499 __pyx_pw_8PyClical_8clifford_41__xor__,
18500 __pyx_pw_8PyClical_8clifford_51__or__,
18501 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18505 #if PY_MAJOR_VERSION < 3 18511 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18514 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18517 __pyx_pw_8PyClical_8clifford_23__iadd__,
18518 __pyx_pw_8PyClical_8clifford_27__isub__,
18519 __pyx_pw_8PyClical_8clifford_31__imul__,
18520 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18521 __pyx_pw_8PyClical_8clifford_47__idiv__,
18523 __pyx_pw_8PyClical_8clifford_35__imod__,
18527 __pyx_pw_8PyClical_8clifford_39__iand__,
18528 __pyx_pw_8PyClical_8clifford_43__ixor__,
18529 __pyx_pw_8PyClical_8clifford_53__ior__,
18535 #if PY_VERSION_HEX >= 0x03050000 18538 #if PY_VERSION_HEX >= 0x03050000 18543 static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18547 __pyx_sq_item_8PyClical_clifford,
18551 __pyx_pw_8PyClical_8clifford_7__contains__,
18556 static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18558 __pyx_pw_8PyClical_8clifford_15__getitem__,
18562 static PyTypeObject __pyx_type_8PyClical_clifford = {
18563 PyVarObject_HEAD_INIT(0, 0)
18564 "PyClical.clifford",
18565 sizeof(
struct __pyx_obj_8PyClical_clifford),
18567 __pyx_tp_dealloc_8PyClical_clifford,
18571 #if PY_MAJOR_VERSION < 3
18574 #if PY_MAJOR_VERSION >= 3
18577 __pyx_pw_8PyClical_8clifford_93__repr__,
18578 &__pyx_tp_as_number_clifford,
18579 &__pyx_tp_as_sequence_clifford,
18580 &__pyx_tp_as_mapping_clifford,
18582 __pyx_pw_8PyClical_8clifford_61__call__,
18583 __pyx_pw_8PyClical_8clifford_95__str__,
18587 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
18588 "\n Python class clifford wraps C++ class Clifford.\n ",
18591 __pyx_pw_8PyClical_8clifford_13__richcmp__,
18593 __pyx_pw_8PyClical_8clifford_9__iter__,
18595 __pyx_methods_8PyClical_clifford,
18605 __pyx_tp_new_8PyClical_clifford,
18615 #if PY_VERSION_HEX >= 0x030400a1 18620 static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18621 static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18623 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18625 if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize ==
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
18626 o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18627 memset(o, 0,
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18628 (void) PyObject_INIT(o, t);
18629 PyObject_GC_Track(o);
18631 o = (*t->tp_alloc)(t, 0);
18632 if (unlikely(!o))
return 0;
18637 static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18638 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18639 PyObject_GC_UnTrack(o);
18640 Py_CLEAR(p->__pyx_v_idx);
18641 Py_CLEAR(p->__pyx_v_self);
18642 Py_CLEAR(p->__pyx_t_0);
18643 if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize ==
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
18644 __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18646 (*Py_TYPE(o)->tp_free)(o);
18650 static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v,
void *a) {
18652 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18653 if (p->__pyx_v_idx) {
18654 e = (*v)(p->__pyx_v_idx, a);
if (e)
return e;
18656 if (p->__pyx_v_self) {
18657 e = (*v)(((PyObject*)p->__pyx_v_self), a);
if (e)
return e;
18659 if (p->__pyx_t_0) {
18660 e = (*v)(p->__pyx_t_0, a);
if (e)
return e;
18665 static int __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18667 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18668 tmp = ((PyObject*)p->__pyx_v_idx);
18669 p->__pyx_v_idx = Py_None; Py_INCREF(Py_None);
18671 tmp = ((PyObject*)p->__pyx_v_self);
18672 p->__pyx_v_self = ((
struct __pyx_obj_8PyClical_index_set *)Py_None); Py_INCREF(Py_None);
18674 tmp = ((PyObject*)p->__pyx_t_0);
18675 p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
18680 static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18681 PyVarObject_HEAD_INIT(0, 0)
18682 "PyClical.__pyx_scope_struct____iter__",
18683 sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__),
18685 __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__,
18689 #if PY_MAJOR_VERSION < 3
18692 #if PY_MAJOR_VERSION >= 3
18705 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
18707 __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__,
18708 __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__,
18723 __pyx_tp_new_8PyClical___pyx_scope_struct____iter__,
18733 #if PY_VERSION_HEX >= 0x030400a1 18738 static PyMethodDef __pyx_methods[] = {
18739 {
"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18740 {
"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18741 {
"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18742 {
"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18743 {
"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18744 {
"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18745 {
"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18746 {
"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18747 {
"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18748 {
"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18749 {
"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18750 {
"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18751 {
"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18752 {
"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18753 {
"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18754 {
"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18755 {
"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18756 {
"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18757 {
"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18758 {
"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18759 {
"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18760 {
"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18761 {
"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18762 {
"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18763 {
"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18764 {
"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18765 {
"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18766 {
"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18767 {
"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18768 {
"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18769 {
"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18770 {
"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18771 {
"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18772 {
"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18773 {
"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18774 {
"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18775 {
"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18776 {
"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18777 {
"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18781 #if PY_MAJOR_VERSION >= 3 18782 static struct PyModuleDef __pyx_moduledef = {
18783 #if PY_VERSION_HEX < 0x03020000 18784 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
18786 PyModuleDef_HEAD_INIT,
18799 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18800 {&__pyx_kp_s_, __pyx_k_,
sizeof(__pyx_k_), 0, 0, 1, 0},
18801 {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2,
sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18802 {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index,
sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18803 {&__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},
18804 {&__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},
18805 {&__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},
18806 {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec,
sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18807 {&__pyx_kp_s_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje,
sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 0, 1, 0},
18808 {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe,
sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18809 {&__pyx_kp_s_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of,
sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 0, 1, 0},
18810 {&__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},
18811 {&__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},
18812 {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute,
sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18813 {&__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},
18814 {&__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},
18815 {&__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},
18816 {&__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},
18817 {&__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},
18818 {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto,
sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18819 {&__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},
18820 {&__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},
18821 {&__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},
18822 {&__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},
18823 {&__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},
18824 {&__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},
18825 {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif,
sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18826 {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford,
sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18827 {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers,
sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18828 {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2,
sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18829 {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor,
sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18830 {&__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},
18831 {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo,
sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18832 {&__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},
18833 {&__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},
18834 {&__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},
18835 {&__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},
18836 {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto,
sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18837 {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector,
sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18838 {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect,
sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18839 {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway,
sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18840 {&__pyx_n_s_IndexError, __pyx_k_IndexError,
sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18841 {&__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},
18842 {&__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},
18843 {&__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},
18844 {&__pyx_n_s_Integral, __pyx_k_Integral,
sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18845 {&__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},
18846 {&__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},
18847 {&__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},
18848 {&__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},
18849 {&__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},
18850 {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector,
sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18851 {&__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},
18852 {&__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},
18853 {&__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},
18854 {&__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},
18855 {&__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},
18856 {&__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},
18857 {&__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},
18858 {&__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},
18859 {&__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},
18860 {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto,
sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18861 {&__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},
18862 {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented,
sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18863 {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable,
sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18864 {&__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},
18865 {&__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},
18866 {&__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},
18867 {&__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},
18868 {&__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},
18869 {&__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},
18870 {&__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},
18871 {&__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},
18872 {&__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},
18873 {&__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},
18874 {&__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},
18875 {&__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},
18876 {&__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},
18877 {&__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},
18878 {&__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},
18879 {&__pyx_n_s_PyClical, __pyx_k_PyClical,
sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18880 {&__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},
18881 {&__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},
18882 {&__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},
18883 {&__pyx_n_s_Real, __pyx_k_Real,
sizeof(__pyx_k_Real), 0, 0, 1, 1},
18884 {&__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},
18885 {&__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},
18886 {&__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},
18887 {&__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},
18888 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError,
sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18889 {&__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},
18890 {&__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},
18891 {&__pyx_n_s_Sequence, __pyx_k_Sequence,
sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18892 {&__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},
18893 {&__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},
18894 {&__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},
18895 {&__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},
18896 {&__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},
18897 {&__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},
18898 {&__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},
18899 {&__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},
18900 {&__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},
18901 {&__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},
18902 {&__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},
18903 {&__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},
18904 {&__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},
18905 {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus,
sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18906 {&__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},
18907 {&__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},
18908 {&__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},
18909 {&__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},
18910 {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat,
sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18911 {&__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},
18912 {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat,
sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18913 {&__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},
18914 {&__pyx_kp_s_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not,
sizeof(__pyx_k_This_comparison_operator_is_not), 0, 0, 1, 0},
18915 {&__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},
18916 {&__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},
18917 {&__pyx_n_s_TypeError, __pyx_k_TypeError,
sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18918 {&__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},
18919 {&__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},
18920 {&__pyx_n_s_ValueError, __pyx_k_ValueError,
sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18921 {&__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},
18922 {&__pyx_kp_s__2, __pyx_k__2,
sizeof(__pyx_k__2), 0, 0, 1, 0},
18923 {&__pyx_kp_s__3, __pyx_k__3,
sizeof(__pyx_k__3), 0, 0, 1, 0},
18924 {&__pyx_kp_s__4, __pyx_k__4,
sizeof(__pyx_k__4), 0, 0, 1, 0},
18925 {&__pyx_kp_s__5, __pyx_k__5,
sizeof(__pyx_k__5), 0, 0, 1, 0},
18926 {&__pyx_kp_s__6, __pyx_k__6,
sizeof(__pyx_k__6), 0, 0, 1, 0},
18927 {&__pyx_kp_s__7, __pyx_k__7,
sizeof(__pyx_k__7), 0, 0, 1, 0},
18928 {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473,
sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18929 {&__pyx_n_s_acos, __pyx_k_acos,
sizeof(__pyx_k_acos), 0, 0, 1, 1},
18930 {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619,
sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18931 {&__pyx_n_s_acosh, __pyx_k_acosh,
sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18932 {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656,
sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18933 {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844,
sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18934 {&__pyx_n_s_args, __pyx_k_args,
sizeof(__pyx_k_args), 0, 0, 1, 1},
18935 {&__pyx_kp_s_as_frame, __pyx_k_as_frame,
sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18936 {&__pyx_n_s_asin, __pyx_k_asin,
sizeof(__pyx_k_asin), 0, 0, 1, 1},
18937 {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698,
sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18938 {&__pyx_n_s_asinh, __pyx_k_asinh,
sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18939 {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733,
sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18940 {&__pyx_n_s_atan, __pyx_k_atan,
sizeof(__pyx_k_atan), 0, 0, 1, 1},
18941 {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769,
sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18942 {&__pyx_n_s_atanh, __pyx_k_atanh,
sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18943 {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798,
sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18944 {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824,
sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18945 {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833,
sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18946 {&__pyx_n_s_cl, __pyx_k_cl,
sizeof(__pyx_k_cl), 0, 0, 1, 1},
18947 {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739,
sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18948 {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835,
sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18949 {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019,
sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18950 {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895,
sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18951 {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706,
sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18952 {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750,
sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18953 {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850,
sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18954 {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910,
sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18955 {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820,
sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18956 {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792,
sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18957 {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949,
sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18958 {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770,
sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18959 {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637,
sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18960 {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880,
sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18961 {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805,
sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18962 {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779,
sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18963 {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721,
sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18964 {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938,
sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18965 {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730,
sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18966 {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960,
sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18967 {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225,
sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18968 {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234,
sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18969 {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759,
sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18970 {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865,
sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18971 {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174,
sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18972 {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137,
sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18973 {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554,
sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18974 {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060,
sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18975 {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214,
sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18976 {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests,
sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18977 {&__pyx_kp_u_clifford_hidden_doctests_line_12, __pyx_k_clifford_hidden_doctests_line_12,
sizeof(__pyx_k_clifford_hidden_doctests_line_12), 0, 1, 0, 0},
18978 {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925,
sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18979 {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106,
sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18980 {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205,
sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18981 {&__pyx_kp_u_clifford_max_abs_line_1183, __pyx_k_clifford_max_abs_line_1183,
sizeof(__pyx_k_clifford_max_abs_line_1183), 0, 1, 0, 0},
18982 {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163,
sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18983 {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069,
sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18984 {&__pyx_kp_u_clifford_outer_pow_line_1003, __pyx_k_clifford_outer_pow_line_1003,
sizeof(__pyx_k_clifford_outer_pow_line_1003), 0, 1, 0, 0},
18985 {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979,
sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18986 {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049,
sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18987 {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152,
sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18988 {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648,
sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18989 {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122,
sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18990 {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038,
sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18991 {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194,
sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18992 {&__pyx_kp_u_clifford_vector_part_line_1078, __pyx_k_clifford_vector_part_line_1078,
sizeof(__pyx_k_clifford_vector_part_line_1078), 0, 1, 0, 0},
18993 {&__pyx_n_s_close, __pyx_k_close,
sizeof(__pyx_k_close), 0, 0, 1, 1},
18994 {&__pyx_n_s_collections, __pyx_k_collections,
sizeof(__pyx_k_collections), 0, 0, 1, 1},
18995 {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490,
sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18996 {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527,
sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18997 {&__pyx_n_s_conj, __pyx_k_conj,
sizeof(__pyx_k_conj), 0, 0, 1, 1},
18998 {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436,
sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18999 {&__pyx_n_s_copy, __pyx_k_copy,
sizeof(__pyx_k_copy), 0, 0, 1, 1},
19000 {&__pyx_n_s_cos, __pyx_k_cos,
sizeof(__pyx_k_cos), 0, 0, 1, 1},
19001 {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602,
sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19002 {&__pyx_n_s_cosh, __pyx_k_cosh,
sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19003 {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640,
sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19004 {&__pyx_n_s_doctest, __pyx_k_doctest,
sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19005 {&__pyx_n_s_e, __pyx_k_e,
sizeof(__pyx_k_e), 0, 0, 1, 1},
19006 {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887,
sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19007 {&__pyx_n_s_even, __pyx_k_even,
sizeof(__pyx_k_even), 0, 0, 1, 1},
19008 {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388,
sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19009 {&__pyx_n_s_exp, __pyx_k_exp,
sizeof(__pyx_k_exp), 0, 0, 1, 1},
19010 {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565,
sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19011 {&__pyx_n_s_fill, __pyx_k_fill,
sizeof(__pyx_k_fill), 0, 0, 1, 1},
19012 {&__pyx_n_s_frm, __pyx_k_frm,
sizeof(__pyx_k_frm), 0, 0, 1, 1},
19013 {&__pyx_kp_s_from, __pyx_k_from,
sizeof(__pyx_k_from), 0, 0, 1, 0},
19014 {&__pyx_n_s_grade, __pyx_k_grade,
sizeof(__pyx_k_grade), 0, 0, 1, 1},
19015 {&__pyx_kp_s_home_leopardi_sync_src_glucat_g, __pyx_k_home_leopardi_sync_src_glucat_g,
sizeof(__pyx_k_home_leopardi_sync_src_glucat_g), 0, 0, 1, 0},
19016 {&__pyx_n_s_i, __pyx_k_i,
sizeof(__pyx_k_i), 0, 0, 1, 1},
19017 {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366,
sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19018 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
19019 {&__pyx_kp_u_index_set___and___line_269, __pyx_k_index_set___and___line_269,
sizeof(__pyx_k_index_set___and___line_269), 0, 1, 0, 0},
19020 {&__pyx_kp_u_index_set___getitem___line_189, __pyx_k_index_set___getitem___line_189,
sizeof(__pyx_k_index_set___getitem___line_189), 0, 1, 0, 0},
19021 {&__pyx_kp_u_index_set___iand___line_280, __pyx_k_index_set___iand___line_280,
sizeof(__pyx_k_index_set___iand___line_280), 0, 1, 0, 0},
19022 {&__pyx_kp_u_index_set___invert___line_238, __pyx_k_index_set___invert___line_238,
sizeof(__pyx_k_index_set___invert___line_238), 0, 1, 0, 0},
19023 {&__pyx_kp_u_index_set___ior___line_302, __pyx_k_index_set___ior___line_302,
sizeof(__pyx_k_index_set___ior___line_302), 0, 1, 0, 0},
19024 {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter,
sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19025 {&__pyx_kp_u_index_set___iter___line_227, __pyx_k_index_set___iter___line_227,
sizeof(__pyx_k_index_set___iter___line_227), 0, 1, 0, 0},
19026 {&__pyx_kp_u_index_set___ixor___line_258, __pyx_k_index_set___ixor___line_258,
sizeof(__pyx_k_index_set___ixor___line_258), 0, 1, 0, 0},
19027 {&__pyx_kp_u_index_set___or___line_291, __pyx_k_index_set___or___line_291,
sizeof(__pyx_k_index_set___or___line_291), 0, 1, 0, 0},
19028 {&__pyx_kp_u_index_set___repr___line_382, __pyx_k_index_set___repr___line_382,
sizeof(__pyx_k_index_set___repr___line_382), 0, 1, 0, 0},
19029 {&__pyx_kp_u_index_set___setitem___line_177, __pyx_k_index_set___setitem___line_177,
sizeof(__pyx_k_index_set___setitem___line_177), 0, 1, 0, 0},
19030 {&__pyx_kp_u_index_set___str___line_393, __pyx_k_index_set___str___line_393,
sizeof(__pyx_k_index_set___str___line_393), 0, 1, 0, 0},
19031 {&__pyx_kp_u_index_set___xor___line_247, __pyx_k_index_set___xor___line_247,
sizeof(__pyx_k_index_set___xor___line_247), 0, 1, 0, 0},
19032 {&__pyx_kp_u_index_set_copy_line_64, __pyx_k_index_set_copy_line_64,
sizeof(__pyx_k_index_set_copy_line_64), 0, 1, 0, 0},
19033 {&__pyx_kp_u_index_set_count_line_313, __pyx_k_index_set_count_line_313,
sizeof(__pyx_k_index_set_count_line_313), 0, 1, 0, 0},
19034 {&__pyx_kp_u_index_set_count_neg_line_322, __pyx_k_index_set_count_neg_line_322,
sizeof(__pyx_k_index_set_count_neg_line_322), 0, 1, 0, 0},
19035 {&__pyx_kp_u_index_set_count_pos_line_331, __pyx_k_index_set_count_pos_line_331,
sizeof(__pyx_k_index_set_count_pos_line_331), 0, 1, 0, 0},
19036 {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests,
sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19037 {&__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},
19038 {&__pyx_kp_u_index_set_max_line_349, __pyx_k_index_set_max_line_349,
sizeof(__pyx_k_index_set_max_line_349), 0, 1, 0, 0},
19039 {&__pyx_kp_u_index_set_min_line_340, __pyx_k_index_set_min_line_340,
sizeof(__pyx_k_index_set_min_line_340), 0, 1, 0, 0},
19040 {&__pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_k_index_set_sign_of_mult_line_364,
sizeof(__pyx_k_index_set_sign_of_mult_line_364), 0, 1, 0, 0},
19041 {&__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},
19042 {&__pyx_n_s_inv, __pyx_k_inv,
sizeof(__pyx_k_inv), 0, 0, 1, 1},
19043 {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329,
sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19044 {&__pyx_kp_s_invalid, __pyx_k_invalid,
sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19045 {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string,
sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19046 {&__pyx_n_s_involute, __pyx_k_involute,
sizeof(__pyx_k_involute), 0, 0, 1, 1},
19047 {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406,
sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19048 {&__pyx_n_s_ist, __pyx_k_ist,
sizeof(__pyx_k_ist), 0, 0, 1, 1},
19049 {&__pyx_n_s_istpq, __pyx_k_istpq,
sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19050 {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900,
sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19051 {&__pyx_n_s_iter, __pyx_k_iter,
sizeof(__pyx_k_iter), 0, 0, 1, 1},
19052 {&__pyx_n_s_ixt, __pyx_k_ixt,
sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19053 {&__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},
19054 {&__pyx_n_s_lhs, __pyx_k_lhs,
sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19055 {&__pyx_n_s_log, __pyx_k_log,
sizeof(__pyx_k_log), 0, 0, 1, 1},
19056 {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579,
sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19057 {&__pyx_n_s_m, __pyx_k_m,
sizeof(__pyx_k_m), 0, 0, 1, 1},
19058 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
19059 {&__pyx_n_s_math, __pyx_k_math,
sizeof(__pyx_k_math), 0, 0, 1, 1},
19060 {&__pyx_n_s_max, __pyx_k_max,
sizeof(__pyx_k_max), 0, 0, 1, 1},
19061 {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482,
sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19062 {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511,
sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19063 {&__pyx_n_s_min, __pyx_k_min,
sizeof(__pyx_k_min), 0, 0, 1, 1},
19064 {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502,
sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19065 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
19066 {&__pyx_n_s_nbar3, __pyx_k_nbar3,
sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19067 {&__pyx_n_s_ninf3, __pyx_k_ninf3,
sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19068 {&__pyx_n_s_norm, __pyx_k_norm,
sizeof(__pyx_k_norm), 0, 0, 1, 1},
19069 {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462,
sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19070 {&__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},
19071 {&__pyx_n_s_numbers, __pyx_k_numbers,
sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19072 {&__pyx_n_s_obj, __pyx_k_obj,
sizeof(__pyx_k_obj), 0, 0, 1, 1},
19073 {&__pyx_n_s_odd, __pyx_k_odd,
sizeof(__pyx_k_odd), 0, 0, 1, 1},
19074 {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397,
sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19075 {&__pyx_n_s_other, __pyx_k_other,
sizeof(__pyx_k_other), 0, 0, 1, 1},
19076 {&__pyx_n_s_outer_pow, __pyx_k_outer_pow,
sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19077 {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518,
sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19078 {&__pyx_n_s_p, __pyx_k_p,
sizeof(__pyx_k_p), 0, 0, 1, 1},
19079 {&__pyx_n_s_pi, __pyx_k_pi,
sizeof(__pyx_k_pi), 0, 0, 1, 1},
19080 {&__pyx_n_s_pow, __pyx_k_pow,
sizeof(__pyx_k_pow), 0, 0, 1, 1},
19081 {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494,
sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19082 {&__pyx_n_s_pure, __pyx_k_pure,
sizeof(__pyx_k_pure), 0, 0, 1, 1},
19083 {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377,
sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19084 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable,
sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19085 {&__pyx_n_s_q, __pyx_k_q,
sizeof(__pyx_k_q), 0, 0, 1, 1},
19086 {&__pyx_n_s_quad, __pyx_k_quad,
sizeof(__pyx_k_quad), 0, 0, 1, 1},
19087 {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451,
sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19088 {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815,
sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19089 {&__pyx_n_s_range, __pyx_k_range,
sizeof(__pyx_k_range), 0, 0, 1, 1},
19090 {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355,
sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19091 {&__pyx_n_s_reverse, __pyx_k_reverse,
sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19092 {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421,
sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19093 {&__pyx_n_s_rhs, __pyx_k_rhs,
sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19094 {&__pyx_n_s_scalar, __pyx_k_scalar,
sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19095 {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344,
sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19096 {&__pyx_n_s_send, __pyx_k_send,
sizeof(__pyx_k_send), 0, 0, 1, 1},
19097 {&__pyx_n_s_sin, __pyx_k_sin,
sizeof(__pyx_k_sin), 0, 0, 1, 1},
19098 {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679,
sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19099 {&__pyx_n_s_sinh, __pyx_k_sinh,
sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19100 {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719,
sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19101 {&__pyx_n_s_sqrt, __pyx_k_sqrt,
sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19102 {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542,
sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19103 {&__pyx_n_s_tan, __pyx_k_tan,
sizeof(__pyx_k_tan), 0, 0, 1, 1},
19104 {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752,
sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19105 {&__pyx_n_s_tanh, __pyx_k_tanh,
sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19106 {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786,
sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19107 {&__pyx_n_s_tau, __pyx_k_tau,
sizeof(__pyx_k_tau), 0, 0, 1, 1},
19108 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
19109 {&__pyx_n_s_test_2, __pyx_k_test_2,
sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19110 {&__pyx_n_s_testmod, __pyx_k_testmod,
sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19111 {&__pyx_n_s_throw, __pyx_k_throw,
sizeof(__pyx_k_throw), 0, 0, 1, 1},
19112 {&__pyx_kp_s_to_frame, __pyx_k_to_frame,
sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19113 {&__pyx_kp_s_using, __pyx_k_using,
sizeof(__pyx_k_using), 0, 0, 1, 0},
19114 {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid,
sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19115 {&__pyx_kp_s_value, __pyx_k_value,
sizeof(__pyx_k_value), 0, 0, 1, 0},
19116 {&__pyx_n_s_version, __pyx_k_version,
sizeof(__pyx_k_version), 0, 0, 1, 1},
19117 {&__pyx_n_s_xrange, __pyx_k_xrange,
sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19118 {0, 0, 0, 0, 0, 0, 0}
19120 static int __Pyx_InitCachedBuiltins(
void) {
19121 __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError);
if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19122 __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError);
if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19123 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError);
if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19124 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError);
if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19125 __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented);
if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19126 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range);
if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19127 #if PY_MAJOR_VERSION >= 3 19128 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range);
if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19130 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange);
if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19137 static int __Pyx_InitCachedConstants(
void) {
19138 __Pyx_RefNannyDeclarations
19139 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
19148 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable);
if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19149 __Pyx_GOTREF(__pyx_tuple__8);
19150 __Pyx_GIVEREF(__pyx_tuple__8);
19159 __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable);
if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19160 __Pyx_GOTREF(__pyx_tuple__9);
19161 __Pyx_GIVEREF(__pyx_tuple__9);
19170 __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_leopardi_sync_src_glucat_g, __pyx_n_s_index_set_hidden_doctests, 404, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19179 __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_leopardi_sync_src_glucat_g, __pyx_n_s_clifford_hidden_doctests, 1243, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19188 __pyx_tuple__12 = PyTuple_Pack(1, __pyx_float_1_0);
if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19189 __Pyx_GOTREF(__pyx_tuple__12);
19190 __Pyx_GIVEREF(__pyx_tuple__12);
19199 __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_obj);
if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19200 __Pyx_GOTREF(__pyx_tuple__13);
19201 __Pyx_GIVEREF(__pyx_tuple__13);
19202 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_leopardi_sync_src_glucat_g, __pyx_n_s_e, 1887, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19211 __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q);
if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19212 __Pyx_GOTREF(__pyx_tuple__15);
19213 __Pyx_GIVEREF(__pyx_tuple__15);
19214 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_leopardi_sync_src_glucat_g, __pyx_n_s_istpq, 1900, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19223 __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_4);
if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19224 __Pyx_GOTREF(__pyx_tuple__17);
19225 __Pyx_GIVEREF(__pyx_tuple__17);
19226 __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_neg_1);
if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19227 __Pyx_GOTREF(__pyx_tuple__18);
19228 __Pyx_GIVEREF(__pyx_tuple__18);
19237 __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_4);
if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19238 __Pyx_GOTREF(__pyx_tuple__19);
19239 __Pyx_GIVEREF(__pyx_tuple__19);
19240 __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_neg_1);
if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19241 __Pyx_GOTREF(__pyx_tuple__20);
19242 __Pyx_GIVEREF(__pyx_tuple__20);
19251 __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest);
if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19252 __Pyx_GOTREF(__pyx_tuple__21);
19253 __Pyx_GIVEREF(__pyx_tuple__21);
19254 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_leopardi_sync_src_glucat_g, __pyx_n_s_test, 1913, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19255 __Pyx_RefNannyFinishContext();
19258 __Pyx_RefNannyFinishContext();
19262 static int __Pyx_InitGlobals(
void) {
19263 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
19264 __pyx_float_0_0 =
PyFloat_FromDouble(0.0);
if (unlikely(!__pyx_float_0_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19265 __pyx_float_1_0 =
PyFloat_FromDouble(1.0);
if (unlikely(!__pyx_float_1_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19266 __pyx_float_2_0 =
PyFloat_FromDouble(2.0);
if (unlikely(!__pyx_float_2_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19267 __pyx_float_8_0 =
PyFloat_FromDouble(8.0);
if (unlikely(!__pyx_float_8_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19268 __pyx_int_0 = PyInt_FromLong(0);
if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19269 __pyx_int_1 = PyInt_FromLong(1);
if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19270 __pyx_int_4 = PyInt_FromLong(4);
if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19271 __pyx_int_neg_1 = PyInt_FromLong(-1);
if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19277 #if PY_MAJOR_VERSION < 3 19278 PyMODINIT_FUNC initPyClical(
void);
19279 PyMODINIT_FUNC initPyClical(
void)
19281 PyMODINIT_FUNC PyInit_PyClical(
void);
19282 PyMODINIT_FUNC PyInit_PyClical(
void)
19285 PyObject *__pyx_t_1 = NULL;
19286 PyObject *__pyx_t_2 = NULL;
19287 PyObject *__pyx_t_3 = NULL;
19289 int __pyx_lineno = 0;
19290 const char *__pyx_filename = NULL;
19291 int __pyx_clineno = 0;
19292 __Pyx_RefNannyDeclarations
19293 #if CYTHON_REFNANNY 19294 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
19295 if (!__Pyx_RefNanny) {
19297 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
19298 if (!__Pyx_RefNanny)
19299 Py_FatalError(
"failed to import 'refnanny' module");
19302 __Pyx_RefNannySetupContext(
"PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19303 if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19304 __pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19305 __pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19306 #ifdef __Pyx_CyFunction_USED 19307 if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19309 #ifdef __Pyx_FusedFunction_USED 19310 if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19312 #ifdef __Pyx_Coroutine_USED 19313 if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19315 #ifdef __Pyx_Generator_USED 19316 if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19318 #ifdef __Pyx_StopAsyncIteration_USED 19319 if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19323 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS 19325 PyEval_InitThreads();
19329 #if PY_MAJOR_VERSION < 3 19330 __pyx_m = Py_InitModule4(
"PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19332 __pyx_m = PyModule_Create(&__pyx_moduledef);
19334 if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19335 __pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19336 Py_INCREF(__pyx_d);
19337 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19338 #if CYTHON_COMPILING_IN_PYPY 19339 Py_INCREF(__pyx_b);
19341 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
19343 if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19344 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) 19345 if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19347 if (__pyx_module_is_main_PyClical) {
19348 if (PyObject_SetAttrString(__pyx_m,
"__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19350 #if PY_MAJOR_VERSION >= 3 19352 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19353 if (!PyDict_GetItemString(modules,
"PyClical")) {
19354 if (unlikely(PyDict_SetItemString(modules,
"PyClical", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19359 if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19361 if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19366 __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19367 __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19368 __pyx_vtable_8PyClical_index_set.unwrap = (
IndexSet (*)(
struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19369 __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19370 if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19371 __pyx_type_8PyClical_index_set.tp_print = 0;
19372 #if CYTHON_COMPILING_IN_CPYTHON 19374 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__setitem__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19375 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19376 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19377 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19378 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19382 #if CYTHON_COMPILING_IN_CPYTHON 19384 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__getitem__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19385 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19386 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19387 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19388 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19392 #if CYTHON_COMPILING_IN_CPYTHON 19394 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__contains__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19395 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19396 __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19397 __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19398 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19402 #if CYTHON_COMPILING_IN_CPYTHON 19404 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__iter__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19405 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19406 __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19407 __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19408 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19412 #if CYTHON_COMPILING_IN_CPYTHON 19414 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__invert__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19415 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19416 __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19417 __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19418 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19422 #if CYTHON_COMPILING_IN_CPYTHON 19424 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__xor__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19425 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19426 __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19427 __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19428 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19432 #if CYTHON_COMPILING_IN_CPYTHON 19434 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__ixor__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19435 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19436 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19437 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19438 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19442 #if CYTHON_COMPILING_IN_CPYTHON 19444 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__and__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19445 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19446 __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19447 __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19448 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19452 #if CYTHON_COMPILING_IN_CPYTHON 19454 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__iand__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19455 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19456 __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19457 __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19458 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19462 #if CYTHON_COMPILING_IN_CPYTHON 19464 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__or__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19465 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19466 __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19467 __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19468 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19472 #if CYTHON_COMPILING_IN_CPYTHON 19474 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__ior__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19475 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19476 __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19477 __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19478 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19482 #if CYTHON_COMPILING_IN_CPYTHON 19484 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__repr__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19485 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19486 __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19487 __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19488 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19492 #if CYTHON_COMPILING_IN_CPYTHON 19494 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set,
"__str__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19495 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19496 __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19497 __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19498 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19502 if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19503 if (PyObject_SetAttrString(__pyx_m,
"index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19504 __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19505 __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19506 __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
Clifford))__pyx_f_8PyClical_8clifford_wrap;
19507 __pyx_vtable_8PyClical_clifford.unwrap = (
Clifford (*)(
struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19508 __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19509 if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19510 __pyx_type_8PyClical_clifford.tp_print = 0;
19511 #if CYTHON_COMPILING_IN_CPYTHON 19513 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__contains__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19514 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19515 __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19516 __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19517 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19521 #if CYTHON_COMPILING_IN_CPYTHON 19523 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__iter__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19524 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19525 __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19526 __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19527 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19531 #if CYTHON_COMPILING_IN_CPYTHON 19533 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__getitem__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19534 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19535 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19536 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19537 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19541 #if CYTHON_COMPILING_IN_CPYTHON 19543 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__neg__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19544 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19545 __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19546 __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19547 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19551 #if CYTHON_COMPILING_IN_CPYTHON 19553 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__pos__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19554 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19555 __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19556 __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19557 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19561 #if CYTHON_COMPILING_IN_CPYTHON 19563 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__add__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19564 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19565 __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19566 __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19567 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19571 #if CYTHON_COMPILING_IN_CPYTHON 19573 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__iadd__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19574 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19575 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19576 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19577 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19581 #if CYTHON_COMPILING_IN_CPYTHON 19583 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__sub__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19584 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19585 __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19586 __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19587 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19591 #if CYTHON_COMPILING_IN_CPYTHON 19593 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__isub__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19594 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19595 __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19596 __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19597 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19601 #if CYTHON_COMPILING_IN_CPYTHON 19603 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__mul__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19604 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19605 __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19606 __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19607 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19611 #if CYTHON_COMPILING_IN_CPYTHON 19613 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__imul__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19614 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19615 __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19616 __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19617 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19621 #if CYTHON_COMPILING_IN_CPYTHON 19623 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__mod__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19624 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19625 __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19626 __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19627 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19631 #if CYTHON_COMPILING_IN_CPYTHON 19633 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__imod__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19634 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19635 __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19636 __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19637 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19641 #if CYTHON_COMPILING_IN_CPYTHON 19643 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__and__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19644 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19645 __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19646 __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19647 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19651 #if CYTHON_COMPILING_IN_CPYTHON 19653 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__iand__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19654 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19655 __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19656 __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19657 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19661 #if CYTHON_COMPILING_IN_CPYTHON 19663 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__xor__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19664 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19665 __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19666 __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19667 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19671 #if CYTHON_COMPILING_IN_CPYTHON 19673 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__ixor__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19674 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19675 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19676 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19677 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19681 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 19682 #if CYTHON_COMPILING_IN_CPYTHON 19684 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__div__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19685 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19686 __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19687 __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19688 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19693 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 19694 #if CYTHON_COMPILING_IN_CPYTHON 19696 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__idiv__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19697 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19698 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19699 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19700 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19705 #if CYTHON_COMPILING_IN_CPYTHON 19707 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__or__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19708 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19709 __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19710 __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19711 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19715 #if CYTHON_COMPILING_IN_CPYTHON 19717 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__ior__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19718 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19719 __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19720 __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19721 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19725 #if CYTHON_COMPILING_IN_CPYTHON 19727 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__pow__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19728 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19729 __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19730 __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19731 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19735 #if CYTHON_COMPILING_IN_CPYTHON 19737 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__call__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19738 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19739 __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19740 __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19741 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19745 #if CYTHON_COMPILING_IN_CPYTHON 19747 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__repr__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19748 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19749 __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19750 __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19751 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19755 #if CYTHON_COMPILING_IN_CPYTHON 19757 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford,
"__str__");
if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19758 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19759 __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19760 __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19761 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19765 if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19766 if (PyObject_SetAttrString(__pyx_m,
"clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19767 __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19768 if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19769 __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19770 __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19775 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 19776 if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19786 __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19787 __Pyx_GOTREF(__pyx_t_1);
19788 if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19789 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19798 __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19799 __Pyx_GOTREF(__pyx_t_1);
19800 if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19801 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19810 __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19811 __Pyx_GOTREF(__pyx_t_1);
19812 if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19813 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19822 if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19831 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_1index_set_hidden_doctests, NULL, __pyx_n_s_PyClical);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19832 __Pyx_GOTREF(__pyx_t_1);
19833 if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19834 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19843 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, NULL, __pyx_n_s_PyClical);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19844 __Pyx_GOTREF(__pyx_t_1);
19845 if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19846 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19855 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__12, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19856 __Pyx_GOTREF(__pyx_t_1);
19857 __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19858 __Pyx_GOTREF(__pyx_t_2);
19859 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19860 __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19861 __Pyx_GOTREF(__pyx_t_1);
19862 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19863 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19864 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19873 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19874 __Pyx_GOTREF(__pyx_t_1);
19875 __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19876 __Pyx_GOTREF(__pyx_t_2);
19877 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19878 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19879 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19888 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19897 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19906 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_83e, NULL, __pyx_n_s_PyClical);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19907 __Pyx_GOTREF(__pyx_t_2);
19908 if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19909 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19918 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_85istpq, NULL, __pyx_n_s_PyClical);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19919 __Pyx_GOTREF(__pyx_t_2);
19920 if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19921 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19930 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19931 __Pyx_GOTREF(__pyx_t_2);
19932 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19933 __Pyx_GOTREF(__pyx_t_1);
19934 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19935 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19936 __Pyx_GOTREF(__pyx_t_2);
19937 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19938 __Pyx_GOTREF(__pyx_t_3);
19939 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19940 __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19941 __Pyx_GOTREF(__pyx_t_2);
19942 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19943 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19944 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19945 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19954 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19955 __Pyx_GOTREF(__pyx_t_2);
19956 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__19, NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19957 __Pyx_GOTREF(__pyx_t_3);
19958 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19959 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19960 __Pyx_GOTREF(__pyx_t_2);
19961 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19962 __Pyx_GOTREF(__pyx_t_1);
19963 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19964 __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19965 __Pyx_GOTREF(__pyx_t_2);
19966 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19967 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19968 if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19969 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19978 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_87_test, NULL, __pyx_n_s_PyClical);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19979 __Pyx_GOTREF(__pyx_t_2);
19980 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19981 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19989 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19990 __Pyx_GOTREF(__pyx_t_2);
19991 __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_main, Py_EQ));
if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19992 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20000 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_test);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20001 __Pyx_GOTREF(__pyx_t_1);
20003 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
20004 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
20005 if (likely(__pyx_t_3)) {
20006 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
20007 __Pyx_INCREF(__pyx_t_3);
20008 __Pyx_INCREF(
function);
20009 __Pyx_DECREF_SET(__pyx_t_1,
function);
20013 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20014 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20016 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20018 __Pyx_GOTREF(__pyx_t_2);
20019 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20020 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20035 __pyx_t_2 = PyDict_New();
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20036 __Pyx_GOTREF(__pyx_t_2);
20037 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_copy_line_64, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20038 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___setitem___line_177, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20039 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___getitem___line_189, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20040 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iter___line_227, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20041 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___invert___line_238, __pyx_kp_u_Set_complement_not_print_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20042 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___xor___line_247, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20043 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ixor___line_258, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20044 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___and___line_269, __pyx_kp_u_Set_intersection_and_print_inde) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20045 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iand___line_280, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20046 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___or___line_291, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20047 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ior___line_302, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20048 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_line_313, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20049 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_neg_line_322, __pyx_kp_u_Number_of_negative_indices_incl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20050 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_pos_line_331, __pyx_kp_u_Number_of_positive_indices_incl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20051 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_min_line_340, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20052 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_max_line_349, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20053 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20054 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_square_line_37, __pyx_kp_u_Sign_of_geometric_square_of_a_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20055 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___repr___line_382, __pyx_kp_u_The_official_string_representat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20056 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___str___line_393, __pyx_kp_u_The_informal_string_representat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20057 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_kp_u_Tests_for_functions_that_Doctes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20058 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_compare_line_490, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20059 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_min_neg_line_502, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20060 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_pos_line_511, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20061 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_copy_line_554, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20062 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iter___line_637, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20063 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reframe_line_648, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20064 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___getitem___line_706, __pyx_kp_u_Subscripting_map_from_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20065 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___neg___line_721, __pyx_kp_u_Unary_print_clifford_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20066 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pos___line_730, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20067 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___add___line_739, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20068 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iadd___line_750, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20069 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___sub___line_759, __pyx_kp_u_Geometric_difference_print_clif) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20070 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___isub___line_770, __pyx_kp_u_Geometric_difference_x_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20071 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mul___line_779, __pyx_kp_u_Geometric_product_print_cliffor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20072 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imul___line_792, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20073 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mod___line_805, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20074 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imod___line_820, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20075 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___and___line_835, __pyx_kp_u_Inner_product_print_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20076 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iand___line_850, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20077 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___xor___line_865, __pyx_kp_u_Outer_product_print_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20078 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ixor___line_880, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20079 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___div___line_895, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20080 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___idiv___line_910, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20081 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_inv_line_925, __pyx_kp_u_Geometric_multiplicative_invers) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20082 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___or___line_938, __pyx_kp_u_Transform_left_hand_side_using) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20083 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ior___line_949, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20084 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pow___line_960, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20085 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pow_line_979, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20086 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_outer_pow_line_1003, __pyx_kp_u_Outer_product_power_x_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20087 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___call___line_1019, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20088 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_scalar_line_1038, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20089 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pure_line_1049, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20090 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_even_line_1060, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20091 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_odd_line_1069, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20092 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_vector_part_line_1078, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20093 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_involute_line_1106, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20094 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reverse_line_1122, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20095 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_conj_line_1137, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20096 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_quad_line_1152, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20097 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_norm_line_1163, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20098 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_abs_line_1174, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20099 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_max_abs_line_1183, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20100 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_truncated_line_1194, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20101 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_isnan_line_1205, __pyx_kp_u_Check_if_a_multivector_contains) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20102 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_frame_line_1214, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20103 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___repr___line_1225, __pyx_kp_u_The_official_string_representat_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20104 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___str___line_1234, __pyx_kp_u_The_informal_string_representat_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20105 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_hidden_doctests_line_12, __pyx_kp_u_Tests_for_functions_that_Doctes_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20106 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_inv_line_1329, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20107 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_scalar_line_1344, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20108 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_real_line_1355, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20109 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_imag_line_1366, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20110 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pure_line_1377, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20111 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_even_line_1388, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20112 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_odd_line_1397, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20113 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_involute_line_1406, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20114 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_reverse_line_1421, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20115 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_conj_line_1436, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20116 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_quad_line_1451, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20117 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_norm_line_1462, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20118 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_abs_line_1473, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20119 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_abs_line_1482, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20120 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pow_line_1494, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20121 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_outer_pow_line_1518, __pyx_kp_u_Outer_product_power_of_multivec) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20122 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_complexifier_line_1527, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20123 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sqrt_line_1542, __pyx_kp_u_Square_root_of_multivector_with) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20124 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_exp_line_1565, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20125 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_log_line_1579, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20126 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cos_line_1602, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20127 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acos_line_1619, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20128 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cosh_line_1640, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20129 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acosh_line_1656, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20130 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sin_line_1679, __pyx_kp_u_Sine_of_multivector_with_option) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20131 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asin_line_1698, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20132 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sinh_line_1719, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20133 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asinh_line_1733, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20134 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tan_line_1752, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20135 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atan_line_1769, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20136 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tanh_line_1786, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20137 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atanh_line_1798, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20138 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_random_clifford_line_1815, __pyx_kp_u_Random_multivector_within_a_fra) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20139 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3_line_1824, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20140 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3std_line_1833, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20141 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_agc3_line_1844, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20142 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_e_line_1887, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20143 if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_istpq_line_1900, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20144 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
20145 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20151 __Pyx_XDECREF(__pyx_t_1);
20152 __Pyx_XDECREF(__pyx_t_2);
20153 __Pyx_XDECREF(__pyx_t_3);
20156 __Pyx_AddTraceback(
"init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20158 Py_DECREF(__pyx_m); __pyx_m = 0;
20159 }
else if (!PyErr_Occurred()) {
20160 PyErr_SetString(PyExc_ImportError,
"init PyClical");
20163 __Pyx_RefNannyFinishContext();
20164 #if PY_MAJOR_VERSION < 3 20172 #if CYTHON_REFNANNY 20173 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
20174 PyObject *m = NULL, *p = NULL;
20176 m = PyImport_ImportModule((
char *)modname);
20178 p = PyObject_GetAttrString(m, (
char *)
"RefNannyAPI");
20180 r = PyLong_AsVoidPtr(p);
20184 return (__Pyx_RefNannyAPIStruct *)r;
20188 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20189 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20190 if (unlikely(!result)) {
20191 PyErr_Format(PyExc_NameError,
20192 #
if PY_MAJOR_VERSION >= 3
20193 "name '%U' is not defined", name);
20195 "name '%.200s' is not defined", PyString_AS_STRING(name));
20201 #if CYTHON_COMPILING_IN_CPYTHON 20202 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20204 ternaryfunc call = func->ob_type->tp_call;
20205 if (unlikely(!call))
20206 return PyObject_Call(func, arg, kw);
20207 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
20209 result = (*call)(func, arg, kw);
20210 Py_LeaveRecursiveCall();
20211 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20214 "NULL result without error in PyObject_Call");
20220 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
20221 #if CYTHON_COMPILING_IN_CPYTHON 20222 PyObject *tmp_type, *tmp_value, *tmp_tb;
20223 PyThreadState *tstate = PyThreadState_GET();
20224 tmp_type = tstate->curexc_type;
20225 tmp_value = tstate->curexc_value;
20226 tmp_tb = tstate->curexc_traceback;
20227 tstate->curexc_type = type;
20228 tstate->curexc_value = value;
20229 tstate->curexc_traceback = tb;
20230 Py_XDECREF(tmp_type);
20231 Py_XDECREF(tmp_value);
20232 Py_XDECREF(tmp_tb);
20234 PyErr_Restore(type, value, tb);
20237 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
20238 #if CYTHON_COMPILING_IN_CPYTHON 20239 PyThreadState *tstate = PyThreadState_GET();
20240 *type = tstate->curexc_type;
20241 *value = tstate->curexc_value;
20242 *tb = tstate->curexc_traceback;
20243 tstate->curexc_type = 0;
20244 tstate->curexc_value = 0;
20245 tstate->curexc_traceback = 0;
20247 PyErr_Fetch(type, value, tb);
20251 static void __Pyx_WriteUnraisable(
const char *name, CYTHON_UNUSED
int clineno,
20252 CYTHON_UNUSED
int lineno, CYTHON_UNUSED
const char *filename,
20253 int full_traceback, CYTHON_UNUSED
int nogil) {
20254 PyObject *old_exc, *old_val, *old_tb;
20257 PyGILState_STATE state;
20259 state = PyGILState_Ensure();
20261 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20262 if (full_traceback) {
20263 Py_XINCREF(old_exc);
20264 Py_XINCREF(old_val);
20265 Py_XINCREF(old_tb);
20266 __Pyx_ErrRestore(old_exc, old_val, old_tb);
20269 #if PY_MAJOR_VERSION < 3 20270 ctx = PyString_FromString(name);
20272 ctx = PyUnicode_FromString(name);
20274 __Pyx_ErrRestore(old_exc, old_val, old_tb);
20276 PyErr_WriteUnraisable(Py_None);
20278 PyErr_WriteUnraisable(ctx);
20283 PyGILState_Release(state);
20287 #if CYTHON_COMPILING_IN_CPYTHON 20288 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20289 PyObject *
self, *result;
20291 cfunc = PyCFunction_GET_FUNCTION(func);
20292 self = PyCFunction_GET_SELF(func);
20293 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
20295 result = cfunc(
self, arg);
20296 Py_LeaveRecursiveCall();
20297 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20300 "NULL result without error in PyObject_Call");
20306 #if CYTHON_COMPILING_IN_CPYTHON 20307 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20309 PyObject *args = PyTuple_New(1);
20310 if (unlikely(!args))
return NULL;
20312 PyTuple_SET_ITEM(args, 0, arg);
20313 result = __Pyx_PyObject_Call(func, args, NULL);
20317 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20318 #ifdef __Pyx_CyFunction_USED 20319 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
20321 if (likely(PyCFunction_Check(func))) {
20323 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20324 return __Pyx_PyObject_CallMethO(func, arg);
20327 return __Pyx__PyObject_CallOneArg(func, arg);
20330 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20332 PyObject *args = PyTuple_Pack(1, arg);
20333 if (unlikely(!args))
return NULL;
20334 result = __Pyx_PyObject_Call(func, args, NULL);
20340 #if CYTHON_COMPILING_IN_CPYTHON 20341 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20342 #ifdef __Pyx_CyFunction_USED 20343 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
20345 if (likely(PyCFunction_Check(func))) {
20347 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20348 return __Pyx_PyObject_CallMethO(func, NULL);
20351 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20355 static void __Pyx_RaiseDoubleKeywordsError(
20356 const char* func_name,
20359 PyErr_Format(PyExc_TypeError,
20360 #
if PY_MAJOR_VERSION >= 3
20361 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20363 "%s() got multiple values for keyword argument '%s'", func_name,
20364 PyString_AsString(kw_name));
20368 static int __Pyx_ParseOptionalKeywords(
20370 PyObject **argnames[],
20372 PyObject *values[],
20373 Py_ssize_t num_pos_args,
20374 const char* function_name)
20376 PyObject *key = 0, *value = 0;
20377 Py_ssize_t pos = 0;
20379 PyObject*** first_kw_arg = argnames + num_pos_args;
20380 while (PyDict_Next(kwds, &pos, &key, &value)) {
20381 name = first_kw_arg;
20382 while (*name && (**name != key)) name++;
20384 values[name-argnames] = value;
20387 name = first_kw_arg;
20388 #if PY_MAJOR_VERSION < 3 20389 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20391 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20392 && _PyString_Eq(**name, key)) {
20393 values[name-argnames] = value;
20398 if (*name)
continue;
20400 PyObject*** argname = argnames;
20401 while (argname != first_kw_arg) {
20402 if ((**argname == key) || (
20403 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20404 && _PyString_Eq(**argname, key))) {
20405 goto arg_passed_twice;
20412 if (likely(PyUnicode_Check(key))) {
20414 int cmp = (**name == key) ? 0 :
20415 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20416 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20418 PyUnicode_Compare(**name, key);
20419 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
20421 values[name-argnames] = value;
20426 if (*name)
continue;
20428 PyObject*** argname = argnames;
20429 while (argname != first_kw_arg) {
20430 int cmp = (**argname == key) ? 0 :
20431 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20432 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20434 PyUnicode_Compare(**argname, key);
20435 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
20436 if (cmp == 0)
goto arg_passed_twice;
20441 goto invalid_keyword_type;
20443 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
20445 goto invalid_keyword;
20450 __Pyx_RaiseDoubleKeywordsError(function_name, key);
20452 invalid_keyword_type:
20453 PyErr_Format(PyExc_TypeError,
20454 "%.200s() keywords must be strings", function_name);
20457 PyErr_Format(PyExc_TypeError,
20458 #
if PY_MAJOR_VERSION < 3
20459 "%.200s() got an unexpected keyword argument '%.200s'",
20460 function_name, PyString_AsString(key));
20462 "%s() got an unexpected keyword argument '%U'",
20463 function_name, key);
20469 static void __Pyx_RaiseArgtupleInvalid(
20470 const char* func_name,
20472 Py_ssize_t num_min,
20473 Py_ssize_t num_max,
20474 Py_ssize_t num_found)
20476 Py_ssize_t num_expected;
20477 const char *more_or_less;
20478 if (num_found < num_min) {
20479 num_expected = num_min;
20480 more_or_less =
"at least";
20482 num_expected = num_max;
20483 more_or_less =
"at most";
20486 more_or_less =
"exactly";
20488 PyErr_Format(PyExc_TypeError,
20489 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
20490 func_name, more_or_less, num_expected,
20491 (num_expected == 1) ?
"" :
"s", num_found);
20494 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
20496 #if CYTHON_COMPILING_IN_CPYTHON 20497 result = PyDict_GetItem(__pyx_d, name);
20498 if (likely(result)) {
20502 result = PyObject_GetItem(__pyx_d, name);
20506 result = __Pyx_GetBuiltinName(name);
20511 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
20512 #if CYTHON_COMPILING_IN_CPYTHON 20513 PyThreadState *tstate = PyThreadState_GET();
20514 *type = tstate->exc_type;
20515 *value = tstate->exc_value;
20516 *tb = tstate->exc_traceback;
20518 Py_XINCREF(*value);
20521 PyErr_GetExcInfo(type, value, tb);
20524 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
20525 #if CYTHON_COMPILING_IN_CPYTHON 20526 PyObject *tmp_type, *tmp_value, *tmp_tb;
20527 PyThreadState *tstate = PyThreadState_GET();
20528 tmp_type = tstate->exc_type;
20529 tmp_value = tstate->exc_value;
20530 tmp_tb = tstate->exc_traceback;
20531 tstate->exc_type = type;
20532 tstate->exc_value = value;
20533 tstate->exc_traceback = tb;
20534 Py_XDECREF(tmp_type);
20535 Py_XDECREF(tmp_value);
20536 Py_XDECREF(tmp_tb);
20538 PyErr_SetExcInfo(type, value, tb);
20542 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
20543 PyObject *local_type, *local_value, *local_tb;
20544 #if CYTHON_COMPILING_IN_CPYTHON 20545 PyObject *tmp_type, *tmp_value, *tmp_tb;
20546 PyThreadState *tstate = PyThreadState_GET();
20547 local_type = tstate->curexc_type;
20548 local_value = tstate->curexc_value;
20549 local_tb = tstate->curexc_traceback;
20550 tstate->curexc_type = 0;
20551 tstate->curexc_value = 0;
20552 tstate->curexc_traceback = 0;
20554 PyErr_Fetch(&local_type, &local_value, &local_tb);
20556 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20557 #if CYTHON_COMPILING_IN_CPYTHON 20558 if (unlikely(tstate->curexc_type))
20560 if (unlikely(PyErr_Occurred()))
20563 #if PY_MAJOR_VERSION >= 3 20565 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20569 Py_XINCREF(local_tb);
20570 Py_XINCREF(local_type);
20571 Py_XINCREF(local_value);
20572 *type = local_type;
20573 *value = local_value;
20575 #if CYTHON_COMPILING_IN_CPYTHON 20576 tmp_type = tstate->exc_type;
20577 tmp_value = tstate->exc_value;
20578 tmp_tb = tstate->exc_traceback;
20579 tstate->exc_type = local_type;
20580 tstate->exc_value = local_value;
20581 tstate->exc_traceback = local_tb;
20582 Py_XDECREF(tmp_type);
20583 Py_XDECREF(tmp_value);
20584 Py_XDECREF(tmp_tb);
20586 PyErr_SetExcInfo(local_type, local_value, local_tb);
20593 Py_XDECREF(local_type);
20594 Py_XDECREF(local_value);
20595 Py_XDECREF(local_tb);
20599 #if PY_MAJOR_VERSION < 3 20600 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
20601 CYTHON_UNUSED PyObject *cause) {
20603 if (!value || value == Py_None)
20607 if (!tb || tb == Py_None)
20611 if (!PyTraceBack_Check(tb)) {
20612 PyErr_SetString(PyExc_TypeError,
20613 "raise: arg 3 must be a traceback or None");
20617 if (PyType_Check(type)) {
20618 #if CYTHON_COMPILING_IN_PYPY 20620 Py_INCREF(Py_None);
20624 PyErr_NormalizeException(&type, &value, &tb);
20627 PyErr_SetString(PyExc_TypeError,
20628 "instance exception may not have a separate value");
20632 type = (PyObject*) Py_TYPE(type);
20634 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
20635 PyErr_SetString(PyExc_TypeError,
20636 "raise: exception class must be a subclass of BaseException");
20640 __Pyx_ErrRestore(type, value, tb);
20649 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
20650 PyObject* owned_instance = NULL;
20651 if (tb == Py_None) {
20653 }
else if (tb && !PyTraceBack_Check(tb)) {
20654 PyErr_SetString(PyExc_TypeError,
20655 "raise: arg 3 must be a traceback or None");
20658 if (value == Py_None)
20660 if (PyExceptionInstance_Check(type)) {
20662 PyErr_SetString(PyExc_TypeError,
20663 "instance exception may not have a separate value");
20667 type = (PyObject*) Py_TYPE(value);
20668 }
else if (PyExceptionClass_Check(type)) {
20669 PyObject *instance_class = NULL;
20670 if (value && PyExceptionInstance_Check(value)) {
20671 instance_class = (PyObject*) Py_TYPE(value);
20672 if (instance_class != type) {
20673 int is_subclass = PyObject_IsSubclass(instance_class, type);
20674 if (!is_subclass) {
20675 instance_class = NULL;
20676 }
else if (unlikely(is_subclass == -1)) {
20679 type = instance_class;
20683 if (!instance_class) {
20686 args = PyTuple_New(0);
20687 else if (PyTuple_Check(value)) {
20691 args = PyTuple_Pack(1, value);
20694 owned_instance = PyObject_Call(type, args, NULL);
20696 if (!owned_instance)
20698 value = owned_instance;
20699 if (!PyExceptionInstance_Check(value)) {
20700 PyErr_Format(PyExc_TypeError,
20701 "calling %R should have returned an instance of " 20702 "BaseException, not %R",
20703 type, Py_TYPE(value));
20708 PyErr_SetString(PyExc_TypeError,
20709 "raise: exception class must be a subclass of BaseException");
20712 #if PY_VERSION_HEX >= 0x03030000 20715 if (cause && cause != Py_None) {
20717 PyObject *fixed_cause;
20718 if (cause == Py_None) {
20719 fixed_cause = NULL;
20720 }
else if (PyExceptionClass_Check(cause)) {
20721 fixed_cause = PyObject_CallObject(cause, NULL);
20722 if (fixed_cause == NULL)
20724 }
else if (PyExceptionInstance_Check(cause)) {
20725 fixed_cause = cause;
20726 Py_INCREF(fixed_cause);
20728 PyErr_SetString(PyExc_TypeError,
20729 "exception causes must derive from " 20733 PyException_SetCause(value, fixed_cause);
20735 PyErr_SetObject(type, value);
20737 #if CYTHON_COMPILING_IN_PYPY 20738 PyObject *tmp_type, *tmp_value, *tmp_tb;
20739 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
20741 PyErr_Restore(tmp_type, tmp_value, tb);
20742 Py_XDECREF(tmp_tb);
20744 PyThreadState *tstate = PyThreadState_GET();
20745 PyObject* tmp_tb = tstate->curexc_traceback;
20746 if (tb != tmp_tb) {
20748 tstate->curexc_traceback = tb;
20749 Py_XDECREF(tmp_tb);
20754 Py_XDECREF(owned_instance);
20759 #if CYTHON_USE_PYLONG_INTERNALS 20760 #include "longintrepr.h" 20763 #if CYTHON_COMPILING_IN_CPYTHON 20764 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
long intval, CYTHON_UNUSED
int inplace) {
20765 #if PY_MAJOR_VERSION < 3 20766 if (likely(PyInt_CheckExact(op1))) {
20767 const long b = intval;
20769 long a = PyInt_AS_LONG(op1);
20770 x = (long)((
unsigned long)a + b);
20771 if (likely((x^a) >= 0 || (x^b) >= 0))
20772 return PyInt_FromLong(x);
20773 return PyLong_Type.tp_as_number->nb_add(op1, op2);
20776 #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 20777 if (likely(PyLong_CheckExact(op1))) {
20778 const long b = intval;
20780 const PY_LONG_LONG llb = intval;
20781 PY_LONG_LONG lla, llx;
20782 const digit* digits = ((PyLongObject*)op1)->ob_digit;
20783 const Py_ssize_t size = Py_SIZE(op1);
20784 if (likely(__Pyx_sst_abs(size) <= 1)) {
20785 a = likely(size) ? digits[0] : 0;
20786 if (size == -1) a = -a;
20790 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
20791 a = -(long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20793 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
20794 lla = -(PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
20798 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
20799 a = (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20801 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
20802 lla = (PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
20806 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
20807 a = -(long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20809 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
20810 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]));
20814 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
20815 a = (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20817 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
20818 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]));
20822 if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
20823 a = -(long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20825 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
20826 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]));
20830 if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
20831 a = (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20833 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
20834 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]));
20837 default:
return PyLong_Type.tp_as_number->nb_add(op1, op2);
20841 return PyLong_FromLong(x);
20844 return PyLong_FromLongLong(llx);
20847 if (PyFloat_CheckExact(op1)) {
20848 const long b = intval;
20849 double a = PyFloat_AS_DOUBLE(op1);
20851 PyFPE_START_PROTECT(
"add",
return NULL)
20852 result = ((double)a) + (double)b;
20853 PyFPE_END_PROTECT(result)
20856 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
20860 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
20863 r = PyObject_SetItem(o, j, v);
20867 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t
i, PyObject *v,
int is_list,
20868 CYTHON_NCP_UNUSED
int wraparound, CYTHON_NCP_UNUSED
int boundscheck) {
20869 #if CYTHON_COMPILING_IN_CPYTHON 20870 if (is_list || PyList_CheckExact(o)) {
20871 Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
20872 if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
20873 PyObject* old = PyList_GET_ITEM(o, n);
20875 PyList_SET_ITEM(o, n, v);
20880 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
20881 if (likely(m && m->sq_ass_item)) {
20882 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
20883 Py_ssize_t l = m->sq_length(o);
20884 if (likely(l >= 0)) {
20887 if (PyErr_ExceptionMatches(PyExc_OverflowError))
20893 return m->sq_ass_item(o, i, v);
20897 #if CYTHON_COMPILING_IN_PYPY 20898 if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
20900 if (is_list || PySequence_Check(o)) {
20902 return PySequence_SetItem(o, i, v);
20905 return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
20908 static void __Pyx_RaiseArgumentTypeInvalid(
const char* name, PyObject *
obj, PyTypeObject *type) {
20909 PyErr_Format(PyExc_TypeError,
20910 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
20911 name, type->tp_name, Py_TYPE(obj)->tp_name);
20913 static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
20914 const char *name,
int exact)
20916 if (unlikely(!type)) {
20917 PyErr_SetString(PyExc_SystemError,
"Missing type object");
20920 if (none_allowed && obj == Py_None)
return 1;
20922 if (likely(Py_TYPE(obj) == type))
return 1;
20923 #if PY_MAJOR_VERSION == 2 20924 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj)))
return 1;
20928 if (likely(PyObject_TypeCheck(obj, type)))
return 1;
20930 __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
20934 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
20935 PyObject *empty_list = 0;
20936 PyObject *module = 0;
20937 PyObject *global_dict = 0;
20938 PyObject *empty_dict = 0;
20940 #if PY_VERSION_HEX < 0x03030000 20941 PyObject *py_import;
20942 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
20949 empty_list = PyList_New(0);
20954 global_dict = PyModule_GetDict(__pyx_m);
20957 empty_dict = PyDict_New();
20961 #if PY_MAJOR_VERSION >= 3 20963 if (strchr(__Pyx_MODULE_NAME,
'.')) {
20964 #if PY_VERSION_HEX < 0x03030000 20965 PyObject *py_level = PyInt_FromLong(1);
20968 module = PyObject_CallFunctionObjArgs(py_import,
20969 name, global_dict, empty_dict, list, py_level, NULL);
20970 Py_DECREF(py_level);
20972 module = PyImport_ImportModuleLevelObject(
20973 name, global_dict, empty_dict, list, 1);
20976 if (!PyErr_ExceptionMatches(PyExc_ImportError))
20985 #if PY_VERSION_HEX < 0x03030000 20986 PyObject *py_level = PyInt_FromLong(level);
20989 module = PyObject_CallFunctionObjArgs(py_import,
20990 name, global_dict, empty_dict, list, py_level, NULL);
20991 Py_DECREF(py_level);
20993 module = PyImport_ImportModuleLevelObject(
20994 name, global_dict, empty_dict, list, level);
20999 #if PY_VERSION_HEX < 0x03030000 21000 Py_XDECREF(py_import);
21002 Py_XDECREF(empty_list);
21003 Py_XDECREF(empty_dict);
21007 static int __Pyx_SetVtable(PyObject *dict,
void *vtable) {
21008 #if PY_VERSION_HEX >= 0x02070000 21009 PyObject *ob = PyCapsule_New(vtable, 0, 0);
21011 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21015 if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21024 #if CYTHON_COMPILING_IN_CPYTHON 21025 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2,
double floatval, CYTHON_UNUSED
int inplace) {
21026 const double b = floatval;
21028 if (likely(PyFloat_CheckExact(op1))) {
21029 a = PyFloat_AS_DOUBLE(op1);
21031 #if PY_MAJOR_VERSION < 3 21032 if (likely(PyInt_CheckExact(op1))) {
21033 a = (double) PyInt_AS_LONG(op1);
21036 if (likely(PyLong_CheckExact(op1))) {
21037 #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 21038 const digit* digits = ((PyLongObject*)op1)->ob_digit;
21039 const Py_ssize_t size = Py_SIZE(op1);
21041 case 0: a = 0.0;
break;
21042 case -1: a = -(double) digits[0];
break;
21043 case 1: a = (double) digits[0];
break;
21046 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21047 a = (double) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
21048 if ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
21056 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21057 a = (double) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
21058 if ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
21066 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21067 a = (double) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
21068 if ((8 *
sizeof(
unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
21078 a = PyLong_AsDouble(op1);
21079 if (unlikely(a == -1.0 && PyErr_Occurred()))
return NULL;
21082 return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21084 PyFPE_START_PROTECT(
"divide",
return NULL)
21086 PyFPE_END_PROTECT(result)
21091 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals) {
21092 #if CYTHON_COMPILING_IN_PYPY 21093 return PyObject_RichCompareBool(s1, s2, equals);
21096 return (equals == Py_EQ);
21097 }
else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21098 const char *ps1, *ps2;
21099 Py_ssize_t length = PyBytes_GET_SIZE(s1);
21100 if (length != PyBytes_GET_SIZE(s2))
21101 return (equals == Py_NE);
21102 ps1 = PyBytes_AS_STRING(s1);
21103 ps2 = PyBytes_AS_STRING(s2);
21104 if (ps1[0] != ps2[0]) {
21105 return (equals == Py_NE);
21106 }
else if (length == 1) {
21107 return (equals == Py_EQ);
21109 int result = memcmp(ps1, ps2, (
size_t)length);
21110 return (equals == Py_EQ) ? (result == 0) : (result != 0);
21112 }
else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21113 return (equals == Py_NE);
21114 }
else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21115 return (equals == Py_NE);
21118 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21121 result = __Pyx_PyObject_IsTrue(py_result);
21122 Py_DECREF(py_result);
21128 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals) {
21129 #if CYTHON_COMPILING_IN_PYPY 21130 return PyObject_RichCompareBool(s1, s2, equals);
21132 #if PY_MAJOR_VERSION < 3 21133 PyObject* owned_ref = NULL;
21135 int s1_is_unicode, s2_is_unicode;
21139 s1_is_unicode = PyUnicode_CheckExact(s1);
21140 s2_is_unicode = PyUnicode_CheckExact(s2);
21141 #if PY_MAJOR_VERSION < 3 21142 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21143 owned_ref = PyUnicode_FromObject(s2);
21144 if (unlikely(!owned_ref))
21148 }
else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21149 owned_ref = PyUnicode_FromObject(s1);
21150 if (unlikely(!owned_ref))
21154 }
else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21155 return __Pyx_PyBytes_Equals(s1, s2, equals);
21158 if (s1_is_unicode & s2_is_unicode) {
21161 void *data1, *data2;
21162 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21164 length = __Pyx_PyUnicode_GET_LENGTH(s1);
21165 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21168 kind = __Pyx_PyUnicode_KIND(s1);
21169 if (kind != __Pyx_PyUnicode_KIND(s2)) {
21172 data1 = __Pyx_PyUnicode_DATA(s1);
21173 data2 = __Pyx_PyUnicode_DATA(s2);
21174 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21176 }
else if (length == 1) {
21179 int result = memcmp(data1, data2, (
size_t)(length * kind));
21180 #if PY_MAJOR_VERSION < 3 21181 Py_XDECREF(owned_ref);
21183 return (equals == Py_EQ) ? (result == 0) : (result != 0);
21185 }
else if ((s1 == Py_None) & s2_is_unicode) {
21187 }
else if ((s2 == Py_None) & s1_is_unicode) {
21191 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21194 result = __Pyx_PyObject_IsTrue(py_result);
21195 Py_DECREF(py_result);
21199 #if PY_MAJOR_VERSION < 3 21200 Py_XDECREF(owned_ref);
21202 return (equals == Py_EQ);
21204 #if PY_MAJOR_VERSION < 3 21205 Py_XDECREF(owned_ref);
21207 return (equals == Py_NE);
21211 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
21212 int start = 0, mid = 0, end = count - 1;
21213 if (end >= 0 && code_line > entries[end].code_line) {
21216 while (start < end) {
21217 mid = start + (end - start) / 2;
21218 if (code_line < entries[mid].code_line) {
21220 }
else if (code_line > entries[mid].code_line) {
21226 if (code_line <= entries[mid].code_line) {
21232 static PyCodeObject *__pyx_find_code_object(
int code_line) {
21233 PyCodeObject* code_object;
21235 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21238 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21239 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21242 code_object = __pyx_code_cache.entries[pos].code_object;
21243 Py_INCREF(code_object);
21244 return code_object;
21246 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
21248 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21249 if (unlikely(!code_line)) {
21252 if (unlikely(!entries)) {
21253 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
21254 if (likely(entries)) {
21255 __pyx_code_cache.entries = entries;
21256 __pyx_code_cache.max_count = 64;
21257 __pyx_code_cache.count = 1;
21258 entries[0].code_line = code_line;
21259 entries[0].code_object = code_object;
21260 Py_INCREF(code_object);
21264 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21265 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21266 PyCodeObject* tmp = entries[pos].code_object;
21267 entries[pos].code_object = code_object;
21271 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21272 int new_max = __pyx_code_cache.max_count + 64;
21273 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21274 __pyx_code_cache.entries, (
size_t)new_max*
sizeof(__Pyx_CodeObjectCacheEntry));
21275 if (unlikely(!entries)) {
21278 __pyx_code_cache.entries = entries;
21279 __pyx_code_cache.max_count = new_max;
21281 for (i=__pyx_code_cache.count; i>pos; i--) {
21282 entries[
i] = entries[i-1];
21284 entries[pos].code_line = code_line;
21285 entries[pos].code_object = code_object;
21286 __pyx_code_cache.count++;
21287 Py_INCREF(code_object);
21290 #include "compile.h" 21291 #include "frameobject.h" 21292 #include "traceback.h" 21293 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21294 const char *funcname,
int c_line,
21295 int py_line,
const char *filename) {
21296 PyCodeObject *py_code = 0;
21297 PyObject *py_srcfile = 0;
21298 PyObject *py_funcname = 0;
21299 #if PY_MAJOR_VERSION < 3 21300 py_srcfile = PyString_FromString(filename);
21302 py_srcfile = PyUnicode_FromString(filename);
21304 if (!py_srcfile)
goto bad;
21306 #if PY_MAJOR_VERSION < 3 21307 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21309 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21313 #if PY_MAJOR_VERSION < 3 21314 py_funcname = PyString_FromString(funcname);
21316 py_funcname = PyUnicode_FromString(funcname);
21319 if (!py_funcname)
goto bad;
21320 py_code = __Pyx_PyCode_New(
21337 Py_DECREF(py_srcfile);
21338 Py_DECREF(py_funcname);
21341 Py_XDECREF(py_srcfile);
21342 Py_XDECREF(py_funcname);
21345 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
21346 int py_line,
const char *filename) {
21347 PyCodeObject *py_code = 0;
21348 PyFrameObject *py_frame = 0;
21349 py_code = __pyx_find_code_object(c_line ? c_line : py_line);
21351 py_code = __Pyx_CreateCodeObjectForTraceback(
21352 funcname, c_line, py_line, filename);
21353 if (!py_code)
goto bad;
21354 __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
21356 py_frame = PyFrame_New(
21357 PyThreadState_GET(),
21362 if (!py_frame)
goto bad;
21363 py_frame->f_lineno = py_line;
21364 PyTraceBack_Here(py_frame);
21366 Py_XDECREF(py_code);
21367 Py_XDECREF(py_frame);
21370 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ 21371 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) 21372 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ 21373 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) 21374 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ 21376 func_type value = func_value;\ 21377 if (sizeof(target_type) < sizeof(func_type)) {\ 21378 if (unlikely(value != (func_type) (target_type) value)) {\ 21379 func_type zero = 0;\ 21380 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ 21381 return (target_type) -1;\ 21382 if (is_unsigned && unlikely(value < zero))\ 21383 goto raise_neg_overflow;\ 21385 goto raise_overflow;\ 21388 return (target_type) value;\ 21391 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
21392 const int neg_one = (int) -1, const_zero = (
int) 0;
21393 const int is_unsigned = neg_one > const_zero;
21394 #if PY_MAJOR_VERSION < 3 21395 if (likely(PyInt_Check(x))) {
21396 if (
sizeof(
int) <
sizeof(long)) {
21397 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
21399 long val = PyInt_AS_LONG(x);
21400 if (is_unsigned && unlikely(val < 0)) {
21401 goto raise_neg_overflow;
21407 if (likely(PyLong_Check(x))) {
21409 #if CYTHON_USE_PYLONG_INTERNALS 21410 const digit* digits = ((PyLongObject*)x)->ob_digit;
21411 switch (Py_SIZE(x)) {
21412 case 0:
return (
int) 0;
21413 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, digits[0])
21415 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
21416 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21417 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21418 }
else if (8 *
sizeof(
int) >= 2 * PyLong_SHIFT) {
21419 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
21424 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
21425 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21426 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21427 }
else if (8 *
sizeof(
int) >= 3 * PyLong_SHIFT) {
21428 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
21433 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
21434 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21435 __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])))
21436 }
else if (8 *
sizeof(
int) >= 4 * PyLong_SHIFT) {
21437 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
21443 #if CYTHON_COMPILING_IN_CPYTHON 21444 if (unlikely(Py_SIZE(x) < 0)) {
21445 goto raise_neg_overflow;
21449 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
21450 if (unlikely(result < 0))
21452 if (unlikely(result == 1))
21453 goto raise_neg_overflow;
21456 if (
sizeof(
int) <=
sizeof(
unsigned long)) {
21457 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
21458 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
21459 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
21462 #if CYTHON_USE_PYLONG_INTERNALS 21463 const digit* digits = ((PyLongObject*)x)->ob_digit;
21464 switch (Py_SIZE(x)) {
21465 case 0:
return (
int) 0;
21466 case -1: __PYX_VERIFY_RETURN_INT(
int, sdigit, -(sdigit) digits[0])
21467 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, +digits[0])
21469 if (8 *
sizeof(
int) - 1 > 1 * PyLong_SHIFT) {
21470 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21471 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21472 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
21473 return (
int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21478 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
21479 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21480 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21481 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
21482 return (
int) ((((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21487 if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
21488 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21489 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21490 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
21491 return (
int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
21496 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
21497 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21498 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21499 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
21500 return (
int) ((((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
21505 if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
21506 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21507 __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])))
21508 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
21509 return (
int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21514 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
21515 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21516 __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])))
21517 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
21518 return (
int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21524 if (
sizeof(
int) <=
sizeof(long)) {
21525 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
21526 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
21527 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
21531 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 21532 PyErr_SetString(PyExc_RuntimeError,
21533 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
21536 PyObject *v = __Pyx_PyNumber_Int(x);
21537 #if PY_MAJOR_VERSION < 3 21538 if (likely(v) && !PyLong_Check(v)) {
21540 v = PyNumber_Long(tmp);
21545 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
21546 unsigned char *bytes = (
unsigned char *)&val;
21547 int ret = _PyLong_AsByteArray((PyLongObject *)v,
21548 bytes,
sizeof(val),
21549 is_little, !is_unsigned);
21559 PyObject *tmp = __Pyx_PyNumber_Int(x);
21560 if (!tmp)
return (
int) -1;
21561 val = __Pyx_PyInt_As_int(tmp);
21566 PyErr_SetString(PyExc_OverflowError,
21567 "value too large to convert to int");
21569 raise_neg_overflow:
21570 PyErr_SetString(PyExc_OverflowError,
21571 "can't convert negative value to int");
21575 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
21576 const int neg_one = (int) -1, const_zero = (
int) 0;
21577 const int is_unsigned = neg_one > const_zero;
21579 if (
sizeof(
int) <
sizeof(long)) {
21580 return PyInt_FromLong((
long) value);
21581 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
21582 return PyLong_FromUnsignedLong((
unsigned long) value);
21583 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
21584 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
21587 if (
sizeof(
int) <=
sizeof(
long)) {
21588 return PyInt_FromLong((
long) value);
21589 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
21590 return PyLong_FromLongLong((PY_LONG_LONG) value);
21594 int one = 1;
int little = (int)*(
unsigned char *)&one;
21595 unsigned char *bytes = (
unsigned char *)&value;
21596 return _PyLong_FromByteArray(bytes,
sizeof(
int),
21597 little, !is_unsigned);
21601 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
21602 const long neg_one = (long) -1, const_zero = (
long) 0;
21603 const int is_unsigned = neg_one > const_zero;
21605 if (
sizeof(
long) <
sizeof(long)) {
21606 return PyInt_FromLong((
long) value);
21607 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
21608 return PyLong_FromUnsignedLong((
unsigned long) value);
21609 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
21610 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
21613 if (
sizeof(
long) <=
sizeof(
long)) {
21614 return PyInt_FromLong((
long) value);
21615 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
21616 return PyLong_FromLongLong((PY_LONG_LONG) value);
21620 int one = 1;
int little = (int)*(
unsigned char *)&one;
21621 unsigned char *bytes = (
unsigned char *)&value;
21622 return _PyLong_FromByteArray(bytes,
sizeof(
long),
21623 little, !is_unsigned);
21627 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
21628 const long neg_one = (long) -1, const_zero = (
long) 0;
21629 const int is_unsigned = neg_one > const_zero;
21630 #if PY_MAJOR_VERSION < 3 21631 if (likely(PyInt_Check(x))) {
21632 if (
sizeof(
long) <
sizeof(long)) {
21633 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
21635 long val = PyInt_AS_LONG(x);
21636 if (is_unsigned && unlikely(val < 0)) {
21637 goto raise_neg_overflow;
21643 if (likely(PyLong_Check(x))) {
21645 #if CYTHON_USE_PYLONG_INTERNALS 21646 const digit* digits = ((PyLongObject*)x)->ob_digit;
21647 switch (Py_SIZE(x)) {
21648 case 0:
return (
long) 0;
21649 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, digits[0])
21651 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
21652 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21653 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21654 }
else if (8 *
sizeof(
long) >= 2 * PyLong_SHIFT) {
21655 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
21660 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
21661 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21662 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21663 }
else if (8 *
sizeof(
long) >= 3 * PyLong_SHIFT) {
21664 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
21669 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
21670 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21671 __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])))
21672 }
else if (8 *
sizeof(
long) >= 4 * PyLong_SHIFT) {
21673 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
21679 #if CYTHON_COMPILING_IN_CPYTHON 21680 if (unlikely(Py_SIZE(x) < 0)) {
21681 goto raise_neg_overflow;
21685 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
21686 if (unlikely(result < 0))
21688 if (unlikely(result == 1))
21689 goto raise_neg_overflow;
21692 if (
sizeof(
long) <=
sizeof(
unsigned long)) {
21693 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
21694 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
21695 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
21698 #if CYTHON_USE_PYLONG_INTERNALS 21699 const digit* digits = ((PyLongObject*)x)->ob_digit;
21700 switch (Py_SIZE(x)) {
21701 case 0:
return (
long) 0;
21702 case -1: __PYX_VERIFY_RETURN_INT(
long, sdigit, -(sdigit) digits[0])
21703 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, +digits[0])
21705 if (8 *
sizeof(
long) - 1 > 1 * PyLong_SHIFT) {
21706 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21707 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21708 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
21709 return (
long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21714 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
21715 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21716 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21717 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
21718 return (
long) ((((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21723 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
21724 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21725 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21726 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
21727 return (
long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
21732 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
21733 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21734 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21735 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
21736 return (
long) ((((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
21741 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
21742 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21743 __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])))
21744 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
21745 return (
long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21750 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
21751 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21752 __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])))
21753 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
21754 return (
long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21760 if (
sizeof(
long) <=
sizeof(long)) {
21761 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
21762 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
21763 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
21767 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 21768 PyErr_SetString(PyExc_RuntimeError,
21769 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
21772 PyObject *v = __Pyx_PyNumber_Int(x);
21773 #if PY_MAJOR_VERSION < 3 21774 if (likely(v) && !PyLong_Check(v)) {
21776 v = PyNumber_Long(tmp);
21781 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
21782 unsigned char *bytes = (
unsigned char *)&val;
21783 int ret = _PyLong_AsByteArray((PyLongObject *)v,
21784 bytes,
sizeof(val),
21785 is_little, !is_unsigned);
21795 PyObject *tmp = __Pyx_PyNumber_Int(x);
21796 if (!tmp)
return (
long) -1;
21797 val = __Pyx_PyInt_As_long(tmp);
21802 PyErr_SetString(PyExc_OverflowError,
21803 "value too large to convert to long");
21805 raise_neg_overflow:
21806 PyErr_SetString(PyExc_OverflowError,
21807 "can't convert negative value to long");
21811 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
21812 PyObject* fake_module;
21813 PyTypeObject* cached_type = NULL;
21814 fake_module = PyImport_AddModule((
char*)
"_cython_" CYTHON_ABI);
21815 if (!fake_module)
return NULL;
21816 Py_INCREF(fake_module);
21817 cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
21819 if (!PyType_Check((PyObject*)cached_type)) {
21820 PyErr_Format(PyExc_TypeError,
21821 "Shared Cython type %.200s is not a type object",
21825 if (cached_type->tp_basicsize != type->tp_basicsize) {
21826 PyErr_Format(PyExc_TypeError,
21827 "Shared Cython type %.200s has the wrong size, try recompiling",
21832 if (!PyErr_ExceptionMatches(PyExc_AttributeError))
goto bad;
21834 if (PyType_Ready(type) < 0)
goto bad;
21835 if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
21838 cached_type = type;
21841 Py_DECREF(fake_module);
21842 return cached_type;
21844 Py_XDECREF(cached_type);
21845 cached_type = NULL;
21849 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
21850 PyObject *tmp_type, *tmp_value, *tmp_tb;
21851 #if CYTHON_COMPILING_IN_CPYTHON 21852 PyThreadState *tstate = PyThreadState_GET();
21853 tmp_type = tstate->exc_type;
21854 tmp_value = tstate->exc_value;
21855 tmp_tb = tstate->exc_traceback;
21856 tstate->exc_type = *type;
21857 tstate->exc_value = *value;
21858 tstate->exc_traceback = *tb;
21860 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
21861 PyErr_SetExcInfo(*type, *value, *tb);
21864 *value = tmp_value;
21868 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
21869 PyObject *method, *result = NULL;
21870 method = __Pyx_PyObject_GetAttrStr(obj, method_name);
21871 if (unlikely(!method))
goto bad;
21872 #if CYTHON_COMPILING_IN_CPYTHON 21873 if (likely(PyMethod_Check(method))) {
21874 PyObject *
self = PyMethod_GET_SELF(method);
21875 if (likely(
self)) {
21877 PyObject *
function = PyMethod_GET_FUNCTION(method);
21878 args = PyTuple_New(2);
21879 if (unlikely(!args))
goto bad;
21881 PyTuple_SET_ITEM(args, 0,
self);
21883 PyTuple_SET_ITEM(args, 1, arg);
21884 Py_INCREF(
function);
21885 Py_DECREF(method); method = NULL;
21886 result = __Pyx_PyObject_Call(
function, args, NULL);
21888 Py_DECREF(
function);
21893 result = __Pyx_PyObject_CallOneArg(method, arg);
21895 Py_XDECREF(method);
21899 #include <structmember.h> 21900 #include <frameobject.h> 21901 static PyObject *__Pyx_Coroutine_Send(PyObject *
self, PyObject *value);
21902 static PyObject *__Pyx_Coroutine_Close(PyObject *
self);
21903 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
21904 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) 21905 #if 1 || PY_VERSION_HEX < 0x030300B0 21906 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
21907 PyObject *et, *ev, *tb;
21908 PyObject *value = NULL;
21909 __Pyx_ErrFetch(&et, &ev, &tb);
21913 Py_INCREF(Py_None);
21917 if (likely(et == PyExc_StopIteration)) {
21918 #if PY_VERSION_HEX >= 0x030300A0 21919 if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
21920 value = ((PyStopIterationObject *)ev)->value;
21929 if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
21931 Py_INCREF(Py_None);
21933 }
else if (PyTuple_Check(ev)) {
21934 if (PyTuple_GET_SIZE(ev) >= 1) {
21936 #if CYTHON_COMPILING_IN_CPYTHON 21937 value = PySequence_ITEM(ev, 0);
21939 value = PyTuple_GET_ITEM(ev, 0);
21945 Py_INCREF(Py_None);
21955 }
else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
21956 __Pyx_ErrRestore(et, ev, tb);
21959 PyErr_NormalizeException(&et, &ev, &tb);
21960 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
21961 __Pyx_ErrRestore(et, ev, tb);
21966 #if PY_VERSION_HEX >= 0x030300A0 21967 value = ((PyStopIterationObject *)ev)->value;
21972 PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
21974 if (likely(args)) {
21975 value = PySequence_GetItem(args, 0);
21978 if (unlikely(!value)) {
21979 __Pyx_ErrRestore(NULL, NULL, NULL);
21980 Py_INCREF(Py_None);
21989 static CYTHON_INLINE
21990 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *
self) {
21991 PyObject *exc_type =
self->exc_type;
21992 PyObject *exc_value =
self->exc_value;
21993 PyObject *exc_traceback =
self->exc_traceback;
21994 self->exc_type = NULL;
21995 self->exc_value = NULL;
21996 self->exc_traceback = NULL;
21997 Py_XDECREF(exc_type);
21998 Py_XDECREF(exc_value);
21999 Py_XDECREF(exc_traceback);
22001 static CYTHON_INLINE
22002 int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
22003 if (unlikely(gen->is_running)) {
22004 PyErr_SetString(PyExc_ValueError,
22005 "generator already executing");
22010 static CYTHON_INLINE
22011 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *
self, PyObject *value) {
22013 assert(!self->is_running);
22014 if (unlikely(self->resume_label == 0)) {
22015 if (unlikely(value && value != Py_None)) {
22016 PyErr_SetString(PyExc_TypeError,
22017 "can't send non-None value to a " 22018 "just-started generator");
22022 if (unlikely(self->resume_label == -1)) {
22023 PyErr_SetNone(PyExc_StopIteration);
22027 #if CYTHON_COMPILING_IN_PYPY 22029 if (self->exc_traceback) {
22030 PyThreadState *tstate = PyThreadState_GET();
22031 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
22032 PyFrameObject *f = tb->tb_frame;
22033 Py_XINCREF(tstate->frame);
22034 assert(f->f_back == NULL);
22035 f->f_back = tstate->frame;
22038 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
22039 &self->exc_traceback);
22041 __Pyx_Coroutine_ExceptionClear(
self);
22043 self->is_running = 1;
22044 retval =
self->body((PyObject *)
self, value);
22045 self->is_running = 0;
22047 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
22048 &self->exc_traceback);
22049 #if CYTHON_COMPILING_IN_PYPY 22051 if (self->exc_traceback) {
22052 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
22053 PyFrameObject *f = tb->tb_frame;
22054 Py_CLEAR(f->f_back);
22058 __Pyx_Coroutine_ExceptionClear(
self);
22062 static CYTHON_INLINE
22063 PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
22064 if (unlikely(!retval && !PyErr_Occurred())) {
22065 PyErr_SetNone(PyExc_StopIteration);
22069 static CYTHON_INLINE
22070 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
22072 PyObject *val = NULL;
22073 __Pyx_Coroutine_Undelegate(gen);
22074 __Pyx_PyGen_FetchStopIterationValue(&val);
22075 ret = __Pyx_Coroutine_SendEx(gen, val);
22079 static PyObject *__Pyx_Coroutine_Send(PyObject *
self, PyObject *value) {
22081 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)
self;
22082 PyObject *yf = gen->yieldfrom;
22083 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22087 gen->is_running = 1;
22088 #ifdef __Pyx_Generator_USED 22089 if (__Pyx_Generator_CheckExact(yf)) {
22090 ret = __Pyx_Coroutine_Send(yf, value);
22093 #ifdef __Pyx_Coroutine_USED 22094 if (__Pyx_Coroutine_CheckExact(yf)) {
22095 ret = __Pyx_Coroutine_Send(yf, value);
22099 if (value == Py_None)
22100 ret = Py_TYPE(yf)->tp_iternext(yf);
22102 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
22104 gen->is_running = 0;
22108 retval = __Pyx_Coroutine_FinishDelegation(gen);
22110 retval = __Pyx_Coroutine_SendEx(gen, value);
22112 return __Pyx_Coroutine_MethodReturn(retval);
22114 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
22115 PyObject *retval = NULL;
22117 #ifdef __Pyx_Generator_USED 22118 if (__Pyx_Generator_CheckExact(yf)) {
22119 retval = __Pyx_Coroutine_Close(yf);
22124 #ifdef __Pyx_Coroutine_USED 22125 if (__Pyx_Coroutine_CheckExact(yf)) {
22126 retval = __Pyx_Coroutine_Close(yf);
22133 gen->is_running = 1;
22134 meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
22135 if (unlikely(!meth)) {
22136 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
22137 PyErr_WriteUnraisable(yf);
22141 retval = PyObject_CallFunction(meth, NULL);
22146 gen->is_running = 0;
22148 Py_XDECREF(retval);
22151 static PyObject *__Pyx_Generator_Next(PyObject *
self) {
22152 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)
self;
22153 PyObject *yf = gen->yieldfrom;
22154 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22158 gen->is_running = 1;
22159 ret = Py_TYPE(yf)->tp_iternext(yf);
22160 gen->is_running = 0;
22164 return __Pyx_Coroutine_FinishDelegation(gen);
22166 return __Pyx_Coroutine_SendEx(gen, Py_None);
22168 static PyObject *__Pyx_Coroutine_Close(PyObject *
self) {
22169 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22170 PyObject *retval, *raised_exception;
22171 PyObject *yf = gen->yieldfrom;
22173 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22177 err = __Pyx_Coroutine_CloseIter(gen, yf);
22178 __Pyx_Coroutine_Undelegate(gen);
22182 PyErr_SetNone(PyExc_GeneratorExit);
22183 retval = __Pyx_Coroutine_SendEx(gen, NULL);
22186 PyErr_SetString(PyExc_RuntimeError,
22187 "generator ignored GeneratorExit");
22190 raised_exception = PyErr_Occurred();
22191 if (!raised_exception
22192 || raised_exception == PyExc_StopIteration
22193 || raised_exception == PyExc_GeneratorExit
22194 || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
22195 || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
22197 if (raised_exception) PyErr_Clear();
22198 Py_INCREF(Py_None);
22203 static PyObject *__Pyx_Coroutine_Throw(PyObject *
self, PyObject *args) {
22204 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22206 PyObject *tb = NULL;
22207 PyObject *val = NULL;
22208 PyObject *yf = gen->yieldfrom;
22209 if (!PyArg_UnpackTuple(args, (
char *)
"throw", 1, 3, &typ, &val, &tb))
22211 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22216 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
22217 int err = __Pyx_Coroutine_CloseIter(gen, yf);
22219 __Pyx_Coroutine_Undelegate(gen);
22221 return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
22224 gen->is_running = 1;
22225 #ifdef __Pyx_Generator_USED 22226 if (__Pyx_Generator_CheckExact(yf)) {
22227 ret = __Pyx_Coroutine_Throw(yf, args);
22230 #ifdef __Pyx_Coroutine_USED 22231 if (__Pyx_Coroutine_CheckExact(yf)) {
22232 ret = __Pyx_Coroutine_Throw(yf, args);
22236 PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
22237 if (unlikely(!meth)) {
22239 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
22240 gen->is_running = 0;
22244 __Pyx_Coroutine_Undelegate(gen);
22245 gen->is_running = 0;
22248 ret = PyObject_CallObject(meth, args);
22251 gen->is_running = 0;
22254 ret = __Pyx_Coroutine_FinishDelegation(gen);
22256 return __Pyx_Coroutine_MethodReturn(ret);
22259 __Pyx_Raise(typ, val, tb, NULL);
22260 return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
22262 static int __Pyx_Coroutine_traverse(PyObject *
self, visitproc visit,
void *arg) {
22263 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22264 Py_VISIT(gen->closure);
22265 Py_VISIT(gen->classobj);
22266 Py_VISIT(gen->yieldfrom);
22267 Py_VISIT(gen->exc_type);
22268 Py_VISIT(gen->exc_value);
22269 Py_VISIT(gen->exc_traceback);
22272 static int __Pyx_Coroutine_clear(PyObject *
self) {
22273 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22274 Py_CLEAR(gen->closure);
22275 Py_CLEAR(gen->classobj);
22276 Py_CLEAR(gen->yieldfrom);
22277 Py_CLEAR(gen->exc_type);
22278 Py_CLEAR(gen->exc_value);
22279 Py_CLEAR(gen->exc_traceback);
22280 Py_CLEAR(gen->gi_name);
22281 Py_CLEAR(gen->gi_qualname);
22284 static void __Pyx_Coroutine_dealloc(PyObject *
self) {
22285 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22286 PyObject_GC_UnTrack(gen);
22287 if (gen->gi_weakreflist != NULL)
22288 PyObject_ClearWeakRefs(
self);
22289 if (gen->resume_label > 0) {
22290 PyObject_GC_Track(
self);
22291 #if PY_VERSION_HEX >= 0x030400a1 22292 if (PyObject_CallFinalizerFromDealloc(
self))
22294 Py_TYPE(gen)->tp_del(
self);
22295 if (self->ob_refcnt > 0)
22300 PyObject_GC_UnTrack(
self);
22302 __Pyx_Coroutine_clear(
self);
22303 PyObject_GC_Del(gen);
22305 static void __Pyx_Coroutine_del(PyObject *
self) {
22307 PyObject *error_type, *error_value, *error_traceback;
22308 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22309 if (gen->resume_label <= 0)
22311 #if PY_VERSION_HEX < 0x030400a1 22312 assert(self->ob_refcnt == 0);
22313 self->ob_refcnt = 1;
22315 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
22316 res = __Pyx_Coroutine_Close(
self);
22318 PyErr_WriteUnraisable(
self);
22321 __Pyx_ErrRestore(error_type, error_value, error_traceback);
22322 #if PY_VERSION_HEX < 0x030400a1 22323 assert(self->ob_refcnt > 0);
22324 if (--self->ob_refcnt == 0) {
22328 Py_ssize_t refcnt =
self->ob_refcnt;
22329 _Py_NewReference(
self);
22330 self->ob_refcnt = refcnt;
22332 #if CYTHON_COMPILING_IN_CPYTHON 22333 assert(PyType_IS_GC(self->ob_type) &&
22334 _Py_AS_GC(
self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
22337 #ifdef COUNT_ALLOCS 22338 --Py_TYPE(
self)->tp_frees;
22339 --Py_TYPE(
self)->tp_allocs;
22344 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *
self)
22346 Py_INCREF(self->gi_name);
22347 return self->gi_name;
22350 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *
self, PyObject *value)
22353 #if PY_MAJOR_VERSION >= 3 22354 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
22356 if (unlikely(value == NULL || !PyString_Check(value))) {
22358 PyErr_SetString(PyExc_TypeError,
22359 "__name__ must be set to a string object");
22362 tmp =
self->gi_name;
22364 self->gi_name = value;
22369 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *
self)
22371 Py_INCREF(self->gi_qualname);
22372 return self->gi_qualname;
22375 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *
self, PyObject *value)
22378 #if PY_MAJOR_VERSION >= 3 22379 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
22381 if (unlikely(value == NULL || !PyString_Check(value))) {
22383 PyErr_SetString(PyExc_TypeError,
22384 "__qualname__ must be set to a string object");
22387 tmp =
self->gi_qualname;
22389 self->gi_qualname = value;
22393 static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
22394 PyObject *closure, PyObject *name, PyObject *qualname) {
22395 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
22399 gen->closure = closure;
22400 Py_XINCREF(closure);
22401 gen->is_running = 0;
22402 gen->resume_label = 0;
22403 gen->classobj = NULL;
22404 gen->yieldfrom = NULL;
22405 gen->exc_type = NULL;
22406 gen->exc_value = NULL;
22407 gen->exc_traceback = NULL;
22408 gen->gi_weakreflist = NULL;
22409 Py_XINCREF(qualname);
22410 gen->gi_qualname = qualname;
22412 gen->gi_name = name;
22413 PyObject_GC_Track(gen);
22417 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code) {
22418 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 22420 PyObject *globals, *result_obj;
22421 globals = PyDict_New();
if (unlikely(!globals))
goto ignore;
22422 result = PyDict_SetItemString(globals,
"_cython_coroutine_type",
22423 #ifdef __Pyx_Coroutine_USED
22424 (PyObject*)__pyx_CoroutineType);
22428 if (unlikely(result < 0))
goto ignore;
22429 result = PyDict_SetItemString(globals,
"_cython_generator_type",
22430 #ifdef __Pyx_Generator_USED
22431 (PyObject*)__pyx_GeneratorType);
22435 if (unlikely(result < 0))
goto ignore;
22436 if (unlikely(PyDict_SetItemString(globals,
"_module", module) < 0))
goto ignore;
22437 if (unlikely(PyDict_SetItemString(globals,
"__builtins__", __pyx_b) < 0))
goto ignore;
22438 result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
22439 if (unlikely(!result_obj))
goto ignore;
22440 Py_DECREF(result_obj);
22441 Py_DECREF(globals);
22444 Py_XDECREF(globals);
22445 PyErr_WriteUnraisable(module);
22446 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
"Cython module failed to patch module with custom type", 1) < 0)) {
22456 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 22457 static PyObject* __Pyx_patch_abc_module(PyObject *module);
22458 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
22459 module = __Pyx_Coroutine_patch_module(
22461 "if _cython_generator_type is not None:\n" 22462 " try: Generator = _module.Generator\n" 22463 " except AttributeError: pass\n" 22464 " else: Generator.register(_cython_generator_type)\n" 22465 "if _cython_coroutine_type is not None:\n" 22466 " try: Coroutine = _module.Coroutine\n" 22467 " except AttributeError: pass\n" 22468 " else: Coroutine.register(_cython_coroutine_type)\n" 22473 static int __Pyx_patch_abc(
void) {
22474 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 22475 static int abc_patched = 0;
22476 if (!abc_patched) {
22478 module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ?
"collections.abc" :
"collections");
22480 PyErr_WriteUnraisable(NULL);
22481 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
22482 ((PY_VERSION_HEX >= 0x03030000) ?
22483 "Cython module failed to register with collections.abc module" :
22484 "Cython module failed to register with collections module"), 1) < 0)) {
22488 module = __Pyx_patch_abc_module(module);
22490 if (unlikely(!module))
22494 module = PyImport_ImportModule(
"backports_abc");
22496 module = __Pyx_patch_abc_module(module);
22497 Py_XDECREF(module);
22504 if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
22509 static PyMethodDef __pyx_Generator_methods[] = {
22510 {
"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
22511 (
char*) PyDoc_STR(
"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
22512 {
"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
22513 (
char*) PyDoc_STR(
"throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
22514 {
"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
22515 (
char*) PyDoc_STR(
"close() -> raise GeneratorExit inside generator.")},
22518 static PyMemberDef __pyx_Generator_memberlist[] = {
22519 {(
char *)
"gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
22520 {(
char*)
"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
22521 (
char*) PyDoc_STR(
"object being iterated by 'yield from', or None")},
22524 static PyGetSetDef __pyx_Generator_getsets[] = {
22525 {(
char *)
"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
22526 (
char*) PyDoc_STR(
"name of the generator"), 0},
22527 {(
char *)
"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
22528 (
char*) PyDoc_STR(
"qualified name of the generator"), 0},
22531 static PyTypeObject __pyx_GeneratorType_type = {
22532 PyVarObject_HEAD_INIT(0, 0)
22534 sizeof(__pyx_CoroutineObject),
22536 (destructor) __Pyx_Coroutine_dealloc,
22551 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
22553 (traverseproc) __Pyx_Coroutine_traverse,
22556 offsetof(__pyx_CoroutineObject, gi_weakreflist),
22558 (iternextfunc) __Pyx_Generator_Next,
22559 __pyx_Generator_methods,
22560 __pyx_Generator_memberlist,
22561 __pyx_Generator_getsets,
22577 #
if PY_VERSION_HEX >= 0x030400a1
22580 __Pyx_Coroutine_del,
22583 #
if PY_VERSION_HEX >= 0x030400a1
22584 __Pyx_Coroutine_del,
22587 static int __pyx_Generator_init(
void) {
22588 __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
22589 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
22590 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
22591 if (unlikely(!__pyx_GeneratorType)) {
22597 static int __Pyx_check_binary_version(
void) {
22598 char ctversion[4], rtversion[4];
22599 PyOS_snprintf(ctversion, 4,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
22600 PyOS_snprintf(rtversion, 4,
"%s", Py_GetVersion());
22601 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
22603 PyOS_snprintf(message,
sizeof(message),
22604 "compiletime version %s of module '%.100s' " 22605 "does not match runtime version %s",
22606 ctversion, __Pyx_MODULE_NAME, rtversion);
22607 return PyErr_WarnEx(NULL, message, 1);
22612 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
22614 #if PY_MAJOR_VERSION < 3 22615 if (t->is_unicode) {
22616 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
22617 }
else if (t->intern) {
22618 *t->p = PyString_InternFromString(t->s);
22620 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
22623 if (t->is_unicode | t->is_str) {
22625 *t->p = PyUnicode_InternFromString(t->s);
22626 }
else if (t->encoding) {
22627 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
22629 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
22632 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
22642 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
22643 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
22645 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject* o) {
22647 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
22649 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
22650 #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) 22652 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
22653 __Pyx_sys_getdefaultencoding_not_ascii &&
22655 PyUnicode_Check(o)) {
22656 #if PY_VERSION_HEX < 0x03030000 22658 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
22659 if (!defenc)
return NULL;
22660 defenc_c = PyBytes_AS_STRING(defenc);
22661 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 22663 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
22665 for (c = defenc_c; c < end; c++) {
22666 if ((
unsigned char) (*c) >= 128) {
22667 PyUnicode_AsASCIIString(o);
22673 *length = PyBytes_GET_SIZE(defenc);
22676 if (__Pyx_PyUnicode_READY(o) == -1)
return NULL;
22677 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 22678 if (PyUnicode_IS_ASCII(o)) {
22679 *length = PyUnicode_GET_LENGTH(o);
22680 return PyUnicode_AsUTF8(o);
22682 PyUnicode_AsASCIIString(o);
22686 return PyUnicode_AsUTF8AndSize(o, length);
22691 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) 22692 if (PyByteArray_Check(o)) {
22693 *length = PyByteArray_GET_SIZE(o);
22694 return PyByteArray_AS_STRING(o);
22699 int r = PyBytes_AsStringAndSize(o, &result, length);
22700 if (unlikely(r < 0)) {
22707 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
22708 int is_true = x == Py_True;
22709 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
22710 else return PyObject_IsTrue(x);
22712 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
22713 PyNumberMethods *m;
22714 const char *name = NULL;
22715 PyObject *res = NULL;
22716 #if PY_MAJOR_VERSION < 3 22717 if (PyInt_Check(x) || PyLong_Check(x))
22719 if (PyLong_Check(x))
22721 return __Pyx_NewRef(x);
22722 m = Py_TYPE(x)->tp_as_number;
22723 #if PY_MAJOR_VERSION < 3 22724 if (m && m->nb_int) {
22726 res = PyNumber_Int(x);
22728 else if (m && m->nb_long) {
22730 res = PyNumber_Long(x);
22733 if (m && m->nb_int) {
22735 res = PyNumber_Long(x);
22739 #if PY_MAJOR_VERSION < 3 22740 if (!PyInt_Check(res) && !PyLong_Check(res)) {
22742 if (!PyLong_Check(res)) {
22744 PyErr_Format(PyExc_TypeError,
22745 "__%.4s__ returned non-%.4s (type %.200s)",
22746 name, name, Py_TYPE(res)->tp_name);
22751 else if (!PyErr_Occurred()) {
22752 PyErr_SetString(PyExc_TypeError,
22753 "an integer is required");
22757 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
22760 #if PY_MAJOR_VERSION < 3 22761 if (likely(PyInt_CheckExact(b))) {
22762 if (
sizeof(Py_ssize_t) >=
sizeof(
long))
22763 return PyInt_AS_LONG(b);
22765 return PyInt_AsSsize_t(x);
22768 if (likely(PyLong_CheckExact(b))) {
22769 #if CYTHON_USE_PYLONG_INTERNALS 22770 const digit* digits = ((PyLongObject*)b)->ob_digit;
22771 const Py_ssize_t size = Py_SIZE(b);
22772 if (likely(__Pyx_sst_abs(size) <= 1)) {
22773 ival = likely(size) ? digits[0] : 0;
22774 if (size == -1) ival = -ival;
22779 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
22780 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
22784 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
22785 return -(Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
22789 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
22790 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
22794 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
22795 return -(Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
22799 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
22800 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]));
22804 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
22805 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]));
22811 return PyLong_AsSsize_t(b);
22813 x = PyNumber_Index(b);
22815 ival = PyInt_AsSsize_t(x);
22819 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
22820 return PyInt_FromSize_t(ival);
int compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b)
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
const Multivector< Scalar_T, LO, HI > sqrt(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Square root of multivector with specified complexifier.
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
const Multivector< Scalar_T, LO, HI > acosh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic cosine of multivector with specified complexifier.
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
const Multivector< Scalar_T, LO, HI > sinh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic sine of multivector.
index_set< lo_ndx, hi_ndx > IndexSet
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
const Multivector< Scalar_T, LO, HI > log(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Natural logarithm of multivector with specified complexifier.
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)].
const Multivector< Scalar_T, LO, HI > sin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > atanh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic tangent of multivector with specified complexifier.
const framed_multi< Scalar_T, LO, HI > exp(const framed_multi< Scalar_T, LO, HI > &val)
Exponential of multivector.
const Multivector< Scalar_T, LO, HI > cos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Cosine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tanh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic tangent of multivector.
index_t min_neg(const index_set< LO, HI > &ist)
Minimum negative index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse sine of multivector with specified complexifier.
matrix_multi< scalar_t > Clifford
const Multivector< Scalar_T, LO, HI > complexifier(const Multivector< Scalar_T, LO, HI > &val)
Square root of -1 which commutes with all members of the frame of the given multivector.
PyObject * PyFloat_FromDouble(Scalar_T v)
const Multivector< Scalar_T, LO, HI > atan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > acos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse cosine of multivector with specified complexifier.
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
index_t max_pos(const index_set< LO, HI > &ist)
Maximum positive index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asinh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic sine of multivector with specified complexifier.
Scalar_T max_abs(const Multivector< Scalar_T, LO, HI > &val)
Maximum of absolute values of components of multivector: multivector infinity norm.
const Multivector< Scalar_T, LO, HI > cosh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic cosine of multivector.
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)].