51 #define PY_SSIZE_T_CLEAN 54 #error Python headers needed to compile C extensions, please install development version of Python. 55 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) 56 #error Cython requires Python 2.6+ or Python 3.2+. 58 #define CYTHON_ABI "0_23_4" 61 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) 63 #if !defined(WIN32) && !defined(MS_WINDOWS) 75 #define DL_IMPORT(t) t 78 #define DL_EXPORT(t) t 81 #define PY_LONG_LONG LONG_LONG 84 #define Py_HUGE_VAL HUGE_VAL 87 #define CYTHON_COMPILING_IN_PYPY 1 88 #define CYTHON_COMPILING_IN_CPYTHON 0 90 #define CYTHON_COMPILING_IN_PYPY 0 91 #define CYTHON_COMPILING_IN_CPYTHON 1 93 #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 94 #define CYTHON_USE_PYLONG_INTERNALS 1 96 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) 97 #define Py_OptimizeFlag 0 99 #define __PYX_BUILD_PY_SSIZE_T "n" 100 #define CYTHON_FORMAT_SSIZE_T "z" 101 #if PY_MAJOR_VERSION < 3 102 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" 103 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 104 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 105 #define __Pyx_DefaultClassType PyClass_Type 107 #define __Pyx_BUILTIN_MODULE_NAME "builtins" 108 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ 109 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 110 #define __Pyx_DefaultClassType PyType_Type 112 #ifndef Py_TPFLAGS_CHECKTYPES 113 #define Py_TPFLAGS_CHECKTYPES 0 115 #ifndef Py_TPFLAGS_HAVE_INDEX 116 #define Py_TPFLAGS_HAVE_INDEX 0 118 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER 119 #define Py_TPFLAGS_HAVE_NEWBUFFER 0 121 #ifndef Py_TPFLAGS_HAVE_FINALIZE 122 #define Py_TPFLAGS_HAVE_FINALIZE 0 124 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) 125 #define CYTHON_PEP393_ENABLED 1 126 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 127 0 : _PyUnicode_Ready((PyObject *)(op))) 128 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) 129 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) 130 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) 131 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) 132 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) 134 #define CYTHON_PEP393_ENABLED 0 135 #define __Pyx_PyUnicode_READY(op) (0) 136 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) 137 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) 138 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) 139 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) 140 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) 142 #if CYTHON_COMPILING_IN_PYPY 143 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) 144 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) 146 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) 147 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ 148 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) 150 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) 151 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) 153 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) 154 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) 155 #if PY_MAJOR_VERSION >= 3 156 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) 158 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) 160 #if PY_MAJOR_VERSION >= 3 161 #define PyBaseString_Type PyUnicode_Type 162 #define PyStringObject PyUnicodeObject 163 #define PyString_Type PyUnicode_Type 164 #define PyString_Check PyUnicode_Check 165 #define PyString_CheckExact PyUnicode_CheckExact 167 #if PY_MAJOR_VERSION >= 3 168 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) 169 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) 171 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) 172 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) 174 #ifndef PySet_CheckExact 175 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) 177 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) 178 #if PY_MAJOR_VERSION >= 3 179 #define PyIntObject PyLongObject 180 #define PyInt_Type PyLong_Type 181 #define PyInt_Check(op) PyLong_Check(op) 182 #define PyInt_CheckExact(op) PyLong_CheckExact(op) 183 #define PyInt_FromString PyLong_FromString 184 #define PyInt_FromUnicode PyLong_FromUnicode 185 #define PyInt_FromLong PyLong_FromLong 186 #define PyInt_FromSize_t PyLong_FromSize_t 187 #define PyInt_FromSsize_t PyLong_FromSsize_t 188 #define PyInt_AsLong PyLong_AsLong 189 #define PyInt_AS_LONG PyLong_AS_LONG 190 #define PyInt_AsSsize_t PyLong_AsSsize_t 191 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask 192 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask 193 #define PyNumber_Int PyNumber_Long 195 #if PY_MAJOR_VERSION >= 3 196 #define PyBoolObject PyLongObject 198 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY 199 #ifndef PyUnicode_InternFromString 200 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) 203 #if PY_VERSION_HEX < 0x030200A4 204 typedef long Py_hash_t;
205 #define __Pyx_PyInt_FromHash_t PyInt_FromLong 206 #define __Pyx_PyInt_AsHash_t PyInt_AsLong 208 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t 209 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t 211 #if PY_MAJOR_VERSION >= 3 212 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) 214 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) 216 #if PY_VERSION_HEX >= 0x030500B1 217 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods 218 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) 219 #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 224 } __Pyx_PyAsyncMethodsStruct;
225 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) 227 #define __Pyx_PyType_AsAsync(obj) NULL 229 #ifndef CYTHON_RESTRICT 230 #if defined(__GNUC__) 231 #define CYTHON_RESTRICT __restrict__ 232 #elif defined(_MSC_VER) && _MSC_VER >= 1400 233 #define CYTHON_RESTRICT __restrict 234 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 235 #define CYTHON_RESTRICT restrict 237 #define CYTHON_RESTRICT 240 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) 243 #error "Cython files generated with the C++ option must be compiled with a C++ compiler." 245 #ifndef CYTHON_INLINE 246 #define CYTHON_INLINE inline 249 void __Pyx_call_destructor(T& x) {
253 class __Pyx_FakeReference {
255 __Pyx_FakeReference() : ptr(NULL) { }
256 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<T*>(&ref)) { }
257 T *operator->() {
return ptr; }
258 operator T&() {
return *ptr; }
263 #if defined(WIN32) || defined(MS_WINDOWS) 264 #define _USE_MATH_DEFINES 268 #define __PYX_NAN() ((float) NAN) 270 static CYTHON_INLINE
float __PYX_NAN() {
272 memset(&value, 0xFF,
sizeof(value));
278 #if PY_MAJOR_VERSION >= 3 279 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) 280 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) 282 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) 283 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) 286 #ifndef __PYX_EXTERN_C 288 #define __PYX_EXTERN_C extern "C" 290 #define __PYX_EXTERN_C extern 294 #define __PYX_HAVE__PyClical 295 #define __PYX_HAVE_API__PyClical 306 #ifdef PYREX_WITHOUT_ASSERTIONS 307 #define CYTHON_WITHOUT_ASSERTIONS 310 #ifndef CYTHON_UNUSED 311 # if defined(__GNUC__) 312 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 313 # define CYTHON_UNUSED __attribute__ ((__unused__)) 315 # define CYTHON_UNUSED 317 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) 318 # define CYTHON_UNUSED __attribute__ ((__unused__)) 320 # define CYTHON_UNUSED 323 #ifndef CYTHON_NCP_UNUSED 324 # if CYTHON_COMPILING_IN_CPYTHON 325 # define CYTHON_NCP_UNUSED 327 # define CYTHON_NCP_UNUSED CYTHON_UNUSED 330 typedef struct {PyObject **p;
char *s;
const Py_ssize_t n;
const char* encoding;
331 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
333 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 334 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 335 #define __PYX_DEFAULT_STRING_ENCODING "" 336 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString 337 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 338 #define __Pyx_uchar_cast(c) ((unsigned char)c) 339 #define __Pyx_long_cast(x) ((long)x) 340 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ 341 (sizeof(type) < sizeof(Py_ssize_t)) ||\ 342 (sizeof(type) > sizeof(Py_ssize_t) &&\ 343 likely(v < (type)PY_SSIZE_T_MAX ||\ 344 v == (type)PY_SSIZE_T_MAX) &&\ 345 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ 346 v == (type)PY_SSIZE_T_MIN))) ||\ 347 (sizeof(type) == sizeof(Py_ssize_t) &&\ 348 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ 349 v == (type)PY_SSIZE_T_MAX))) ) 350 #if defined (__cplusplus) && __cplusplus >= 201103L 352 #define __Pyx_sst_abs(value) std::abs(value) 353 #elif SIZEOF_INT >= SIZEOF_SIZE_T 354 #define __Pyx_sst_abs(value) abs(value) 355 #elif SIZEOF_LONG >= SIZEOF_SIZE_T 356 #define __Pyx_sst_abs(value) labs(value) 357 #elif defined (_MSC_VER) && defined (_M_X64) 358 #define __Pyx_sst_abs(value) _abs64(value) 359 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 360 #define __Pyx_sst_abs(value) llabs(value) 361 #elif defined (__GNUC__) 362 #define __Pyx_sst_abs(value) __builtin_llabs(value) 364 #define __Pyx_sst_abs(value) ((value<0) ? -value : value) 366 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject*);
367 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
368 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) 369 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) 370 #define __Pyx_PyBytes_FromString PyBytes_FromString 371 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize 372 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
373 #if PY_MAJOR_VERSION < 3 374 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString 375 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 377 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString 378 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize 380 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) 381 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) 382 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) 383 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) 384 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) 385 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) 386 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) 387 #if PY_MAJOR_VERSION < 3 388 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *u)
390 const Py_UNICODE *u_end = u;
392 return (
size_t)(u_end - u - 1);
395 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen 397 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) 398 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode 399 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode 400 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) 401 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) 402 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) 403 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
404 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
405 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
406 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
407 #if CYTHON_COMPILING_IN_CPYTHON 408 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) 410 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) 412 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) 413 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 414 static int __Pyx_sys_getdefaultencoding_not_ascii;
415 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
417 PyObject* default_encoding = NULL;
418 PyObject* ascii_chars_u = NULL;
419 PyObject* ascii_chars_b = NULL;
420 const char* default_encoding_c;
421 sys = PyImport_ImportModule(
"sys");
423 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
425 if (!default_encoding)
goto bad;
426 default_encoding_c = PyBytes_AsString(default_encoding);
427 if (!default_encoding_c)
goto bad;
428 if (strcmp(default_encoding_c,
"ascii") == 0) {
429 __Pyx_sys_getdefaultencoding_not_ascii = 0;
431 char ascii_chars[128];
433 for (c = 0; c < 128; c++) {
436 __Pyx_sys_getdefaultencoding_not_ascii = 1;
437 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
438 if (!ascii_chars_u)
goto bad;
439 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
440 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
443 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
447 Py_DECREF(ascii_chars_u);
448 Py_DECREF(ascii_chars_b);
450 Py_DECREF(default_encoding);
453 Py_XDECREF(default_encoding);
454 Py_XDECREF(ascii_chars_u);
455 Py_XDECREF(ascii_chars_b);
459 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 460 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) 462 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) 463 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 464 static char* __PYX_DEFAULT_STRING_ENCODING;
465 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
467 PyObject* default_encoding = NULL;
468 char* default_encoding_c;
469 sys = PyImport_ImportModule(
"sys");
471 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
473 if (!default_encoding)
goto bad;
474 default_encoding_c = PyBytes_AsString(default_encoding);
475 if (!default_encoding_c)
goto bad;
476 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c));
477 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
478 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
479 Py_DECREF(default_encoding);
482 Py_XDECREF(default_encoding);
490 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) 491 #define likely(x) __builtin_expect(!!(x), 1) 492 #define unlikely(x) __builtin_expect(!!(x), 0) 494 #define likely(x) (x) 495 #define unlikely(x) (x) 498 static PyObject *__pyx_m;
499 static PyObject *__pyx_d;
500 static PyObject *__pyx_b;
501 static PyObject *__pyx_empty_tuple;
502 static PyObject *__pyx_empty_bytes;
503 static int __pyx_lineno;
504 static int __pyx_clineno = 0;
505 static const char * __pyx_cfilenm= __FILE__;
506 static const char *__pyx_filename;
509 static const char *__pyx_f[] = {
514 struct __pyx_obj_8PyClical_index_set;
515 struct __pyx_obj_8PyClical_clifford;
516 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
517 struct __pyx_opt_args_8PyClical_sqrt;
518 struct __pyx_opt_args_8PyClical_log;
519 struct __pyx_opt_args_8PyClical_cos;
520 struct __pyx_opt_args_8PyClical_acos;
521 struct __pyx_opt_args_8PyClical_acosh;
522 struct __pyx_opt_args_8PyClical_sin;
523 struct __pyx_opt_args_8PyClical_asin;
524 struct __pyx_opt_args_8PyClical_asinh;
525 struct __pyx_opt_args_8PyClical_tan;
526 struct __pyx_opt_args_8PyClical_atan;
527 struct __pyx_opt_args_8PyClical_atanh;
528 struct __pyx_opt_args_8PyClical_random_clifford;
537 struct __pyx_opt_args_8PyClical_sqrt {
549 struct __pyx_opt_args_8PyClical_log {
561 struct __pyx_opt_args_8PyClical_cos {
573 struct __pyx_opt_args_8PyClical_acos {
585 struct __pyx_opt_args_8PyClical_acosh {
597 struct __pyx_opt_args_8PyClical_sin {
609 struct __pyx_opt_args_8PyClical_asin {
621 struct __pyx_opt_args_8PyClical_asinh {
633 struct __pyx_opt_args_8PyClical_tan {
645 struct __pyx_opt_args_8PyClical_atan {
657 struct __pyx_opt_args_8PyClical_atanh {
669 struct __pyx_opt_args_8PyClical_random_clifford {
681 struct __pyx_obj_8PyClical_index_set {
683 struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
695 struct __pyx_obj_8PyClical_clifford {
697 struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
709 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
711 PyObject *__pyx_v_idx;
712 struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
714 Py_ssize_t __pyx_t_1;
715 PyObject *(*__pyx_t_2)(PyObject *);
728 struct __pyx_vtabstruct_8PyClical_index_set {
729 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
730 IndexSet (*unwrap)(
struct __pyx_obj_8PyClical_index_set *);
731 PyObject *(*copy)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch);
733 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
734 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
735 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *);
746 struct __pyx_vtabstruct_8PyClical_clifford {
747 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
748 Clifford (*unwrap)(
struct __pyx_obj_8PyClical_clifford *);
749 PyObject *(*copy)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch);
751 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
752 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
753 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *);
756 #ifndef CYTHON_REFNANNY 757 #define CYTHON_REFNANNY 0 761 void (*INCREF)(
void*, PyObject*, int);
762 void (*DECREF)(
void*, PyObject*, int);
763 void (*GOTREF)(
void*, PyObject*, int);
764 void (*GIVEREF)(
void*, PyObject*, int);
765 void* (*SetupContext)(
const char*, int,
const char*);
766 void (*FinishContext)(
void**);
767 } __Pyx_RefNannyAPIStruct;
768 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
769 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
770 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; 772 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ 774 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ 775 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ 776 PyGILState_Release(__pyx_gilstate_save);\ 778 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ 781 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ 782 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) 784 #define __Pyx_RefNannyFinishContext()\ 785 __Pyx_RefNanny->FinishContext(&__pyx_refnanny) 786 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 787 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 788 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 789 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 790 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) 791 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) 792 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) 793 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) 795 #define __Pyx_RefNannyDeclarations 796 #define __Pyx_RefNannySetupContext(name, acquire_gil) 797 #define __Pyx_RefNannyFinishContext() 798 #define __Pyx_INCREF(r) Py_INCREF(r) 799 #define __Pyx_DECREF(r) Py_DECREF(r) 800 #define __Pyx_GOTREF(r) 801 #define __Pyx_GIVEREF(r) 802 #define __Pyx_XINCREF(r) Py_XINCREF(r) 803 #define __Pyx_XDECREF(r) Py_XDECREF(r) 804 #define __Pyx_XGOTREF(r) 805 #define __Pyx_XGIVEREF(r) 807 #define __Pyx_XDECREF_SET(r, v) do {\ 808 PyObject *tmp = (PyObject *) r;\ 809 r = v; __Pyx_XDECREF(tmp);\ 811 #define __Pyx_DECREF_SET(r, v) do {\ 812 PyObject *tmp = (PyObject *) r;\ 813 r = v; __Pyx_DECREF(tmp);\ 815 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) 816 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) 818 #if CYTHON_COMPILING_IN_CPYTHON 819 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject*
obj, PyObject* attr_name) {
820 PyTypeObject* tp = Py_TYPE(
obj);
821 if (likely(tp->tp_getattro))
822 return tp->tp_getattro(
obj, attr_name);
823 #if PY_MAJOR_VERSION < 3 824 if (likely(tp->tp_getattr))
825 return tp->tp_getattr(
obj, PyString_AS_STRING(attr_name));
827 return PyObject_GetAttr(
obj, attr_name);
830 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) 833 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
835 #if CYTHON_COMPILING_IN_CPYTHON 836 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
838 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) 841 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
842 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
844 static void __Pyx_WriteUnraisable(
const char *name,
int clineno,
845 int lineno,
const char *filename,
846 int full_traceback,
int nogil);
848 #if CYTHON_COMPILING_IN_CPYTHON 849 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
852 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
854 #if CYTHON_COMPILING_IN_CPYTHON 855 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
857 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) 860 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
862 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
863 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
864 const char* function_name);
866 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
867 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
869 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
871 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
872 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
874 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
876 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
878 #if CYTHON_COMPILING_IN_CPYTHON 879 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace);
881 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ 882 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) 885 static CYTHON_INLINE
int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq,
int eq) {
886 int result = PySequence_Contains(seq, item);
887 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
890 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ 891 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ 892 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ 893 (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ 894 __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) 895 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
896 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t
i, PyObject *v,
897 int is_list,
int wraparound,
int boundscheck);
899 static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *
obj, PyTypeObject *type,
int none_allowed,
900 const char *name,
int exact);
902 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
906 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
908 #if CYTHON_COMPILING_IN_CPYTHON 909 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace);
911 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\ 912 ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) 915 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
917 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
919 #if PY_MAJOR_VERSION >= 3 920 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals 922 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals 927 PyCodeObject* code_object;
928 } __Pyx_CodeObjectCacheEntry;
929 struct __Pyx_CodeObjectCache {
932 __Pyx_CodeObjectCacheEntry* entries;
934 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
935 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
936 static PyCodeObject *__pyx_find_code_object(
int code_line);
937 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
939 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
940 int py_line,
const char *filename);
942 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
944 #ifndef __Pyx_CppExn2PyErr 949 static void __Pyx_CppExn2PyErr() {
951 if (PyErr_Occurred())
955 }
catch (
const std::bad_alloc& exn) {
956 PyErr_SetString(PyExc_MemoryError, exn.what());
957 }
catch (
const std::bad_cast& exn) {
958 PyErr_SetString(PyExc_TypeError, exn.what());
959 }
catch (
const std::domain_error& exn) {
960 PyErr_SetString(PyExc_ValueError, exn.what());
961 }
catch (
const std::invalid_argument& exn) {
962 PyErr_SetString(PyExc_ValueError, exn.what());
963 }
catch (
const std::ios_base::failure& exn) {
964 PyErr_SetString(PyExc_IOError, exn.what());
965 }
catch (
const std::out_of_range& exn) {
966 PyErr_SetString(PyExc_IndexError, exn.what());
967 }
catch (
const std::overflow_error& exn) {
968 PyErr_SetString(PyExc_OverflowError, exn.what());
969 }
catch (
const std::range_error& exn) {
970 PyErr_SetString(PyExc_ArithmeticError, exn.what());
971 }
catch (
const std::underflow_error& exn) {
972 PyErr_SetString(PyExc_ArithmeticError, exn.what());
973 }
catch (
const std::exception& exn) {
974 PyErr_SetString(PyExc_RuntimeError, exn.what());
978 PyErr_SetString(PyExc_RuntimeError,
"Unknown exception");
983 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
985 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
987 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
989 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
991 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
993 static PyObject* __Pyx_PyObject_CallMethod1(PyObject*
obj, PyObject* method_name, PyObject* arg);
995 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
998 __pyx_coroutine_body_t body;
1001 PyObject *exc_value;
1002 PyObject *exc_traceback;
1003 PyObject *gi_weakreflist;
1005 PyObject *yieldfrom;
1007 PyObject *gi_qualname;
1010 } __pyx_CoroutineObject;
1011 static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
1012 PyObject *closure, PyObject *name, PyObject *qualname);
1013 static int __Pyx_Coroutine_clear(PyObject *
self);
1014 #if 1 || PY_VERSION_HEX < 0x030300B0 1015 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
1017 #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) 1020 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code);
1022 static int __Pyx_patch_abc(
void);
1024 #define __Pyx_Generator_USED 1025 static PyTypeObject *__pyx_GeneratorType = 0;
1026 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) 1027 #define __Pyx_Generator_New(body, closure, name, qualname)\ 1028 __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname) 1029 static PyObject *__Pyx_Generator_Next(PyObject *
self);
1030 static int __pyx_Generator_init(
void);
1032 static int __Pyx_check_binary_version(
void);
1034 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1036 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other);
1037 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1038 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch);
1039 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other);
1040 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1041 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch);
1048 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1049 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1050 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1051 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *);
1052 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1053 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *,
int __pyx_skip_dispatch);
1054 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *,
int __pyx_skip_dispatch);
1055 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *);
1056 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *);
1057 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *,
int __pyx_skip_dispatch);
1058 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *,
int __pyx_skip_dispatch);
1059 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *,
int __pyx_skip_dispatch);
1060 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *,
int __pyx_skip_dispatch);
1061 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *,
int __pyx_skip_dispatch);
1062 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *,
int __pyx_skip_dispatch);
1063 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *,
int __pyx_skip_dispatch);
1064 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *,
int __pyx_skip_dispatch);
1065 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *,
int __pyx_skip_dispatch);
1066 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *,
int __pyx_skip_dispatch);
1067 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *,
int __pyx_skip_dispatch);
1068 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *,
int __pyx_skip_dispatch);
1069 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *,
int __pyx_skip_dispatch);
1070 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *,
int __pyx_skip_dispatch);
1071 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1072 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1073 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *,
int __pyx_skip_dispatch);
1074 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args);
1075 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *,
int __pyx_skip_dispatch);
1076 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_log *__pyx_optional_args);
1077 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args);
1078 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args);
1079 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *,
int __pyx_skip_dispatch);
1080 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args);
1081 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args);
1082 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args);
1083 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *,
int __pyx_skip_dispatch);
1084 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args);
1085 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args);
1086 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args);
1087 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *,
int __pyx_skip_dispatch);
1088 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args);
1089 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);
1090 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *,
int __pyx_skip_dispatch);
1091 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *,
int __pyx_skip_dispatch);
1092 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *,
int __pyx_skip_dispatch);
1093 #define __Pyx_MODULE_NAME "PyClical" 1094 int __pyx_module_is_main_PyClical = 0;
1097 static PyObject *__pyx_builtin_IndexError;
1098 static PyObject *__pyx_builtin_RuntimeError;
1099 static PyObject *__pyx_builtin_TypeError;
1100 static PyObject *__pyx_builtin_ValueError;
1101 static PyObject *__pyx_builtin_NotImplemented;
1102 static PyObject *__pyx_builtin_range;
1103 static PyObject *__pyx_builtin_xrange;
1104 static char __pyx_k_[] =
".";
1105 static char __pyx_k_e[] =
"e";
1106 static char __pyx_k_i[] =
"i";
1107 static char __pyx_k_m[] =
"m";
1108 static char __pyx_k_p[] =
"p";
1109 static char __pyx_k_q[] =
"q";
1110 static char __pyx_k__2[] =
" ";
1111 static char __pyx_k__3[] =
":";
1112 static char __pyx_k__4[] =
"\n\t";
1113 static char __pyx_k__5[] =
" (";
1114 static char __pyx_k__6[] =
", ";
1115 static char __pyx_k__7[] =
").";
1116 static char __pyx_k_cl[] =
"cl";
1117 static char __pyx_k_pi[] =
"pi";
1118 static char __pyx_k_cos[] =
"cos";
1119 static char __pyx_k_exp[] =
"exp";
1120 static char __pyx_k_frm[] =
"frm";
1121 static char __pyx_k_inv[] =
"inv";
1122 static char __pyx_k_ist[] =
"ist";
1123 static char __pyx_k_ixt[] =
"ixt";
1124 static char __pyx_k_lhs[] =
"lhs";
1125 static char __pyx_k_log[] =
"log";
1126 static char __pyx_k_max[] =
"max";
1127 static char __pyx_k_min[] =
"min";
1128 static char __pyx_k_obj[] =
"obj";
1129 static char __pyx_k_odd[] =
"odd";
1130 static char __pyx_k_pow[] =
"pow";
1131 static char __pyx_k_rhs[] =
"rhs";
1132 static char __pyx_k_sin[] =
"sin";
1133 static char __pyx_k_tan[] =
"tan";
1134 static char __pyx_k_tau[] =
"tau";
1135 static char __pyx_k_Real[] =
"Real";
1136 static char __pyx_k_acos[] =
"acos";
1137 static char __pyx_k_args[] =
"args";
1138 static char __pyx_k_asin[] =
"asin";
1139 static char __pyx_k_atan[] =
"atan";
1140 static char __pyx_k_conj[] =
"conj";
1141 static char __pyx_k_copy[] =
"copy";
1142 static char __pyx_k_cosh[] =
"cosh";
1143 static char __pyx_k_even[] =
"even";
1144 static char __pyx_k_fill[] =
"fill";
1145 static char __pyx_k_from[] =
" from ";
1146 static char __pyx_k_iter[] =
"__iter__";
1147 static char __pyx_k_main[] =
"__main__";
1148 static char __pyx_k_math[] =
"math";
1149 static char __pyx_k_name[] =
"__name__";
1150 static char __pyx_k_norm[] =
"norm";
1151 static char __pyx_k_pure[] =
"pure";
1152 static char __pyx_k_quad[] =
"quad";
1153 static char __pyx_k_send[] =
"send";
1154 static char __pyx_k_sinh[] =
"sinh";
1155 static char __pyx_k_sqrt[] =
"sqrt";
1156 static char __pyx_k_tanh[] =
"tanh";
1157 static char __pyx_k_test[] =
"_test";
1158 static char __pyx_k_0_8_2[] =
"0.8.2";
1159 static char __pyx_k_acosh[] =
"acosh";
1160 static char __pyx_k_asinh[] =
"asinh";
1161 static char __pyx_k_atanh[] =
"atanh";
1162 static char __pyx_k_close[] =
"close";
1163 static char __pyx_k_grade[] =
"grade";
1164 static char __pyx_k_istpq[] =
"istpq";
1165 static char __pyx_k_nbar3[] =
"nbar3";
1166 static char __pyx_k_ninf3[] =
"ninf3";
1167 static char __pyx_k_other[] =
"other";
1168 static char __pyx_k_range[] =
"range";
1169 static char __pyx_k_throw[] =
"throw";
1170 static char __pyx_k_using[] =
" using (";
1171 static char __pyx_k_value[] =
" value ";
1172 static char __pyx_k_import[] =
"__import__";
1173 static char __pyx_k_scalar[] =
"scalar";
1174 static char __pyx_k_test_2[] =
"__test__";
1175 static char __pyx_k_xrange[] =
"xrange";
1176 static char __pyx_k_doctest[] =
"doctest";
1177 static char __pyx_k_invalid[] =
" invalid ";
1178 static char __pyx_k_numbers[] =
"numbers";
1179 static char __pyx_k_reverse[] =
"reverse";
1180 static char __pyx_k_testmod[] =
"testmod";
1181 static char __pyx_k_version[] =
"__version__";
1182 static char __pyx_k_Integral[] =
"Integral";
1183 static char __pyx_k_PyClical[] =
"PyClical";
1184 static char __pyx_k_Sequence[] =
"Sequence";
1185 static char __pyx_k_as_frame[] =
" as frame:\n\t";
1186 static char __pyx_k_involute[] =
"involute";
1187 static char __pyx_k_to_frame[] =
" to frame ";
1188 static char __pyx_k_TypeError[] =
"TypeError";
1189 static char __pyx_k_outer_pow[] =
"outer_pow";
1190 static char __pyx_k_IndexError[] =
"IndexError";
1191 static char __pyx_k_ValueError[] =
"ValueError";
1192 static char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
1193 static char __pyx_k_collections[] =
"collections";
1194 static char __pyx_k_e_line_1887[] =
"e (line 1887)";
1195 static char __pyx_k_RuntimeError[] =
"RuntimeError";
1196 static char __pyx_k_abs_line_1473[] =
"abs (line 1473)";
1197 static char __pyx_k_cos_line_1602[] =
"cos (line 1602)";
1198 static char __pyx_k_exp_line_1565[] =
"exp (line 1565)";
1199 static char __pyx_k_inv_line_1329[] =
"inv (line 1329)";
1200 static char __pyx_k_log_line_1579[] =
"log (line 1579)";
1201 static char __pyx_k_odd_line_1397[] =
"odd (line 1397)";
1202 static char __pyx_k_pow_line_1494[] =
"pow (line 1494)";
1203 static char __pyx_k_sin_line_1679[] =
"sin (line 1679)";
1204 static char __pyx_k_tan_line_1752[] =
"tan (line 1752)";
1205 static char __pyx_k_using_invalid[] =
" using invalid ";
1206 static char __pyx_k_Cannot_reframe[] =
"Cannot reframe";
1207 static char __pyx_k_NotImplemented[] =
"NotImplemented";
1208 static char __pyx_k_Not_applicable[] =
"Not applicable.";
1209 static char __pyx_k_acos_line_1619[] =
"acos (line 1619)";
1210 static char __pyx_k_agc3_line_1844[] =
"agc3 (line 1844)";
1211 static char __pyx_k_asin_line_1698[] =
"asin (line 1698)";
1212 static char __pyx_k_atan_line_1769[] =
"atan (line 1769)";
1213 static char __pyx_k_cga3_line_1824[] =
"cga3 (line 1824)";
1214 static char __pyx_k_conj_line_1436[] =
"conj (line 1436)";
1215 static char __pyx_k_cosh_line_1640[] =
"cosh (line 1640)";
1216 static char __pyx_k_even_line_1388[] =
"even (line 1388)";
1217 static char __pyx_k_imag_line_1366[] =
"imag (line 1366)";
1218 static char __pyx_k_invalid_string[] =
" invalid string ";
1219 static char __pyx_k_norm_line_1462[] =
"norm (line 1462)";
1220 static char __pyx_k_pure_line_1377[] =
"pure (line 1377)";
1221 static char __pyx_k_quad_line_1451[] =
"quad (line 1451)";
1222 static char __pyx_k_real_line_1355[] =
"real (line 1355)";
1223 static char __pyx_k_sinh_line_1719[] =
"sinh (line 1719)";
1224 static char __pyx_k_sqrt_line_1542[] =
"sqrt (line 1542)";
1225 static char __pyx_k_tanh_line_1786[] =
"tanh (line 1786)";
1226 static char __pyx_k_acosh_line_1656[] =
"acosh (line 1656)";
1227 static char __pyx_k_asinh_line_1733[] =
"asinh (line 1733)";
1228 static char __pyx_k_atanh_line_1798[] =
"atanh (line 1798)";
1229 static char __pyx_k_istpq_line_1900[] =
"istpq (line 1900)";
1230 static char __pyx_k_compare_line_490[] =
"compare (line 490)";
1231 static char __pyx_k_index_set___iter[] =
"index_set.__iter__";
1232 static char __pyx_k_max_pos_line_511[] =
"max_pos (line 511)";
1233 static char __pyx_k_min_neg_line_502[] =
"min_neg (line 502)";
1234 static char __pyx_k_scalar_line_1344[] =
"scalar (line 1344)";
1235 static char __pyx_k_cga3std_line_1833[] =
"cga3std (line 1833)";
1236 static char __pyx_k_max_abs_line_1482[] =
"max_abs (line 1482)";
1237 static char __pyx_k_reverse_line_1421[] =
"reverse (line 1421)";
1238 static char __pyx_k_involute_line_1406[] =
"involute (line 1406)";
1239 static char __pyx_k_outer_pow_line_1518[] =
"outer_pow (line 1518)";
1240 static char __pyx_k_clifford_inv_line_925[] =
"clifford.inv (line 925)";
1241 static char __pyx_k_clifford_pow_line_979[] =
"clifford.pow (line 979)";
1242 static char __pyx_k_clifford_abs_line_1174[] =
"clifford.abs (line 1174)";
1243 static char __pyx_k_clifford_copy_line_554[] =
"clifford.copy (line 554)";
1244 static char __pyx_k_clifford_odd_line_1069[] =
"clifford.odd (line 1069)";
1245 static char __pyx_k_complexifier_line_1527[] =
"complexifier (line 1527)";
1246 static char __pyx_k_index_set_copy_line_64[] =
"index_set.copy (line 64)";
1247 static char __pyx_k_index_set_max_line_349[] =
"index_set.max (line 349)";
1248 static char __pyx_k_index_set_min_line_340[] =
"index_set.min (line 340)";
1249 static char __pyx_k_clifford_conj_line_1137[] =
"clifford.conj (line 1137)";
1250 static char __pyx_k_clifford_even_line_1060[] =
"clifford.even (line 1060)";
1251 static char __pyx_k_clifford_norm_line_1163[] =
"clifford.norm (line 1163)";
1252 static char __pyx_k_clifford_pure_line_1049[] =
"clifford.pure (line 1049)";
1253 static char __pyx_k_clifford_quad_line_1152[] =
"clifford.quad (line 1152)";
1254 static char __pyx_k_Unary_print_clifford_1_1[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1255 static char __pyx_k_clifford___or___line_938[] =
"clifford.__or__ (line 938)";
1256 static char __pyx_k_clifford_frame_line_1214[] =
"clifford.frame (line 1214)";
1257 static char __pyx_k_clifford_hidden_doctests[] =
"clifford_hidden_doctests";
1258 static char __pyx_k_clifford_isnan_line_1205[] =
"clifford.isnan (line 1205)";
1259 static char __pyx_k_index_set_count_line_313[] =
"index_set.count (line 313)";
1260 static char __pyx_k_clifford___add___line_739[] =
"clifford.__add__ (line 739)";
1261 static char __pyx_k_clifford___and___line_835[] =
"clifford.__and__ (line 835)";
1262 static char __pyx_k_clifford___div___line_895[] =
"clifford.__div__ (line 895)";
1263 static char __pyx_k_clifford___ior___line_949[] =
"clifford.__ior__ (line 949)";
1264 static char __pyx_k_clifford___mod___line_805[] =
"clifford.__mod__ (line 805)";
1265 static char __pyx_k_clifford___mul___line_779[] =
"clifford.__mul__ (line 779)";
1266 static char __pyx_k_clifford___neg___line_721[] =
"clifford.__neg__ (line 721)";
1267 static char __pyx_k_clifford___pos___line_730[] =
"clifford.__pos__ (line 730)";
1268 static char __pyx_k_clifford___pow___line_960[] =
"clifford.__pow__ (line 960)";
1269 static char __pyx_k_clifford___sub___line_759[] =
"clifford.__sub__ (line 759)";
1270 static char __pyx_k_clifford___xor___line_865[] =
"clifford.__xor__ (line 865)";
1271 static char __pyx_k_clifford_reframe_line_648[] =
"clifford.reframe (line 648)";
1272 static char __pyx_k_clifford_scalar_line_1038[] =
"clifford.scalar (line 1038)";
1273 static char __pyx_k_index_set___or___line_291[] =
"index_set.__or__ (line 291)";
1274 static char __pyx_k_index_set_hidden_doctests[] =
"index_set_hidden_doctests";
1275 static char __pyx_k_random_clifford_line_1815[] =
"random_clifford (line 1815)";
1276 static char __pyx_k_Cannot_take_vector_part_of[] =
"Cannot take vector part of ";
1277 static char __pyx_k_Unary_print_clifford_1_1_2[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1278 static char __pyx_k_clifford___iadd___line_750[] =
"clifford.__iadd__ (line 750)";
1279 static char __pyx_k_clifford___iand___line_850[] =
"clifford.__iand__ (line 850)";
1280 static char __pyx_k_clifford___idiv___line_910[] =
"clifford.__idiv__ (line 910)";
1281 static char __pyx_k_clifford___imod___line_820[] =
"clifford.__imod__ (line 820)";
1282 static char __pyx_k_clifford___imul___line_792[] =
"clifford.__imul__ (line 792)";
1283 static char __pyx_k_clifford___isub___line_770[] =
"clifford.__isub__ (line 770)";
1284 static char __pyx_k_clifford___iter___line_637[] =
"clifford.__iter__ (line 637)";
1285 static char __pyx_k_clifford___ixor___line_880[] =
"clifford.__ixor__ (line 880)";
1286 static char __pyx_k_clifford___str___line_1234[] =
"clifford.__str__ (line 1234)";
1287 static char __pyx_k_clifford_max_abs_line_1183[] =
"clifford.max_abs (line 1183)";
1288 static char __pyx_k_clifford_reverse_line_1122[] =
"clifford.reverse (line 1122)";
1289 static char __pyx_k_index_set___and___line_269[] =
"index_set.__and__ (line 269)";
1290 static char __pyx_k_index_set___ior___line_302[] =
"index_set.__ior__ (line 302)";
1291 static char __pyx_k_index_set___str___line_393[] =
"index_set.__str__ (line 393)";
1292 static char __pyx_k_index_set___xor___line_247[] =
"index_set.__xor__ (line 247)";
1293 static char __pyx_k_clifford___call___line_1019[] =
"clifford.__call__ (line 1019)";
1294 static char __pyx_k_clifford___repr___line_1225[] =
"clifford.__repr__ (line 1225)";
1295 static char __pyx_k_clifford_involute_line_1106[] =
"clifford.involute (line 1106)";
1296 static char __pyx_k_index_set___iand___line_280[] =
"index_set.__iand__ (line 280)";
1297 static char __pyx_k_index_set___iter___line_227[] =
"index_set.__iter__ (line 227)";
1298 static char __pyx_k_index_set___ixor___line_258[] =
"index_set.__ixor__ (line 258)";
1299 static char __pyx_k_index_set___repr___line_382[] =
"index_set.__repr__ (line 382)";
1300 static char __pyx_k_clifford_outer_pow_line_1003[] =
"clifford.outer_pow (line 1003)";
1301 static char __pyx_k_clifford_truncated_line_1194[] =
"clifford.truncated (line 1194)";
1302 static char __pyx_k_index_set_count_neg_line_322[] =
"index_set.count_neg (line 322)";
1303 static char __pyx_k_index_set_count_pos_line_331[] =
"index_set.count_pos (line 331)";
1304 static char __pyx_k_clifford___getitem___line_706[] =
"clifford.__getitem__ (line 706)";
1305 static char __pyx_k_index_set___invert___line_238[] =
"index_set.__invert__ (line 238)";
1306 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 ";
1307 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 ";
1308 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 ";
1309 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 ";
1310 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 ";
1311 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 ";
1312 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 ";
1313 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 ";
1314 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 ";
1315 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 ";
1316 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 ";
1317 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 ";
1318 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 ";
1319 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 ";
1320 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 ";
1321 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 ";
1322 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 ";
1323 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 ";
1324 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 ";
1325 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 ";
1326 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 ";
1327 static char __pyx_k_clifford_vector_part_line_1078[] =
"clifford.vector_part (line 1078)";
1328 static char __pyx_k_index_set___getitem___line_189[] =
"index_set.__getitem__ (line 189)";
1329 static char __pyx_k_index_set___setitem___line_177[] =
"index_set.__setitem__ (line 177)";
1330 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 ";
1331 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 ";
1332 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 ";
1333 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 ";
1334 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 ";
1335 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 ";
1336 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 ";
1337 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 ";
1338 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 ";
1339 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 ";
1340 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 ";
1341 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 ";
1342 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 ";
1343 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 ";
1344 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 ";
1345 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 ";
1346 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 ";
1347 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 ";
1348 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 ";
1349 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 ";
1350 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 ";
1351 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 ";
1352 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 ";
1353 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 ";
1354 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 ";
1355 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 ";
1356 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 ";
1357 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 ";
1358 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 ";
1359 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 ";
1360 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 ";
1361 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 ";
1362 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 ";
1363 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 ";
1364 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 ";
1365 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 ";
1366 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 ";
1367 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 ";
1368 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 ";
1369 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 ";
1370 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 ";
1371 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 ";
1372 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 ";
1373 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 ";
1374 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 ";
1375 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 ";
1376 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 ";
1377 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 ";
1378 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 ";
1379 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 ";
1380 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 ";
1381 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 ";
1382 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 ";
1383 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 ";
1384 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 ";
1385 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 ";
1386 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 ";
1387 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 ";
1388 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 ";
1389 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 ";
1390 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 ";
1391 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 ";
1392 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 ";
1393 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 ";
1394 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 ";
1395 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 ";
1396 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 ";
1397 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 ";
1398 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 ";
1399 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 ";
1400 static char __pyx_k_This_comparison_operator_is_not[] =
"This comparison operator is not implemented for ";
1401 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 ";
1402 static char __pyx_k_home_abuild_rpmbuild_BUILD_gluc[] =
"/home/abuild/rpmbuild/BUILD/glucat-0.8.2/pyclical/PyClical.pyx";
1403 static char __pyx_k_index_set_sign_of_mult_line_364[] =
"index_set.sign_of_mult (line 364)";
1404 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 ";
1405 static char __pyx_k_Cannot_initialize_clifford_objec[] =
"Cannot initialize clifford object from";
1406 static char __pyx_k_Cannot_initialize_index_set_obje[] =
"Cannot initialize index_set object from";
1407 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 ";
1408 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 ";
1409 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 ";
1410 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 ";
1411 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 ";
1412 static char __pyx_k_clifford_hidden_doctests_line_12[] =
"clifford_hidden_doctests (line 1243)";
1413 static char __pyx_k_index_set_hidden_doctests_line_4[] =
"index_set_hidden_doctests (line 404)";
1414 static char __pyx_k_index_set_sign_of_square_line_37[] =
"index_set.sign_of_square (line 373)";
1415 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 ";
1416 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 ";
1417 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 ";
1418 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 ";
1419 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 ";
1420 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 ";
1421 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 ";
1422 static PyObject *__pyx_kp_s_;
1423 static PyObject *__pyx_kp_s_0_8_2;
1424 static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1425 static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1426 static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1427 static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1428 static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1429 static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1430 static PyObject *__pyx_kp_s_Cannot_reframe;
1431 static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1432 static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1433 static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1434 static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1435 static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1436 static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1437 static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1438 static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1439 static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1440 static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1441 static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1442 static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1443 static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1444 static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1445 static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1446 static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1447 static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1448 static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1449 static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1450 static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1451 static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1452 static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1453 static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1454 static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1455 static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1456 static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1457 static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1458 static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1459 static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1460 static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1461 static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1462 static PyObject *__pyx_n_s_IndexError;
1463 static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1464 static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1465 static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1466 static PyObject *__pyx_n_s_Integral;
1467 static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1468 static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1469 static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1470 static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1471 static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1472 static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1473 static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1474 static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1475 static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1476 static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1477 static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1478 static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1479 static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1480 static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1481 static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1482 static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1483 static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1484 static PyObject *__pyx_n_s_NotImplemented;
1485 static PyObject *__pyx_kp_s_Not_applicable;
1486 static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1487 static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1488 static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1489 static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1490 static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1491 static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1492 static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1493 static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1494 static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1495 static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1496 static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1497 static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1498 static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1499 static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1500 static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1501 static PyObject *__pyx_n_s_PyClical;
1502 static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1503 static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1504 static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1505 static PyObject *__pyx_n_s_Real;
1506 static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1507 static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1508 static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1509 static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1510 static PyObject *__pyx_n_s_RuntimeError;
1511 static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1512 static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1513 static PyObject *__pyx_n_s_Sequence;
1514 static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1515 static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1516 static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1517 static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1518 static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1519 static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1520 static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1521 static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1522 static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1523 static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1524 static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1525 static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1526 static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1527 static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1528 static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1529 static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1530 static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1531 static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1532 static PyObject *__pyx_kp_u_The_informal_string_representat;
1533 static PyObject *__pyx_kp_u_The_informal_string_representat_2;
1534 static PyObject *__pyx_kp_u_The_official_string_representat;
1535 static PyObject *__pyx_kp_u_The_official_string_representat_2;
1536 static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
1537 static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
1538 static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
1539 static PyObject *__pyx_n_s_TypeError;
1540 static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
1541 static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
1542 static PyObject *__pyx_n_s_ValueError;
1543 static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
1544 static PyObject *__pyx_kp_s__2;
1545 static PyObject *__pyx_kp_s__3;
1546 static PyObject *__pyx_kp_s__4;
1547 static PyObject *__pyx_kp_s__5;
1548 static PyObject *__pyx_kp_s__6;
1549 static PyObject *__pyx_kp_s__7;
1550 static PyObject *__pyx_kp_u_abs_line_1473;
1551 static PyObject *__pyx_n_s_acos;
1552 static PyObject *__pyx_kp_u_acos_line_1619;
1553 static PyObject *__pyx_n_s_acosh;
1554 static PyObject *__pyx_kp_u_acosh_line_1656;
1555 static PyObject *__pyx_kp_u_agc3_line_1844;
1556 static PyObject *__pyx_n_s_args;
1557 static PyObject *__pyx_kp_s_as_frame;
1558 static PyObject *__pyx_n_s_asin;
1559 static PyObject *__pyx_kp_u_asin_line_1698;
1560 static PyObject *__pyx_n_s_asinh;
1561 static PyObject *__pyx_kp_u_asinh_line_1733;
1562 static PyObject *__pyx_n_s_atan;
1563 static PyObject *__pyx_kp_u_atan_line_1769;
1564 static PyObject *__pyx_n_s_atanh;
1565 static PyObject *__pyx_kp_u_atanh_line_1798;
1566 static PyObject *__pyx_kp_u_cga3_line_1824;
1567 static PyObject *__pyx_kp_u_cga3std_line_1833;
1568 static PyObject *__pyx_n_s_cl;
1569 static PyObject *__pyx_kp_u_clifford___add___line_739;
1570 static PyObject *__pyx_kp_u_clifford___and___line_835;
1571 static PyObject *__pyx_kp_u_clifford___call___line_1019;
1572 static PyObject *__pyx_kp_u_clifford___div___line_895;
1573 static PyObject *__pyx_kp_u_clifford___getitem___line_706;
1574 static PyObject *__pyx_kp_u_clifford___iadd___line_750;
1575 static PyObject *__pyx_kp_u_clifford___iand___line_850;
1576 static PyObject *__pyx_kp_u_clifford___idiv___line_910;
1577 static PyObject *__pyx_kp_u_clifford___imod___line_820;
1578 static PyObject *__pyx_kp_u_clifford___imul___line_792;
1579 static PyObject *__pyx_kp_u_clifford___ior___line_949;
1580 static PyObject *__pyx_kp_u_clifford___isub___line_770;
1581 static PyObject *__pyx_kp_u_clifford___iter___line_637;
1582 static PyObject *__pyx_kp_u_clifford___ixor___line_880;
1583 static PyObject *__pyx_kp_u_clifford___mod___line_805;
1584 static PyObject *__pyx_kp_u_clifford___mul___line_779;
1585 static PyObject *__pyx_kp_u_clifford___neg___line_721;
1586 static PyObject *__pyx_kp_u_clifford___or___line_938;
1587 static PyObject *__pyx_kp_u_clifford___pos___line_730;
1588 static PyObject *__pyx_kp_u_clifford___pow___line_960;
1589 static PyObject *__pyx_kp_u_clifford___repr___line_1225;
1590 static PyObject *__pyx_kp_u_clifford___str___line_1234;
1591 static PyObject *__pyx_kp_u_clifford___sub___line_759;
1592 static PyObject *__pyx_kp_u_clifford___xor___line_865;
1593 static PyObject *__pyx_kp_u_clifford_abs_line_1174;
1594 static PyObject *__pyx_kp_u_clifford_conj_line_1137;
1595 static PyObject *__pyx_kp_u_clifford_copy_line_554;
1596 static PyObject *__pyx_kp_u_clifford_even_line_1060;
1597 static PyObject *__pyx_kp_u_clifford_frame_line_1214;
1598 static PyObject *__pyx_n_s_clifford_hidden_doctests;
1599 static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
1600 static PyObject *__pyx_kp_u_clifford_inv_line_925;
1601 static PyObject *__pyx_kp_u_clifford_involute_line_1106;
1602 static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
1603 static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
1604 static PyObject *__pyx_kp_u_clifford_norm_line_1163;
1605 static PyObject *__pyx_kp_u_clifford_odd_line_1069;
1606 static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
1607 static PyObject *__pyx_kp_u_clifford_pow_line_979;
1608 static PyObject *__pyx_kp_u_clifford_pure_line_1049;
1609 static PyObject *__pyx_kp_u_clifford_quad_line_1152;
1610 static PyObject *__pyx_kp_u_clifford_reframe_line_648;
1611 static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
1612 static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
1613 static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
1614 static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
1615 static PyObject *__pyx_n_s_close;
1616 static PyObject *__pyx_n_s_collections;
1617 static PyObject *__pyx_kp_u_compare_line_490;
1618 static PyObject *__pyx_kp_u_complexifier_line_1527;
1619 static PyObject *__pyx_n_s_conj;
1620 static PyObject *__pyx_kp_u_conj_line_1436;
1621 static PyObject *__pyx_n_s_copy;
1622 static PyObject *__pyx_n_s_cos;
1623 static PyObject *__pyx_kp_u_cos_line_1602;
1624 static PyObject *__pyx_n_s_cosh;
1625 static PyObject *__pyx_kp_u_cosh_line_1640;
1626 static PyObject *__pyx_n_s_doctest;
1627 static PyObject *__pyx_n_s_e;
1628 static PyObject *__pyx_kp_u_e_line_1887;
1629 static PyObject *__pyx_n_s_even;
1630 static PyObject *__pyx_kp_u_even_line_1388;
1631 static PyObject *__pyx_n_s_exp;
1632 static PyObject *__pyx_kp_u_exp_line_1565;
1633 static PyObject *__pyx_n_s_fill;
1634 static PyObject *__pyx_n_s_frm;
1635 static PyObject *__pyx_kp_s_from;
1636 static PyObject *__pyx_n_s_grade;
1637 static PyObject *__pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc;
1638 static PyObject *__pyx_n_s_i;
1639 static PyObject *__pyx_kp_u_imag_line_1366;
1640 static PyObject *__pyx_n_s_import;
1641 static PyObject *__pyx_kp_u_index_set___and___line_269;
1642 static PyObject *__pyx_kp_u_index_set___getitem___line_189;
1643 static PyObject *__pyx_kp_u_index_set___iand___line_280;
1644 static PyObject *__pyx_kp_u_index_set___invert___line_238;
1645 static PyObject *__pyx_kp_u_index_set___ior___line_302;
1646 static PyObject *__pyx_n_s_index_set___iter;
1647 static PyObject *__pyx_kp_u_index_set___iter___line_227;
1648 static PyObject *__pyx_kp_u_index_set___ixor___line_258;
1649 static PyObject *__pyx_kp_u_index_set___or___line_291;
1650 static PyObject *__pyx_kp_u_index_set___repr___line_382;
1651 static PyObject *__pyx_kp_u_index_set___setitem___line_177;
1652 static PyObject *__pyx_kp_u_index_set___str___line_393;
1653 static PyObject *__pyx_kp_u_index_set___xor___line_247;
1654 static PyObject *__pyx_kp_u_index_set_copy_line_64;
1655 static PyObject *__pyx_kp_u_index_set_count_line_313;
1656 static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
1657 static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
1658 static PyObject *__pyx_n_s_index_set_hidden_doctests;
1659 static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
1660 static PyObject *__pyx_kp_u_index_set_max_line_349;
1661 static PyObject *__pyx_kp_u_index_set_min_line_340;
1662 static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
1663 static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
1664 static PyObject *__pyx_n_s_inv;
1665 static PyObject *__pyx_kp_u_inv_line_1329;
1666 static PyObject *__pyx_kp_s_invalid;
1667 static PyObject *__pyx_kp_s_invalid_string;
1668 static PyObject *__pyx_n_s_involute;
1669 static PyObject *__pyx_kp_u_involute_line_1406;
1670 static PyObject *__pyx_n_s_ist;
1671 static PyObject *__pyx_n_s_istpq;
1672 static PyObject *__pyx_kp_u_istpq_line_1900;
1673 static PyObject *__pyx_n_s_iter;
1674 static PyObject *__pyx_n_s_ixt;
1675 static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
1676 static PyObject *__pyx_n_s_lhs;
1677 static PyObject *__pyx_n_s_log;
1678 static PyObject *__pyx_kp_u_log_line_1579;
1679 static PyObject *__pyx_n_s_m;
1680 static PyObject *__pyx_n_s_main;
1681 static PyObject *__pyx_n_s_math;
1682 static PyObject *__pyx_n_s_max;
1683 static PyObject *__pyx_kp_u_max_abs_line_1482;
1684 static PyObject *__pyx_kp_u_max_pos_line_511;
1685 static PyObject *__pyx_n_s_min;
1686 static PyObject *__pyx_kp_u_min_neg_line_502;
1687 static PyObject *__pyx_n_s_name;
1688 static PyObject *__pyx_n_s_nbar3;
1689 static PyObject *__pyx_n_s_ninf3;
1690 static PyObject *__pyx_n_s_norm;
1691 static PyObject *__pyx_kp_u_norm_line_1462;
1692 static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
1693 static PyObject *__pyx_n_s_numbers;
1694 static PyObject *__pyx_n_s_obj;
1695 static PyObject *__pyx_n_s_odd;
1696 static PyObject *__pyx_kp_u_odd_line_1397;
1697 static PyObject *__pyx_n_s_other;
1698 static PyObject *__pyx_n_s_outer_pow;
1699 static PyObject *__pyx_kp_u_outer_pow_line_1518;
1700 static PyObject *__pyx_n_s_p;
1701 static PyObject *__pyx_n_s_pi;
1702 static PyObject *__pyx_n_s_pow;
1703 static PyObject *__pyx_kp_u_pow_line_1494;
1704 static PyObject *__pyx_n_s_pure;
1705 static PyObject *__pyx_kp_u_pure_line_1377;
1706 static PyObject *__pyx_n_s_pyx_vtable;
1707 static PyObject *__pyx_n_s_q;
1708 static PyObject *__pyx_n_s_quad;
1709 static PyObject *__pyx_kp_u_quad_line_1451;
1710 static PyObject *__pyx_kp_u_random_clifford_line_1815;
1711 static PyObject *__pyx_n_s_range;
1712 static PyObject *__pyx_kp_u_real_line_1355;
1713 static PyObject *__pyx_n_s_reverse;
1714 static PyObject *__pyx_kp_u_reverse_line_1421;
1715 static PyObject *__pyx_n_s_rhs;
1716 static PyObject *__pyx_n_s_scalar;
1717 static PyObject *__pyx_kp_u_scalar_line_1344;
1718 static PyObject *__pyx_n_s_send;
1719 static PyObject *__pyx_n_s_sin;
1720 static PyObject *__pyx_kp_u_sin_line_1679;
1721 static PyObject *__pyx_n_s_sinh;
1722 static PyObject *__pyx_kp_u_sinh_line_1719;
1723 static PyObject *__pyx_n_s_sqrt;
1724 static PyObject *__pyx_kp_u_sqrt_line_1542;
1725 static PyObject *__pyx_n_s_tan;
1726 static PyObject *__pyx_kp_u_tan_line_1752;
1727 static PyObject *__pyx_n_s_tanh;
1728 static PyObject *__pyx_kp_u_tanh_line_1786;
1729 static PyObject *__pyx_n_s_tau;
1730 static PyObject *__pyx_n_s_test;
1731 static PyObject *__pyx_n_s_test_2;
1732 static PyObject *__pyx_n_s_testmod;
1733 static PyObject *__pyx_n_s_throw;
1734 static PyObject *__pyx_kp_s_to_frame;
1735 static PyObject *__pyx_kp_s_using;
1736 static PyObject *__pyx_kp_s_using_invalid;
1737 static PyObject *__pyx_kp_s_value;
1738 static PyObject *__pyx_n_s_version;
1739 static PyObject *__pyx_n_s_xrange;
1740 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1741 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other);
1742 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1743 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1744 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);
1745 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
1746 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
1747 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1748 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1749 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1750 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1751 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1752 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1753 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1754 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1755 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1756 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1757 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1758 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1759 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1760 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1761 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1762 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1763 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1764 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1765 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1766 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1767 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1768 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1769 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1770 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt);
1771 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1772 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x);
1773 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1774 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1775 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1776 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1777 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1778 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1779 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1780 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1781 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1782 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1783 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1784 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1785 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1786 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1787 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1788 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1789 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1790 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1791 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 1792 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1794 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 1795 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1797 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1798 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1799 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1800 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy);
1801 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1802 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1803 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade);
1804 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1805 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1806 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1807 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1808 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm);
1809 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1810 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1811 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1812 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1813 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1814 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1815 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1816 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit);
1817 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1818 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1819 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1820 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1821 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1822 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1823 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1824 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1825 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1826 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1827 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1828 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1829 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1830 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1831 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1832 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1833 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1834 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1835 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1836 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1837 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1838 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1839 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1840 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1841 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1842 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1843 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1844 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1845 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1846 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1847 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1848 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1849 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1850 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1851 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1852 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1853 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1854 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);
1855 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1856 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1857 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1858 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1859 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q);
1860 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self);
1861 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k);
1862 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k);
1863 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k);
1864 static PyObject *__pyx_float_0_0;
1865 static PyObject *__pyx_float_1_0;
1866 static PyObject *__pyx_float_2_0;
1867 static PyObject *__pyx_float_8_0;
1868 static PyObject *__pyx_int_0;
1869 static PyObject *__pyx_int_1;
1870 static PyObject *__pyx_int_4;
1871 static PyObject *__pyx_int_neg_1;
1872 static PyObject *__pyx_tuple__8;
1873 static PyObject *__pyx_tuple__9;
1874 static PyObject *__pyx_tuple__12;
1875 static PyObject *__pyx_tuple__13;
1876 static PyObject *__pyx_tuple__15;
1877 static PyObject *__pyx_tuple__17;
1878 static PyObject *__pyx_tuple__18;
1879 static PyObject *__pyx_tuple__19;
1880 static PyObject *__pyx_tuple__20;
1881 static PyObject *__pyx_tuple__21;
1882 static PyObject *__pyx_codeobj__10;
1883 static PyObject *__pyx_codeobj__11;
1884 static PyObject *__pyx_codeobj__14;
1885 static PyObject *__pyx_codeobj__16;
1886 static PyObject *__pyx_codeobj__22;
1896 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
1898 __Pyx_RefNannyDeclarations
1899 PyObject *__pyx_t_1 = NULL;
1900 PyObject *__pyx_t_2 = NULL;
1901 int __pyx_lineno = 0;
1902 const char *__pyx_filename = NULL;
1903 int __pyx_clineno = 0;
1904 __Pyx_RefNannySetupContext(
"toIndexSet", 0);
1913 __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;}
1914 __Pyx_GOTREF(__pyx_t_1);
1915 __Pyx_INCREF(__pyx_v_obj);
1916 __Pyx_GIVEREF(__pyx_v_obj);
1917 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
1918 __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;}
1919 __Pyx_GOTREF(__pyx_t_2);
1920 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1921 __pyx_r = (((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
1922 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1935 __Pyx_XDECREF(__pyx_t_1);
1936 __Pyx_XDECREF(__pyx_t_2);
1937 __Pyx_WriteUnraisable(
"PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
1939 __Pyx_RefNannyFinishContext();
1951 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other) {
1952 PyObject *__pyx_r = NULL;
1953 __Pyx_RefNannyDeclarations
1954 __Pyx_RefNannySetupContext(
"wrap", 0);
1963 (__pyx_v_self->instance[0]) = __pyx_v_other;
1972 __Pyx_XDECREF(__pyx_r);
1973 __Pyx_INCREF(((PyObject *)__pyx_v_self));
1974 __pyx_r = ((PyObject *)__pyx_v_self);
1987 __Pyx_XGIVEREF(__pyx_r);
1988 __Pyx_RefNannyFinishContext();
2000 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2002 __Pyx_RefNannyDeclarations
2003 __Pyx_RefNannySetupContext(
"unwrap", 0);
2012 __pyx_r = (__pyx_v_self->instance[0]);
2025 __Pyx_RefNannyFinishContext();
2037 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
2038 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch) {
2039 PyObject *__pyx_r = NULL;
2040 __Pyx_RefNannyDeclarations
2041 PyObject *__pyx_t_1 = NULL;
2042 PyObject *__pyx_t_2 = NULL;
2043 PyObject *__pyx_t_3 = NULL;
2044 PyObject *__pyx_t_4 = NULL;
2045 int __pyx_lineno = 0;
2046 const char *__pyx_filename = NULL;
2047 int __pyx_clineno = 0;
2048 __Pyx_RefNannySetupContext(
"copy", 0);
2050 if (unlikely(__pyx_skip_dispatch)) ;
2052 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2053 __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;}
2054 __Pyx_GOTREF(__pyx_t_1);
2055 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2056 __Pyx_XDECREF(__pyx_r);
2057 __Pyx_INCREF(__pyx_t_1);
2058 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2059 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
2060 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2061 if (likely(__pyx_t_4)) {
2062 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
2063 __Pyx_INCREF(__pyx_t_4);
2064 __Pyx_INCREF(
function);
2065 __Pyx_DECREF_SET(__pyx_t_3,
function);
2069 __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;}
2070 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2072 __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;}
2074 __Pyx_GOTREF(__pyx_t_2);
2075 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2076 __pyx_r = __pyx_t_2;
2078 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2081 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2091 __Pyx_XDECREF(__pyx_r);
2092 __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;}
2093 __Pyx_GOTREF(__pyx_t_1);
2094 __Pyx_INCREF(((PyObject *)__pyx_v_self));
2095 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
2096 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
2097 __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;}
2098 __Pyx_GOTREF(__pyx_t_2);
2099 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2100 __pyx_r = __pyx_t_2;
2114 __Pyx_XDECREF(__pyx_t_1);
2115 __Pyx_XDECREF(__pyx_t_2);
2116 __Pyx_XDECREF(__pyx_t_3);
2117 __Pyx_XDECREF(__pyx_t_4);
2118 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2121 __Pyx_XGIVEREF(__pyx_r);
2122 __Pyx_RefNannyFinishContext();
2127 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
2128 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 ";
2129 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2130 PyObject *__pyx_r = 0;
2131 __Pyx_RefNannyDeclarations
2132 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
2133 __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2136 __Pyx_RefNannyFinishContext();
2140 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2141 PyObject *__pyx_r = NULL;
2142 __Pyx_RefNannyDeclarations
2143 PyObject *__pyx_t_1 = NULL;
2144 int __pyx_lineno = 0;
2145 const char *__pyx_filename = NULL;
2146 int __pyx_clineno = 0;
2147 __Pyx_RefNannySetupContext(
"copy", 0);
2148 __Pyx_XDECREF(__pyx_r);
2149 __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;}
2150 __Pyx_GOTREF(__pyx_t_1);
2151 __pyx_r = __pyx_t_1;
2157 __Pyx_XDECREF(__pyx_t_1);
2158 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2161 __Pyx_XGIVEREF(__pyx_r);
2162 __Pyx_RefNannyFinishContext();
2175 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2176 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2177 PyObject *__pyx_v_other = 0;
2178 int __pyx_lineno = 0;
2179 const char *__pyx_filename = NULL;
2180 int __pyx_clineno = 0;
2182 __Pyx_RefNannyDeclarations
2183 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
2185 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2186 PyObject* values[1] = {0};
2187 values[0] = ((PyObject *)__pyx_int_0);
2188 if (unlikely(__pyx_kwds)) {
2190 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2192 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2194 default:
goto __pyx_L5_argtuple_error;
2196 kw_args = PyDict_Size(__pyx_kwds);
2200 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2201 if (value) { values[0] = value; kw_args--; }
2204 if (unlikely(kw_args > 0)) {
2205 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;}
2208 switch (PyTuple_GET_SIZE(__pyx_args)) {
2209 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2211 default:
goto __pyx_L5_argtuple_error;
2214 __pyx_v_other = values[0];
2216 goto __pyx_L4_argument_unpacking_done;
2217 __pyx_L5_argtuple_error:;
2218 __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;}
2220 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2221 __Pyx_RefNannyFinishContext();
2223 __pyx_L4_argument_unpacking_done:;
2224 __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2227 __Pyx_RefNannyFinishContext();
2231 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2232 PyObject *__pyx_v_error_msg_prefix = NULL;
2233 PyObject *__pyx_v_idx = NULL;
2235 __Pyx_RefNannyDeclarations
2239 PyObject *__pyx_t_4 = NULL;
2240 PyObject *__pyx_t_5 = NULL;
2243 PyObject *__pyx_t_8 = NULL;
2244 PyObject *__pyx_t_9 = NULL;
2245 PyObject *__pyx_t_10 = NULL;
2246 Py_ssize_t __pyx_t_11;
2247 PyObject *(*__pyx_t_12)(PyObject *);
2248 PyObject *__pyx_t_13 = NULL;
2249 PyObject *__pyx_t_14 = NULL;
2250 PyObject *__pyx_t_15 = NULL;
2251 PyObject *__pyx_t_16 = NULL;
2253 int __pyx_lineno = 0;
2254 const char *__pyx_filename = NULL;
2255 int __pyx_clineno = 0;
2256 __Pyx_RefNannySetupContext(
"__cinit__", 0);
2265 __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2266 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2275 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2276 __pyx_t_2 = (__pyx_t_1 != 0);
2287 __pyx_t_3 =
new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2289 __Pyx_CppExn2PyErr();
2290 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2292 __pyx_v_self->instance = __pyx_t_3;
2311 __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;}
2312 __Pyx_GOTREF(__pyx_t_4);
2313 __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;}
2314 __Pyx_GOTREF(__pyx_t_5);
2315 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2316 __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;}
2317 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2318 __pyx_t_1 = (__pyx_t_2 != 0);
2328 __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;}
2330 __pyx_t_3 =
new IndexSet(((
int)__pyx_t_6));
2332 __Pyx_CppExn2PyErr();
2333 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2335 __pyx_v_self->instance = __pyx_t_3;
2354 __pyx_t_2 = PySet_Check(__pyx_v_other);
2355 __pyx_t_7 = (__pyx_t_2 != 0);
2358 __pyx_t_1 = __pyx_t_7;
2359 goto __pyx_L4_bool_binop_done;
2361 __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2362 __pyx_t_2 = (__pyx_t_7 != 0);
2363 __pyx_t_1 = __pyx_t_2;
2364 __pyx_L4_bool_binop_done:;
2365 __pyx_t_2 = (__pyx_t_1 != 0);
2376 __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2377 __Pyx_XGOTREF(__pyx_t_8);
2378 __Pyx_XGOTREF(__pyx_t_9);
2379 __Pyx_XGOTREF(__pyx_t_10);
2389 __pyx_v_self->instance =
new IndexSet();
2398 if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2399 __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2402 __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;}
2403 __Pyx_GOTREF(__pyx_t_5);
2404 __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;}
2407 if (likely(!__pyx_t_12)) {
2408 if (likely(PyList_CheckExact(__pyx_t_5))) {
2409 if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5))
break;
2410 #if CYTHON_COMPILING_IN_CPYTHON 2411 __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;}
2413 __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;}
2414 __Pyx_GOTREF(__pyx_t_4);
2417 if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5))
break;
2418 #if CYTHON_COMPILING_IN_CPYTHON 2419 __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;}
2421 __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;}
2422 __Pyx_GOTREF(__pyx_t_4);
2426 __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2427 if (unlikely(!__pyx_t_4)) {
2428 PyObject* exc_type = PyErr_Occurred();
2430 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2431 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2435 __Pyx_GOTREF(__pyx_t_4);
2437 __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2447 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;}
2457 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2467 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2468 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2469 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2470 goto __pyx_L13_try_end;
2472 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2473 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2482 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2484 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2485 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;}
2486 __Pyx_GOTREF(__pyx_t_5);
2487 __Pyx_GOTREF(__pyx_t_4);
2488 __Pyx_GOTREF(__pyx_t_13);
2497 __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;}
2498 __Pyx_GOTREF(__pyx_t_14);
2499 __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;}
2500 __Pyx_GOTREF(__pyx_t_15);
2501 __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;}
2502 __Pyx_GOTREF(__pyx_t_16);
2503 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2504 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2505 __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;}
2506 __Pyx_GOTREF(__pyx_t_15);
2507 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2508 __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;}
2509 __Pyx_GOTREF(__pyx_t_16);
2510 __Pyx_GIVEREF(__pyx_t_15);
2511 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2513 __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;}
2514 __Pyx_GOTREF(__pyx_t_15);
2515 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2516 __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2517 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2518 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2528 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
2530 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2531 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;}
2532 __Pyx_GOTREF(__pyx_t_13);
2533 __Pyx_GOTREF(__pyx_t_4);
2534 __Pyx_GOTREF(__pyx_t_5);
2543 __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;}
2544 __Pyx_GOTREF(__pyx_t_15);
2545 __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;}
2546 __Pyx_GOTREF(__pyx_t_16);
2547 __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;}
2548 __Pyx_GOTREF(__pyx_t_14);
2549 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2550 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2551 __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;}
2552 __Pyx_GOTREF(__pyx_t_16);
2553 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2554 __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;}
2555 __Pyx_GOTREF(__pyx_t_14);
2556 __Pyx_GIVEREF(__pyx_t_16);
2557 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
2559 __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;}
2560 __Pyx_GOTREF(__pyx_t_16);
2561 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2562 __Pyx_Raise(__pyx_t_16, 0, 0, 0);
2563 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2564 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2566 goto __pyx_L8_except_error;
2567 __pyx_L8_except_error:;
2576 __Pyx_XGIVEREF(__pyx_t_8);
2577 __Pyx_XGIVEREF(__pyx_t_9);
2578 __Pyx_XGIVEREF(__pyx_t_10);
2579 __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
2580 goto __pyx_L1_error;
2601 __pyx_t_2 = PyString_Check(__pyx_v_other);
2602 __pyx_t_1 = (__pyx_t_2 != 0);
2613 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
2614 __Pyx_XGOTREF(__pyx_t_10);
2615 __Pyx_XGOTREF(__pyx_t_9);
2616 __Pyx_XGOTREF(__pyx_t_8);
2626 __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;}
2628 __pyx_t_3 =
new IndexSet(((
char *)__pyx_t_17));
2630 __Pyx_CppExn2PyErr();
2631 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__;
goto __pyx_L20_error;}
2633 __pyx_v_self->instance = __pyx_t_3;
2643 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2644 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2645 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2646 goto __pyx_L27_try_end;
2648 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
2649 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
2650 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
2651 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
2652 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2653 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2662 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
2664 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2665 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;}
2666 __Pyx_GOTREF(__pyx_t_5);
2667 __Pyx_GOTREF(__pyx_t_4);
2668 __Pyx_GOTREF(__pyx_t_13);
2677 __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;}
2678 __Pyx_GOTREF(__pyx_t_16);
2679 __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;}
2680 __Pyx_GOTREF(__pyx_t_14);
2681 __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;}
2682 __Pyx_GOTREF(__pyx_t_15);
2683 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2684 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2685 __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;}
2686 __Pyx_GOTREF(__pyx_t_14);
2687 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2688 __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;}
2689 __Pyx_GOTREF(__pyx_t_15);
2690 __Pyx_GIVEREF(__pyx_t_14);
2691 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
2693 __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;}
2694 __Pyx_GOTREF(__pyx_t_14);
2695 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2696 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
2697 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2698 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2700 goto __pyx_L22_except_error;
2701 __pyx_L22_except_error:;
2710 __Pyx_XGIVEREF(__pyx_t_10);
2711 __Pyx_XGIVEREF(__pyx_t_9);
2712 __Pyx_XGIVEREF(__pyx_t_8);
2713 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
2714 goto __pyx_L1_error;
2736 __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;}
2737 __Pyx_GOTREF(__pyx_t_13);
2738 __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;}
2739 __Pyx_GOTREF(__pyx_t_4);
2740 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2741 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2742 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
2743 __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;}
2744 __Pyx_GOTREF(__pyx_t_5);
2745 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2746 __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;}
2747 __Pyx_GOTREF(__pyx_t_4);
2748 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2749 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2750 __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;}
2751 __Pyx_GOTREF(__pyx_t_5);
2752 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2753 __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;}
2754 __Pyx_GOTREF(__pyx_t_4);
2755 __Pyx_GIVEREF(__pyx_t_5);
2756 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
2758 __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;}
2759 __Pyx_GOTREF(__pyx_t_5);
2760 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2761 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
2762 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2763 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2779 __Pyx_XDECREF(__pyx_t_4);
2780 __Pyx_XDECREF(__pyx_t_5);
2781 __Pyx_XDECREF(__pyx_t_13);
2782 __Pyx_XDECREF(__pyx_t_14);
2783 __Pyx_XDECREF(__pyx_t_15);
2784 __Pyx_XDECREF(__pyx_t_16);
2785 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2788 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
2789 __Pyx_XDECREF(__pyx_v_idx);
2790 __Pyx_RefNannyFinishContext();
2803 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self);
2804 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
2805 __Pyx_RefNannyDeclarations
2806 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
2807 __pyx_pf_8PyClical_9index_set_4__dealloc__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2810 __Pyx_RefNannyFinishContext();
2813 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2814 __Pyx_RefNannyDeclarations
2815 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
2824 delete __pyx_v_self->instance;
2835 __Pyx_RefNannyFinishContext();
2847 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
2848 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2849 PyObject *__pyx_r = 0;
2850 __Pyx_RefNannyDeclarations
2851 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
2852 __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
2855 __Pyx_RefNannyFinishContext();
2859 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2860 PyObject *__pyx_v_eq = NULL;
2861 PyObject *__pyx_v_lt = NULL;
2862 PyObject *__pyx_r = NULL;
2863 __Pyx_RefNannyDeclarations
2867 PyObject *__pyx_t_4 = NULL;
2868 int __pyx_lineno = 0;
2869 const char *__pyx_filename = NULL;
2870 int __pyx_clineno = 0;
2871 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
2880 __pyx_t_2 = (__pyx_v_lhs == Py_None);
2881 __pyx_t_3 = (__pyx_t_2 != 0);
2884 __pyx_t_1 = __pyx_t_3;
2885 goto __pyx_L4_bool_binop_done;
2887 __pyx_t_3 = (__pyx_v_rhs == Py_None);
2888 __pyx_t_2 = (__pyx_t_3 != 0);
2889 __pyx_t_1 = __pyx_t_2;
2890 __pyx_L4_bool_binop_done:;
2900 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
2901 __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;}
2902 __Pyx_GOTREF(__pyx_t_4);
2903 __pyx_v_eq = __pyx_t_4;
2913 switch (__pyx_v_op) {
2923 __Pyx_XDECREF(__pyx_r);
2924 __Pyx_INCREF(__pyx_v_eq);
2925 __pyx_r = __pyx_v_eq;
2953 __Pyx_XDECREF(__pyx_r);
2954 __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;}
2955 __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;}
2956 __Pyx_GOTREF(__pyx_t_4);
2957 __pyx_r = __pyx_t_4;
2978 __pyx_t_1 = ((__pyx_v_op == 0) != 0);
2988 __Pyx_XDECREF(__pyx_r);
2989 __Pyx_INCREF(Py_False);
3009 __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3019 __Pyx_XDECREF(__pyx_r);
3020 __Pyx_INCREF(__pyx_v_eq);
3021 __pyx_r = __pyx_v_eq;
3040 __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3050 __Pyx_XDECREF(__pyx_r);
3051 __Pyx_INCREF(Py_False);
3071 __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3081 __Pyx_XDECREF(__pyx_r);
3082 __Pyx_INCREF(__pyx_v_eq);
3083 __pyx_r = __pyx_v_eq;
3103 __Pyx_XDECREF(__pyx_r);
3104 __Pyx_INCREF(__pyx_builtin_NotImplemented);
3105 __pyx_r = __pyx_builtin_NotImplemented;
3128 __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3129 __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;}
3130 __Pyx_GOTREF(__pyx_t_4);
3131 __pyx_v_eq = __pyx_t_4;
3141 switch (__pyx_v_op) {
3151 __Pyx_XDECREF(__pyx_r);
3152 __Pyx_INCREF(__pyx_v_eq);
3153 __pyx_r = __pyx_v_eq;
3181 __Pyx_XDECREF(__pyx_r);
3182 __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;}
3183 __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;}
3184 __Pyx_GOTREF(__pyx_t_4);
3185 __pyx_r = __pyx_t_4;
3206 __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3207 __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;}
3208 __Pyx_GOTREF(__pyx_t_4);
3209 __pyx_v_lt = __pyx_t_4;
3219 __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3229 __Pyx_XDECREF(__pyx_r);
3230 __Pyx_INCREF(__pyx_v_lt);
3231 __pyx_r = __pyx_v_lt;
3250 __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3260 __Pyx_XDECREF(__pyx_r);
3261 __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;}
3264 __Pyx_INCREF(__pyx_v_lt);
3265 __pyx_t_4 = __pyx_v_lt;
3266 goto __pyx_L8_bool_binop_done;
3268 __Pyx_INCREF(__pyx_v_eq);
3269 __pyx_t_4 = __pyx_v_eq;
3270 __pyx_L8_bool_binop_done:;
3271 __pyx_r = __pyx_t_4;
3291 __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3301 __Pyx_XDECREF(__pyx_r);
3302 __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;}
3305 __pyx_t_1 = __pyx_t_2;
3306 goto __pyx_L10_bool_binop_done;
3308 __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;}
3309 __pyx_t_1 = __pyx_t_2;
3310 __pyx_L10_bool_binop_done:;
3311 __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;}
3312 __Pyx_GOTREF(__pyx_t_4);
3313 __pyx_r = __pyx_t_4;
3333 __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3343 __Pyx_XDECREF(__pyx_r);
3344 __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;}
3345 __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;}
3346 __Pyx_GOTREF(__pyx_t_4);
3347 __pyx_r = __pyx_t_4;
3368 __Pyx_XDECREF(__pyx_r);
3369 __Pyx_INCREF(__pyx_builtin_NotImplemented);
3370 __pyx_r = __pyx_builtin_NotImplemented;
3387 __Pyx_XDECREF(__pyx_t_4);
3388 __Pyx_AddTraceback(
"PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3391 __Pyx_XDECREF(__pyx_v_eq);
3392 __Pyx_XDECREF(__pyx_v_lt);
3393 __Pyx_XGIVEREF(__pyx_r);
3394 __Pyx_RefNannyFinishContext();
3407 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val);
3408 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 ";
3409 #if CYTHON_COMPILING_IN_CPYTHON 3410 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3412 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3414 __Pyx_RefNannyDeclarations
3415 __Pyx_RefNannySetupContext(
"__setitem__ (wrapper)", 0);
3416 __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));
3419 __Pyx_RefNannyFinishContext();
3423 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) {
3425 __Pyx_RefNannyDeclarations
3428 int __pyx_lineno = 0;
3429 const char *__pyx_filename = NULL;
3430 int __pyx_clineno = 0;
3431 __Pyx_RefNannySetupContext(
"__setitem__", 0);
3440 __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;}
3441 __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;}
3443 __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3445 __Pyx_CppExn2PyErr();
3446 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3469 __Pyx_AddTraceback(
"PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3472 __Pyx_RefNannyFinishContext();
3485 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3486 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 ";
3487 #if CYTHON_COMPILING_IN_CPYTHON 3488 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3490 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3491 PyObject *__pyx_r = 0;
3492 __Pyx_RefNannyDeclarations
3493 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
3494 __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3497 __Pyx_RefNannyFinishContext();
3501 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3502 PyObject *__pyx_r = NULL;
3503 __Pyx_RefNannyDeclarations
3505 PyObject *__pyx_t_2 = NULL;
3506 int __pyx_lineno = 0;
3507 const char *__pyx_filename = NULL;
3508 int __pyx_clineno = 0;
3509 __Pyx_RefNannySetupContext(
"__getitem__", 0);
3518 __Pyx_XDECREF(__pyx_r);
3519 __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;}
3520 __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;}
3521 __Pyx_GOTREF(__pyx_t_2);
3522 __pyx_r = __pyx_t_2;
3536 __Pyx_XDECREF(__pyx_t_2);
3537 __Pyx_AddTraceback(
"PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3540 __Pyx_XGIVEREF(__pyx_r);
3541 __Pyx_RefNannyFinishContext();
3554 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3555 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 ";
3556 #if CYTHON_COMPILING_IN_CPYTHON 3557 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
3559 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3561 __Pyx_RefNannyDeclarations
3562 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
3563 __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3566 __Pyx_RefNannyFinishContext();
3570 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3572 __Pyx_RefNannyDeclarations
3574 int __pyx_lineno = 0;
3575 const char *__pyx_filename = NULL;
3576 int __pyx_clineno = 0;
3577 __Pyx_RefNannySetupContext(
"__contains__", 0);
3586 __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;}
3587 __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
3600 __Pyx_AddTraceback(
"PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3603 __Pyx_RefNannyFinishContext();
3606 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value);
3617 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self);
3618 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 ";
3619 #if CYTHON_COMPILING_IN_CPYTHON 3620 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
3622 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
3623 PyObject *__pyx_r = 0;
3624 __Pyx_RefNannyDeclarations
3625 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
3626 __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3629 __Pyx_RefNannyFinishContext();
3633 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3634 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
3635 PyObject *__pyx_r = NULL;
3636 __Pyx_RefNannyDeclarations
3637 int __pyx_lineno = 0;
3638 const char *__pyx_filename = NULL;
3639 int __pyx_clineno = 0;
3640 __Pyx_RefNannySetupContext(
"__iter__", 0);
3641 __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);
3642 if (unlikely(!__pyx_cur_scope)) {
3643 __Pyx_RefNannyFinishContext();
3646 __Pyx_GOTREF(__pyx_cur_scope);
3647 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
3648 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3649 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3651 __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;}
3652 __Pyx_DECREF(__pyx_cur_scope);
3653 __Pyx_RefNannyFinishContext();
3654 return (PyObject *) gen;
3659 __Pyx_AddTraceback(
"PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3661 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
3662 __Pyx_XGIVEREF(__pyx_r);
3663 __Pyx_RefNannyFinishContext();
3667 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value)
3669 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
3670 PyObject *__pyx_r = NULL;
3671 PyObject *__pyx_t_1 = NULL;
3672 PyObject *__pyx_t_2 = NULL;
3673 PyObject *__pyx_t_3 = NULL;
3674 PyObject *__pyx_t_4 = NULL;
3675 Py_ssize_t __pyx_t_5;
3676 PyObject *(*__pyx_t_6)(PyObject *);
3679 int __pyx_lineno = 0;
3680 const char *__pyx_filename = NULL;
3681 int __pyx_clineno = 0;
3682 __Pyx_RefNannyDeclarations
3683 __Pyx_RefNannySetupContext(
"None", 0);
3684 switch (__pyx_generator->resume_label) {
3685 case 0:
goto __pyx_L3_first_run;
3686 case 1:
goto __pyx_L7_resume_from_yield;
3688 __Pyx_RefNannyFinishContext();
3691 __pyx_L3_first_run:;
3692 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3701 __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;}
3702 __Pyx_GOTREF(__pyx_t_2);
3704 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
3705 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3706 if (likely(__pyx_t_3)) {
3707 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3708 __Pyx_INCREF(__pyx_t_3);
3709 __Pyx_INCREF(
function);
3710 __Pyx_DECREF_SET(__pyx_t_2,
function);
3714 __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;}
3715 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3717 __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;}
3719 __Pyx_GOTREF(__pyx_t_1);
3720 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3721 __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;}
3722 __Pyx_GOTREF(__pyx_t_3);
3724 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
3725 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3726 if (likely(__pyx_t_4)) {
3727 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3728 __Pyx_INCREF(__pyx_t_4);
3729 __Pyx_INCREF(
function);
3730 __Pyx_DECREF_SET(__pyx_t_3,
function);
3734 __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;}
3735 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3737 __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;}
3739 __Pyx_GOTREF(__pyx_t_2);
3740 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3741 __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;}
3742 __Pyx_GOTREF(__pyx_t_3);
3743 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3744 __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;}
3745 __Pyx_GOTREF(__pyx_t_2);
3746 __Pyx_GIVEREF(__pyx_t_1);
3747 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
3748 __Pyx_GIVEREF(__pyx_t_3);
3749 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
3752 __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;}
3753 __Pyx_GOTREF(__pyx_t_3);
3754 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3755 if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
3756 __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
3759 __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;}
3760 __Pyx_GOTREF(__pyx_t_2);
3761 __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;}
3763 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3765 if (likely(!__pyx_t_6)) {
3766 if (likely(PyList_CheckExact(__pyx_t_2))) {
3767 if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2))
break;
3768 #if CYTHON_COMPILING_IN_CPYTHON 3769 __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;}
3771 __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;}
3772 __Pyx_GOTREF(__pyx_t_3);
3775 if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2))
break;
3776 #if CYTHON_COMPILING_IN_CPYTHON 3777 __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;}
3779 __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;}
3780 __Pyx_GOTREF(__pyx_t_3);
3784 __pyx_t_3 = __pyx_t_6(__pyx_t_2);
3785 if (unlikely(!__pyx_t_3)) {
3786 PyObject* exc_type = PyErr_Occurred();
3788 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3789 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3793 __Pyx_GOTREF(__pyx_t_3);
3795 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
3796 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
3797 __Pyx_GIVEREF(__pyx_t_3);
3807 __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;}
3808 __pyx_t_8 = (__pyx_t_7 != 0);
3818 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
3819 __pyx_r = __pyx_cur_scope->__pyx_v_idx;
3820 __Pyx_XGIVEREF(__pyx_t_2);
3821 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
3822 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
3823 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
3824 __Pyx_XGIVEREF(__pyx_r);
3825 __Pyx_RefNannyFinishContext();
3827 __pyx_generator->resume_label = 1;
3829 __pyx_L7_resume_from_yield:;
3830 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
3831 __pyx_cur_scope->__pyx_t_0 = 0;
3832 __Pyx_XGOTREF(__pyx_t_2);
3833 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
3834 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
3835 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3854 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3865 PyErr_SetNone(PyExc_StopIteration);
3868 __Pyx_XDECREF(__pyx_t_1);
3869 __Pyx_XDECREF(__pyx_t_2);
3870 __Pyx_XDECREF(__pyx_t_3);
3871 __Pyx_XDECREF(__pyx_t_4);
3872 __Pyx_AddTraceback(
"__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3874 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
3875 __pyx_generator->resume_label = -1;
3876 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
3877 __Pyx_RefNannyFinishContext();
3890 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self);
3891 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 ";
3892 #if CYTHON_COMPILING_IN_CPYTHON 3893 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
3895 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
3896 PyObject *__pyx_r = 0;
3897 __Pyx_RefNannyDeclarations
3898 __Pyx_RefNannySetupContext(
"__invert__ (wrapper)", 0);
3899 __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3902 __Pyx_RefNannyFinishContext();
3906 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3907 PyObject *__pyx_r = NULL;
3908 __Pyx_RefNannyDeclarations
3909 PyObject *__pyx_t_1 = NULL;
3910 PyObject *__pyx_t_2 = NULL;
3911 int __pyx_lineno = 0;
3912 const char *__pyx_filename = NULL;
3913 int __pyx_clineno = 0;
3914 __Pyx_RefNannySetupContext(
"__invert__", 0);
3923 __Pyx_XDECREF(__pyx_r);
3924 __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;}
3925 __Pyx_GOTREF(__pyx_t_1);
3926 __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;}
3927 __Pyx_GOTREF(__pyx_t_2);
3928 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3929 __pyx_r = __pyx_t_2;
3943 __Pyx_XDECREF(__pyx_t_1);
3944 __Pyx_XDECREF(__pyx_t_2);
3945 __Pyx_AddTraceback(
"PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3948 __Pyx_XGIVEREF(__pyx_r);
3949 __Pyx_RefNannyFinishContext();
3962 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3963 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 ";
3964 #if CYTHON_COMPILING_IN_CPYTHON 3965 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
3967 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3968 PyObject *__pyx_r = 0;
3969 __Pyx_RefNannyDeclarations
3970 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
3971 __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3974 __Pyx_RefNannyFinishContext();
3978 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3979 PyObject *__pyx_r = NULL;
3980 __Pyx_RefNannyDeclarations
3981 PyObject *__pyx_t_1 = NULL;
3982 PyObject *__pyx_t_2 = NULL;
3983 int __pyx_lineno = 0;
3984 const char *__pyx_filename = NULL;
3985 int __pyx_clineno = 0;
3986 __Pyx_RefNannySetupContext(
"__xor__", 0);
3995 __Pyx_XDECREF(__pyx_r);
3996 __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;}
3997 __Pyx_GOTREF(__pyx_t_1);
3998 __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;}
3999 __Pyx_GOTREF(__pyx_t_2);
4000 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4001 __pyx_r = __pyx_t_2;
4015 __Pyx_XDECREF(__pyx_t_1);
4016 __Pyx_XDECREF(__pyx_t_2);
4017 __Pyx_AddTraceback(
"PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4020 __Pyx_XGIVEREF(__pyx_r);
4021 __Pyx_RefNannyFinishContext();
4034 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4035 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 ";
4036 #if CYTHON_COMPILING_IN_CPYTHON 4037 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4039 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4040 PyObject *__pyx_r = 0;
4041 __Pyx_RefNannyDeclarations
4042 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
4043 __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4046 __Pyx_RefNannyFinishContext();
4050 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4051 PyObject *__pyx_r = NULL;
4052 __Pyx_RefNannyDeclarations
4053 PyObject *__pyx_t_1 = NULL;
4054 int __pyx_lineno = 0;
4055 const char *__pyx_filename = NULL;
4056 int __pyx_clineno = 0;
4057 __Pyx_RefNannySetupContext(
"__ixor__", 0);
4066 __Pyx_XDECREF(__pyx_r);
4067 __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;}
4068 __Pyx_GOTREF(__pyx_t_1);
4069 __pyx_r = __pyx_t_1;
4083 __Pyx_XDECREF(__pyx_t_1);
4084 __Pyx_AddTraceback(
"PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4087 __Pyx_XGIVEREF(__pyx_r);
4088 __Pyx_RefNannyFinishContext();
4101 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
4102 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 ";
4103 #if CYTHON_COMPILING_IN_CPYTHON 4104 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4106 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4107 PyObject *__pyx_r = 0;
4108 __Pyx_RefNannyDeclarations
4109 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
4110 __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4113 __Pyx_RefNannyFinishContext();
4117 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4118 PyObject *__pyx_r = NULL;
4119 __Pyx_RefNannyDeclarations
4120 PyObject *__pyx_t_1 = NULL;
4121 PyObject *__pyx_t_2 = NULL;
4122 int __pyx_lineno = 0;
4123 const char *__pyx_filename = NULL;
4124 int __pyx_clineno = 0;
4125 __Pyx_RefNannySetupContext(
"__and__", 0);
4134 __Pyx_XDECREF(__pyx_r);
4135 __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;}
4136 __Pyx_GOTREF(__pyx_t_1);
4137 __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;}
4138 __Pyx_GOTREF(__pyx_t_2);
4139 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4140 __pyx_r = __pyx_t_2;
4154 __Pyx_XDECREF(__pyx_t_1);
4155 __Pyx_XDECREF(__pyx_t_2);
4156 __Pyx_AddTraceback(
"PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4159 __Pyx_XGIVEREF(__pyx_r);
4160 __Pyx_RefNannyFinishContext();
4173 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4174 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 ";
4175 #if CYTHON_COMPILING_IN_CPYTHON 4176 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4178 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4179 PyObject *__pyx_r = 0;
4180 __Pyx_RefNannyDeclarations
4181 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
4182 __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4185 __Pyx_RefNannyFinishContext();
4189 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4190 PyObject *__pyx_r = NULL;
4191 __Pyx_RefNannyDeclarations
4192 PyObject *__pyx_t_1 = NULL;
4193 int __pyx_lineno = 0;
4194 const char *__pyx_filename = NULL;
4195 int __pyx_clineno = 0;
4196 __Pyx_RefNannySetupContext(
"__iand__", 0);
4205 __Pyx_XDECREF(__pyx_r);
4206 __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;}
4207 __Pyx_GOTREF(__pyx_t_1);
4208 __pyx_r = __pyx_t_1;
4222 __Pyx_XDECREF(__pyx_t_1);
4223 __Pyx_AddTraceback(
"PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4226 __Pyx_XGIVEREF(__pyx_r);
4227 __Pyx_RefNannyFinishContext();
4240 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
4241 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 ";
4242 #if CYTHON_COMPILING_IN_CPYTHON 4243 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4245 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4246 PyObject *__pyx_r = 0;
4247 __Pyx_RefNannyDeclarations
4248 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
4249 __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4252 __Pyx_RefNannyFinishContext();
4256 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4257 PyObject *__pyx_r = NULL;
4258 __Pyx_RefNannyDeclarations
4259 PyObject *__pyx_t_1 = NULL;
4260 PyObject *__pyx_t_2 = NULL;
4261 int __pyx_lineno = 0;
4262 const char *__pyx_filename = NULL;
4263 int __pyx_clineno = 0;
4264 __Pyx_RefNannySetupContext(
"__or__", 0);
4273 __Pyx_XDECREF(__pyx_r);
4274 __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;}
4275 __Pyx_GOTREF(__pyx_t_1);
4276 __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;}
4277 __Pyx_GOTREF(__pyx_t_2);
4278 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4279 __pyx_r = __pyx_t_2;
4293 __Pyx_XDECREF(__pyx_t_1);
4294 __Pyx_XDECREF(__pyx_t_2);
4295 __Pyx_AddTraceback(
"PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4298 __Pyx_XGIVEREF(__pyx_r);
4299 __Pyx_RefNannyFinishContext();
4312 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4313 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 ";
4314 #if CYTHON_COMPILING_IN_CPYTHON 4315 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4317 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4318 PyObject *__pyx_r = 0;
4319 __Pyx_RefNannyDeclarations
4320 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
4321 __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4324 __Pyx_RefNannyFinishContext();
4328 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4329 PyObject *__pyx_r = NULL;
4330 __Pyx_RefNannyDeclarations
4331 PyObject *__pyx_t_1 = NULL;
4332 int __pyx_lineno = 0;
4333 const char *__pyx_filename = NULL;
4334 int __pyx_clineno = 0;
4335 __Pyx_RefNannySetupContext(
"__ior__", 0);
4344 __Pyx_XDECREF(__pyx_r);
4345 __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;}
4346 __Pyx_GOTREF(__pyx_t_1);
4347 __pyx_r = __pyx_t_1;
4361 __Pyx_XDECREF(__pyx_t_1);
4362 __Pyx_AddTraceback(
"PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4365 __Pyx_XGIVEREF(__pyx_r);
4366 __Pyx_RefNannyFinishContext();
4379 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4380 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 ";
4381 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4382 PyObject *__pyx_r = 0;
4383 __Pyx_RefNannyDeclarations
4384 __Pyx_RefNannySetupContext(
"count (wrapper)", 0);
4385 __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4388 __Pyx_RefNannyFinishContext();
4392 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4393 PyObject *__pyx_r = NULL;
4394 __Pyx_RefNannyDeclarations
4395 PyObject *__pyx_t_1 = NULL;
4396 int __pyx_lineno = 0;
4397 const char *__pyx_filename = NULL;
4398 int __pyx_clineno = 0;
4399 __Pyx_RefNannySetupContext(
"count", 0);
4408 __Pyx_XDECREF(__pyx_r);
4409 __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;}
4410 __Pyx_GOTREF(__pyx_t_1);
4411 __pyx_r = __pyx_t_1;
4425 __Pyx_XDECREF(__pyx_t_1);
4426 __Pyx_AddTraceback(
"PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4429 __Pyx_XGIVEREF(__pyx_r);
4430 __Pyx_RefNannyFinishContext();
4443 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4444 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 ";
4445 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4446 PyObject *__pyx_r = 0;
4447 __Pyx_RefNannyDeclarations
4448 __Pyx_RefNannySetupContext(
"count_neg (wrapper)", 0);
4449 __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4452 __Pyx_RefNannyFinishContext();
4456 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4457 PyObject *__pyx_r = NULL;
4458 __Pyx_RefNannyDeclarations
4459 PyObject *__pyx_t_1 = NULL;
4460 int __pyx_lineno = 0;
4461 const char *__pyx_filename = NULL;
4462 int __pyx_clineno = 0;
4463 __Pyx_RefNannySetupContext(
"count_neg", 0);
4472 __Pyx_XDECREF(__pyx_r);
4473 __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;}
4474 __Pyx_GOTREF(__pyx_t_1);
4475 __pyx_r = __pyx_t_1;
4489 __Pyx_XDECREF(__pyx_t_1);
4490 __Pyx_AddTraceback(
"PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4493 __Pyx_XGIVEREF(__pyx_r);
4494 __Pyx_RefNannyFinishContext();
4507 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4508 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 ";
4509 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4510 PyObject *__pyx_r = 0;
4511 __Pyx_RefNannyDeclarations
4512 __Pyx_RefNannySetupContext(
"count_pos (wrapper)", 0);
4513 __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4516 __Pyx_RefNannyFinishContext();
4520 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4521 PyObject *__pyx_r = NULL;
4522 __Pyx_RefNannyDeclarations
4523 PyObject *__pyx_t_1 = NULL;
4524 int __pyx_lineno = 0;
4525 const char *__pyx_filename = NULL;
4526 int __pyx_clineno = 0;
4527 __Pyx_RefNannySetupContext(
"count_pos", 0);
4536 __Pyx_XDECREF(__pyx_r);
4537 __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;}
4538 __Pyx_GOTREF(__pyx_t_1);
4539 __pyx_r = __pyx_t_1;
4553 __Pyx_XDECREF(__pyx_t_1);
4554 __Pyx_AddTraceback(
"PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4557 __Pyx_XGIVEREF(__pyx_r);
4558 __Pyx_RefNannyFinishContext();
4571 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4572 static char __pyx_doc_8PyClical_9index_set_37min[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
4573 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4574 PyObject *__pyx_r = 0;
4575 __Pyx_RefNannyDeclarations
4576 __Pyx_RefNannySetupContext(
"min (wrapper)", 0);
4577 __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4580 __Pyx_RefNannyFinishContext();
4584 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4585 PyObject *__pyx_r = NULL;
4586 __Pyx_RefNannyDeclarations
4587 PyObject *__pyx_t_1 = NULL;
4588 int __pyx_lineno = 0;
4589 const char *__pyx_filename = NULL;
4590 int __pyx_clineno = 0;
4591 __Pyx_RefNannySetupContext(
"min", 0);
4600 __Pyx_XDECREF(__pyx_r);
4601 __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;}
4602 __Pyx_GOTREF(__pyx_t_1);
4603 __pyx_r = __pyx_t_1;
4617 __Pyx_XDECREF(__pyx_t_1);
4618 __Pyx_AddTraceback(
"PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
4621 __Pyx_XGIVEREF(__pyx_r);
4622 __Pyx_RefNannyFinishContext();
4635 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4636 static char __pyx_doc_8PyClical_9index_set_39max[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
4637 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4638 PyObject *__pyx_r = 0;
4639 __Pyx_RefNannyDeclarations
4640 __Pyx_RefNannySetupContext(
"max (wrapper)", 0);
4641 __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4644 __Pyx_RefNannyFinishContext();
4648 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4649 PyObject *__pyx_r = NULL;
4650 __Pyx_RefNannyDeclarations
4651 PyObject *__pyx_t_1 = NULL;
4652 int __pyx_lineno = 0;
4653 const char *__pyx_filename = NULL;
4654 int __pyx_clineno = 0;
4655 __Pyx_RefNannySetupContext(
"max", 0);
4664 __Pyx_XDECREF(__pyx_r);
4665 __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;}
4666 __Pyx_GOTREF(__pyx_t_1);
4667 __pyx_r = __pyx_t_1;
4681 __Pyx_XDECREF(__pyx_t_1);
4682 __Pyx_AddTraceback(
"PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
4685 __Pyx_XGIVEREF(__pyx_r);
4686 __Pyx_RefNannyFinishContext();
4699 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4700 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] =
"\n Hash function.\n ";
4701 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4702 PyObject *__pyx_r = 0;
4703 __Pyx_RefNannyDeclarations
4704 __Pyx_RefNannySetupContext(
"hash_fn (wrapper)", 0);
4705 __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4708 __Pyx_RefNannyFinishContext();
4712 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4713 PyObject *__pyx_r = NULL;
4714 __Pyx_RefNannyDeclarations
4715 PyObject *__pyx_t_1 = NULL;
4716 int __pyx_lineno = 0;
4717 const char *__pyx_filename = NULL;
4718 int __pyx_clineno = 0;
4719 __Pyx_RefNannySetupContext(
"hash_fn", 0);
4728 __Pyx_XDECREF(__pyx_r);
4729 __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;}
4730 __Pyx_GOTREF(__pyx_t_1);
4731 __pyx_r = __pyx_t_1;
4745 __Pyx_XDECREF(__pyx_t_1);
4746 __Pyx_AddTraceback(
"PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
4749 __Pyx_XGIVEREF(__pyx_r);
4750 __Pyx_RefNannyFinishContext();
4763 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4764 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 ";
4765 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4766 PyObject *__pyx_r = 0;
4767 __Pyx_RefNannyDeclarations
4768 __Pyx_RefNannySetupContext(
"sign_of_mult (wrapper)", 0);
4769 __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4772 __Pyx_RefNannyFinishContext();
4776 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4777 PyObject *__pyx_r = NULL;
4778 __Pyx_RefNannyDeclarations
4779 PyObject *__pyx_t_1 = NULL;
4780 int __pyx_lineno = 0;
4781 const char *__pyx_filename = NULL;
4782 int __pyx_clineno = 0;
4783 __Pyx_RefNannySetupContext(
"sign_of_mult", 0);
4792 __Pyx_XDECREF(__pyx_r);
4793 __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;}
4794 __Pyx_GOTREF(__pyx_t_1);
4795 __pyx_r = __pyx_t_1;
4809 __Pyx_XDECREF(__pyx_t_1);
4810 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
4813 __Pyx_XGIVEREF(__pyx_r);
4814 __Pyx_RefNannyFinishContext();
4827 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4828 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 ";
4829 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4830 PyObject *__pyx_r = 0;
4831 __Pyx_RefNannyDeclarations
4832 __Pyx_RefNannySetupContext(
"sign_of_square (wrapper)", 0);
4833 __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4836 __Pyx_RefNannyFinishContext();
4840 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4841 PyObject *__pyx_r = NULL;
4842 __Pyx_RefNannyDeclarations
4843 PyObject *__pyx_t_1 = NULL;
4844 int __pyx_lineno = 0;
4845 const char *__pyx_filename = NULL;
4846 int __pyx_clineno = 0;
4847 __Pyx_RefNannySetupContext(
"sign_of_square", 0);
4856 __Pyx_XDECREF(__pyx_r);
4857 __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;}
4858 __Pyx_GOTREF(__pyx_t_1);
4859 __pyx_r = __pyx_t_1;
4873 __Pyx_XDECREF(__pyx_t_1);
4874 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
4877 __Pyx_XGIVEREF(__pyx_r);
4878 __Pyx_RefNannyFinishContext();
4891 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self);
4892 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 ";
4893 #if CYTHON_COMPILING_IN_CPYTHON 4894 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
4896 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
4897 PyObject *__pyx_r = 0;
4898 __Pyx_RefNannyDeclarations
4899 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
4900 __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4903 __Pyx_RefNannyFinishContext();
4907 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4908 PyObject *__pyx_r = NULL;
4909 __Pyx_RefNannyDeclarations
4910 PyObject *__pyx_t_1 = NULL;
4911 int __pyx_lineno = 0;
4912 const char *__pyx_filename = NULL;
4913 int __pyx_clineno = 0;
4914 __Pyx_RefNannySetupContext(
"__repr__", 0);
4923 __Pyx_XDECREF(__pyx_r);
4924 __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;}
4925 __Pyx_GOTREF(__pyx_t_1);
4926 __pyx_r = __pyx_t_1;
4940 __Pyx_XDECREF(__pyx_t_1);
4941 __Pyx_AddTraceback(
"PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4944 __Pyx_XGIVEREF(__pyx_r);
4945 __Pyx_RefNannyFinishContext();
4958 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self);
4959 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 ";
4960 #if CYTHON_COMPILING_IN_CPYTHON 4961 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
4963 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
4964 PyObject *__pyx_r = 0;
4965 __Pyx_RefNannyDeclarations
4966 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
4967 __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4970 __Pyx_RefNannyFinishContext();
4974 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4975 PyObject *__pyx_r = NULL;
4976 __Pyx_RefNannyDeclarations
4977 PyObject *__pyx_t_1 = NULL;
4978 int __pyx_lineno = 0;
4979 const char *__pyx_filename = NULL;
4980 int __pyx_clineno = 0;
4981 __Pyx_RefNannySetupContext(
"__str__", 0);
4990 __Pyx_XDECREF(__pyx_r);
4991 __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;}
4992 __Pyx_GOTREF(__pyx_t_1);
4993 __pyx_r = __pyx_t_1;
5007 __Pyx_XDECREF(__pyx_t_1);
5008 __Pyx_AddTraceback(
"PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5011 __Pyx_XGIVEREF(__pyx_r);
5012 __Pyx_RefNannyFinishContext();
5025 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
5026 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 ";
5027 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};
5028 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5029 PyObject *__pyx_r = 0;
5030 __Pyx_RefNannyDeclarations
5031 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests (wrapper)", 0);
5032 __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5035 __Pyx_RefNannyFinishContext();
5039 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5040 PyObject *__pyx_r = NULL;
5041 __Pyx_RefNannyDeclarations
5042 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests", 0);
5051 __Pyx_XDECREF(__pyx_r);
5052 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5065 __Pyx_XGIVEREF(__pyx_r);
5066 __Pyx_RefNannyFinishContext();
5078 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5079 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5080 PyObject *__pyx_r = NULL;
5081 __Pyx_RefNannyDeclarations
5082 PyObject *__pyx_t_1 = NULL;
5083 int __pyx_lineno = 0;
5084 const char *__pyx_filename = NULL;
5085 int __pyx_clineno = 0;
5086 __Pyx_RefNannySetupContext(
"compare", 0);
5095 __Pyx_XDECREF(__pyx_r);
5096 __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;}
5097 __Pyx_GOTREF(__pyx_t_1);
5098 __pyx_r = __pyx_t_1;
5112 __Pyx_XDECREF(__pyx_t_1);
5113 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5116 __Pyx_XGIVEREF(__pyx_r);
5117 __Pyx_RefNannyFinishContext();
5122 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5123 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 ";
5124 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5125 PyObject *__pyx_v_lhs = 0;
5126 PyObject *__pyx_v_rhs = 0;
5127 int __pyx_lineno = 0;
5128 const char *__pyx_filename = NULL;
5129 int __pyx_clineno = 0;
5130 PyObject *__pyx_r = 0;
5131 __Pyx_RefNannyDeclarations
5132 __Pyx_RefNannySetupContext(
"compare (wrapper)", 0);
5134 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5135 PyObject* values[2] = {0,0};
5136 if (unlikely(__pyx_kwds)) {
5138 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5140 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5141 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5143 default:
goto __pyx_L5_argtuple_error;
5145 kw_args = PyDict_Size(__pyx_kwds);
5148 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5149 else goto __pyx_L5_argtuple_error;
5151 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5153 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
5156 if (unlikely(kw_args > 0)) {
5157 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;}
5159 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5160 goto __pyx_L5_argtuple_error;
5162 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5163 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5165 __pyx_v_lhs = values[0];
5166 __pyx_v_rhs = values[1];
5168 goto __pyx_L4_argument_unpacking_done;
5169 __pyx_L5_argtuple_error:;
5170 __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;}
5172 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5173 __Pyx_RefNannyFinishContext();
5175 __pyx_L4_argument_unpacking_done:;
5176 __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5179 __Pyx_RefNannyFinishContext();
5183 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5184 PyObject *__pyx_r = NULL;
5185 __Pyx_RefNannyDeclarations
5186 PyObject *__pyx_t_1 = NULL;
5187 int __pyx_lineno = 0;
5188 const char *__pyx_filename = NULL;
5189 int __pyx_clineno = 0;
5190 __Pyx_RefNannySetupContext(
"compare", 0);
5191 __Pyx_XDECREF(__pyx_r);
5192 __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;}
5193 __Pyx_GOTREF(__pyx_t_1);
5194 __pyx_r = __pyx_t_1;
5200 __Pyx_XDECREF(__pyx_t_1);
5201 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5204 __Pyx_XGIVEREF(__pyx_r);
5205 __Pyx_RefNannyFinishContext();
5217 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5218 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5219 PyObject *__pyx_r = NULL;
5220 __Pyx_RefNannyDeclarations
5221 PyObject *__pyx_t_1 = NULL;
5222 int __pyx_lineno = 0;
5223 const char *__pyx_filename = NULL;
5224 int __pyx_clineno = 0;
5225 __Pyx_RefNannySetupContext(
"min_neg", 0);
5234 __Pyx_XDECREF(__pyx_r);
5235 __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;}
5236 __Pyx_GOTREF(__pyx_t_1);
5237 __pyx_r = __pyx_t_1;
5251 __Pyx_XDECREF(__pyx_t_1);
5252 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5255 __Pyx_XGIVEREF(__pyx_r);
5256 __Pyx_RefNannyFinishContext();
5261 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5262 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 ";
5263 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5264 PyObject *__pyx_r = 0;
5265 __Pyx_RefNannyDeclarations
5266 __Pyx_RefNannySetupContext(
"min_neg (wrapper)", 0);
5267 __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5270 __Pyx_RefNannyFinishContext();
5274 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5275 PyObject *__pyx_r = NULL;
5276 __Pyx_RefNannyDeclarations
5277 PyObject *__pyx_t_1 = NULL;
5278 int __pyx_lineno = 0;
5279 const char *__pyx_filename = NULL;
5280 int __pyx_clineno = 0;
5281 __Pyx_RefNannySetupContext(
"min_neg", 0);
5282 __Pyx_XDECREF(__pyx_r);
5283 __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;}
5284 __Pyx_GOTREF(__pyx_t_1);
5285 __pyx_r = __pyx_t_1;
5291 __Pyx_XDECREF(__pyx_t_1);
5292 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5295 __Pyx_XGIVEREF(__pyx_r);
5296 __Pyx_RefNannyFinishContext();
5308 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5309 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5310 PyObject *__pyx_r = NULL;
5311 __Pyx_RefNannyDeclarations
5312 PyObject *__pyx_t_1 = NULL;
5313 int __pyx_lineno = 0;
5314 const char *__pyx_filename = NULL;
5315 int __pyx_clineno = 0;
5316 __Pyx_RefNannySetupContext(
"max_pos", 0);
5325 __Pyx_XDECREF(__pyx_r);
5326 __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;}
5327 __Pyx_GOTREF(__pyx_t_1);
5328 __pyx_r = __pyx_t_1;
5342 __Pyx_XDECREF(__pyx_t_1);
5343 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5346 __Pyx_XGIVEREF(__pyx_r);
5347 __Pyx_RefNannyFinishContext();
5352 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5353 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 ";
5354 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5355 PyObject *__pyx_r = 0;
5356 __Pyx_RefNannyDeclarations
5357 __Pyx_RefNannySetupContext(
"max_pos (wrapper)", 0);
5358 __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5361 __Pyx_RefNannyFinishContext();
5365 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5366 PyObject *__pyx_r = NULL;
5367 __Pyx_RefNannyDeclarations
5368 PyObject *__pyx_t_1 = NULL;
5369 int __pyx_lineno = 0;
5370 const char *__pyx_filename = NULL;
5371 int __pyx_clineno = 0;
5372 __Pyx_RefNannySetupContext(
"max_pos", 0);
5373 __Pyx_XDECREF(__pyx_r);
5374 __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;}
5375 __Pyx_GOTREF(__pyx_t_1);
5376 __pyx_r = __pyx_t_1;
5382 __Pyx_XDECREF(__pyx_t_1);
5383 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5386 __Pyx_XGIVEREF(__pyx_r);
5387 __Pyx_RefNannyFinishContext();
5399 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5400 std::vector<scalar_t> __pyx_v_v;
5401 PyObject *__pyx_v_s = NULL;
5402 std::vector<scalar_t> __pyx_r;
5403 __Pyx_RefNannyDeclarations
5404 PyObject *__pyx_t_1 = NULL;
5405 Py_ssize_t __pyx_t_2;
5406 PyObject *(*__pyx_t_3)(PyObject *);
5407 PyObject *__pyx_t_4 = NULL;
5409 int __pyx_lineno = 0;
5410 const char *__pyx_filename = NULL;
5411 int __pyx_clineno = 0;
5412 __Pyx_RefNannySetupContext(
"list_to_vector", 0);
5421 if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5422 __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5425 __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;}
5426 __Pyx_GOTREF(__pyx_t_1);
5427 __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;}
5430 if (likely(!__pyx_t_3)) {
5431 if (likely(PyList_CheckExact(__pyx_t_1))) {
5432 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1))
break;
5433 #if CYTHON_COMPILING_IN_CPYTHON 5434 __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;}
5436 __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;}
5437 __Pyx_GOTREF(__pyx_t_4);
5440 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1))
break;
5441 #if CYTHON_COMPILING_IN_CPYTHON 5442 __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;}
5444 __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;}
5445 __Pyx_GOTREF(__pyx_t_4);
5449 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5450 if (unlikely(!__pyx_t_4)) {
5451 PyObject* exc_type = PyErr_Occurred();
5453 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5454 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5458 __Pyx_GOTREF(__pyx_t_4);
5460 __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5470 __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;}
5472 __pyx_v_v.push_back(((
scalar_t)__pyx_t_5));
5474 __Pyx_CppExn2PyErr();
5475 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5486 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5495 __pyx_r = __pyx_v_v;
5508 __Pyx_XDECREF(__pyx_t_1);
5509 __Pyx_XDECREF(__pyx_t_4);
5510 __Pyx_WriteUnraisable(
"PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
5512 __Pyx_XDECREF(__pyx_v_s);
5513 __Pyx_RefNannyFinishContext();
5525 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
5527 __Pyx_RefNannyDeclarations
5528 PyObject *__pyx_t_1 = NULL;
5529 PyObject *__pyx_t_2 = NULL;
5530 int __pyx_lineno = 0;
5531 const char *__pyx_filename = NULL;
5532 int __pyx_clineno = 0;
5533 __Pyx_RefNannySetupContext(
"toClifford", 0);
5542 __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;}
5543 __Pyx_GOTREF(__pyx_t_1);
5544 __Pyx_INCREF(__pyx_v_obj);
5545 __Pyx_GIVEREF(__pyx_v_obj);
5546 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
5547 __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;}
5548 __Pyx_GOTREF(__pyx_t_2);
5549 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5550 __pyx_r = (((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
5551 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5564 __Pyx_XDECREF(__pyx_t_1);
5565 __Pyx_XDECREF(__pyx_t_2);
5566 __Pyx_WriteUnraisable(
"PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
5568 __Pyx_RefNannyFinishContext();
5580 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other) {
5581 PyObject *__pyx_r = NULL;
5582 __Pyx_RefNannyDeclarations
5583 __Pyx_RefNannySetupContext(
"wrap", 0);
5592 (__pyx_v_self->instance[0]) = __pyx_v_other;
5601 __Pyx_XDECREF(__pyx_r);
5602 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5603 __pyx_r = ((PyObject *)__pyx_v_self);
5616 __Pyx_XGIVEREF(__pyx_r);
5617 __Pyx_RefNannyFinishContext();
5629 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5631 __Pyx_RefNannyDeclarations
5632 __Pyx_RefNannySetupContext(
"unwrap", 0);
5641 __pyx_r = (__pyx_v_self->instance[0]);
5654 __Pyx_RefNannyFinishContext();
5666 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5667 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch) {
5668 PyObject *__pyx_r = NULL;
5669 __Pyx_RefNannyDeclarations
5670 PyObject *__pyx_t_1 = NULL;
5671 PyObject *__pyx_t_2 = NULL;
5672 PyObject *__pyx_t_3 = NULL;
5673 PyObject *__pyx_t_4 = NULL;
5674 int __pyx_lineno = 0;
5675 const char *__pyx_filename = NULL;
5676 int __pyx_clineno = 0;
5677 __Pyx_RefNannySetupContext(
"copy", 0);
5679 if (unlikely(__pyx_skip_dispatch)) ;
5681 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
5682 __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;}
5683 __Pyx_GOTREF(__pyx_t_1);
5684 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
5685 __Pyx_XDECREF(__pyx_r);
5686 __Pyx_INCREF(__pyx_t_1);
5687 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
5688 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
5689 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5690 if (likely(__pyx_t_4)) {
5691 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
5692 __Pyx_INCREF(__pyx_t_4);
5693 __Pyx_INCREF(
function);
5694 __Pyx_DECREF_SET(__pyx_t_3,
function);
5698 __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;}
5699 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5701 __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;}
5703 __Pyx_GOTREF(__pyx_t_2);
5704 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5705 __pyx_r = __pyx_t_2;
5707 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5710 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5720 __Pyx_XDECREF(__pyx_r);
5721 __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;}
5722 __Pyx_GOTREF(__pyx_t_1);
5723 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5724 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5725 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
5726 __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;}
5727 __Pyx_GOTREF(__pyx_t_2);
5728 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5729 __pyx_r = __pyx_t_2;
5743 __Pyx_XDECREF(__pyx_t_1);
5744 __Pyx_XDECREF(__pyx_t_2);
5745 __Pyx_XDECREF(__pyx_t_3);
5746 __Pyx_XDECREF(__pyx_t_4);
5747 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5750 __Pyx_XGIVEREF(__pyx_r);
5751 __Pyx_RefNannyFinishContext();
5756 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5757 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 ";
5758 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5759 PyObject *__pyx_r = 0;
5760 __Pyx_RefNannyDeclarations
5761 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
5762 __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
5765 __Pyx_RefNannyFinishContext();
5769 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5770 PyObject *__pyx_r = NULL;
5771 __Pyx_RefNannyDeclarations
5772 PyObject *__pyx_t_1 = NULL;
5773 int __pyx_lineno = 0;
5774 const char *__pyx_filename = NULL;
5775 int __pyx_clineno = 0;
5776 __Pyx_RefNannySetupContext(
"copy", 0);
5777 __Pyx_XDECREF(__pyx_r);
5778 __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;}
5779 __Pyx_GOTREF(__pyx_t_1);
5780 __pyx_r = __pyx_t_1;
5786 __Pyx_XDECREF(__pyx_t_1);
5787 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5790 __Pyx_XGIVEREF(__pyx_r);
5791 __Pyx_RefNannyFinishContext();
5804 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5805 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5806 PyObject *__pyx_v_other = 0;
5807 PyObject *__pyx_v_ixt = 0;
5808 int __pyx_lineno = 0;
5809 const char *__pyx_filename = NULL;
5810 int __pyx_clineno = 0;
5812 __Pyx_RefNannyDeclarations
5813 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
5815 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
5816 PyObject* values[2] = {0,0};
5817 values[0] = ((PyObject *)__pyx_int_0);
5818 values[1] = ((PyObject *)Py_None);
5819 if (unlikely(__pyx_kwds)) {
5821 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5823 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5824 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5826 default:
goto __pyx_L5_argtuple_error;
5828 kw_args = PyDict_Size(__pyx_kwds);
5832 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
5833 if (value) { values[0] = value; kw_args--; }
5837 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
5838 if (value) { values[1] = value; kw_args--; }
5841 if (unlikely(kw_args > 0)) {
5842 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;}
5845 switch (PyTuple_GET_SIZE(__pyx_args)) {
5846 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5847 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5849 default:
goto __pyx_L5_argtuple_error;
5852 __pyx_v_other = values[0];
5853 __pyx_v_ixt = values[1];
5855 goto __pyx_L4_argument_unpacking_done;
5856 __pyx_L5_argtuple_error:;
5857 __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;}
5859 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5860 __Pyx_RefNannyFinishContext();
5862 __pyx_L4_argument_unpacking_done:;
5863 __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
5866 __Pyx_RefNannyFinishContext();
5870 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
5871 PyObject *__pyx_v_error_msg_prefix = NULL;
5872 PyObject *__pyx_v_err = NULL;
5874 __Pyx_RefNannyDeclarations
5877 PyObject *__pyx_t_3 = NULL;
5878 PyObject *__pyx_t_4 = NULL;
5879 PyObject *__pyx_t_5 = NULL;
5881 PyObject *__pyx_t_7 = NULL;
5882 PyObject *__pyx_t_8 = NULL;
5884 PyObject *__pyx_t_10 = NULL;
5885 PyObject *__pyx_t_11 = NULL;
5886 PyObject *__pyx_t_12 = NULL;
5889 PyObject *__pyx_t_15 = NULL;
5890 PyObject *__pyx_t_16 = NULL;
5891 PyObject *__pyx_t_17 = NULL;
5892 PyObject *__pyx_t_18 = NULL;
5893 int __pyx_lineno = 0;
5894 const char *__pyx_filename = NULL;
5895 int __pyx_clineno = 0;
5896 __Pyx_RefNannySetupContext(
"__cinit__", 0);
5905 __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
5906 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
5915 __pyx_t_1 = (__pyx_v_ixt == Py_None);
5916 __pyx_t_2 = (__pyx_t_1 != 0);
5927 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
5928 __Pyx_XGOTREF(__pyx_t_3);
5929 __Pyx_XGOTREF(__pyx_t_4);
5930 __Pyx_XGOTREF(__pyx_t_5);
5940 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
5941 __pyx_t_1 = (__pyx_t_2 != 0);
5952 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
5954 __Pyx_CppExn2PyErr();
5955 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5957 __pyx_v_self->instance = __pyx_t_6;
5976 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
5977 __pyx_t_2 = (__pyx_t_1 != 0);
5988 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((
scalar_t)1.0));
5990 __Pyx_CppExn2PyErr();
5991 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5993 __pyx_v_self->instance = __pyx_t_6;
6012 __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;}
6013 __Pyx_GOTREF(__pyx_t_7);
6014 __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;}
6015 __Pyx_GOTREF(__pyx_t_8);
6016 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6017 __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;}
6018 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6019 __pyx_t_1 = (__pyx_t_2 != 0);
6029 __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;}
6033 __Pyx_CppExn2PyErr();
6034 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6036 __pyx_v_self->instance = __pyx_t_6;
6055 __pyx_t_1 = PyString_Check(__pyx_v_other);
6056 __pyx_t_2 = (__pyx_t_1 != 0);
6067 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6068 __Pyx_XGOTREF(__pyx_t_10);
6069 __Pyx_XGOTREF(__pyx_t_11);
6070 __Pyx_XGOTREF(__pyx_t_12);
6080 __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;}
6082 __pyx_t_6 =
new Clifford(((
char *)__pyx_t_13));
6084 __Pyx_CppExn2PyErr();
6085 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__;
goto __pyx_L13_error;}
6087 __pyx_v_self->instance = __pyx_t_6;
6097 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6098 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6099 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6100 goto __pyx_L20_try_end;
6102 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6103 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6112 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6114 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6115 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;}
6116 __Pyx_GOTREF(__pyx_t_8);
6117 __Pyx_GOTREF(__pyx_t_7);
6118 __Pyx_GOTREF(__pyx_t_15);
6127 __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;}
6128 __Pyx_GOTREF(__pyx_t_16);
6129 __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;}
6130 __Pyx_GOTREF(__pyx_t_17);
6131 __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;}
6132 __Pyx_GOTREF(__pyx_t_18);
6133 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6134 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6135 __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;}
6136 __Pyx_GOTREF(__pyx_t_17);
6137 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6138 __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;}
6139 __Pyx_GOTREF(__pyx_t_18);
6140 __Pyx_GIVEREF(__pyx_t_17);
6141 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
6143 __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;}
6144 __Pyx_GOTREF(__pyx_t_17);
6145 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6146 __Pyx_Raise(__pyx_t_17, 0, 0, 0);
6147 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6148 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
6150 goto __pyx_L15_except_error;
6151 __pyx_L15_except_error:;
6160 __Pyx_XGIVEREF(__pyx_t_10);
6161 __Pyx_XGIVEREF(__pyx_t_11);
6162 __Pyx_XGIVEREF(__pyx_t_12);
6163 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6164 goto __pyx_L4_error;
6186 __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;}
6187 __Pyx_GOTREF(__pyx_t_15);
6188 __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;}
6189 __Pyx_GOTREF(__pyx_t_7);
6190 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6191 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6192 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6193 __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;}
6194 __Pyx_GOTREF(__pyx_t_8);
6195 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6196 __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;}
6197 __Pyx_GOTREF(__pyx_t_7);
6198 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6199 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6200 __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;}
6201 __Pyx_GOTREF(__pyx_t_8);
6202 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6203 __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;}
6204 __Pyx_GOTREF(__pyx_t_7);
6205 __Pyx_GIVEREF(__pyx_t_8);
6206 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
6208 __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;}
6209 __Pyx_GOTREF(__pyx_t_8);
6210 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6211 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6212 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6213 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6225 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6226 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6227 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6228 goto __pyx_L11_try_end;
6230 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6231 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6232 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6233 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6234 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6235 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6244 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6246 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6247 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;}
6248 __Pyx_GOTREF(__pyx_t_8);
6249 __Pyx_GOTREF(__pyx_t_7);
6250 __Pyx_GOTREF(__pyx_t_15);
6251 __Pyx_INCREF(__pyx_t_7);
6252 __pyx_v_err = __pyx_t_7;
6261 __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;}
6262 __Pyx_GOTREF(__pyx_t_17);
6263 __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;}
6264 __Pyx_GOTREF(__pyx_t_18);
6265 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6266 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6267 PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6268 __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;}
6269 __Pyx_GOTREF(__pyx_t_16);
6270 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6271 __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;}
6272 __Pyx_GOTREF(__pyx_t_18);
6273 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6274 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6283 __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;}
6284 __Pyx_GOTREF(__pyx_t_16);
6285 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6286 __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;}
6287 __Pyx_GOTREF(__pyx_t_18);
6288 __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;}
6289 __Pyx_GOTREF(__pyx_t_17);
6290 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6291 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6292 __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;}
6293 __Pyx_GOTREF(__pyx_t_18);
6294 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6303 __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;}
6304 __Pyx_GOTREF(__pyx_t_17);
6305 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6306 __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;}
6307 __Pyx_GOTREF(__pyx_t_18);
6308 __Pyx_INCREF(__pyx_v_err);
6309 __Pyx_GIVEREF(__pyx_v_err);
6310 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
6311 __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;}
6312 __Pyx_GOTREF(__pyx_t_16);
6313 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6314 __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;}
6315 __Pyx_GOTREF(__pyx_t_18);
6316 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6317 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6326 __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;}
6327 __Pyx_GOTREF(__pyx_t_16);
6328 __Pyx_GIVEREF(__pyx_t_18);
6329 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
6331 __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;}
6332 __Pyx_GOTREF(__pyx_t_18);
6333 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6334 __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6335 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6336 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6338 goto __pyx_L6_except_error;
6339 __pyx_L6_except_error:;
6348 __Pyx_XGIVEREF(__pyx_t_3);
6349 __Pyx_XGIVEREF(__pyx_t_4);
6350 __Pyx_XGIVEREF(__pyx_t_5);
6351 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6352 goto __pyx_L1_error;
6373 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6374 __pyx_t_1 = (__pyx_t_2 != 0);
6384 __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;}
6385 __Pyx_GOTREF(__pyx_t_15);
6386 __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;}
6387 __Pyx_GOTREF(__pyx_t_7);
6388 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6389 __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;}
6390 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6391 __pyx_t_2 = (__pyx_t_1 != 0);
6401 __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;}
6403 __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));
6405 __Pyx_CppExn2PyErr();
6406 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6408 __pyx_v_self->instance = __pyx_t_6;
6427 __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;}
6428 __Pyx_GOTREF(__pyx_t_7);
6429 __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;}
6430 __Pyx_GOTREF(__pyx_t_15);
6431 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6432 __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;}
6433 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6434 __pyx_t_1 = (__pyx_t_2 != 0);
6445 __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)));
6447 __Pyx_CppExn2PyErr();
6448 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6450 __pyx_v_self->instance = __pyx_t_6;
6470 __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;}
6471 __Pyx_GOTREF(__pyx_t_15);
6472 __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;}
6473 __Pyx_GOTREF(__pyx_t_7);
6474 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6475 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6476 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6477 __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;}
6478 __Pyx_GOTREF(__pyx_t_8);
6479 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6480 __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;}
6481 __Pyx_GOTREF(__pyx_t_7);
6482 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6483 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6492 __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;}
6493 __Pyx_GOTREF(__pyx_t_8);
6494 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6495 __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;}
6496 __Pyx_GOTREF(__pyx_t_7);
6497 __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;}
6498 __Pyx_GOTREF(__pyx_t_15);
6499 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6500 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6501 __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;}
6502 __Pyx_GOTREF(__pyx_t_7);
6503 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6512 __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;}
6513 __Pyx_GOTREF(__pyx_t_15);
6514 __Pyx_GIVEREF(__pyx_t_7);
6515 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6517 __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;}
6518 __Pyx_GOTREF(__pyx_t_7);
6519 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6520 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6521 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6522 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6544 __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;}
6545 __Pyx_GOTREF(__pyx_t_7);
6546 __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;}
6547 __Pyx_GOTREF(__pyx_t_15);
6548 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6549 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6550 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6551 __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;}
6552 __Pyx_GOTREF(__pyx_t_8);
6553 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6554 __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;}
6555 __Pyx_GOTREF(__pyx_t_15);
6556 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6557 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6566 __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;}
6567 __Pyx_GOTREF(__pyx_t_8);
6568 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6569 __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;}
6570 __Pyx_GOTREF(__pyx_t_15);
6571 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6572 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6573 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6574 __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;}
6575 __Pyx_GOTREF(__pyx_t_7);
6576 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6577 __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;}
6578 __Pyx_GOTREF(__pyx_t_15);
6579 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6580 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6581 __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;}
6582 __Pyx_GOTREF(__pyx_t_7);
6583 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6592 __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;}
6593 __Pyx_GOTREF(__pyx_t_15);
6594 __Pyx_GIVEREF(__pyx_t_7);
6595 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6597 __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;}
6598 __Pyx_GOTREF(__pyx_t_7);
6599 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6600 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6601 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6602 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6618 __Pyx_XDECREF(__pyx_t_7);
6619 __Pyx_XDECREF(__pyx_t_8);
6620 __Pyx_XDECREF(__pyx_t_15);
6621 __Pyx_XDECREF(__pyx_t_16);
6622 __Pyx_XDECREF(__pyx_t_17);
6623 __Pyx_XDECREF(__pyx_t_18);
6624 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6627 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6628 __Pyx_XDECREF(__pyx_v_err);
6629 __Pyx_RefNannyFinishContext();
6642 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self);
6643 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
6644 __Pyx_RefNannyDeclarations
6645 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
6646 __pyx_pf_8PyClical_8clifford_4__dealloc__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6649 __Pyx_RefNannyFinishContext();
6652 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6653 __Pyx_RefNannyDeclarations
6654 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
6663 delete __pyx_v_self->instance;
6674 __Pyx_RefNannyFinishContext();
6686 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x);
6687 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 ";
6688 #if CYTHON_COMPILING_IN_CPYTHON 6689 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
6691 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
6693 __Pyx_RefNannyDeclarations
6694 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
6695 __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
6698 __Pyx_RefNannyFinishContext();
6702 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
6704 __Pyx_RefNannyDeclarations
6705 PyObject *__pyx_t_1 = NULL;
6706 int __pyx_lineno = 0;
6707 const char *__pyx_filename = NULL;
6708 int __pyx_clineno = 0;
6709 __Pyx_RefNannySetupContext(
"__contains__", 0);
6718 __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;}
6719 __Pyx_GOTREF(__pyx_t_1);
6720 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6721 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6722 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6734 __Pyx_XDECREF(__pyx_t_1);
6735 __Pyx_AddTraceback(
"PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6737 __Pyx_RefNannyFinishContext();
6750 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self);
6751 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 ";
6752 #if CYTHON_COMPILING_IN_CPYTHON 6753 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
6755 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
6756 PyObject *__pyx_r = 0;
6757 __Pyx_RefNannyDeclarations
6758 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
6759 __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6762 __Pyx_RefNannyFinishContext();
6766 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6767 PyObject *__pyx_r = NULL;
6768 __Pyx_RefNannyDeclarations
6769 PyObject *__pyx_t_1 = NULL;
6770 int __pyx_lineno = 0;
6771 const char *__pyx_filename = NULL;
6772 int __pyx_clineno = 0;
6773 __Pyx_RefNannySetupContext(
"__iter__", 0);
6782 __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;}
6783 __Pyx_GOTREF(__pyx_t_1);
6784 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6785 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6786 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6798 __Pyx_XDECREF(__pyx_t_1);
6799 __Pyx_AddTraceback(
"PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6801 __Pyx_XGIVEREF(__pyx_r);
6802 __Pyx_RefNannyFinishContext();
6815 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
6816 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 ";
6817 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
6818 PyObject *__pyx_r = 0;
6819 __Pyx_RefNannyDeclarations
6820 __Pyx_RefNannySetupContext(
"reframe (wrapper)", 0);
6821 __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
6824 __Pyx_RefNannyFinishContext();
6828 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
6829 PyObject *__pyx_v_error_msg_prefix = NULL;
6830 struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
6831 PyObject *__pyx_v_err = NULL;
6832 PyObject *__pyx_r = NULL;
6833 __Pyx_RefNannyDeclarations
6836 PyObject *__pyx_t_3 = NULL;
6837 PyObject *__pyx_t_4 = NULL;
6838 PyObject *__pyx_t_5 = NULL;
6839 PyObject *__pyx_t_6 = NULL;
6842 PyObject *__pyx_t_9 = NULL;
6843 PyObject *__pyx_t_10 = NULL;
6844 PyObject *__pyx_t_11 = NULL;
6845 PyObject *__pyx_t_12 = NULL;
6846 PyObject *__pyx_t_13 = NULL;
6847 int __pyx_lineno = 0;
6848 const char *__pyx_filename = NULL;
6849 int __pyx_clineno = 0;
6850 __Pyx_RefNannySetupContext(
"reframe", 0);
6859 __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
6860 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
6869 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6870 __pyx_t_2 = (__pyx_t_1 != 0);
6881 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6882 __Pyx_XGOTREF(__pyx_t_3);
6883 __Pyx_XGOTREF(__pyx_t_4);
6884 __Pyx_XGOTREF(__pyx_t_5);
6894 __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;}
6895 __Pyx_GOTREF(__pyx_t_6);
6896 __pyx_v_result = ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
6907 __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)));
6909 __Pyx_CppExn2PyErr();
6910 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6912 __pyx_v_result->instance = __pyx_t_7;
6922 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6923 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6924 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6925 goto __pyx_L11_try_end;
6927 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6936 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6938 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6939 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;}
6940 __Pyx_GOTREF(__pyx_t_6);
6941 __Pyx_GOTREF(__pyx_t_9);
6942 __Pyx_GOTREF(__pyx_t_10);
6943 __Pyx_INCREF(__pyx_t_9);
6944 __pyx_v_err = __pyx_t_9;
6953 __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;}
6954 __Pyx_GOTREF(__pyx_t_11);
6955 __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;}
6956 __Pyx_GOTREF(__pyx_t_12);
6957 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6958 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6959 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
6960 __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;}
6961 __Pyx_GOTREF(__pyx_t_13);
6962 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6963 __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;}
6964 __Pyx_GOTREF(__pyx_t_12);
6965 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6966 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6967 __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;}
6968 __Pyx_GOTREF(__pyx_t_13);
6969 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6978 __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;}
6979 __Pyx_GOTREF(__pyx_t_12);
6980 __Pyx_INCREF(__pyx_v_ixt);
6981 __Pyx_GIVEREF(__pyx_v_ixt);
6982 PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
6983 __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;}
6984 __Pyx_GOTREF(__pyx_t_11);
6985 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6986 __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;}
6987 __Pyx_GOTREF(__pyx_t_12);
6988 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6989 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6990 __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;}
6991 __Pyx_GOTREF(__pyx_t_11);
6992 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7001 __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;}
7002 __Pyx_GOTREF(__pyx_t_12);
7003 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7004 __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;}
7005 __Pyx_GOTREF(__pyx_t_11);
7006 __Pyx_INCREF(__pyx_v_err);
7007 __Pyx_GIVEREF(__pyx_v_err);
7008 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
7009 __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;}
7010 __Pyx_GOTREF(__pyx_t_13);
7011 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7012 __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;}
7013 __Pyx_GOTREF(__pyx_t_11);
7014 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7015 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7024 __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;}
7025 __Pyx_GOTREF(__pyx_t_13);
7026 __Pyx_GIVEREF(__pyx_t_11);
7027 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
7029 __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;}
7030 __Pyx_GOTREF(__pyx_t_11);
7031 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7032 __Pyx_Raise(__pyx_t_11, 0, 0, 0);
7033 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7034 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
7036 goto __pyx_L6_except_error;
7037 __pyx_L6_except_error:;
7046 __Pyx_XGIVEREF(__pyx_t_3);
7047 __Pyx_XGIVEREF(__pyx_t_4);
7048 __Pyx_XGIVEREF(__pyx_t_5);
7049 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7050 goto __pyx_L1_error;
7072 __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;}
7073 __Pyx_GOTREF(__pyx_t_10);
7074 __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;}
7075 __Pyx_GOTREF(__pyx_t_9);
7076 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7077 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7078 PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7079 __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;}
7080 __Pyx_GOTREF(__pyx_t_6);
7081 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7082 __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;}
7083 __Pyx_GOTREF(__pyx_t_9);
7084 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7085 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7086 __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;}
7087 __Pyx_GOTREF(__pyx_t_6);
7088 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7089 __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;}
7090 __Pyx_GOTREF(__pyx_t_9);
7091 __Pyx_GIVEREF(__pyx_t_6);
7092 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
7094 __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;}
7095 __Pyx_GOTREF(__pyx_t_6);
7096 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7097 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7098 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7099 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7110 __Pyx_XDECREF(__pyx_r);
7111 __Pyx_INCREF(((PyObject *)__pyx_v_result));
7112 __pyx_r = ((PyObject *)__pyx_v_result);
7125 __Pyx_XDECREF(__pyx_t_6);
7126 __Pyx_XDECREF(__pyx_t_9);
7127 __Pyx_XDECREF(__pyx_t_10);
7128 __Pyx_XDECREF(__pyx_t_11);
7129 __Pyx_XDECREF(__pyx_t_12);
7130 __Pyx_XDECREF(__pyx_t_13);
7131 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7134 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7135 __Pyx_XDECREF((PyObject *)__pyx_v_result);
7136 __Pyx_XDECREF(__pyx_v_err);
7137 __Pyx_XGIVEREF(__pyx_r);
7138 __Pyx_RefNannyFinishContext();
7151 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
7152 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
7153 PyObject *__pyx_r = 0;
7154 __Pyx_RefNannyDeclarations
7155 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
7156 __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
7159 __Pyx_RefNannyFinishContext();
7163 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
7164 PyObject *__pyx_r = NULL;
7165 __Pyx_RefNannyDeclarations
7169 PyObject *__pyx_t_4 = NULL;
7170 PyObject *__pyx_t_5 = NULL;
7171 PyObject *__pyx_t_6 = NULL;
7172 int __pyx_lineno = 0;
7173 const char *__pyx_filename = NULL;
7174 int __pyx_clineno = 0;
7175 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
7184 __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7194 __pyx_t_2 = (__pyx_v_lhs == Py_None);
7195 __pyx_t_3 = (__pyx_t_2 != 0);
7198 __pyx_t_1 = __pyx_t_3;
7199 goto __pyx_L5_bool_binop_done;
7201 __pyx_t_3 = (__pyx_v_rhs == Py_None);
7202 __pyx_t_2 = (__pyx_t_3 != 0);
7203 __pyx_t_1 = __pyx_t_2;
7204 __pyx_L5_bool_binop_done:;
7214 __Pyx_XDECREF(__pyx_r);
7215 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7216 __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;}
7217 __Pyx_GOTREF(__pyx_t_4);
7218 __pyx_r = __pyx_t_4;
7239 __Pyx_XDECREF(__pyx_r);
7240 __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7241 __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;}
7242 __Pyx_GOTREF(__pyx_t_4);
7243 __pyx_r = __pyx_t_4;
7264 __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7274 __pyx_t_2 = (__pyx_v_lhs == Py_None);
7275 __pyx_t_3 = (__pyx_t_2 != 0);
7278 __pyx_t_1 = __pyx_t_3;
7279 goto __pyx_L8_bool_binop_done;
7281 __pyx_t_3 = (__pyx_v_rhs == Py_None);
7282 __pyx_t_2 = (__pyx_t_3 != 0);
7283 __pyx_t_1 = __pyx_t_2;
7284 __pyx_L8_bool_binop_done:;
7294 __Pyx_XDECREF(__pyx_r);
7295 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7296 __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;}
7297 __Pyx_GOTREF(__pyx_t_4);
7298 __pyx_r = __pyx_t_4;
7319 __Pyx_XDECREF(__pyx_r);
7320 __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7321 __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;}
7322 __Pyx_GOTREF(__pyx_t_4);
7323 __pyx_r = __pyx_t_4;
7344 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, __pyx_ptype_8PyClical_clifford);
7345 __pyx_t_3 = (__pyx_t_2 != 0);
7348 __pyx_t_1 = __pyx_t_3;
7349 goto __pyx_L10_bool_binop_done;
7351 __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7352 __pyx_t_2 = (__pyx_t_3 != 0);
7353 __pyx_t_1 = __pyx_t_2;
7354 __pyx_L10_bool_binop_done:;
7364 __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;}
7365 __Pyx_GOTREF(__pyx_t_4);
7366 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7367 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7368 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
7369 __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;}
7370 __Pyx_GOTREF(__pyx_t_5);
7371 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7372 __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;}
7373 __Pyx_GOTREF(__pyx_t_4);
7374 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7375 __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;}
7376 __Pyx_GOTREF(__pyx_t_5);
7377 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7378 __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;}
7379 __Pyx_GOTREF(__pyx_t_4);
7380 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7381 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7382 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
7383 __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;}
7384 __Pyx_GOTREF(__pyx_t_6);
7385 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7386 __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;}
7387 __Pyx_GOTREF(__pyx_t_4);
7388 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7389 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7390 __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;}
7391 __Pyx_GOTREF(__pyx_t_6);
7392 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7401 __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;}
7402 __Pyx_GOTREF(__pyx_t_4);
7403 __Pyx_GIVEREF(__pyx_t_6);
7404 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
7406 __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;}
7407 __Pyx_GOTREF(__pyx_t_6);
7408 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7409 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7410 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7411 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7430 __Pyx_XDECREF(__pyx_r);
7431 __Pyx_INCREF(__pyx_builtin_NotImplemented);
7432 __pyx_r = __pyx_builtin_NotImplemented;
7446 __Pyx_XDECREF(__pyx_t_4);
7447 __Pyx_XDECREF(__pyx_t_5);
7448 __Pyx_XDECREF(__pyx_t_6);
7449 __Pyx_AddTraceback(
"PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7452 __Pyx_XGIVEREF(__pyx_r);
7453 __Pyx_RefNannyFinishContext();
7466 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
7467 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 ";
7468 #if CYTHON_COMPILING_IN_CPYTHON 7469 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7471 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7472 PyObject *__pyx_r = 0;
7473 __Pyx_RefNannyDeclarations
7474 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
7475 __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7478 __Pyx_RefNannyFinishContext();
7482 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7483 PyObject *__pyx_r = NULL;
7484 __Pyx_RefNannyDeclarations
7485 PyObject *__pyx_t_1 = NULL;
7486 int __pyx_lineno = 0;
7487 const char *__pyx_filename = NULL;
7488 int __pyx_clineno = 0;
7489 __Pyx_RefNannySetupContext(
"__getitem__", 0);
7498 __Pyx_XDECREF(__pyx_r);
7499 __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;}
7500 __Pyx_GOTREF(__pyx_t_1);
7501 __pyx_r = __pyx_t_1;
7515 __Pyx_XDECREF(__pyx_t_1);
7516 __Pyx_AddTraceback(
"PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7519 __Pyx_XGIVEREF(__pyx_r);
7520 __Pyx_RefNannyFinishContext();
7533 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self);
7534 static char __pyx_doc_8PyClical_8clifford_16__neg__[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7535 #if CYTHON_COMPILING_IN_CPYTHON 7536 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7538 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7539 PyObject *__pyx_r = 0;
7540 __Pyx_RefNannyDeclarations
7541 __Pyx_RefNannySetupContext(
"__neg__ (wrapper)", 0);
7542 __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7545 __Pyx_RefNannyFinishContext();
7549 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7550 PyObject *__pyx_r = NULL;
7551 __Pyx_RefNannyDeclarations
7552 PyObject *__pyx_t_1 = NULL;
7553 PyObject *__pyx_t_2 = NULL;
7554 int __pyx_lineno = 0;
7555 const char *__pyx_filename = NULL;
7556 int __pyx_clineno = 0;
7557 __Pyx_RefNannySetupContext(
"__neg__", 0);
7566 __Pyx_XDECREF(__pyx_r);
7567 __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;}
7568 __Pyx_GOTREF(__pyx_t_1);
7569 __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;}
7570 __Pyx_GOTREF(__pyx_t_2);
7571 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7572 __pyx_r = __pyx_t_2;
7586 __Pyx_XDECREF(__pyx_t_1);
7587 __Pyx_XDECREF(__pyx_t_2);
7588 __Pyx_AddTraceback(
"PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7591 __Pyx_XGIVEREF(__pyx_r);
7592 __Pyx_RefNannyFinishContext();
7605 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self);
7606 static char __pyx_doc_8PyClical_8clifford_18__pos__[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
7607 #if CYTHON_COMPILING_IN_CPYTHON 7608 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
7610 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
7611 PyObject *__pyx_r = 0;
7612 __Pyx_RefNannyDeclarations
7613 __Pyx_RefNannySetupContext(
"__pos__ (wrapper)", 0);
7614 __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7617 __Pyx_RefNannyFinishContext();
7621 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7622 PyObject *__pyx_r = NULL;
7623 __Pyx_RefNannyDeclarations
7624 PyObject *__pyx_t_1 = NULL;
7625 PyObject *__pyx_t_2 = NULL;
7626 int __pyx_lineno = 0;
7627 const char *__pyx_filename = NULL;
7628 int __pyx_clineno = 0;
7629 __Pyx_RefNannySetupContext(
"__pos__", 0);
7638 __Pyx_XDECREF(__pyx_r);
7639 __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;}
7640 __Pyx_GOTREF(__pyx_t_1);
7641 __Pyx_INCREF(((PyObject *)__pyx_v_self));
7642 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7643 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
7644 __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;}
7645 __Pyx_GOTREF(__pyx_t_2);
7646 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7647 __pyx_r = __pyx_t_2;
7661 __Pyx_XDECREF(__pyx_t_1);
7662 __Pyx_XDECREF(__pyx_t_2);
7663 __Pyx_AddTraceback(
"PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7666 __Pyx_XGIVEREF(__pyx_r);
7667 __Pyx_RefNannyFinishContext();
7680 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7681 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 ";
7682 #if CYTHON_COMPILING_IN_CPYTHON 7683 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
7685 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7686 PyObject *__pyx_r = 0;
7687 __Pyx_RefNannyDeclarations
7688 __Pyx_RefNannySetupContext(
"__add__ (wrapper)", 0);
7689 __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7692 __Pyx_RefNannyFinishContext();
7696 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7697 PyObject *__pyx_r = NULL;
7698 __Pyx_RefNannyDeclarations
7699 PyObject *__pyx_t_1 = NULL;
7700 PyObject *__pyx_t_2 = NULL;
7701 int __pyx_lineno = 0;
7702 const char *__pyx_filename = NULL;
7703 int __pyx_clineno = 0;
7704 __Pyx_RefNannySetupContext(
"__add__", 0);
7713 __Pyx_XDECREF(__pyx_r);
7714 __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;}
7715 __Pyx_GOTREF(__pyx_t_1);
7716 __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;}
7717 __Pyx_GOTREF(__pyx_t_2);
7718 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7719 __pyx_r = __pyx_t_2;
7733 __Pyx_XDECREF(__pyx_t_1);
7734 __Pyx_XDECREF(__pyx_t_2);
7735 __Pyx_AddTraceback(
"PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7738 __Pyx_XGIVEREF(__pyx_r);
7739 __Pyx_RefNannyFinishContext();
7752 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7753 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 ";
7754 #if CYTHON_COMPILING_IN_CPYTHON 7755 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
7757 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7758 PyObject *__pyx_r = 0;
7759 __Pyx_RefNannyDeclarations
7760 __Pyx_RefNannySetupContext(
"__iadd__ (wrapper)", 0);
7761 __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7764 __Pyx_RefNannyFinishContext();
7768 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7769 PyObject *__pyx_r = NULL;
7770 __Pyx_RefNannyDeclarations
7771 PyObject *__pyx_t_1 = NULL;
7772 int __pyx_lineno = 0;
7773 const char *__pyx_filename = NULL;
7774 int __pyx_clineno = 0;
7775 __Pyx_RefNannySetupContext(
"__iadd__", 0);
7784 __Pyx_XDECREF(__pyx_r);
7785 __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;}
7786 __Pyx_GOTREF(__pyx_t_1);
7787 __pyx_r = __pyx_t_1;
7801 __Pyx_XDECREF(__pyx_t_1);
7802 __Pyx_AddTraceback(
"PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7805 __Pyx_XGIVEREF(__pyx_r);
7806 __Pyx_RefNannyFinishContext();
7819 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7820 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 ";
7821 #if CYTHON_COMPILING_IN_CPYTHON 7822 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
7824 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7825 PyObject *__pyx_r = 0;
7826 __Pyx_RefNannyDeclarations
7827 __Pyx_RefNannySetupContext(
"__sub__ (wrapper)", 0);
7828 __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7831 __Pyx_RefNannyFinishContext();
7835 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7836 PyObject *__pyx_r = NULL;
7837 __Pyx_RefNannyDeclarations
7838 PyObject *__pyx_t_1 = NULL;
7839 PyObject *__pyx_t_2 = NULL;
7840 int __pyx_lineno = 0;
7841 const char *__pyx_filename = NULL;
7842 int __pyx_clineno = 0;
7843 __Pyx_RefNannySetupContext(
"__sub__", 0);
7852 __Pyx_XDECREF(__pyx_r);
7853 __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;}
7854 __Pyx_GOTREF(__pyx_t_1);
7855 __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;}
7856 __Pyx_GOTREF(__pyx_t_2);
7857 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7858 __pyx_r = __pyx_t_2;
7872 __Pyx_XDECREF(__pyx_t_1);
7873 __Pyx_XDECREF(__pyx_t_2);
7874 __Pyx_AddTraceback(
"PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7877 __Pyx_XGIVEREF(__pyx_r);
7878 __Pyx_RefNannyFinishContext();
7891 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7892 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 ";
7893 #if CYTHON_COMPILING_IN_CPYTHON 7894 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
7896 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7897 PyObject *__pyx_r = 0;
7898 __Pyx_RefNannyDeclarations
7899 __Pyx_RefNannySetupContext(
"__isub__ (wrapper)", 0);
7900 __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7903 __Pyx_RefNannyFinishContext();
7907 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7908 PyObject *__pyx_r = NULL;
7909 __Pyx_RefNannyDeclarations
7910 PyObject *__pyx_t_1 = NULL;
7911 int __pyx_lineno = 0;
7912 const char *__pyx_filename = NULL;
7913 int __pyx_clineno = 0;
7914 __Pyx_RefNannySetupContext(
"__isub__", 0);
7923 __Pyx_XDECREF(__pyx_r);
7924 __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;}
7925 __Pyx_GOTREF(__pyx_t_1);
7926 __pyx_r = __pyx_t_1;
7940 __Pyx_XDECREF(__pyx_t_1);
7941 __Pyx_AddTraceback(
"PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7944 __Pyx_XGIVEREF(__pyx_r);
7945 __Pyx_RefNannyFinishContext();
7958 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7959 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 ";
7960 #if CYTHON_COMPILING_IN_CPYTHON 7961 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
7963 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7964 PyObject *__pyx_r = 0;
7965 __Pyx_RefNannyDeclarations
7966 __Pyx_RefNannySetupContext(
"__mul__ (wrapper)", 0);
7967 __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7970 __Pyx_RefNannyFinishContext();
7974 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7975 PyObject *__pyx_r = NULL;
7976 __Pyx_RefNannyDeclarations
7977 PyObject *__pyx_t_1 = NULL;
7978 PyObject *__pyx_t_2 = NULL;
7979 int __pyx_lineno = 0;
7980 const char *__pyx_filename = NULL;
7981 int __pyx_clineno = 0;
7982 __Pyx_RefNannySetupContext(
"__mul__", 0);
7991 __Pyx_XDECREF(__pyx_r);
7992 __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;}
7993 __Pyx_GOTREF(__pyx_t_1);
7994 __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;}
7995 __Pyx_GOTREF(__pyx_t_2);
7996 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7997 __pyx_r = __pyx_t_2;
8011 __Pyx_XDECREF(__pyx_t_1);
8012 __Pyx_XDECREF(__pyx_t_2);
8013 __Pyx_AddTraceback(
"PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8016 __Pyx_XGIVEREF(__pyx_r);
8017 __Pyx_RefNannyFinishContext();
8030 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8031 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 ";
8032 #if CYTHON_COMPILING_IN_CPYTHON 8033 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8035 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8036 PyObject *__pyx_r = 0;
8037 __Pyx_RefNannyDeclarations
8038 __Pyx_RefNannySetupContext(
"__imul__ (wrapper)", 0);
8039 __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8042 __Pyx_RefNannyFinishContext();
8046 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8047 PyObject *__pyx_r = NULL;
8048 __Pyx_RefNannyDeclarations
8049 PyObject *__pyx_t_1 = NULL;
8050 int __pyx_lineno = 0;
8051 const char *__pyx_filename = NULL;
8052 int __pyx_clineno = 0;
8053 __Pyx_RefNannySetupContext(
"__imul__", 0);
8062 __Pyx_XDECREF(__pyx_r);
8063 __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;}
8064 __Pyx_GOTREF(__pyx_t_1);
8065 __pyx_r = __pyx_t_1;
8079 __Pyx_XDECREF(__pyx_t_1);
8080 __Pyx_AddTraceback(
"PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8083 __Pyx_XGIVEREF(__pyx_r);
8084 __Pyx_RefNannyFinishContext();
8097 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8098 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 ";
8099 #if CYTHON_COMPILING_IN_CPYTHON 8100 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8102 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8103 PyObject *__pyx_r = 0;
8104 __Pyx_RefNannyDeclarations
8105 __Pyx_RefNannySetupContext(
"__mod__ (wrapper)", 0);
8106 __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8109 __Pyx_RefNannyFinishContext();
8113 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8114 PyObject *__pyx_r = NULL;
8115 __Pyx_RefNannyDeclarations
8116 PyObject *__pyx_t_1 = NULL;
8117 PyObject *__pyx_t_2 = NULL;
8118 int __pyx_lineno = 0;
8119 const char *__pyx_filename = NULL;
8120 int __pyx_clineno = 0;
8121 __Pyx_RefNannySetupContext(
"__mod__", 0);
8130 __Pyx_XDECREF(__pyx_r);
8131 __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;}
8132 __Pyx_GOTREF(__pyx_t_1);
8133 __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;}
8134 __Pyx_GOTREF(__pyx_t_2);
8135 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8136 __pyx_r = __pyx_t_2;
8150 __Pyx_XDECREF(__pyx_t_1);
8151 __Pyx_XDECREF(__pyx_t_2);
8152 __Pyx_AddTraceback(
"PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8155 __Pyx_XGIVEREF(__pyx_r);
8156 __Pyx_RefNannyFinishContext();
8169 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8170 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 ";
8171 #if CYTHON_COMPILING_IN_CPYTHON 8172 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8174 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8175 PyObject *__pyx_r = 0;
8176 __Pyx_RefNannyDeclarations
8177 __Pyx_RefNannySetupContext(
"__imod__ (wrapper)", 0);
8178 __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8181 __Pyx_RefNannyFinishContext();
8185 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8186 PyObject *__pyx_r = NULL;
8187 __Pyx_RefNannyDeclarations
8188 PyObject *__pyx_t_1 = NULL;
8189 int __pyx_lineno = 0;
8190 const char *__pyx_filename = NULL;
8191 int __pyx_clineno = 0;
8192 __Pyx_RefNannySetupContext(
"__imod__", 0);
8201 __Pyx_XDECREF(__pyx_r);
8202 __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;}
8203 __Pyx_GOTREF(__pyx_t_1);
8204 __pyx_r = __pyx_t_1;
8218 __Pyx_XDECREF(__pyx_t_1);
8219 __Pyx_AddTraceback(
"PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8222 __Pyx_XGIVEREF(__pyx_r);
8223 __Pyx_RefNannyFinishContext();
8236 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8237 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 ";
8238 #if CYTHON_COMPILING_IN_CPYTHON 8239 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8241 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8242 PyObject *__pyx_r = 0;
8243 __Pyx_RefNannyDeclarations
8244 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
8245 __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8248 __Pyx_RefNannyFinishContext();
8252 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8253 PyObject *__pyx_r = NULL;
8254 __Pyx_RefNannyDeclarations
8255 PyObject *__pyx_t_1 = NULL;
8256 PyObject *__pyx_t_2 = NULL;
8257 int __pyx_lineno = 0;
8258 const char *__pyx_filename = NULL;
8259 int __pyx_clineno = 0;
8260 __Pyx_RefNannySetupContext(
"__and__", 0);
8269 __Pyx_XDECREF(__pyx_r);
8270 __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;}
8271 __Pyx_GOTREF(__pyx_t_1);
8272 __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;}
8273 __Pyx_GOTREF(__pyx_t_2);
8274 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8275 __pyx_r = __pyx_t_2;
8289 __Pyx_XDECREF(__pyx_t_1);
8290 __Pyx_XDECREF(__pyx_t_2);
8291 __Pyx_AddTraceback(
"PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8294 __Pyx_XGIVEREF(__pyx_r);
8295 __Pyx_RefNannyFinishContext();
8308 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8309 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 ";
8310 #if CYTHON_COMPILING_IN_CPYTHON 8311 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8313 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8314 PyObject *__pyx_r = 0;
8315 __Pyx_RefNannyDeclarations
8316 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
8317 __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8320 __Pyx_RefNannyFinishContext();
8324 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8325 PyObject *__pyx_r = NULL;
8326 __Pyx_RefNannyDeclarations
8327 PyObject *__pyx_t_1 = NULL;
8328 int __pyx_lineno = 0;
8329 const char *__pyx_filename = NULL;
8330 int __pyx_clineno = 0;
8331 __Pyx_RefNannySetupContext(
"__iand__", 0);
8340 __Pyx_XDECREF(__pyx_r);
8341 __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;}
8342 __Pyx_GOTREF(__pyx_t_1);
8343 __pyx_r = __pyx_t_1;
8357 __Pyx_XDECREF(__pyx_t_1);
8358 __Pyx_AddTraceback(
"PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8361 __Pyx_XGIVEREF(__pyx_r);
8362 __Pyx_RefNannyFinishContext();
8375 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8376 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 ";
8377 #if CYTHON_COMPILING_IN_CPYTHON 8378 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8380 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8381 PyObject *__pyx_r = 0;
8382 __Pyx_RefNannyDeclarations
8383 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
8384 __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8387 __Pyx_RefNannyFinishContext();
8391 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8392 PyObject *__pyx_r = NULL;
8393 __Pyx_RefNannyDeclarations
8394 PyObject *__pyx_t_1 = NULL;
8395 PyObject *__pyx_t_2 = NULL;
8396 int __pyx_lineno = 0;
8397 const char *__pyx_filename = NULL;
8398 int __pyx_clineno = 0;
8399 __Pyx_RefNannySetupContext(
"__xor__", 0);
8408 __Pyx_XDECREF(__pyx_r);
8409 __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;}
8410 __Pyx_GOTREF(__pyx_t_1);
8411 __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;}
8412 __Pyx_GOTREF(__pyx_t_2);
8413 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8414 __pyx_r = __pyx_t_2;
8428 __Pyx_XDECREF(__pyx_t_1);
8429 __Pyx_XDECREF(__pyx_t_2);
8430 __Pyx_AddTraceback(
"PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8433 __Pyx_XGIVEREF(__pyx_r);
8434 __Pyx_RefNannyFinishContext();
8447 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8448 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 ";
8449 #if CYTHON_COMPILING_IN_CPYTHON 8450 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8452 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8453 PyObject *__pyx_r = 0;
8454 __Pyx_RefNannyDeclarations
8455 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
8456 __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8459 __Pyx_RefNannyFinishContext();
8463 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8464 PyObject *__pyx_r = NULL;
8465 __Pyx_RefNannyDeclarations
8466 PyObject *__pyx_t_1 = NULL;
8467 int __pyx_lineno = 0;
8468 const char *__pyx_filename = NULL;
8469 int __pyx_clineno = 0;
8470 __Pyx_RefNannySetupContext(
"__ixor__", 0);
8479 __Pyx_XDECREF(__pyx_r);
8480 __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;}
8481 __Pyx_GOTREF(__pyx_t_1);
8482 __pyx_r = __pyx_t_1;
8496 __Pyx_XDECREF(__pyx_t_1);
8497 __Pyx_AddTraceback(
"PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8500 __Pyx_XGIVEREF(__pyx_r);
8501 __Pyx_RefNannyFinishContext();
8514 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8515 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8516 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 ";
8517 #if CYTHON_COMPILING_IN_CPYTHON 8518 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8520 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8521 PyObject *__pyx_r = 0;
8522 __Pyx_RefNannyDeclarations
8523 __Pyx_RefNannySetupContext(
"__div__ (wrapper)", 0);
8524 __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8527 __Pyx_RefNannyFinishContext();
8532 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8533 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8534 PyObject *__pyx_r = NULL;
8535 __Pyx_RefNannyDeclarations
8536 PyObject *__pyx_t_1 = NULL;
8537 PyObject *__pyx_t_2 = NULL;
8538 int __pyx_lineno = 0;
8539 const char *__pyx_filename = NULL;
8540 int __pyx_clineno = 0;
8541 __Pyx_RefNannySetupContext(
"__div__", 0);
8550 __Pyx_XDECREF(__pyx_r);
8551 __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;}
8552 __Pyx_GOTREF(__pyx_t_1);
8553 __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;}
8554 __Pyx_GOTREF(__pyx_t_2);
8555 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8556 __pyx_r = __pyx_t_2;
8570 __Pyx_XDECREF(__pyx_t_1);
8571 __Pyx_XDECREF(__pyx_t_2);
8572 __Pyx_AddTraceback(
"PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8575 __Pyx_XGIVEREF(__pyx_r);
8576 __Pyx_RefNannyFinishContext();
8590 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8591 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8592 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 ";
8593 #if CYTHON_COMPILING_IN_CPYTHON 8594 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8596 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8597 PyObject *__pyx_r = 0;
8598 __Pyx_RefNannyDeclarations
8599 __Pyx_RefNannySetupContext(
"__idiv__ (wrapper)", 0);
8600 __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8603 __Pyx_RefNannyFinishContext();
8608 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 8609 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8610 PyObject *__pyx_r = NULL;
8611 __Pyx_RefNannyDeclarations
8612 PyObject *__pyx_t_1 = NULL;
8613 int __pyx_lineno = 0;
8614 const char *__pyx_filename = NULL;
8615 int __pyx_clineno = 0;
8616 __Pyx_RefNannySetupContext(
"__idiv__", 0);
8625 __Pyx_XDECREF(__pyx_r);
8626 __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;}
8627 __Pyx_GOTREF(__pyx_t_1);
8628 __pyx_r = __pyx_t_1;
8642 __Pyx_XDECREF(__pyx_t_1);
8643 __Pyx_AddTraceback(
"PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8646 __Pyx_XGIVEREF(__pyx_r);
8647 __Pyx_RefNannyFinishContext();
8661 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8662 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 ";
8663 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8664 PyObject *__pyx_r = 0;
8665 __Pyx_RefNannyDeclarations
8666 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
8667 __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8670 __Pyx_RefNannyFinishContext();
8674 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8675 PyObject *__pyx_r = NULL;
8676 __Pyx_RefNannyDeclarations
8677 PyObject *__pyx_t_1 = NULL;
8678 PyObject *__pyx_t_2 = NULL;
8679 int __pyx_lineno = 0;
8680 const char *__pyx_filename = NULL;
8681 int __pyx_clineno = 0;
8682 __Pyx_RefNannySetupContext(
"inv", 0);
8691 __Pyx_XDECREF(__pyx_r);
8692 __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;}
8693 __Pyx_GOTREF(__pyx_t_1);
8694 __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;}
8695 __Pyx_GOTREF(__pyx_t_2);
8696 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8697 __pyx_r = __pyx_t_2;
8711 __Pyx_XDECREF(__pyx_t_1);
8712 __Pyx_XDECREF(__pyx_t_2);
8713 __Pyx_AddTraceback(
"PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
8716 __Pyx_XGIVEREF(__pyx_r);
8717 __Pyx_RefNannyFinishContext();
8730 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8731 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 ";
8732 #if CYTHON_COMPILING_IN_CPYTHON 8733 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
8735 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8736 PyObject *__pyx_r = 0;
8737 __Pyx_RefNannyDeclarations
8738 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
8739 __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8742 __Pyx_RefNannyFinishContext();
8746 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8747 PyObject *__pyx_r = NULL;
8748 __Pyx_RefNannyDeclarations
8749 PyObject *__pyx_t_1 = NULL;
8750 PyObject *__pyx_t_2 = NULL;
8751 int __pyx_lineno = 0;
8752 const char *__pyx_filename = NULL;
8753 int __pyx_clineno = 0;
8754 __Pyx_RefNannySetupContext(
"__or__", 0);
8763 __Pyx_XDECREF(__pyx_r);
8764 __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;}
8765 __Pyx_GOTREF(__pyx_t_1);
8766 __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;}
8767 __Pyx_GOTREF(__pyx_t_2);
8768 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8769 __pyx_r = __pyx_t_2;
8783 __Pyx_XDECREF(__pyx_t_1);
8784 __Pyx_XDECREF(__pyx_t_2);
8785 __Pyx_AddTraceback(
"PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8788 __Pyx_XGIVEREF(__pyx_r);
8789 __Pyx_RefNannyFinishContext();
8802 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8803 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 ";
8804 #if CYTHON_COMPILING_IN_CPYTHON 8805 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
8807 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8808 PyObject *__pyx_r = 0;
8809 __Pyx_RefNannyDeclarations
8810 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
8811 __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8814 __Pyx_RefNannyFinishContext();
8818 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8819 PyObject *__pyx_r = NULL;
8820 __Pyx_RefNannyDeclarations
8821 PyObject *__pyx_t_1 = NULL;
8822 int __pyx_lineno = 0;
8823 const char *__pyx_filename = NULL;
8824 int __pyx_clineno = 0;
8825 __Pyx_RefNannySetupContext(
"__ior__", 0);
8834 __Pyx_XDECREF(__pyx_r);
8835 __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;}
8836 __Pyx_GOTREF(__pyx_t_1);
8837 __pyx_r = __pyx_t_1;
8851 __Pyx_XDECREF(__pyx_t_1);
8852 __Pyx_AddTraceback(
"PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8855 __Pyx_XGIVEREF(__pyx_r);
8856 __Pyx_RefNannyFinishContext();
8869 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy);
8870 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 ";
8871 #if CYTHON_COMPILING_IN_CPYTHON 8872 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
8874 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
8875 PyObject *__pyx_r = 0;
8876 __Pyx_RefNannyDeclarations
8877 __Pyx_RefNannySetupContext(
"__pow__ (wrapper)", 0);
8878 __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
8881 __Pyx_RefNannyFinishContext();
8885 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
8886 PyObject *__pyx_r = NULL;
8887 __Pyx_RefNannyDeclarations
8888 PyObject *__pyx_t_1 = NULL;
8889 int __pyx_lineno = 0;
8890 const char *__pyx_filename = NULL;
8891 int __pyx_clineno = 0;
8892 __Pyx_RefNannySetupContext(
"__pow__", 0);
8901 __Pyx_XDECREF(__pyx_r);
8902 __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;}
8903 __Pyx_GOTREF(__pyx_t_1);
8904 __pyx_r = __pyx_t_1;
8918 __Pyx_XDECREF(__pyx_t_1);
8919 __Pyx_AddTraceback(
"PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8922 __Pyx_XGIVEREF(__pyx_r);
8923 __Pyx_RefNannyFinishContext();
8936 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
8937 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 ";
8938 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8939 PyObject *__pyx_r = 0;
8940 __Pyx_RefNannyDeclarations
8941 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
8942 __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8945 __Pyx_RefNannyFinishContext();
8949 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8950 PyObject *__pyx_r = NULL;
8951 __Pyx_RefNannyDeclarations
8952 PyObject *__pyx_t_1 = NULL;
8953 PyObject *__pyx_t_2 = NULL;
8957 int __pyx_lineno = 0;
8958 const char *__pyx_filename = NULL;
8959 int __pyx_clineno = 0;
8960 __Pyx_RefNannySetupContext(
"pow", 0);
8969 __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;}
8970 __Pyx_GOTREF(__pyx_t_1);
8971 __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;}
8972 __Pyx_GOTREF(__pyx_t_2);
8973 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8974 __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;}
8975 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8976 __pyx_t_4 = (__pyx_t_3 != 0);
8986 __Pyx_XDECREF(__pyx_r);
8987 __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;}
8988 __Pyx_GOTREF(__pyx_t_2);
8989 __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;}
8990 __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;}
8991 __Pyx_GOTREF(__pyx_t_1);
8992 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8993 __pyx_r = __pyx_t_1;
9014 __Pyx_XDECREF(__pyx_r);
9015 __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;}
9016 __Pyx_GOTREF(__pyx_t_1);
9017 __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;}
9018 __Pyx_GOTREF(__pyx_t_2);
9019 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9020 __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;}
9021 __Pyx_GOTREF(__pyx_t_1);
9022 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9023 __pyx_r = __pyx_t_1;
9038 __Pyx_XDECREF(__pyx_t_1);
9039 __Pyx_XDECREF(__pyx_t_2);
9040 __Pyx_AddTraceback(
"PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9043 __Pyx_XGIVEREF(__pyx_r);
9044 __Pyx_RefNannyFinishContext();
9057 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
9058 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 ";
9059 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9060 PyObject *__pyx_r = 0;
9061 __Pyx_RefNannyDeclarations
9062 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
9063 __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9066 __Pyx_RefNannyFinishContext();
9070 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9071 PyObject *__pyx_r = NULL;
9072 __Pyx_RefNannyDeclarations
9073 PyObject *__pyx_t_1 = NULL;
9075 PyObject *__pyx_t_3 = NULL;
9076 int __pyx_lineno = 0;
9077 const char *__pyx_filename = NULL;
9078 int __pyx_clineno = 0;
9079 __Pyx_RefNannySetupContext(
"outer_pow", 0);
9088 __Pyx_XDECREF(__pyx_r);
9089 __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;}
9090 __Pyx_GOTREF(__pyx_t_1);
9091 __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;}
9092 __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;}
9093 __Pyx_GOTREF(__pyx_t_3);
9094 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9095 __pyx_r = __pyx_t_3;
9109 __Pyx_XDECREF(__pyx_t_1);
9110 __Pyx_XDECREF(__pyx_t_3);
9111 __Pyx_AddTraceback(
"PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9114 __Pyx_XGIVEREF(__pyx_r);
9115 __Pyx_RefNannyFinishContext();
9128 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9129 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 ";
9130 #if CYTHON_COMPILING_IN_CPYTHON 9131 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9133 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9134 PyObject *__pyx_v_grade = 0;
9135 int __pyx_lineno = 0;
9136 const char *__pyx_filename = NULL;
9137 int __pyx_clineno = 0;
9138 PyObject *__pyx_r = 0;
9139 __Pyx_RefNannyDeclarations
9140 __Pyx_RefNannySetupContext(
"__call__ (wrapper)", 0);
9142 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9143 PyObject* values[1] = {0};
9144 if (unlikely(__pyx_kwds)) {
9146 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9148 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9150 default:
goto __pyx_L5_argtuple_error;
9152 kw_args = PyDict_Size(__pyx_kwds);
9155 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9156 else goto __pyx_L5_argtuple_error;
9158 if (unlikely(kw_args > 0)) {
9159 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;}
9161 }
else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9162 goto __pyx_L5_argtuple_error;
9164 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9166 __pyx_v_grade = values[0];
9168 goto __pyx_L4_argument_unpacking_done;
9169 __pyx_L5_argtuple_error:;
9170 __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;}
9172 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9173 __Pyx_RefNannyFinishContext();
9175 __pyx_L4_argument_unpacking_done:;
9176 __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9179 __Pyx_RefNannyFinishContext();
9183 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9184 PyObject *__pyx_r = NULL;
9185 __Pyx_RefNannyDeclarations
9186 PyObject *__pyx_t_1 = NULL;
9188 PyObject *__pyx_t_3 = NULL;
9189 int __pyx_lineno = 0;
9190 const char *__pyx_filename = NULL;
9191 int __pyx_clineno = 0;
9192 __Pyx_RefNannySetupContext(
"__call__", 0);
9201 __Pyx_XDECREF(__pyx_r);
9202 __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;}
9203 __Pyx_GOTREF(__pyx_t_1);
9204 __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;}
9205 __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;}
9206 __Pyx_GOTREF(__pyx_t_3);
9207 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9208 __pyx_r = __pyx_t_3;
9222 __Pyx_XDECREF(__pyx_t_1);
9223 __Pyx_XDECREF(__pyx_t_3);
9224 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9227 __Pyx_XGIVEREF(__pyx_r);
9228 __Pyx_RefNannyFinishContext();
9241 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9242 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 ";
9243 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9244 PyObject *__pyx_r = 0;
9245 __Pyx_RefNannyDeclarations
9246 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
9247 __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9250 __Pyx_RefNannyFinishContext();
9254 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9255 PyObject *__pyx_r = NULL;
9256 __Pyx_RefNannyDeclarations
9257 PyObject *__pyx_t_1 = NULL;
9258 int __pyx_lineno = 0;
9259 const char *__pyx_filename = NULL;
9260 int __pyx_clineno = 0;
9261 __Pyx_RefNannySetupContext(
"scalar", 0);
9270 __Pyx_XDECREF(__pyx_r);
9271 __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;}
9272 __Pyx_GOTREF(__pyx_t_1);
9273 __pyx_r = __pyx_t_1;
9287 __Pyx_XDECREF(__pyx_t_1);
9288 __Pyx_AddTraceback(
"PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9291 __Pyx_XGIVEREF(__pyx_r);
9292 __Pyx_RefNannyFinishContext();
9305 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9306 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 ";
9307 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9308 PyObject *__pyx_r = 0;
9309 __Pyx_RefNannyDeclarations
9310 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
9311 __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9314 __Pyx_RefNannyFinishContext();
9318 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9319 PyObject *__pyx_r = NULL;
9320 __Pyx_RefNannyDeclarations
9321 PyObject *__pyx_t_1 = NULL;
9322 PyObject *__pyx_t_2 = NULL;
9323 int __pyx_lineno = 0;
9324 const char *__pyx_filename = NULL;
9325 int __pyx_clineno = 0;
9326 __Pyx_RefNannySetupContext(
"pure", 0);
9335 __Pyx_XDECREF(__pyx_r);
9336 __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;}
9337 __Pyx_GOTREF(__pyx_t_1);
9338 __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;}
9339 __Pyx_GOTREF(__pyx_t_2);
9340 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9341 __pyx_r = __pyx_t_2;
9355 __Pyx_XDECREF(__pyx_t_1);
9356 __Pyx_XDECREF(__pyx_t_2);
9357 __Pyx_AddTraceback(
"PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9360 __Pyx_XGIVEREF(__pyx_r);
9361 __Pyx_RefNannyFinishContext();
9374 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9375 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 ";
9376 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9377 PyObject *__pyx_r = 0;
9378 __Pyx_RefNannyDeclarations
9379 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
9380 __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9383 __Pyx_RefNannyFinishContext();
9387 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9388 PyObject *__pyx_r = NULL;
9389 __Pyx_RefNannyDeclarations
9390 PyObject *__pyx_t_1 = NULL;
9391 PyObject *__pyx_t_2 = NULL;
9392 int __pyx_lineno = 0;
9393 const char *__pyx_filename = NULL;
9394 int __pyx_clineno = 0;
9395 __Pyx_RefNannySetupContext(
"even", 0);
9404 __Pyx_XDECREF(__pyx_r);
9405 __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;}
9406 __Pyx_GOTREF(__pyx_t_1);
9407 __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;}
9408 __Pyx_GOTREF(__pyx_t_2);
9409 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9410 __pyx_r = __pyx_t_2;
9424 __Pyx_XDECREF(__pyx_t_1);
9425 __Pyx_XDECREF(__pyx_t_2);
9426 __Pyx_AddTraceback(
"PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9429 __Pyx_XGIVEREF(__pyx_r);
9430 __Pyx_RefNannyFinishContext();
9443 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9444 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 ";
9445 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9446 PyObject *__pyx_r = 0;
9447 __Pyx_RefNannyDeclarations
9448 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
9449 __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9452 __Pyx_RefNannyFinishContext();
9456 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9457 PyObject *__pyx_r = NULL;
9458 __Pyx_RefNannyDeclarations
9459 PyObject *__pyx_t_1 = NULL;
9460 PyObject *__pyx_t_2 = NULL;
9461 int __pyx_lineno = 0;
9462 const char *__pyx_filename = NULL;
9463 int __pyx_clineno = 0;
9464 __Pyx_RefNannySetupContext(
"odd", 0);
9473 __Pyx_XDECREF(__pyx_r);
9474 __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;}
9475 __Pyx_GOTREF(__pyx_t_1);
9476 __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;}
9477 __Pyx_GOTREF(__pyx_t_2);
9478 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9479 __pyx_r = __pyx_t_2;
9493 __Pyx_XDECREF(__pyx_t_1);
9494 __Pyx_XDECREF(__pyx_t_2);
9495 __Pyx_AddTraceback(
"PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9498 __Pyx_XGIVEREF(__pyx_r);
9499 __Pyx_RefNannyFinishContext();
9512 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9513 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 ";
9514 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9515 PyObject *__pyx_v_frm = 0;
9516 int __pyx_lineno = 0;
9517 const char *__pyx_filename = NULL;
9518 int __pyx_clineno = 0;
9519 PyObject *__pyx_r = 0;
9520 __Pyx_RefNannyDeclarations
9521 __Pyx_RefNannySetupContext(
"vector_part (wrapper)", 0);
9523 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9524 PyObject* values[1] = {0};
9525 values[0] = ((PyObject *)Py_None);
9526 if (unlikely(__pyx_kwds)) {
9528 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9530 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9532 default:
goto __pyx_L5_argtuple_error;
9534 kw_args = PyDict_Size(__pyx_kwds);
9538 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9539 if (value) { values[0] = value; kw_args--; }
9542 if (unlikely(kw_args > 0)) {
9543 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;}
9546 switch (PyTuple_GET_SIZE(__pyx_args)) {
9547 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9549 default:
goto __pyx_L5_argtuple_error;
9552 __pyx_v_frm = values[0];
9554 goto __pyx_L4_argument_unpacking_done;
9555 __pyx_L5_argtuple_error:;
9556 __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;}
9558 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9559 __Pyx_RefNannyFinishContext();
9561 __pyx_L4_argument_unpacking_done:;
9562 __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9565 __Pyx_RefNannyFinishContext();
9569 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9570 PyObject *__pyx_v_error_msg_prefix = NULL;
9571 std::vector<scalar_t> __pyx_v_vec;
9574 PyObject *__pyx_v_lst = NULL;
9575 PyObject *__pyx_v_err = NULL;
9576 PyObject *__pyx_r = NULL;
9577 __Pyx_RefNannyDeclarations
9578 PyObject *__pyx_t_1 = NULL;
9579 PyObject *__pyx_t_2 = NULL;
9580 PyObject *__pyx_t_3 = NULL;
9583 std::vector<scalar_t> __pyx_t_6;
9584 PyObject *__pyx_t_7 = NULL;
9587 PyObject *__pyx_t_10 = NULL;
9588 PyObject *__pyx_t_11 = NULL;
9589 PyObject *__pyx_t_12 = NULL;
9590 PyObject *__pyx_t_13 = NULL;
9591 PyObject *__pyx_t_14 = NULL;
9592 int __pyx_lineno = 0;
9593 const char *__pyx_filename = NULL;
9594 int __pyx_clineno = 0;
9595 __Pyx_RefNannySetupContext(
"vector_part", 0);
9604 __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9605 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9615 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9616 __Pyx_XGOTREF(__pyx_t_1);
9617 __Pyx_XGOTREF(__pyx_t_2);
9618 __Pyx_XGOTREF(__pyx_t_3);
9628 __pyx_t_4 = (__pyx_v_frm == Py_None);
9629 __pyx_t_5 = (__pyx_t_4 != 0);
9639 __pyx_v_vec = __pyx_v_self->instance->vector_part();
9660 __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9662 __Pyx_CppExn2PyErr();
9663 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9665 __pyx_v_vec = __pyx_t_6;
9676 __pyx_v_n = __pyx_v_vec.size();
9685 __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;}
9686 __Pyx_GOTREF(__pyx_t_7);
9687 { Py_ssize_t __pyx_temp;
9688 for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
9689 __Pyx_INCREF(__pyx_float_0_0);
9690 __Pyx_GIVEREF(__pyx_float_0_0);
9691 PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
9694 __pyx_v_lst = ((PyObject*)__pyx_t_7);
9704 __pyx_t_8 = __pyx_v_n;
9705 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
9706 __pyx_v_i = __pyx_t_9;
9715 __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;}
9716 __Pyx_GOTREF(__pyx_t_7);
9717 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;}
9718 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9728 __Pyx_XDECREF(__pyx_r);
9729 __Pyx_INCREF(__pyx_v_lst);
9730 __pyx_r = __pyx_v_lst;
9731 goto __pyx_L7_try_return;
9742 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9751 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
9753 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9754 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;}
9755 __Pyx_GOTREF(__pyx_t_7);
9756 __Pyx_GOTREF(__pyx_t_10);
9757 __Pyx_GOTREF(__pyx_t_11);
9758 __Pyx_INCREF(__pyx_t_10);
9759 __pyx_v_err = __pyx_t_10;
9768 __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;}
9769 __Pyx_GOTREF(__pyx_t_12);
9770 __Pyx_INCREF(((PyObject *)__pyx_v_self));
9771 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
9772 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
9773 __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;}
9774 __Pyx_GOTREF(__pyx_t_13);
9775 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9776 __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;}
9777 __Pyx_GOTREF(__pyx_t_12);
9778 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9779 __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;}
9780 __Pyx_GOTREF(__pyx_t_13);
9781 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9790 __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;}
9791 __Pyx_GOTREF(__pyx_t_12);
9792 __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;}
9793 __Pyx_GOTREF(__pyx_t_14);
9794 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9795 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9796 __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;}
9797 __Pyx_GOTREF(__pyx_t_12);
9798 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9807 __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;}
9808 __Pyx_GOTREF(__pyx_t_14);
9809 __Pyx_INCREF(__pyx_v_err);
9810 __Pyx_GIVEREF(__pyx_v_err);
9811 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
9812 __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;}
9813 __Pyx_GOTREF(__pyx_t_13);
9814 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9815 __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;}
9816 __Pyx_GOTREF(__pyx_t_14);
9817 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9818 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9827 __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;}
9828 __Pyx_GOTREF(__pyx_t_13);
9829 __Pyx_GIVEREF(__pyx_t_14);
9830 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
9832 __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;}
9833 __Pyx_GOTREF(__pyx_t_14);
9834 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9835 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
9836 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9837 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9839 goto __pyx_L5_except_error;
9840 __pyx_L5_except_error:;
9849 __Pyx_XGIVEREF(__pyx_t_1);
9850 __Pyx_XGIVEREF(__pyx_t_2);
9851 __Pyx_XGIVEREF(__pyx_t_3);
9852 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9853 goto __pyx_L1_error;
9854 __pyx_L7_try_return:;
9855 __Pyx_XGIVEREF(__pyx_t_1);
9856 __Pyx_XGIVEREF(__pyx_t_2);
9857 __Pyx_XGIVEREF(__pyx_t_3);
9858 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9872 __Pyx_XDECREF(__pyx_t_7);
9873 __Pyx_XDECREF(__pyx_t_10);
9874 __Pyx_XDECREF(__pyx_t_11);
9875 __Pyx_XDECREF(__pyx_t_12);
9876 __Pyx_XDECREF(__pyx_t_13);
9877 __Pyx_XDECREF(__pyx_t_14);
9878 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9881 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
9882 __Pyx_XDECREF(__pyx_v_lst);
9883 __Pyx_XDECREF(__pyx_v_err);
9884 __Pyx_XGIVEREF(__pyx_r);
9885 __Pyx_RefNannyFinishContext();
9898 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9899 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 ";
9900 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9901 PyObject *__pyx_r = 0;
9902 __Pyx_RefNannyDeclarations
9903 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
9904 __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9907 __Pyx_RefNannyFinishContext();
9911 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9912 PyObject *__pyx_r = NULL;
9913 __Pyx_RefNannyDeclarations
9914 PyObject *__pyx_t_1 = NULL;
9915 PyObject *__pyx_t_2 = NULL;
9916 int __pyx_lineno = 0;
9917 const char *__pyx_filename = NULL;
9918 int __pyx_clineno = 0;
9919 __Pyx_RefNannySetupContext(
"involute", 0);
9928 __Pyx_XDECREF(__pyx_r);
9929 __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;}
9930 __Pyx_GOTREF(__pyx_t_1);
9931 __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;}
9932 __Pyx_GOTREF(__pyx_t_2);
9933 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9934 __pyx_r = __pyx_t_2;
9948 __Pyx_XDECREF(__pyx_t_1);
9949 __Pyx_XDECREF(__pyx_t_2);
9950 __Pyx_AddTraceback(
"PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
9953 __Pyx_XGIVEREF(__pyx_r);
9954 __Pyx_RefNannyFinishContext();
9967 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9968 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 ";
9969 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9970 PyObject *__pyx_r = 0;
9971 __Pyx_RefNannyDeclarations
9972 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
9973 __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9976 __Pyx_RefNannyFinishContext();
9980 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9981 PyObject *__pyx_r = NULL;
9982 __Pyx_RefNannyDeclarations
9983 PyObject *__pyx_t_1 = NULL;
9984 PyObject *__pyx_t_2 = NULL;
9985 int __pyx_lineno = 0;
9986 const char *__pyx_filename = NULL;
9987 int __pyx_clineno = 0;
9988 __Pyx_RefNannySetupContext(
"reverse", 0);
9997 __Pyx_XDECREF(__pyx_r);
9998 __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;}
9999 __Pyx_GOTREF(__pyx_t_1);
10000 __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;}
10001 __Pyx_GOTREF(__pyx_t_2);
10002 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10003 __pyx_r = __pyx_t_2;
10017 __Pyx_XDECREF(__pyx_t_1);
10018 __Pyx_XDECREF(__pyx_t_2);
10019 __Pyx_AddTraceback(
"PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10022 __Pyx_XGIVEREF(__pyx_r);
10023 __Pyx_RefNannyFinishContext();
10036 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10037 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 ";
10038 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10039 PyObject *__pyx_r = 0;
10040 __Pyx_RefNannyDeclarations
10041 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
10042 __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10045 __Pyx_RefNannyFinishContext();
10049 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10050 PyObject *__pyx_r = NULL;
10051 __Pyx_RefNannyDeclarations
10052 PyObject *__pyx_t_1 = NULL;
10053 PyObject *__pyx_t_2 = NULL;
10054 int __pyx_lineno = 0;
10055 const char *__pyx_filename = NULL;
10056 int __pyx_clineno = 0;
10057 __Pyx_RefNannySetupContext(
"conj", 0);
10066 __Pyx_XDECREF(__pyx_r);
10067 __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;}
10068 __Pyx_GOTREF(__pyx_t_1);
10069 __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;}
10070 __Pyx_GOTREF(__pyx_t_2);
10071 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10072 __pyx_r = __pyx_t_2;
10086 __Pyx_XDECREF(__pyx_t_1);
10087 __Pyx_XDECREF(__pyx_t_2);
10088 __Pyx_AddTraceback(
"PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10091 __Pyx_XGIVEREF(__pyx_r);
10092 __Pyx_RefNannyFinishContext();
10105 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10106 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 ";
10107 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10108 PyObject *__pyx_r = 0;
10109 __Pyx_RefNannyDeclarations
10110 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
10111 __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10114 __Pyx_RefNannyFinishContext();
10118 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10119 PyObject *__pyx_r = NULL;
10120 __Pyx_RefNannyDeclarations
10121 PyObject *__pyx_t_1 = NULL;
10122 int __pyx_lineno = 0;
10123 const char *__pyx_filename = NULL;
10124 int __pyx_clineno = 0;
10125 __Pyx_RefNannySetupContext(
"quad", 0);
10134 __Pyx_XDECREF(__pyx_r);
10135 __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;}
10136 __Pyx_GOTREF(__pyx_t_1);
10137 __pyx_r = __pyx_t_1;
10151 __Pyx_XDECREF(__pyx_t_1);
10152 __Pyx_AddTraceback(
"PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10155 __Pyx_XGIVEREF(__pyx_r);
10156 __Pyx_RefNannyFinishContext();
10169 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10170 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 ";
10171 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10172 PyObject *__pyx_r = 0;
10173 __Pyx_RefNannyDeclarations
10174 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
10175 __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10178 __Pyx_RefNannyFinishContext();
10182 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10183 PyObject *__pyx_r = NULL;
10184 __Pyx_RefNannyDeclarations
10185 PyObject *__pyx_t_1 = NULL;
10186 int __pyx_lineno = 0;
10187 const char *__pyx_filename = NULL;
10188 int __pyx_clineno = 0;
10189 __Pyx_RefNannySetupContext(
"norm", 0);
10198 __Pyx_XDECREF(__pyx_r);
10199 __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;}
10200 __Pyx_GOTREF(__pyx_t_1);
10201 __pyx_r = __pyx_t_1;
10215 __Pyx_XDECREF(__pyx_t_1);
10216 __Pyx_AddTraceback(
"PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10219 __Pyx_XGIVEREF(__pyx_r);
10220 __Pyx_RefNannyFinishContext();
10233 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10234 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 ";
10235 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10236 PyObject *__pyx_r = 0;
10237 __Pyx_RefNannyDeclarations
10238 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
10239 __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10242 __Pyx_RefNannyFinishContext();
10246 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10247 PyObject *__pyx_r = NULL;
10248 __Pyx_RefNannyDeclarations
10249 PyObject *__pyx_t_1 = NULL;
10250 int __pyx_lineno = 0;
10251 const char *__pyx_filename = NULL;
10252 int __pyx_clineno = 0;
10253 __Pyx_RefNannySetupContext(
"abs", 0);
10262 __Pyx_XDECREF(__pyx_r);
10263 __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;}
10264 __Pyx_GOTREF(__pyx_t_1);
10265 __pyx_r = __pyx_t_1;
10279 __Pyx_XDECREF(__pyx_t_1);
10280 __Pyx_AddTraceback(
"PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10283 __Pyx_XGIVEREF(__pyx_r);
10284 __Pyx_RefNannyFinishContext();
10297 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10298 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 ";
10299 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10300 PyObject *__pyx_r = 0;
10301 __Pyx_RefNannyDeclarations
10302 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
10303 __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10306 __Pyx_RefNannyFinishContext();
10310 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10311 PyObject *__pyx_r = NULL;
10312 __Pyx_RefNannyDeclarations
10313 PyObject *__pyx_t_1 = NULL;
10314 int __pyx_lineno = 0;
10315 const char *__pyx_filename = NULL;
10316 int __pyx_clineno = 0;
10317 __Pyx_RefNannySetupContext(
"max_abs", 0);
10326 __Pyx_XDECREF(__pyx_r);
10327 __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;}
10328 __Pyx_GOTREF(__pyx_t_1);
10329 __pyx_r = __pyx_t_1;
10343 __Pyx_XDECREF(__pyx_t_1);
10344 __Pyx_AddTraceback(
"PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10347 __Pyx_XGIVEREF(__pyx_r);
10348 __Pyx_RefNannyFinishContext();
10361 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit);
10362 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 ";
10363 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10364 PyObject *__pyx_r = 0;
10365 __Pyx_RefNannyDeclarations
10366 __Pyx_RefNannySetupContext(
"truncated (wrapper)", 0);
10367 __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10370 __Pyx_RefNannyFinishContext();
10374 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10375 PyObject *__pyx_r = NULL;
10376 __Pyx_RefNannyDeclarations
10377 PyObject *__pyx_t_1 = NULL;
10379 PyObject *__pyx_t_3 = NULL;
10380 int __pyx_lineno = 0;
10381 const char *__pyx_filename = NULL;
10382 int __pyx_clineno = 0;
10383 __Pyx_RefNannySetupContext(
"truncated", 0);
10392 __Pyx_XDECREF(__pyx_r);
10393 __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;}
10394 __Pyx_GOTREF(__pyx_t_1);
10395 __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;}
10396 __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;}
10397 __Pyx_GOTREF(__pyx_t_3);
10398 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10399 __pyx_r = __pyx_t_3;
10413 __Pyx_XDECREF(__pyx_t_1);
10414 __Pyx_XDECREF(__pyx_t_3);
10415 __Pyx_AddTraceback(
"PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10418 __Pyx_XGIVEREF(__pyx_r);
10419 __Pyx_RefNannyFinishContext();
10432 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10433 static char __pyx_doc_8PyClical_8clifford_88isnan[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10434 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10435 PyObject *__pyx_r = 0;
10436 __Pyx_RefNannyDeclarations
10437 __Pyx_RefNannySetupContext(
"isnan (wrapper)", 0);
10438 __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10441 __Pyx_RefNannyFinishContext();
10445 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10446 PyObject *__pyx_r = NULL;
10447 __Pyx_RefNannyDeclarations
10448 PyObject *__pyx_t_1 = NULL;
10449 int __pyx_lineno = 0;
10450 const char *__pyx_filename = NULL;
10451 int __pyx_clineno = 0;
10452 __Pyx_RefNannySetupContext(
"isnan", 0);
10461 __Pyx_XDECREF(__pyx_r);
10462 __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;}
10463 __Pyx_GOTREF(__pyx_t_1);
10464 __pyx_r = __pyx_t_1;
10478 __Pyx_XDECREF(__pyx_t_1);
10479 __Pyx_AddTraceback(
"PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10482 __Pyx_XGIVEREF(__pyx_r);
10483 __Pyx_RefNannyFinishContext();
10496 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10497 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 ";
10498 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10499 PyObject *__pyx_r = 0;
10500 __Pyx_RefNannyDeclarations
10501 __Pyx_RefNannySetupContext(
"frame (wrapper)", 0);
10502 __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10505 __Pyx_RefNannyFinishContext();
10509 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10510 PyObject *__pyx_r = NULL;
10511 __Pyx_RefNannyDeclarations
10512 PyObject *__pyx_t_1 = NULL;
10513 PyObject *__pyx_t_2 = NULL;
10514 int __pyx_lineno = 0;
10515 const char *__pyx_filename = NULL;
10516 int __pyx_clineno = 0;
10517 __Pyx_RefNannySetupContext(
"frame", 0);
10526 __Pyx_XDECREF(__pyx_r);
10527 __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;}
10528 __Pyx_GOTREF(__pyx_t_1);
10529 __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;}
10530 __Pyx_GOTREF(__pyx_t_2);
10531 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10532 __pyx_r = __pyx_t_2;
10546 __Pyx_XDECREF(__pyx_t_1);
10547 __Pyx_XDECREF(__pyx_t_2);
10548 __Pyx_AddTraceback(
"PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10551 __Pyx_XGIVEREF(__pyx_r);
10552 __Pyx_RefNannyFinishContext();
10565 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self);
10566 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 ";
10567 #if CYTHON_COMPILING_IN_CPYTHON 10568 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10570 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10571 PyObject *__pyx_r = 0;
10572 __Pyx_RefNannyDeclarations
10573 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
10574 __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10577 __Pyx_RefNannyFinishContext();
10581 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10582 PyObject *__pyx_r = NULL;
10583 __Pyx_RefNannyDeclarations
10584 PyObject *__pyx_t_1 = NULL;
10585 int __pyx_lineno = 0;
10586 const char *__pyx_filename = NULL;
10587 int __pyx_clineno = 0;
10588 __Pyx_RefNannySetupContext(
"__repr__", 0);
10597 __Pyx_XDECREF(__pyx_r);
10598 __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;}
10599 __Pyx_GOTREF(__pyx_t_1);
10600 __pyx_r = __pyx_t_1;
10614 __Pyx_XDECREF(__pyx_t_1);
10615 __Pyx_AddTraceback(
"PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10618 __Pyx_XGIVEREF(__pyx_r);
10619 __Pyx_RefNannyFinishContext();
10632 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self);
10633 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 ";
10634 #if CYTHON_COMPILING_IN_CPYTHON 10635 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10637 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10638 PyObject *__pyx_r = 0;
10639 __Pyx_RefNannyDeclarations
10640 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
10641 __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10644 __Pyx_RefNannyFinishContext();
10648 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10649 PyObject *__pyx_r = NULL;
10650 __Pyx_RefNannyDeclarations
10651 PyObject *__pyx_t_1 = NULL;
10652 int __pyx_lineno = 0;
10653 const char *__pyx_filename = NULL;
10654 int __pyx_clineno = 0;
10655 __Pyx_RefNannySetupContext(
"__str__", 0);
10664 __Pyx_XDECREF(__pyx_r);
10665 __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;}
10666 __Pyx_GOTREF(__pyx_t_1);
10667 __pyx_r = __pyx_t_1;
10681 __Pyx_XDECREF(__pyx_t_1);
10682 __Pyx_AddTraceback(
"PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10685 __Pyx_XGIVEREF(__pyx_r);
10686 __Pyx_RefNannyFinishContext();
10699 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
10700 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 ";
10701 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};
10702 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
10703 PyObject *__pyx_r = 0;
10704 __Pyx_RefNannyDeclarations
10705 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests (wrapper)", 0);
10706 __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
10709 __Pyx_RefNannyFinishContext();
10713 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
10714 PyObject *__pyx_r = NULL;
10715 __Pyx_RefNannyDeclarations
10716 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests", 0);
10725 __Pyx_XDECREF(__pyx_r);
10726 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10739 __Pyx_XGIVEREF(__pyx_r);
10740 __Pyx_RefNannyFinishContext();
10752 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10753 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10754 PyObject *__pyx_r = NULL;
10755 __Pyx_RefNannyDeclarations
10756 PyObject *__pyx_t_1 = NULL;
10757 PyObject *__pyx_t_2 = NULL;
10758 PyObject *__pyx_t_3 = NULL;
10759 int __pyx_lineno = 0;
10760 const char *__pyx_filename = NULL;
10761 int __pyx_clineno = 0;
10762 __Pyx_RefNannySetupContext(
"inv", 0);
10771 __Pyx_XDECREF(__pyx_r);
10772 __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;}
10773 __Pyx_GOTREF(__pyx_t_2);
10774 __Pyx_INCREF(__pyx_v_obj);
10775 __Pyx_GIVEREF(__pyx_v_obj);
10776 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10777 __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;}
10778 __Pyx_GOTREF(__pyx_t_3);
10779 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10780 __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;}
10781 __Pyx_GOTREF(__pyx_t_2);
10782 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10784 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10785 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10786 if (likely(__pyx_t_3)) {
10787 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10788 __Pyx_INCREF(__pyx_t_3);
10789 __Pyx_INCREF(
function);
10790 __Pyx_DECREF_SET(__pyx_t_2,
function);
10794 __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;}
10795 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10797 __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;}
10799 __Pyx_GOTREF(__pyx_t_1);
10800 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10801 __pyx_r = __pyx_t_1;
10815 __Pyx_XDECREF(__pyx_t_1);
10816 __Pyx_XDECREF(__pyx_t_2);
10817 __Pyx_XDECREF(__pyx_t_3);
10818 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10821 __Pyx_XGIVEREF(__pyx_r);
10822 __Pyx_RefNannyFinishContext();
10827 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10828 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 ";
10829 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10830 PyObject *__pyx_r = 0;
10831 __Pyx_RefNannyDeclarations
10832 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
10833 __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
10836 __Pyx_RefNannyFinishContext();
10840 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10841 PyObject *__pyx_r = NULL;
10842 __Pyx_RefNannyDeclarations
10843 PyObject *__pyx_t_1 = NULL;
10844 int __pyx_lineno = 0;
10845 const char *__pyx_filename = NULL;
10846 int __pyx_clineno = 0;
10847 __Pyx_RefNannySetupContext(
"inv", 0);
10848 __Pyx_XDECREF(__pyx_r);
10849 __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;}
10850 __Pyx_GOTREF(__pyx_t_1);
10851 __pyx_r = __pyx_t_1;
10857 __Pyx_XDECREF(__pyx_t_1);
10858 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10861 __Pyx_XGIVEREF(__pyx_r);
10862 __Pyx_RefNannyFinishContext();
10874 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10875 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10876 PyObject *__pyx_r = NULL;
10877 __Pyx_RefNannyDeclarations
10878 PyObject *__pyx_t_1 = NULL;
10879 PyObject *__pyx_t_2 = NULL;
10880 PyObject *__pyx_t_3 = NULL;
10881 int __pyx_lineno = 0;
10882 const char *__pyx_filename = NULL;
10883 int __pyx_clineno = 0;
10884 __Pyx_RefNannySetupContext(
"scalar", 0);
10893 __Pyx_XDECREF(__pyx_r);
10894 __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;}
10895 __Pyx_GOTREF(__pyx_t_2);
10896 __Pyx_INCREF(__pyx_v_obj);
10897 __Pyx_GIVEREF(__pyx_v_obj);
10898 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10899 __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;}
10900 __Pyx_GOTREF(__pyx_t_3);
10901 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10902 __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;}
10903 __Pyx_GOTREF(__pyx_t_2);
10904 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10906 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10907 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10908 if (likely(__pyx_t_3)) {
10909 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10910 __Pyx_INCREF(__pyx_t_3);
10911 __Pyx_INCREF(
function);
10912 __Pyx_DECREF_SET(__pyx_t_2,
function);
10916 __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;}
10917 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10919 __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;}
10921 __Pyx_GOTREF(__pyx_t_1);
10922 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10923 __pyx_r = __pyx_t_1;
10937 __Pyx_XDECREF(__pyx_t_1);
10938 __Pyx_XDECREF(__pyx_t_2);
10939 __Pyx_XDECREF(__pyx_t_3);
10940 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10943 __Pyx_XGIVEREF(__pyx_r);
10944 __Pyx_RefNannyFinishContext();
10949 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10950 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 ";
10951 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10952 PyObject *__pyx_r = 0;
10953 __Pyx_RefNannyDeclarations
10954 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
10955 __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
10958 __Pyx_RefNannyFinishContext();
10962 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10963 PyObject *__pyx_r = NULL;
10964 __Pyx_RefNannyDeclarations
10965 PyObject *__pyx_t_1 = NULL;
10966 int __pyx_lineno = 0;
10967 const char *__pyx_filename = NULL;
10968 int __pyx_clineno = 0;
10969 __Pyx_RefNannySetupContext(
"scalar", 0);
10970 __Pyx_XDECREF(__pyx_r);
10971 __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;}
10972 __Pyx_GOTREF(__pyx_t_1);
10973 __pyx_r = __pyx_t_1;
10979 __Pyx_XDECREF(__pyx_t_1);
10980 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10983 __Pyx_XGIVEREF(__pyx_r);
10984 __Pyx_RefNannyFinishContext();
10996 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10997 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10998 PyObject *__pyx_r = NULL;
10999 __Pyx_RefNannyDeclarations
11000 PyObject *__pyx_t_1 = NULL;
11001 PyObject *__pyx_t_2 = NULL;
11002 PyObject *__pyx_t_3 = NULL;
11003 int __pyx_lineno = 0;
11004 const char *__pyx_filename = NULL;
11005 int __pyx_clineno = 0;
11006 __Pyx_RefNannySetupContext(
"real", 0);
11015 __Pyx_XDECREF(__pyx_r);
11016 __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;}
11017 __Pyx_GOTREF(__pyx_t_2);
11018 __Pyx_INCREF(__pyx_v_obj);
11019 __Pyx_GIVEREF(__pyx_v_obj);
11020 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11021 __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;}
11022 __Pyx_GOTREF(__pyx_t_3);
11023 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11024 __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;}
11025 __Pyx_GOTREF(__pyx_t_2);
11026 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11028 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11029 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11030 if (likely(__pyx_t_3)) {
11031 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11032 __Pyx_INCREF(__pyx_t_3);
11033 __Pyx_INCREF(
function);
11034 __Pyx_DECREF_SET(__pyx_t_2,
function);
11038 __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;}
11039 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11041 __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;}
11043 __Pyx_GOTREF(__pyx_t_1);
11044 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11045 __pyx_r = __pyx_t_1;
11059 __Pyx_XDECREF(__pyx_t_1);
11060 __Pyx_XDECREF(__pyx_t_2);
11061 __Pyx_XDECREF(__pyx_t_3);
11062 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11065 __Pyx_XGIVEREF(__pyx_r);
11066 __Pyx_RefNannyFinishContext();
11071 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11072 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 ";
11073 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11074 PyObject *__pyx_r = 0;
11075 __Pyx_RefNannyDeclarations
11076 __Pyx_RefNannySetupContext(
"real (wrapper)", 0);
11077 __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11080 __Pyx_RefNannyFinishContext();
11084 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11085 PyObject *__pyx_r = NULL;
11086 __Pyx_RefNannyDeclarations
11087 PyObject *__pyx_t_1 = NULL;
11088 int __pyx_lineno = 0;
11089 const char *__pyx_filename = NULL;
11090 int __pyx_clineno = 0;
11091 __Pyx_RefNannySetupContext(
"real", 0);
11092 __Pyx_XDECREF(__pyx_r);
11093 __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;}
11094 __Pyx_GOTREF(__pyx_t_1);
11095 __pyx_r = __pyx_t_1;
11101 __Pyx_XDECREF(__pyx_t_1);
11102 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11105 __Pyx_XGIVEREF(__pyx_r);
11106 __Pyx_RefNannyFinishContext();
11118 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11119 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11120 PyObject *__pyx_r = NULL;
11121 __Pyx_RefNannyDeclarations
11122 __Pyx_RefNannySetupContext(
"imag", 0);
11131 __Pyx_XDECREF(__pyx_r);
11132 __Pyx_INCREF(__pyx_float_0_0);
11133 __pyx_r = __pyx_float_0_0;
11146 __Pyx_XGIVEREF(__pyx_r);
11147 __Pyx_RefNannyFinishContext();
11152 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11153 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 ";
11154 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11155 PyObject *__pyx_r = 0;
11156 __Pyx_RefNannyDeclarations
11157 __Pyx_RefNannySetupContext(
"imag (wrapper)", 0);
11158 __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11161 __Pyx_RefNannyFinishContext();
11165 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11166 PyObject *__pyx_r = NULL;
11167 __Pyx_RefNannyDeclarations
11168 PyObject *__pyx_t_1 = NULL;
11169 int __pyx_lineno = 0;
11170 const char *__pyx_filename = NULL;
11171 int __pyx_clineno = 0;
11172 __Pyx_RefNannySetupContext(
"imag", 0);
11173 __Pyx_XDECREF(__pyx_r);
11174 __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;}
11175 __Pyx_GOTREF(__pyx_t_1);
11176 __pyx_r = __pyx_t_1;
11182 __Pyx_XDECREF(__pyx_t_1);
11183 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11186 __Pyx_XGIVEREF(__pyx_r);
11187 __Pyx_RefNannyFinishContext();
11199 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11200 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11201 PyObject *__pyx_r = NULL;
11202 __Pyx_RefNannyDeclarations
11203 PyObject *__pyx_t_1 = NULL;
11204 PyObject *__pyx_t_2 = NULL;
11205 PyObject *__pyx_t_3 = NULL;
11206 int __pyx_lineno = 0;
11207 const char *__pyx_filename = NULL;
11208 int __pyx_clineno = 0;
11209 __Pyx_RefNannySetupContext(
"pure", 0);
11218 __Pyx_XDECREF(__pyx_r);
11219 __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;}
11220 __Pyx_GOTREF(__pyx_t_2);
11221 __Pyx_INCREF(__pyx_v_obj);
11222 __Pyx_GIVEREF(__pyx_v_obj);
11223 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11224 __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;}
11225 __Pyx_GOTREF(__pyx_t_3);
11226 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11227 __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;}
11228 __Pyx_GOTREF(__pyx_t_2);
11229 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11231 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11232 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11233 if (likely(__pyx_t_3)) {
11234 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11235 __Pyx_INCREF(__pyx_t_3);
11236 __Pyx_INCREF(
function);
11237 __Pyx_DECREF_SET(__pyx_t_2,
function);
11241 __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;}
11242 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11244 __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;}
11246 __Pyx_GOTREF(__pyx_t_1);
11247 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11248 __pyx_r = __pyx_t_1;
11262 __Pyx_XDECREF(__pyx_t_1);
11263 __Pyx_XDECREF(__pyx_t_2);
11264 __Pyx_XDECREF(__pyx_t_3);
11265 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11268 __Pyx_XGIVEREF(__pyx_r);
11269 __Pyx_RefNannyFinishContext();
11274 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11275 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 ";
11276 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11277 PyObject *__pyx_r = 0;
11278 __Pyx_RefNannyDeclarations
11279 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
11280 __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11283 __Pyx_RefNannyFinishContext();
11287 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11288 PyObject *__pyx_r = NULL;
11289 __Pyx_RefNannyDeclarations
11290 PyObject *__pyx_t_1 = NULL;
11291 int __pyx_lineno = 0;
11292 const char *__pyx_filename = NULL;
11293 int __pyx_clineno = 0;
11294 __Pyx_RefNannySetupContext(
"pure", 0);
11295 __Pyx_XDECREF(__pyx_r);
11296 __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;}
11297 __Pyx_GOTREF(__pyx_t_1);
11298 __pyx_r = __pyx_t_1;
11304 __Pyx_XDECREF(__pyx_t_1);
11305 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11308 __Pyx_XGIVEREF(__pyx_r);
11309 __Pyx_RefNannyFinishContext();
11321 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11322 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11323 PyObject *__pyx_r = NULL;
11324 __Pyx_RefNannyDeclarations
11325 PyObject *__pyx_t_1 = NULL;
11326 PyObject *__pyx_t_2 = NULL;
11327 PyObject *__pyx_t_3 = NULL;
11328 int __pyx_lineno = 0;
11329 const char *__pyx_filename = NULL;
11330 int __pyx_clineno = 0;
11331 __Pyx_RefNannySetupContext(
"even", 0);
11340 __Pyx_XDECREF(__pyx_r);
11341 __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;}
11342 __Pyx_GOTREF(__pyx_t_2);
11343 __Pyx_INCREF(__pyx_v_obj);
11344 __Pyx_GIVEREF(__pyx_v_obj);
11345 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11346 __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;}
11347 __Pyx_GOTREF(__pyx_t_3);
11348 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11349 __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;}
11350 __Pyx_GOTREF(__pyx_t_2);
11351 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11353 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11354 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11355 if (likely(__pyx_t_3)) {
11356 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11357 __Pyx_INCREF(__pyx_t_3);
11358 __Pyx_INCREF(
function);
11359 __Pyx_DECREF_SET(__pyx_t_2,
function);
11363 __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;}
11364 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11366 __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;}
11368 __Pyx_GOTREF(__pyx_t_1);
11369 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11370 __pyx_r = __pyx_t_1;
11384 __Pyx_XDECREF(__pyx_t_1);
11385 __Pyx_XDECREF(__pyx_t_2);
11386 __Pyx_XDECREF(__pyx_t_3);
11387 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11390 __Pyx_XGIVEREF(__pyx_r);
11391 __Pyx_RefNannyFinishContext();
11396 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11397 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 ";
11398 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11399 PyObject *__pyx_r = 0;
11400 __Pyx_RefNannyDeclarations
11401 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
11402 __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11405 __Pyx_RefNannyFinishContext();
11409 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11410 PyObject *__pyx_r = NULL;
11411 __Pyx_RefNannyDeclarations
11412 PyObject *__pyx_t_1 = NULL;
11413 int __pyx_lineno = 0;
11414 const char *__pyx_filename = NULL;
11415 int __pyx_clineno = 0;
11416 __Pyx_RefNannySetupContext(
"even", 0);
11417 __Pyx_XDECREF(__pyx_r);
11418 __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;}
11419 __Pyx_GOTREF(__pyx_t_1);
11420 __pyx_r = __pyx_t_1;
11426 __Pyx_XDECREF(__pyx_t_1);
11427 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11430 __Pyx_XGIVEREF(__pyx_r);
11431 __Pyx_RefNannyFinishContext();
11443 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11444 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11445 PyObject *__pyx_r = NULL;
11446 __Pyx_RefNannyDeclarations
11447 PyObject *__pyx_t_1 = NULL;
11448 PyObject *__pyx_t_2 = NULL;
11449 PyObject *__pyx_t_3 = NULL;
11450 int __pyx_lineno = 0;
11451 const char *__pyx_filename = NULL;
11452 int __pyx_clineno = 0;
11453 __Pyx_RefNannySetupContext(
"odd", 0);
11462 __Pyx_XDECREF(__pyx_r);
11463 __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;}
11464 __Pyx_GOTREF(__pyx_t_2);
11465 __Pyx_INCREF(__pyx_v_obj);
11466 __Pyx_GIVEREF(__pyx_v_obj);
11467 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11468 __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;}
11469 __Pyx_GOTREF(__pyx_t_3);
11470 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11471 __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;}
11472 __Pyx_GOTREF(__pyx_t_2);
11473 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11475 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11476 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11477 if (likely(__pyx_t_3)) {
11478 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11479 __Pyx_INCREF(__pyx_t_3);
11480 __Pyx_INCREF(
function);
11481 __Pyx_DECREF_SET(__pyx_t_2,
function);
11485 __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;}
11486 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11488 __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;}
11490 __Pyx_GOTREF(__pyx_t_1);
11491 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11492 __pyx_r = __pyx_t_1;
11506 __Pyx_XDECREF(__pyx_t_1);
11507 __Pyx_XDECREF(__pyx_t_2);
11508 __Pyx_XDECREF(__pyx_t_3);
11509 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11512 __Pyx_XGIVEREF(__pyx_r);
11513 __Pyx_RefNannyFinishContext();
11518 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11519 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 ";
11520 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11521 PyObject *__pyx_r = 0;
11522 __Pyx_RefNannyDeclarations
11523 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
11524 __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11527 __Pyx_RefNannyFinishContext();
11531 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11532 PyObject *__pyx_r = NULL;
11533 __Pyx_RefNannyDeclarations
11534 PyObject *__pyx_t_1 = NULL;
11535 int __pyx_lineno = 0;
11536 const char *__pyx_filename = NULL;
11537 int __pyx_clineno = 0;
11538 __Pyx_RefNannySetupContext(
"odd", 0);
11539 __Pyx_XDECREF(__pyx_r);
11540 __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;}
11541 __Pyx_GOTREF(__pyx_t_1);
11542 __pyx_r = __pyx_t_1;
11548 __Pyx_XDECREF(__pyx_t_1);
11549 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11552 __Pyx_XGIVEREF(__pyx_r);
11553 __Pyx_RefNannyFinishContext();
11565 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11566 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11567 PyObject *__pyx_r = NULL;
11568 __Pyx_RefNannyDeclarations
11569 PyObject *__pyx_t_1 = NULL;
11570 PyObject *__pyx_t_2 = NULL;
11571 PyObject *__pyx_t_3 = NULL;
11572 int __pyx_lineno = 0;
11573 const char *__pyx_filename = NULL;
11574 int __pyx_clineno = 0;
11575 __Pyx_RefNannySetupContext(
"involute", 0);
11584 __Pyx_XDECREF(__pyx_r);
11585 __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;}
11586 __Pyx_GOTREF(__pyx_t_2);
11587 __Pyx_INCREF(__pyx_v_obj);
11588 __Pyx_GIVEREF(__pyx_v_obj);
11589 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11590 __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;}
11591 __Pyx_GOTREF(__pyx_t_3);
11592 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11593 __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;}
11594 __Pyx_GOTREF(__pyx_t_2);
11595 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11597 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11598 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11599 if (likely(__pyx_t_3)) {
11600 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11601 __Pyx_INCREF(__pyx_t_3);
11602 __Pyx_INCREF(
function);
11603 __Pyx_DECREF_SET(__pyx_t_2,
function);
11607 __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;}
11608 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11610 __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;}
11612 __Pyx_GOTREF(__pyx_t_1);
11613 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11614 __pyx_r = __pyx_t_1;
11628 __Pyx_XDECREF(__pyx_t_1);
11629 __Pyx_XDECREF(__pyx_t_2);
11630 __Pyx_XDECREF(__pyx_t_3);
11631 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11634 __Pyx_XGIVEREF(__pyx_r);
11635 __Pyx_RefNannyFinishContext();
11640 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11641 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 ";
11642 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11643 PyObject *__pyx_r = 0;
11644 __Pyx_RefNannyDeclarations
11645 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
11646 __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11649 __Pyx_RefNannyFinishContext();
11653 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11654 PyObject *__pyx_r = NULL;
11655 __Pyx_RefNannyDeclarations
11656 PyObject *__pyx_t_1 = NULL;
11657 int __pyx_lineno = 0;
11658 const char *__pyx_filename = NULL;
11659 int __pyx_clineno = 0;
11660 __Pyx_RefNannySetupContext(
"involute", 0);
11661 __Pyx_XDECREF(__pyx_r);
11662 __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;}
11663 __Pyx_GOTREF(__pyx_t_1);
11664 __pyx_r = __pyx_t_1;
11670 __Pyx_XDECREF(__pyx_t_1);
11671 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11674 __Pyx_XGIVEREF(__pyx_r);
11675 __Pyx_RefNannyFinishContext();
11687 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11689 PyObject *__pyx_r = NULL;
11690 __Pyx_RefNannyDeclarations
11691 PyObject *__pyx_t_1 = NULL;
11692 PyObject *__pyx_t_2 = NULL;
11693 PyObject *__pyx_t_3 = NULL;
11694 int __pyx_lineno = 0;
11695 const char *__pyx_filename = NULL;
11696 int __pyx_clineno = 0;
11697 __Pyx_RefNannySetupContext(
"reverse", 0);
11706 __Pyx_XDECREF(__pyx_r);
11707 __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;}
11708 __Pyx_GOTREF(__pyx_t_2);
11709 __Pyx_INCREF(__pyx_v_obj);
11710 __Pyx_GIVEREF(__pyx_v_obj);
11711 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11712 __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;}
11713 __Pyx_GOTREF(__pyx_t_3);
11714 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11715 __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;}
11716 __Pyx_GOTREF(__pyx_t_2);
11717 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11719 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11720 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11721 if (likely(__pyx_t_3)) {
11722 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11723 __Pyx_INCREF(__pyx_t_3);
11724 __Pyx_INCREF(
function);
11725 __Pyx_DECREF_SET(__pyx_t_2,
function);
11729 __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;}
11730 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11732 __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;}
11734 __Pyx_GOTREF(__pyx_t_1);
11735 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11736 __pyx_r = __pyx_t_1;
11750 __Pyx_XDECREF(__pyx_t_1);
11751 __Pyx_XDECREF(__pyx_t_2);
11752 __Pyx_XDECREF(__pyx_t_3);
11753 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11756 __Pyx_XGIVEREF(__pyx_r);
11757 __Pyx_RefNannyFinishContext();
11762 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11763 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 ";
11764 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11765 PyObject *__pyx_r = 0;
11766 __Pyx_RefNannyDeclarations
11767 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
11768 __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
11771 __Pyx_RefNannyFinishContext();
11775 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11776 PyObject *__pyx_r = NULL;
11777 __Pyx_RefNannyDeclarations
11778 PyObject *__pyx_t_1 = NULL;
11779 int __pyx_lineno = 0;
11780 const char *__pyx_filename = NULL;
11781 int __pyx_clineno = 0;
11782 __Pyx_RefNannySetupContext(
"reverse", 0);
11783 __Pyx_XDECREF(__pyx_r);
11784 __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;}
11785 __Pyx_GOTREF(__pyx_t_1);
11786 __pyx_r = __pyx_t_1;
11792 __Pyx_XDECREF(__pyx_t_1);
11793 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11796 __Pyx_XGIVEREF(__pyx_r);
11797 __Pyx_RefNannyFinishContext();
11809 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11810 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11811 PyObject *__pyx_r = NULL;
11812 __Pyx_RefNannyDeclarations
11813 PyObject *__pyx_t_1 = NULL;
11814 PyObject *__pyx_t_2 = NULL;
11815 PyObject *__pyx_t_3 = NULL;
11816 int __pyx_lineno = 0;
11817 const char *__pyx_filename = NULL;
11818 int __pyx_clineno = 0;
11819 __Pyx_RefNannySetupContext(
"conj", 0);
11828 __Pyx_XDECREF(__pyx_r);
11829 __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;}
11830 __Pyx_GOTREF(__pyx_t_2);
11831 __Pyx_INCREF(__pyx_v_obj);
11832 __Pyx_GIVEREF(__pyx_v_obj);
11833 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11834 __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;}
11835 __Pyx_GOTREF(__pyx_t_3);
11836 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11837 __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;}
11838 __Pyx_GOTREF(__pyx_t_2);
11839 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11841 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11842 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11843 if (likely(__pyx_t_3)) {
11844 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11845 __Pyx_INCREF(__pyx_t_3);
11846 __Pyx_INCREF(
function);
11847 __Pyx_DECREF_SET(__pyx_t_2,
function);
11851 __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;}
11852 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11854 __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;}
11856 __Pyx_GOTREF(__pyx_t_1);
11857 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11858 __pyx_r = __pyx_t_1;
11872 __Pyx_XDECREF(__pyx_t_1);
11873 __Pyx_XDECREF(__pyx_t_2);
11874 __Pyx_XDECREF(__pyx_t_3);
11875 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11878 __Pyx_XGIVEREF(__pyx_r);
11879 __Pyx_RefNannyFinishContext();
11884 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11885 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 ";
11886 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11887 PyObject *__pyx_r = 0;
11888 __Pyx_RefNannyDeclarations
11889 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
11890 __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
11893 __Pyx_RefNannyFinishContext();
11897 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11898 PyObject *__pyx_r = NULL;
11899 __Pyx_RefNannyDeclarations
11900 PyObject *__pyx_t_1 = NULL;
11901 int __pyx_lineno = 0;
11902 const char *__pyx_filename = NULL;
11903 int __pyx_clineno = 0;
11904 __Pyx_RefNannySetupContext(
"conj", 0);
11905 __Pyx_XDECREF(__pyx_r);
11906 __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;}
11907 __Pyx_GOTREF(__pyx_t_1);
11908 __pyx_r = __pyx_t_1;
11914 __Pyx_XDECREF(__pyx_t_1);
11915 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11918 __Pyx_XGIVEREF(__pyx_r);
11919 __Pyx_RefNannyFinishContext();
11931 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11932 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11933 PyObject *__pyx_r = NULL;
11934 __Pyx_RefNannyDeclarations
11935 PyObject *__pyx_t_1 = NULL;
11936 PyObject *__pyx_t_2 = NULL;
11937 PyObject *__pyx_t_3 = NULL;
11938 int __pyx_lineno = 0;
11939 const char *__pyx_filename = NULL;
11940 int __pyx_clineno = 0;
11941 __Pyx_RefNannySetupContext(
"quad", 0);
11950 __Pyx_XDECREF(__pyx_r);
11951 __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;}
11952 __Pyx_GOTREF(__pyx_t_2);
11953 __Pyx_INCREF(__pyx_v_obj);
11954 __Pyx_GIVEREF(__pyx_v_obj);
11955 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11956 __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;}
11957 __Pyx_GOTREF(__pyx_t_3);
11958 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11959 __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;}
11960 __Pyx_GOTREF(__pyx_t_2);
11961 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11963 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11964 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11965 if (likely(__pyx_t_3)) {
11966 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11967 __Pyx_INCREF(__pyx_t_3);
11968 __Pyx_INCREF(
function);
11969 __Pyx_DECREF_SET(__pyx_t_2,
function);
11973 __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;}
11974 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11976 __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;}
11978 __Pyx_GOTREF(__pyx_t_1);
11979 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11980 __pyx_r = __pyx_t_1;
11994 __Pyx_XDECREF(__pyx_t_1);
11995 __Pyx_XDECREF(__pyx_t_2);
11996 __Pyx_XDECREF(__pyx_t_3);
11997 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12000 __Pyx_XGIVEREF(__pyx_r);
12001 __Pyx_RefNannyFinishContext();
12006 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12007 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 ";
12008 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12009 PyObject *__pyx_r = 0;
12010 __Pyx_RefNannyDeclarations
12011 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
12012 __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12015 __Pyx_RefNannyFinishContext();
12019 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12020 PyObject *__pyx_r = NULL;
12021 __Pyx_RefNannyDeclarations
12022 PyObject *__pyx_t_1 = NULL;
12023 int __pyx_lineno = 0;
12024 const char *__pyx_filename = NULL;
12025 int __pyx_clineno = 0;
12026 __Pyx_RefNannySetupContext(
"quad", 0);
12027 __Pyx_XDECREF(__pyx_r);
12028 __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;}
12029 __Pyx_GOTREF(__pyx_t_1);
12030 __pyx_r = __pyx_t_1;
12036 __Pyx_XDECREF(__pyx_t_1);
12037 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12040 __Pyx_XGIVEREF(__pyx_r);
12041 __Pyx_RefNannyFinishContext();
12053 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12054 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12055 PyObject *__pyx_r = NULL;
12056 __Pyx_RefNannyDeclarations
12057 PyObject *__pyx_t_1 = NULL;
12058 PyObject *__pyx_t_2 = NULL;
12059 PyObject *__pyx_t_3 = NULL;
12060 int __pyx_lineno = 0;
12061 const char *__pyx_filename = NULL;
12062 int __pyx_clineno = 0;
12063 __Pyx_RefNannySetupContext(
"norm", 0);
12072 __Pyx_XDECREF(__pyx_r);
12073 __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;}
12074 __Pyx_GOTREF(__pyx_t_2);
12075 __Pyx_INCREF(__pyx_v_obj);
12076 __Pyx_GIVEREF(__pyx_v_obj);
12077 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12078 __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;}
12079 __Pyx_GOTREF(__pyx_t_3);
12080 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12081 __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;}
12082 __Pyx_GOTREF(__pyx_t_2);
12083 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12085 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
12086 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12087 if (likely(__pyx_t_3)) {
12088 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
12089 __Pyx_INCREF(__pyx_t_3);
12090 __Pyx_INCREF(
function);
12091 __Pyx_DECREF_SET(__pyx_t_2,
function);
12095 __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;}
12096 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12098 __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;}
12100 __Pyx_GOTREF(__pyx_t_1);
12101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12102 __pyx_r = __pyx_t_1;
12116 __Pyx_XDECREF(__pyx_t_1);
12117 __Pyx_XDECREF(__pyx_t_2);
12118 __Pyx_XDECREF(__pyx_t_3);
12119 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12122 __Pyx_XGIVEREF(__pyx_r);
12123 __Pyx_RefNannyFinishContext();
12128 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12129 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 ";
12130 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12131 PyObject *__pyx_r = 0;
12132 __Pyx_RefNannyDeclarations
12133 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
12134 __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12137 __Pyx_RefNannyFinishContext();
12141 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12142 PyObject *__pyx_r = NULL;
12143 __Pyx_RefNannyDeclarations
12144 PyObject *__pyx_t_1 = NULL;
12145 int __pyx_lineno = 0;
12146 const char *__pyx_filename = NULL;
12147 int __pyx_clineno = 0;
12148 __Pyx_RefNannySetupContext(
"norm", 0);
12149 __Pyx_XDECREF(__pyx_r);
12150 __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;}
12151 __Pyx_GOTREF(__pyx_t_1);
12152 __pyx_r = __pyx_t_1;
12158 __Pyx_XDECREF(__pyx_t_1);
12159 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12162 __Pyx_XGIVEREF(__pyx_r);
12163 __Pyx_RefNannyFinishContext();
12175 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12176 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12177 PyObject *__pyx_r = NULL;
12178 __Pyx_RefNannyDeclarations
12179 PyObject *__pyx_t_1 = NULL;
12180 int __pyx_lineno = 0;
12181 const char *__pyx_filename = NULL;
12182 int __pyx_clineno = 0;
12183 __Pyx_RefNannySetupContext(
"abs", 0);
12192 __Pyx_XDECREF(__pyx_r);
12193 __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;}
12194 __Pyx_GOTREF(__pyx_t_1);
12195 __pyx_r = __pyx_t_1;
12209 __Pyx_XDECREF(__pyx_t_1);
12210 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12213 __Pyx_XGIVEREF(__pyx_r);
12214 __Pyx_RefNannyFinishContext();
12219 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12220 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 ";
12221 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12222 PyObject *__pyx_r = 0;
12223 __Pyx_RefNannyDeclarations
12224 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
12225 __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12228 __Pyx_RefNannyFinishContext();
12232 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12233 PyObject *__pyx_r = NULL;
12234 __Pyx_RefNannyDeclarations
12235 PyObject *__pyx_t_1 = NULL;
12236 int __pyx_lineno = 0;
12237 const char *__pyx_filename = NULL;
12238 int __pyx_clineno = 0;
12239 __Pyx_RefNannySetupContext(
"abs", 0);
12240 __Pyx_XDECREF(__pyx_r);
12241 __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;}
12242 __Pyx_GOTREF(__pyx_t_1);
12243 __pyx_r = __pyx_t_1;
12249 __Pyx_XDECREF(__pyx_t_1);
12250 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12253 __Pyx_XGIVEREF(__pyx_r);
12254 __Pyx_RefNannyFinishContext();
12266 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12267 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12268 PyObject *__pyx_r = NULL;
12269 __Pyx_RefNannyDeclarations
12270 PyObject *__pyx_t_1 = NULL;
12271 int __pyx_lineno = 0;
12272 const char *__pyx_filename = NULL;
12273 int __pyx_clineno = 0;
12274 __Pyx_RefNannySetupContext(
"max_abs", 0);
12283 __Pyx_XDECREF(__pyx_r);
12284 __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;}
12285 __Pyx_GOTREF(__pyx_t_1);
12286 __pyx_r = __pyx_t_1;
12300 __Pyx_XDECREF(__pyx_t_1);
12301 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12304 __Pyx_XGIVEREF(__pyx_r);
12305 __Pyx_RefNannyFinishContext();
12310 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12311 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 ";
12312 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12313 PyObject *__pyx_r = 0;
12314 __Pyx_RefNannyDeclarations
12315 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
12316 __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12319 __Pyx_RefNannyFinishContext();
12323 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12324 PyObject *__pyx_r = NULL;
12325 __Pyx_RefNannyDeclarations
12326 PyObject *__pyx_t_1 = NULL;
12327 int __pyx_lineno = 0;
12328 const char *__pyx_filename = NULL;
12329 int __pyx_clineno = 0;
12330 __Pyx_RefNannySetupContext(
"max_abs", 0);
12331 __Pyx_XDECREF(__pyx_r);
12332 __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;}
12333 __Pyx_GOTREF(__pyx_t_1);
12334 __pyx_r = __pyx_t_1;
12340 __Pyx_XDECREF(__pyx_t_1);
12341 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12344 __Pyx_XGIVEREF(__pyx_r);
12345 __Pyx_RefNannyFinishContext();
12357 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12358 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12359 PyObject *__pyx_r = NULL;
12360 __Pyx_RefNannyDeclarations
12361 PyObject *__pyx_t_1 = NULL;
12362 PyObject *__pyx_t_2 = NULL;
12363 PyObject *__pyx_t_3 = NULL;
12364 PyObject *__pyx_t_4 = NULL;
12365 PyObject *__pyx_t_5 = NULL;
12366 PyObject *__pyx_t_6 = NULL;
12367 Py_ssize_t __pyx_t_7;
12368 PyObject *__pyx_t_8 = NULL;
12369 PyObject *__pyx_t_9 = NULL;
12370 PyObject *__pyx_t_10 = NULL;
12371 PyObject *__pyx_t_11 = NULL;
12372 int __pyx_lineno = 0;
12373 const char *__pyx_filename = NULL;
12374 int __pyx_clineno = 0;
12375 __Pyx_RefNannySetupContext(
"pow", 0);
12385 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12386 __Pyx_XGOTREF(__pyx_t_1);
12387 __Pyx_XGOTREF(__pyx_t_2);
12388 __Pyx_XGOTREF(__pyx_t_3);
12398 __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;}
12399 __Pyx_GOTREF(__pyx_t_5);
12400 __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;}
12401 __Pyx_GOTREF(__pyx_t_6);
12402 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12405 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
12406 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12407 if (likely(__pyx_t_5)) {
12408 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
12409 __Pyx_INCREF(__pyx_t_5);
12410 __Pyx_INCREF(
function);
12411 __Pyx_DECREF_SET(__pyx_t_6,
function);
12415 __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;}
12416 __Pyx_GOTREF(__pyx_t_8);
12418 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12420 __Pyx_INCREF(__pyx_v_obj);
12421 __Pyx_GIVEREF(__pyx_v_obj);
12422 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12423 __Pyx_INCREF(__pyx_v_m);
12424 __Pyx_GIVEREF(__pyx_v_m);
12425 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12426 __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;}
12427 __Pyx_GOTREF(__pyx_t_4);
12428 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12429 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12430 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12440 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12441 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12442 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12443 goto __pyx_L10_try_end;
12445 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12446 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12447 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12448 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12458 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12459 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;}
12460 __Pyx_GOTREF(__pyx_t_4);
12461 __Pyx_GOTREF(__pyx_t_6);
12462 __Pyx_GOTREF(__pyx_t_8);
12471 __Pyx_XDECREF(__pyx_r);
12472 __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;}
12473 __Pyx_GOTREF(__pyx_t_9);
12474 __Pyx_INCREF(__pyx_v_obj);
12475 __Pyx_GIVEREF(__pyx_v_obj);
12476 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12477 __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;}
12478 __Pyx_GOTREF(__pyx_t_10);
12479 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12480 __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;}
12481 __Pyx_GOTREF(__pyx_t_9);
12482 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12484 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
12485 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12486 if (likely(__pyx_t_10)) {
12487 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
12488 __Pyx_INCREF(__pyx_t_10);
12489 __Pyx_INCREF(
function);
12490 __Pyx_DECREF_SET(__pyx_t_9,
function);
12494 __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;}
12495 __Pyx_GOTREF(__pyx_t_5);
12497 __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;}
12498 __Pyx_GOTREF(__pyx_t_11);
12499 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
12500 __Pyx_INCREF(__pyx_v_m);
12501 __Pyx_GIVEREF(__pyx_v_m);
12502 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12503 __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;}
12504 __Pyx_GOTREF(__pyx_t_5);
12505 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12507 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12508 __pyx_r = __pyx_t_5;
12510 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12511 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12512 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12513 goto __pyx_L6_except_return;
12515 __pyx_L5_except_error:;
12524 __Pyx_XGIVEREF(__pyx_t_1);
12525 __Pyx_XGIVEREF(__pyx_t_2);
12526 __Pyx_XGIVEREF(__pyx_t_3);
12527 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12528 goto __pyx_L1_error;
12529 __pyx_L6_except_return:;
12530 __Pyx_XGIVEREF(__pyx_t_1);
12531 __Pyx_XGIVEREF(__pyx_t_2);
12532 __Pyx_XGIVEREF(__pyx_t_3);
12533 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12535 __pyx_L10_try_end:;
12547 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12550 __Pyx_XDECREF(__pyx_t_4);
12551 __Pyx_XDECREF(__pyx_t_5);
12552 __Pyx_XDECREF(__pyx_t_6);
12553 __Pyx_XDECREF(__pyx_t_8);
12554 __Pyx_XDECREF(__pyx_t_9);
12555 __Pyx_XDECREF(__pyx_t_10);
12556 __Pyx_XDECREF(__pyx_t_11);
12557 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12560 __Pyx_XGIVEREF(__pyx_r);
12561 __Pyx_RefNannyFinishContext();
12566 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12567 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 ";
12568 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12569 PyObject *__pyx_v_obj = 0;
12570 PyObject *__pyx_v_m = 0;
12571 int __pyx_lineno = 0;
12572 const char *__pyx_filename = NULL;
12573 int __pyx_clineno = 0;
12574 PyObject *__pyx_r = 0;
12575 __Pyx_RefNannyDeclarations
12576 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
12578 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12579 PyObject* values[2] = {0,0};
12580 if (unlikely(__pyx_kwds)) {
12581 Py_ssize_t kw_args;
12582 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12583 switch (pos_args) {
12584 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12585 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12587 default:
goto __pyx_L5_argtuple_error;
12589 kw_args = PyDict_Size(__pyx_kwds);
12590 switch (pos_args) {
12592 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12593 else goto __pyx_L5_argtuple_error;
12595 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12597 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12600 if (unlikely(kw_args > 0)) {
12601 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;}
12603 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12604 goto __pyx_L5_argtuple_error;
12606 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12607 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12609 __pyx_v_obj = values[0];
12610 __pyx_v_m = values[1];
12612 goto __pyx_L4_argument_unpacking_done;
12613 __pyx_L5_argtuple_error:;
12614 __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;}
12616 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12617 __Pyx_RefNannyFinishContext();
12619 __pyx_L4_argument_unpacking_done:;
12620 __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12623 __Pyx_RefNannyFinishContext();
12627 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12628 PyObject *__pyx_r = NULL;
12629 __Pyx_RefNannyDeclarations
12630 PyObject *__pyx_t_1 = NULL;
12631 int __pyx_lineno = 0;
12632 const char *__pyx_filename = NULL;
12633 int __pyx_clineno = 0;
12634 __Pyx_RefNannySetupContext(
"pow", 0);
12635 __Pyx_XDECREF(__pyx_r);
12636 __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;}
12637 __Pyx_GOTREF(__pyx_t_1);
12638 __pyx_r = __pyx_t_1;
12644 __Pyx_XDECREF(__pyx_t_1);
12645 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12648 __Pyx_XGIVEREF(__pyx_r);
12649 __Pyx_RefNannyFinishContext();
12661 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12662 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12663 PyObject *__pyx_r = NULL;
12664 __Pyx_RefNannyDeclarations
12665 PyObject *__pyx_t_1 = NULL;
12666 PyObject *__pyx_t_2 = NULL;
12667 PyObject *__pyx_t_3 = NULL;
12668 PyObject *__pyx_t_4 = NULL;
12669 int __pyx_lineno = 0;
12670 const char *__pyx_filename = NULL;
12671 int __pyx_clineno = 0;
12672 __Pyx_RefNannySetupContext(
"outer_pow", 0);
12681 __Pyx_XDECREF(__pyx_r);
12682 __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;}
12683 __Pyx_GOTREF(__pyx_t_2);
12684 __Pyx_INCREF(__pyx_v_obj);
12685 __Pyx_GIVEREF(__pyx_v_obj);
12686 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12687 __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;}
12688 __Pyx_GOTREF(__pyx_t_3);
12689 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12690 __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;}
12691 __Pyx_GOTREF(__pyx_t_2);
12692 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12694 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
12695 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12696 if (likely(__pyx_t_3)) {
12697 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
12698 __Pyx_INCREF(__pyx_t_3);
12699 __Pyx_INCREF(
function);
12700 __Pyx_DECREF_SET(__pyx_t_2,
function);
12704 __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;}
12705 __Pyx_GOTREF(__pyx_t_1);
12707 __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;}
12708 __Pyx_GOTREF(__pyx_t_4);
12709 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
12710 __Pyx_INCREF(__pyx_v_m);
12711 __Pyx_GIVEREF(__pyx_v_m);
12712 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
12713 __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;}
12714 __Pyx_GOTREF(__pyx_t_1);
12715 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12717 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12718 __pyx_r = __pyx_t_1;
12732 __Pyx_XDECREF(__pyx_t_1);
12733 __Pyx_XDECREF(__pyx_t_2);
12734 __Pyx_XDECREF(__pyx_t_3);
12735 __Pyx_XDECREF(__pyx_t_4);
12736 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12739 __Pyx_XGIVEREF(__pyx_r);
12740 __Pyx_RefNannyFinishContext();
12745 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12746 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 ";
12747 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12748 PyObject *__pyx_v_obj = 0;
12749 PyObject *__pyx_v_m = 0;
12750 int __pyx_lineno = 0;
12751 const char *__pyx_filename = NULL;
12752 int __pyx_clineno = 0;
12753 PyObject *__pyx_r = 0;
12754 __Pyx_RefNannyDeclarations
12755 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
12757 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12758 PyObject* values[2] = {0,0};
12759 if (unlikely(__pyx_kwds)) {
12760 Py_ssize_t kw_args;
12761 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12762 switch (pos_args) {
12763 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12764 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12766 default:
goto __pyx_L5_argtuple_error;
12768 kw_args = PyDict_Size(__pyx_kwds);
12769 switch (pos_args) {
12771 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12772 else goto __pyx_L5_argtuple_error;
12774 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12776 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12779 if (unlikely(kw_args > 0)) {
12780 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;}
12782 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12783 goto __pyx_L5_argtuple_error;
12785 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12786 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12788 __pyx_v_obj = values[0];
12789 __pyx_v_m = values[1];
12791 goto __pyx_L4_argument_unpacking_done;
12792 __pyx_L5_argtuple_error:;
12793 __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;}
12795 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12796 __Pyx_RefNannyFinishContext();
12798 __pyx_L4_argument_unpacking_done:;
12799 __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12802 __Pyx_RefNannyFinishContext();
12806 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12807 PyObject *__pyx_r = NULL;
12808 __Pyx_RefNannyDeclarations
12809 PyObject *__pyx_t_1 = NULL;
12810 int __pyx_lineno = 0;
12811 const char *__pyx_filename = NULL;
12812 int __pyx_clineno = 0;
12813 __Pyx_RefNannySetupContext(
"outer_pow", 0);
12814 __Pyx_XDECREF(__pyx_r);
12815 __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;}
12816 __Pyx_GOTREF(__pyx_t_1);
12817 __pyx_r = __pyx_t_1;
12823 __Pyx_XDECREF(__pyx_t_1);
12824 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12827 __Pyx_XGIVEREF(__pyx_r);
12828 __Pyx_RefNannyFinishContext();
12840 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12841 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12842 PyObject *__pyx_r = NULL;
12843 __Pyx_RefNannyDeclarations
12844 PyObject *__pyx_t_1 = NULL;
12845 PyObject *__pyx_t_2 = NULL;
12846 int __pyx_lineno = 0;
12847 const char *__pyx_filename = NULL;
12848 int __pyx_clineno = 0;
12849 __Pyx_RefNannySetupContext(
"complexifier", 0);
12858 __Pyx_XDECREF(__pyx_r);
12859 __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;}
12860 __Pyx_GOTREF(__pyx_t_1);
12861 __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;}
12862 __Pyx_GOTREF(__pyx_t_2);
12863 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12864 __pyx_r = __pyx_t_2;
12878 __Pyx_XDECREF(__pyx_t_1);
12879 __Pyx_XDECREF(__pyx_t_2);
12880 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12883 __Pyx_XGIVEREF(__pyx_r);
12884 __Pyx_RefNannyFinishContext();
12889 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12890 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 ";
12891 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12892 PyObject *__pyx_r = 0;
12893 __Pyx_RefNannyDeclarations
12894 __Pyx_RefNannySetupContext(
"complexifier (wrapper)", 0);
12895 __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
12898 __Pyx_RefNannyFinishContext();
12902 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12903 PyObject *__pyx_r = NULL;
12904 __Pyx_RefNannyDeclarations
12905 PyObject *__pyx_t_1 = NULL;
12906 int __pyx_lineno = 0;
12907 const char *__pyx_filename = NULL;
12908 int __pyx_clineno = 0;
12909 __Pyx_RefNannySetupContext(
"complexifier", 0);
12910 __Pyx_XDECREF(__pyx_r);
12911 __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;}
12912 __Pyx_GOTREF(__pyx_t_1);
12913 __pyx_r = __pyx_t_1;
12919 __Pyx_XDECREF(__pyx_t_1);
12920 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12923 __Pyx_XGIVEREF(__pyx_r);
12924 __Pyx_RefNannyFinishContext();
12936 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12937 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) {
12938 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12939 PyObject *__pyx_r = NULL;
12940 __Pyx_RefNannyDeclarations
12943 PyObject *__pyx_t_3 = NULL;
12945 PyObject *__pyx_t_5 = NULL;
12946 PyObject *__pyx_t_6 = NULL;
12947 PyObject *__pyx_t_7 = NULL;
12948 PyObject *__pyx_t_8 = NULL;
12949 PyObject *__pyx_t_9 = NULL;
12950 PyObject *__pyx_t_10 = NULL;
12951 PyObject *__pyx_t_11 = NULL;
12952 int __pyx_lineno = 0;
12953 const char *__pyx_filename = NULL;
12954 int __pyx_clineno = 0;
12955 __Pyx_RefNannySetupContext(
"sqrt", 0);
12956 if (__pyx_optional_args) {
12957 if (__pyx_optional_args->__pyx_n > 0) {
12958 __pyx_v_i = __pyx_optional_args->i;
12969 __pyx_t_1 = (__pyx_v_i != Py_None);
12970 __pyx_t_2 = (__pyx_t_1 != 0);
12980 __Pyx_XDECREF(__pyx_r);
12981 __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;}
12982 __Pyx_GOTREF(__pyx_t_3);
12984 __pyx_t_4 =
sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12986 __Pyx_CppExn2PyErr();
12987 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12989 __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;}
12990 __Pyx_GOTREF(__pyx_t_5);
12991 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12992 __pyx_r = __pyx_t_5;
13014 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13015 __Pyx_XGOTREF(__pyx_t_6);
13016 __Pyx_XGOTREF(__pyx_t_7);
13017 __Pyx_XGOTREF(__pyx_t_8);
13027 __Pyx_XDECREF(__pyx_r);
13028 __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;}
13029 __Pyx_GOTREF(__pyx_t_3);
13030 __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;}
13031 __Pyx_GOTREF(__pyx_t_9);
13032 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13034 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13035 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13036 if (likely(__pyx_t_3)) {
13037 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13038 __Pyx_INCREF(__pyx_t_3);
13039 __Pyx_INCREF(
function);
13040 __Pyx_DECREF_SET(__pyx_t_9,
function);
13044 __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;}
13045 __Pyx_GOTREF(__pyx_t_5);
13047 __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;}
13048 __Pyx_GOTREF(__pyx_t_10);
13049 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13050 __Pyx_INCREF(__pyx_v_obj);
13051 __Pyx_GIVEREF(__pyx_v_obj);
13052 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13053 __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;}
13054 __Pyx_GOTREF(__pyx_t_5);
13055 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13057 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13058 __pyx_r = __pyx_t_5;
13060 goto __pyx_L8_try_return;
13071 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13072 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13073 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13074 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13084 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13085 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;}
13086 __Pyx_GOTREF(__pyx_t_5);
13087 __Pyx_GOTREF(__pyx_t_9);
13088 __Pyx_GOTREF(__pyx_t_10);
13097 __Pyx_XDECREF(__pyx_r);
13098 __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;}
13099 __Pyx_GOTREF(__pyx_t_3);
13100 __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;}
13101 __Pyx_GOTREF(__pyx_t_11);
13102 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13103 __pyx_r = __pyx_t_11;
13105 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13106 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13107 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13108 goto __pyx_L7_except_return;
13110 __pyx_L6_except_error:;
13119 __Pyx_XGIVEREF(__pyx_t_6);
13120 __Pyx_XGIVEREF(__pyx_t_7);
13121 __Pyx_XGIVEREF(__pyx_t_8);
13122 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13123 goto __pyx_L1_error;
13124 __pyx_L8_try_return:;
13125 __Pyx_XGIVEREF(__pyx_t_6);
13126 __Pyx_XGIVEREF(__pyx_t_7);
13127 __Pyx_XGIVEREF(__pyx_t_8);
13128 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13130 __pyx_L7_except_return:;
13131 __Pyx_XGIVEREF(__pyx_t_6);
13132 __Pyx_XGIVEREF(__pyx_t_7);
13133 __Pyx_XGIVEREF(__pyx_t_8);
13134 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13149 __Pyx_XDECREF(__pyx_t_3);
13150 __Pyx_XDECREF(__pyx_t_5);
13151 __Pyx_XDECREF(__pyx_t_9);
13152 __Pyx_XDECREF(__pyx_t_10);
13153 __Pyx_XDECREF(__pyx_t_11);
13154 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13157 __Pyx_XGIVEREF(__pyx_r);
13158 __Pyx_RefNannyFinishContext();
13163 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13164 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 ";
13165 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13166 PyObject *__pyx_v_obj = 0;
13167 PyObject *__pyx_v_i = 0;
13168 int __pyx_lineno = 0;
13169 const char *__pyx_filename = NULL;
13170 int __pyx_clineno = 0;
13171 PyObject *__pyx_r = 0;
13172 __Pyx_RefNannyDeclarations
13173 __Pyx_RefNannySetupContext(
"sqrt (wrapper)", 0);
13175 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13176 PyObject* values[2] = {0,0};
13177 values[1] = ((PyObject *)Py_None);
13178 if (unlikely(__pyx_kwds)) {
13179 Py_ssize_t kw_args;
13180 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13181 switch (pos_args) {
13182 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13183 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13185 default:
goto __pyx_L5_argtuple_error;
13187 kw_args = PyDict_Size(__pyx_kwds);
13188 switch (pos_args) {
13190 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13191 else goto __pyx_L5_argtuple_error;
13194 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13195 if (value) { values[1] = value; kw_args--; }
13198 if (unlikely(kw_args > 0)) {
13199 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;}
13202 switch (PyTuple_GET_SIZE(__pyx_args)) {
13203 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13204 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13206 default:
goto __pyx_L5_argtuple_error;
13209 __pyx_v_obj = values[0];
13210 __pyx_v_i = values[1];
13212 goto __pyx_L4_argument_unpacking_done;
13213 __pyx_L5_argtuple_error:;
13214 __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;}
13216 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13217 __Pyx_RefNannyFinishContext();
13219 __pyx_L4_argument_unpacking_done:;
13220 __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13223 __Pyx_RefNannyFinishContext();
13227 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13228 PyObject *__pyx_r = NULL;
13229 __Pyx_RefNannyDeclarations
13230 PyObject *__pyx_t_1 = NULL;
13231 struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13232 int __pyx_lineno = 0;
13233 const char *__pyx_filename = NULL;
13234 int __pyx_clineno = 0;
13235 __Pyx_RefNannySetupContext(
"sqrt", 0);
13236 __Pyx_XDECREF(__pyx_r);
13237 __pyx_t_2.__pyx_n = 1;
13238 __pyx_t_2.i = __pyx_v_i;
13239 __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;}
13240 __Pyx_GOTREF(__pyx_t_1);
13241 __pyx_r = __pyx_t_1;
13247 __Pyx_XDECREF(__pyx_t_1);
13248 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13251 __Pyx_XGIVEREF(__pyx_r);
13252 __Pyx_RefNannyFinishContext();
13264 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
13265 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
13266 PyObject *__pyx_r = NULL;
13267 __Pyx_RefNannyDeclarations
13268 PyObject *__pyx_t_1 = NULL;
13269 PyObject *__pyx_t_2 = NULL;
13270 PyObject *__pyx_t_3 = NULL;
13271 PyObject *__pyx_t_4 = NULL;
13272 PyObject *__pyx_t_5 = NULL;
13273 PyObject *__pyx_t_6 = NULL;
13274 PyObject *__pyx_t_7 = NULL;
13275 PyObject *__pyx_t_8 = NULL;
13276 int __pyx_lineno = 0;
13277 const char *__pyx_filename = NULL;
13278 int __pyx_clineno = 0;
13279 __Pyx_RefNannySetupContext(
"exp", 0);
13289 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13290 __Pyx_XGOTREF(__pyx_t_1);
13291 __Pyx_XGOTREF(__pyx_t_2);
13292 __Pyx_XGOTREF(__pyx_t_3);
13302 __Pyx_XDECREF(__pyx_r);
13303 __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;}
13304 __Pyx_GOTREF(__pyx_t_5);
13305 __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;}
13306 __Pyx_GOTREF(__pyx_t_6);
13307 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13309 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
13310 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13311 if (likely(__pyx_t_5)) {
13312 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
13313 __Pyx_INCREF(__pyx_t_5);
13314 __Pyx_INCREF(
function);
13315 __Pyx_DECREF_SET(__pyx_t_6,
function);
13319 __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;}
13320 __Pyx_GOTREF(__pyx_t_4);
13322 __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;}
13323 __Pyx_GOTREF(__pyx_t_7);
13324 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13325 __Pyx_INCREF(__pyx_v_obj);
13326 __Pyx_GIVEREF(__pyx_v_obj);
13327 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13328 __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;}
13329 __Pyx_GOTREF(__pyx_t_4);
13330 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13332 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13333 __pyx_r = __pyx_t_4;
13335 goto __pyx_L7_try_return;
13346 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13347 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13348 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13349 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13359 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13360 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;}
13361 __Pyx_GOTREF(__pyx_t_4);
13362 __Pyx_GOTREF(__pyx_t_6);
13363 __Pyx_GOTREF(__pyx_t_7);
13372 __Pyx_XDECREF(__pyx_r);
13373 __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;}
13374 __Pyx_GOTREF(__pyx_t_5);
13375 __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;}
13376 __Pyx_GOTREF(__pyx_t_8);
13377 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13378 __pyx_r = __pyx_t_8;
13380 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13381 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13382 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13383 goto __pyx_L6_except_return;
13385 __pyx_L5_except_error:;
13394 __Pyx_XGIVEREF(__pyx_t_1);
13395 __Pyx_XGIVEREF(__pyx_t_2);
13396 __Pyx_XGIVEREF(__pyx_t_3);
13397 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13398 goto __pyx_L1_error;
13399 __pyx_L7_try_return:;
13400 __Pyx_XGIVEREF(__pyx_t_1);
13401 __Pyx_XGIVEREF(__pyx_t_2);
13402 __Pyx_XGIVEREF(__pyx_t_3);
13403 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13405 __pyx_L6_except_return:;
13406 __Pyx_XGIVEREF(__pyx_t_1);
13407 __Pyx_XGIVEREF(__pyx_t_2);
13408 __Pyx_XGIVEREF(__pyx_t_3);
13409 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13423 __Pyx_XDECREF(__pyx_t_4);
13424 __Pyx_XDECREF(__pyx_t_5);
13425 __Pyx_XDECREF(__pyx_t_6);
13426 __Pyx_XDECREF(__pyx_t_7);
13427 __Pyx_XDECREF(__pyx_t_8);
13428 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13431 __Pyx_XGIVEREF(__pyx_r);
13432 __Pyx_RefNannyFinishContext();
13437 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
13438 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 ";
13439 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13440 PyObject *__pyx_r = 0;
13441 __Pyx_RefNannyDeclarations
13442 __Pyx_RefNannySetupContext(
"exp (wrapper)", 0);
13443 __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13446 __Pyx_RefNannyFinishContext();
13450 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13451 PyObject *__pyx_r = NULL;
13452 __Pyx_RefNannyDeclarations
13453 PyObject *__pyx_t_1 = NULL;
13454 int __pyx_lineno = 0;
13455 const char *__pyx_filename = NULL;
13456 int __pyx_clineno = 0;
13457 __Pyx_RefNannySetupContext(
"exp", 0);
13458 __Pyx_XDECREF(__pyx_r);
13459 __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;}
13460 __Pyx_GOTREF(__pyx_t_1);
13461 __pyx_r = __pyx_t_1;
13467 __Pyx_XDECREF(__pyx_t_1);
13468 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13471 __Pyx_XGIVEREF(__pyx_r);
13472 __Pyx_RefNannyFinishContext();
13484 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13485 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) {
13486 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13487 PyObject *__pyx_r = NULL;
13488 __Pyx_RefNannyDeclarations
13491 PyObject *__pyx_t_3 = NULL;
13493 PyObject *__pyx_t_5 = NULL;
13494 PyObject *__pyx_t_6 = NULL;
13495 PyObject *__pyx_t_7 = NULL;
13496 PyObject *__pyx_t_8 = NULL;
13497 PyObject *__pyx_t_9 = NULL;
13498 PyObject *__pyx_t_10 = NULL;
13499 PyObject *__pyx_t_11 = NULL;
13500 int __pyx_lineno = 0;
13501 const char *__pyx_filename = NULL;
13502 int __pyx_clineno = 0;
13503 __Pyx_RefNannySetupContext(
"log", 0);
13504 if (__pyx_optional_args) {
13505 if (__pyx_optional_args->__pyx_n > 0) {
13506 __pyx_v_i = __pyx_optional_args->i;
13517 __pyx_t_1 = (__pyx_v_i != Py_None);
13518 __pyx_t_2 = (__pyx_t_1 != 0);
13528 __Pyx_XDECREF(__pyx_r);
13529 __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;}
13530 __Pyx_GOTREF(__pyx_t_3);
13532 __pyx_t_4 =
log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13534 __Pyx_CppExn2PyErr();
13535 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13537 __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;}
13538 __Pyx_GOTREF(__pyx_t_5);
13539 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13540 __pyx_r = __pyx_t_5;
13562 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13563 __Pyx_XGOTREF(__pyx_t_6);
13564 __Pyx_XGOTREF(__pyx_t_7);
13565 __Pyx_XGOTREF(__pyx_t_8);
13575 __Pyx_XDECREF(__pyx_r);
13576 __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;}
13577 __Pyx_GOTREF(__pyx_t_3);
13578 __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;}
13579 __Pyx_GOTREF(__pyx_t_9);
13580 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13582 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13583 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13584 if (likely(__pyx_t_3)) {
13585 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13586 __Pyx_INCREF(__pyx_t_3);
13587 __Pyx_INCREF(
function);
13588 __Pyx_DECREF_SET(__pyx_t_9,
function);
13592 __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;}
13593 __Pyx_GOTREF(__pyx_t_5);
13595 __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;}
13596 __Pyx_GOTREF(__pyx_t_10);
13597 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13598 __Pyx_INCREF(__pyx_v_obj);
13599 __Pyx_GIVEREF(__pyx_v_obj);
13600 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13601 __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;}
13602 __Pyx_GOTREF(__pyx_t_5);
13603 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13605 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13606 __pyx_r = __pyx_t_5;
13608 goto __pyx_L8_try_return;
13619 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13620 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13621 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13622 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13632 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13633 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;}
13634 __Pyx_GOTREF(__pyx_t_5);
13635 __Pyx_GOTREF(__pyx_t_9);
13636 __Pyx_GOTREF(__pyx_t_10);
13645 __Pyx_XDECREF(__pyx_r);
13646 __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;}
13647 __Pyx_GOTREF(__pyx_t_3);
13648 __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;}
13649 __Pyx_GOTREF(__pyx_t_11);
13650 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13651 __pyx_r = __pyx_t_11;
13653 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13654 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13655 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13656 goto __pyx_L7_except_return;
13658 __pyx_L6_except_error:;
13667 __Pyx_XGIVEREF(__pyx_t_6);
13668 __Pyx_XGIVEREF(__pyx_t_7);
13669 __Pyx_XGIVEREF(__pyx_t_8);
13670 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13671 goto __pyx_L1_error;
13672 __pyx_L8_try_return:;
13673 __Pyx_XGIVEREF(__pyx_t_6);
13674 __Pyx_XGIVEREF(__pyx_t_7);
13675 __Pyx_XGIVEREF(__pyx_t_8);
13676 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13678 __pyx_L7_except_return:;
13679 __Pyx_XGIVEREF(__pyx_t_6);
13680 __Pyx_XGIVEREF(__pyx_t_7);
13681 __Pyx_XGIVEREF(__pyx_t_8);
13682 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13697 __Pyx_XDECREF(__pyx_t_3);
13698 __Pyx_XDECREF(__pyx_t_5);
13699 __Pyx_XDECREF(__pyx_t_9);
13700 __Pyx_XDECREF(__pyx_t_10);
13701 __Pyx_XDECREF(__pyx_t_11);
13702 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13705 __Pyx_XGIVEREF(__pyx_r);
13706 __Pyx_RefNannyFinishContext();
13711 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13712 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 ";
13713 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13714 PyObject *__pyx_v_obj = 0;
13715 PyObject *__pyx_v_i = 0;
13716 int __pyx_lineno = 0;
13717 const char *__pyx_filename = NULL;
13718 int __pyx_clineno = 0;
13719 PyObject *__pyx_r = 0;
13720 __Pyx_RefNannyDeclarations
13721 __Pyx_RefNannySetupContext(
"log (wrapper)", 0);
13723 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13724 PyObject* values[2] = {0,0};
13725 values[1] = ((PyObject *)Py_None);
13726 if (unlikely(__pyx_kwds)) {
13727 Py_ssize_t kw_args;
13728 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13729 switch (pos_args) {
13730 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13731 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13733 default:
goto __pyx_L5_argtuple_error;
13735 kw_args = PyDict_Size(__pyx_kwds);
13736 switch (pos_args) {
13738 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13739 else goto __pyx_L5_argtuple_error;
13742 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13743 if (value) { values[1] = value; kw_args--; }
13746 if (unlikely(kw_args > 0)) {
13747 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;}
13750 switch (PyTuple_GET_SIZE(__pyx_args)) {
13751 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13752 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13754 default:
goto __pyx_L5_argtuple_error;
13757 __pyx_v_obj = values[0];
13758 __pyx_v_i = values[1];
13760 goto __pyx_L4_argument_unpacking_done;
13761 __pyx_L5_argtuple_error:;
13762 __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;}
13764 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13765 __Pyx_RefNannyFinishContext();
13767 __pyx_L4_argument_unpacking_done:;
13768 __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13771 __Pyx_RefNannyFinishContext();
13775 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13776 PyObject *__pyx_r = NULL;
13777 __Pyx_RefNannyDeclarations
13778 PyObject *__pyx_t_1 = NULL;
13779 struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13780 int __pyx_lineno = 0;
13781 const char *__pyx_filename = NULL;
13782 int __pyx_clineno = 0;
13783 __Pyx_RefNannySetupContext(
"log", 0);
13784 __Pyx_XDECREF(__pyx_r);
13785 __pyx_t_2.__pyx_n = 1;
13786 __pyx_t_2.i = __pyx_v_i;
13787 __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;}
13788 __Pyx_GOTREF(__pyx_t_1);
13789 __pyx_r = __pyx_t_1;
13795 __Pyx_XDECREF(__pyx_t_1);
13796 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13799 __Pyx_XGIVEREF(__pyx_r);
13800 __Pyx_RefNannyFinishContext();
13812 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13813 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) {
13814 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13815 PyObject *__pyx_r = NULL;
13816 __Pyx_RefNannyDeclarations
13819 PyObject *__pyx_t_3 = NULL;
13821 PyObject *__pyx_t_5 = NULL;
13822 PyObject *__pyx_t_6 = NULL;
13823 PyObject *__pyx_t_7 = NULL;
13824 PyObject *__pyx_t_8 = NULL;
13825 PyObject *__pyx_t_9 = NULL;
13826 PyObject *__pyx_t_10 = NULL;
13827 PyObject *__pyx_t_11 = NULL;
13828 int __pyx_lineno = 0;
13829 const char *__pyx_filename = NULL;
13830 int __pyx_clineno = 0;
13831 __Pyx_RefNannySetupContext(
"cos", 0);
13832 if (__pyx_optional_args) {
13833 if (__pyx_optional_args->__pyx_n > 0) {
13834 __pyx_v_i = __pyx_optional_args->i;
13845 __pyx_t_1 = (__pyx_v_i != Py_None);
13846 __pyx_t_2 = (__pyx_t_1 != 0);
13856 __Pyx_XDECREF(__pyx_r);
13857 __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;}
13858 __Pyx_GOTREF(__pyx_t_3);
13860 __pyx_t_4 =
cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13862 __Pyx_CppExn2PyErr();
13863 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13865 __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;}
13866 __Pyx_GOTREF(__pyx_t_5);
13867 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13868 __pyx_r = __pyx_t_5;
13890 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13891 __Pyx_XGOTREF(__pyx_t_6);
13892 __Pyx_XGOTREF(__pyx_t_7);
13893 __Pyx_XGOTREF(__pyx_t_8);
13903 __Pyx_XDECREF(__pyx_r);
13904 __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;}
13905 __Pyx_GOTREF(__pyx_t_3);
13906 __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;}
13907 __Pyx_GOTREF(__pyx_t_9);
13908 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13910 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13911 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13912 if (likely(__pyx_t_3)) {
13913 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13914 __Pyx_INCREF(__pyx_t_3);
13915 __Pyx_INCREF(
function);
13916 __Pyx_DECREF_SET(__pyx_t_9,
function);
13920 __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;}
13921 __Pyx_GOTREF(__pyx_t_5);
13923 __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;}
13924 __Pyx_GOTREF(__pyx_t_10);
13925 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13926 __Pyx_INCREF(__pyx_v_obj);
13927 __Pyx_GIVEREF(__pyx_v_obj);
13928 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13929 __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;}
13930 __Pyx_GOTREF(__pyx_t_5);
13931 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13933 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13934 __pyx_r = __pyx_t_5;
13936 goto __pyx_L8_try_return;
13947 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13948 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13949 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13950 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13960 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13961 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;}
13962 __Pyx_GOTREF(__pyx_t_5);
13963 __Pyx_GOTREF(__pyx_t_9);
13964 __Pyx_GOTREF(__pyx_t_10);
13973 __Pyx_XDECREF(__pyx_r);
13974 __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;}
13975 __Pyx_GOTREF(__pyx_t_3);
13976 __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;}
13977 __Pyx_GOTREF(__pyx_t_11);
13978 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13979 __pyx_r = __pyx_t_11;
13981 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13982 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13983 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13984 goto __pyx_L7_except_return;
13986 __pyx_L6_except_error:;
13995 __Pyx_XGIVEREF(__pyx_t_6);
13996 __Pyx_XGIVEREF(__pyx_t_7);
13997 __Pyx_XGIVEREF(__pyx_t_8);
13998 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13999 goto __pyx_L1_error;
14000 __pyx_L8_try_return:;
14001 __Pyx_XGIVEREF(__pyx_t_6);
14002 __Pyx_XGIVEREF(__pyx_t_7);
14003 __Pyx_XGIVEREF(__pyx_t_8);
14004 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14006 __pyx_L7_except_return:;
14007 __Pyx_XGIVEREF(__pyx_t_6);
14008 __Pyx_XGIVEREF(__pyx_t_7);
14009 __Pyx_XGIVEREF(__pyx_t_8);
14010 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14025 __Pyx_XDECREF(__pyx_t_3);
14026 __Pyx_XDECREF(__pyx_t_5);
14027 __Pyx_XDECREF(__pyx_t_9);
14028 __Pyx_XDECREF(__pyx_t_10);
14029 __Pyx_XDECREF(__pyx_t_11);
14030 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14033 __Pyx_XGIVEREF(__pyx_r);
14034 __Pyx_RefNannyFinishContext();
14039 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14040 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 ";
14041 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14042 PyObject *__pyx_v_obj = 0;
14043 PyObject *__pyx_v_i = 0;
14044 int __pyx_lineno = 0;
14045 const char *__pyx_filename = NULL;
14046 int __pyx_clineno = 0;
14047 PyObject *__pyx_r = 0;
14048 __Pyx_RefNannyDeclarations
14049 __Pyx_RefNannySetupContext(
"cos (wrapper)", 0);
14051 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14052 PyObject* values[2] = {0,0};
14053 values[1] = ((PyObject *)Py_None);
14054 if (unlikely(__pyx_kwds)) {
14055 Py_ssize_t kw_args;
14056 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14057 switch (pos_args) {
14058 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14059 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14061 default:
goto __pyx_L5_argtuple_error;
14063 kw_args = PyDict_Size(__pyx_kwds);
14064 switch (pos_args) {
14066 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14067 else goto __pyx_L5_argtuple_error;
14070 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14071 if (value) { values[1] = value; kw_args--; }
14074 if (unlikely(kw_args > 0)) {
14075 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;}
14078 switch (PyTuple_GET_SIZE(__pyx_args)) {
14079 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14080 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14082 default:
goto __pyx_L5_argtuple_error;
14085 __pyx_v_obj = values[0];
14086 __pyx_v_i = values[1];
14088 goto __pyx_L4_argument_unpacking_done;
14089 __pyx_L5_argtuple_error:;
14090 __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;}
14092 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14093 __Pyx_RefNannyFinishContext();
14095 __pyx_L4_argument_unpacking_done:;
14096 __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14099 __Pyx_RefNannyFinishContext();
14103 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14104 PyObject *__pyx_r = NULL;
14105 __Pyx_RefNannyDeclarations
14106 PyObject *__pyx_t_1 = NULL;
14107 struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14108 int __pyx_lineno = 0;
14109 const char *__pyx_filename = NULL;
14110 int __pyx_clineno = 0;
14111 __Pyx_RefNannySetupContext(
"cos", 0);
14112 __Pyx_XDECREF(__pyx_r);
14113 __pyx_t_2.__pyx_n = 1;
14114 __pyx_t_2.i = __pyx_v_i;
14115 __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;}
14116 __Pyx_GOTREF(__pyx_t_1);
14117 __pyx_r = __pyx_t_1;
14123 __Pyx_XDECREF(__pyx_t_1);
14124 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14127 __Pyx_XGIVEREF(__pyx_r);
14128 __Pyx_RefNannyFinishContext();
14140 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14141 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) {
14142 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14143 PyObject *__pyx_r = NULL;
14144 __Pyx_RefNannyDeclarations
14147 PyObject *__pyx_t_3 = NULL;
14149 PyObject *__pyx_t_5 = NULL;
14150 PyObject *__pyx_t_6 = NULL;
14151 PyObject *__pyx_t_7 = NULL;
14152 PyObject *__pyx_t_8 = NULL;
14153 PyObject *__pyx_t_9 = NULL;
14154 PyObject *__pyx_t_10 = NULL;
14155 PyObject *__pyx_t_11 = NULL;
14156 int __pyx_lineno = 0;
14157 const char *__pyx_filename = NULL;
14158 int __pyx_clineno = 0;
14159 __Pyx_RefNannySetupContext(
"acos", 0);
14160 if (__pyx_optional_args) {
14161 if (__pyx_optional_args->__pyx_n > 0) {
14162 __pyx_v_i = __pyx_optional_args->i;
14173 __pyx_t_1 = (__pyx_v_i != Py_None);
14174 __pyx_t_2 = (__pyx_t_1 != 0);
14184 __Pyx_XDECREF(__pyx_r);
14185 __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;}
14186 __Pyx_GOTREF(__pyx_t_3);
14188 __pyx_t_4 =
acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14190 __Pyx_CppExn2PyErr();
14191 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14193 __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;}
14194 __Pyx_GOTREF(__pyx_t_5);
14195 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14196 __pyx_r = __pyx_t_5;
14218 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14219 __Pyx_XGOTREF(__pyx_t_6);
14220 __Pyx_XGOTREF(__pyx_t_7);
14221 __Pyx_XGOTREF(__pyx_t_8);
14231 __Pyx_XDECREF(__pyx_r);
14232 __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;}
14233 __Pyx_GOTREF(__pyx_t_3);
14234 __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;}
14235 __Pyx_GOTREF(__pyx_t_9);
14236 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14238 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14239 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14240 if (likely(__pyx_t_3)) {
14241 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14242 __Pyx_INCREF(__pyx_t_3);
14243 __Pyx_INCREF(
function);
14244 __Pyx_DECREF_SET(__pyx_t_9,
function);
14248 __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;}
14249 __Pyx_GOTREF(__pyx_t_5);
14251 __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;}
14252 __Pyx_GOTREF(__pyx_t_10);
14253 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14254 __Pyx_INCREF(__pyx_v_obj);
14255 __Pyx_GIVEREF(__pyx_v_obj);
14256 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14257 __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;}
14258 __Pyx_GOTREF(__pyx_t_5);
14259 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14261 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14262 __pyx_r = __pyx_t_5;
14264 goto __pyx_L8_try_return;
14275 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14276 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14277 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14278 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14288 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14289 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;}
14290 __Pyx_GOTREF(__pyx_t_5);
14291 __Pyx_GOTREF(__pyx_t_9);
14292 __Pyx_GOTREF(__pyx_t_10);
14301 __Pyx_XDECREF(__pyx_r);
14302 __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;}
14303 __Pyx_GOTREF(__pyx_t_3);
14304 __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;}
14305 __Pyx_GOTREF(__pyx_t_11);
14306 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14307 __pyx_r = __pyx_t_11;
14309 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14310 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14311 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14312 goto __pyx_L7_except_return;
14314 __pyx_L6_except_error:;
14323 __Pyx_XGIVEREF(__pyx_t_6);
14324 __Pyx_XGIVEREF(__pyx_t_7);
14325 __Pyx_XGIVEREF(__pyx_t_8);
14326 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14327 goto __pyx_L1_error;
14328 __pyx_L8_try_return:;
14329 __Pyx_XGIVEREF(__pyx_t_6);
14330 __Pyx_XGIVEREF(__pyx_t_7);
14331 __Pyx_XGIVEREF(__pyx_t_8);
14332 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14334 __pyx_L7_except_return:;
14335 __Pyx_XGIVEREF(__pyx_t_6);
14336 __Pyx_XGIVEREF(__pyx_t_7);
14337 __Pyx_XGIVEREF(__pyx_t_8);
14338 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14353 __Pyx_XDECREF(__pyx_t_3);
14354 __Pyx_XDECREF(__pyx_t_5);
14355 __Pyx_XDECREF(__pyx_t_9);
14356 __Pyx_XDECREF(__pyx_t_10);
14357 __Pyx_XDECREF(__pyx_t_11);
14358 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14361 __Pyx_XGIVEREF(__pyx_r);
14362 __Pyx_RefNannyFinishContext();
14367 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14368 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 ";
14369 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14370 PyObject *__pyx_v_obj = 0;
14371 PyObject *__pyx_v_i = 0;
14372 int __pyx_lineno = 0;
14373 const char *__pyx_filename = NULL;
14374 int __pyx_clineno = 0;
14375 PyObject *__pyx_r = 0;
14376 __Pyx_RefNannyDeclarations
14377 __Pyx_RefNannySetupContext(
"acos (wrapper)", 0);
14379 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14380 PyObject* values[2] = {0,0};
14381 values[1] = ((PyObject *)Py_None);
14382 if (unlikely(__pyx_kwds)) {
14383 Py_ssize_t kw_args;
14384 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14385 switch (pos_args) {
14386 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14387 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14389 default:
goto __pyx_L5_argtuple_error;
14391 kw_args = PyDict_Size(__pyx_kwds);
14392 switch (pos_args) {
14394 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14395 else goto __pyx_L5_argtuple_error;
14398 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14399 if (value) { values[1] = value; kw_args--; }
14402 if (unlikely(kw_args > 0)) {
14403 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;}
14406 switch (PyTuple_GET_SIZE(__pyx_args)) {
14407 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14408 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14410 default:
goto __pyx_L5_argtuple_error;
14413 __pyx_v_obj = values[0];
14414 __pyx_v_i = values[1];
14416 goto __pyx_L4_argument_unpacking_done;
14417 __pyx_L5_argtuple_error:;
14418 __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;}
14420 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14421 __Pyx_RefNannyFinishContext();
14423 __pyx_L4_argument_unpacking_done:;
14424 __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14427 __Pyx_RefNannyFinishContext();
14431 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14432 PyObject *__pyx_r = NULL;
14433 __Pyx_RefNannyDeclarations
14434 PyObject *__pyx_t_1 = NULL;
14435 struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14436 int __pyx_lineno = 0;
14437 const char *__pyx_filename = NULL;
14438 int __pyx_clineno = 0;
14439 __Pyx_RefNannySetupContext(
"acos", 0);
14440 __Pyx_XDECREF(__pyx_r);
14441 __pyx_t_2.__pyx_n = 1;
14442 __pyx_t_2.i = __pyx_v_i;
14443 __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;}
14444 __Pyx_GOTREF(__pyx_t_1);
14445 __pyx_r = __pyx_t_1;
14451 __Pyx_XDECREF(__pyx_t_1);
14452 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14455 __Pyx_XGIVEREF(__pyx_r);
14456 __Pyx_RefNannyFinishContext();
14468 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14469 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
14470 PyObject *__pyx_r = NULL;
14471 __Pyx_RefNannyDeclarations
14472 PyObject *__pyx_t_1 = NULL;
14473 PyObject *__pyx_t_2 = NULL;
14474 PyObject *__pyx_t_3 = NULL;
14475 PyObject *__pyx_t_4 = NULL;
14476 PyObject *__pyx_t_5 = NULL;
14477 PyObject *__pyx_t_6 = NULL;
14478 PyObject *__pyx_t_7 = NULL;
14479 PyObject *__pyx_t_8 = NULL;
14480 int __pyx_lineno = 0;
14481 const char *__pyx_filename = NULL;
14482 int __pyx_clineno = 0;
14483 __Pyx_RefNannySetupContext(
"cosh", 0);
14493 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14494 __Pyx_XGOTREF(__pyx_t_1);
14495 __Pyx_XGOTREF(__pyx_t_2);
14496 __Pyx_XGOTREF(__pyx_t_3);
14506 __Pyx_XDECREF(__pyx_r);
14507 __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;}
14508 __Pyx_GOTREF(__pyx_t_5);
14509 __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;}
14510 __Pyx_GOTREF(__pyx_t_6);
14511 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14513 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
14514 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14515 if (likely(__pyx_t_5)) {
14516 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
14517 __Pyx_INCREF(__pyx_t_5);
14518 __Pyx_INCREF(
function);
14519 __Pyx_DECREF_SET(__pyx_t_6,
function);
14523 __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;}
14524 __Pyx_GOTREF(__pyx_t_4);
14526 __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;}
14527 __Pyx_GOTREF(__pyx_t_7);
14528 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
14529 __Pyx_INCREF(__pyx_v_obj);
14530 __Pyx_GIVEREF(__pyx_v_obj);
14531 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
14532 __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;}
14533 __Pyx_GOTREF(__pyx_t_4);
14534 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14536 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14537 __pyx_r = __pyx_t_4;
14539 goto __pyx_L7_try_return;
14550 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14551 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14552 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14553 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14563 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14564 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;}
14565 __Pyx_GOTREF(__pyx_t_4);
14566 __Pyx_GOTREF(__pyx_t_6);
14567 __Pyx_GOTREF(__pyx_t_7);
14576 __Pyx_XDECREF(__pyx_r);
14577 __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;}
14578 __Pyx_GOTREF(__pyx_t_5);
14579 __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;}
14580 __Pyx_GOTREF(__pyx_t_8);
14581 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14582 __pyx_r = __pyx_t_8;
14584 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14585 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14586 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14587 goto __pyx_L6_except_return;
14589 __pyx_L5_except_error:;
14598 __Pyx_XGIVEREF(__pyx_t_1);
14599 __Pyx_XGIVEREF(__pyx_t_2);
14600 __Pyx_XGIVEREF(__pyx_t_3);
14601 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14602 goto __pyx_L1_error;
14603 __pyx_L7_try_return:;
14604 __Pyx_XGIVEREF(__pyx_t_1);
14605 __Pyx_XGIVEREF(__pyx_t_2);
14606 __Pyx_XGIVEREF(__pyx_t_3);
14607 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14609 __pyx_L6_except_return:;
14610 __Pyx_XGIVEREF(__pyx_t_1);
14611 __Pyx_XGIVEREF(__pyx_t_2);
14612 __Pyx_XGIVEREF(__pyx_t_3);
14613 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14627 __Pyx_XDECREF(__pyx_t_4);
14628 __Pyx_XDECREF(__pyx_t_5);
14629 __Pyx_XDECREF(__pyx_t_6);
14630 __Pyx_XDECREF(__pyx_t_7);
14631 __Pyx_XDECREF(__pyx_t_8);
14632 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14635 __Pyx_XGIVEREF(__pyx_r);
14636 __Pyx_RefNannyFinishContext();
14641 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14642 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 ";
14643 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14644 PyObject *__pyx_r = 0;
14645 __Pyx_RefNannyDeclarations
14646 __Pyx_RefNannySetupContext(
"cosh (wrapper)", 0);
14647 __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14650 __Pyx_RefNannyFinishContext();
14654 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14655 PyObject *__pyx_r = NULL;
14656 __Pyx_RefNannyDeclarations
14657 PyObject *__pyx_t_1 = NULL;
14658 int __pyx_lineno = 0;
14659 const char *__pyx_filename = NULL;
14660 int __pyx_clineno = 0;
14661 __Pyx_RefNannySetupContext(
"cosh", 0);
14662 __Pyx_XDECREF(__pyx_r);
14663 __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;}
14664 __Pyx_GOTREF(__pyx_t_1);
14665 __pyx_r = __pyx_t_1;
14671 __Pyx_XDECREF(__pyx_t_1);
14672 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14675 __Pyx_XGIVEREF(__pyx_r);
14676 __Pyx_RefNannyFinishContext();
14688 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14689 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) {
14690 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14691 PyObject *__pyx_r = NULL;
14692 __Pyx_RefNannyDeclarations
14695 PyObject *__pyx_t_3 = NULL;
14697 PyObject *__pyx_t_5 = NULL;
14698 PyObject *__pyx_t_6 = NULL;
14699 PyObject *__pyx_t_7 = NULL;
14700 PyObject *__pyx_t_8 = NULL;
14701 PyObject *__pyx_t_9 = NULL;
14702 PyObject *__pyx_t_10 = NULL;
14703 PyObject *__pyx_t_11 = NULL;
14704 int __pyx_lineno = 0;
14705 const char *__pyx_filename = NULL;
14706 int __pyx_clineno = 0;
14707 __Pyx_RefNannySetupContext(
"acosh", 0);
14708 if (__pyx_optional_args) {
14709 if (__pyx_optional_args->__pyx_n > 0) {
14710 __pyx_v_i = __pyx_optional_args->i;
14721 __pyx_t_1 = (__pyx_v_i != Py_None);
14722 __pyx_t_2 = (__pyx_t_1 != 0);
14732 __Pyx_XDECREF(__pyx_r);
14733 __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;}
14734 __Pyx_GOTREF(__pyx_t_3);
14736 __pyx_t_4 =
acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14738 __Pyx_CppExn2PyErr();
14739 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14741 __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;}
14742 __Pyx_GOTREF(__pyx_t_5);
14743 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14744 __pyx_r = __pyx_t_5;
14766 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14767 __Pyx_XGOTREF(__pyx_t_6);
14768 __Pyx_XGOTREF(__pyx_t_7);
14769 __Pyx_XGOTREF(__pyx_t_8);
14779 __Pyx_XDECREF(__pyx_r);
14780 __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;}
14781 __Pyx_GOTREF(__pyx_t_3);
14782 __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;}
14783 __Pyx_GOTREF(__pyx_t_9);
14784 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14786 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14787 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14788 if (likely(__pyx_t_3)) {
14789 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14790 __Pyx_INCREF(__pyx_t_3);
14791 __Pyx_INCREF(
function);
14792 __Pyx_DECREF_SET(__pyx_t_9,
function);
14796 __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;}
14797 __Pyx_GOTREF(__pyx_t_5);
14799 __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;}
14800 __Pyx_GOTREF(__pyx_t_10);
14801 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14802 __Pyx_INCREF(__pyx_v_obj);
14803 __Pyx_GIVEREF(__pyx_v_obj);
14804 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14805 __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;}
14806 __Pyx_GOTREF(__pyx_t_5);
14807 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14809 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14810 __pyx_r = __pyx_t_5;
14812 goto __pyx_L8_try_return;
14823 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14824 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14825 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14826 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14836 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14837 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;}
14838 __Pyx_GOTREF(__pyx_t_5);
14839 __Pyx_GOTREF(__pyx_t_9);
14840 __Pyx_GOTREF(__pyx_t_10);
14849 __Pyx_XDECREF(__pyx_r);
14850 __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;}
14851 __Pyx_GOTREF(__pyx_t_3);
14852 __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;}
14853 __Pyx_GOTREF(__pyx_t_11);
14854 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14855 __pyx_r = __pyx_t_11;
14857 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14858 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14859 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14860 goto __pyx_L7_except_return;
14862 __pyx_L6_except_error:;
14871 __Pyx_XGIVEREF(__pyx_t_6);
14872 __Pyx_XGIVEREF(__pyx_t_7);
14873 __Pyx_XGIVEREF(__pyx_t_8);
14874 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14875 goto __pyx_L1_error;
14876 __pyx_L8_try_return:;
14877 __Pyx_XGIVEREF(__pyx_t_6);
14878 __Pyx_XGIVEREF(__pyx_t_7);
14879 __Pyx_XGIVEREF(__pyx_t_8);
14880 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14882 __pyx_L7_except_return:;
14883 __Pyx_XGIVEREF(__pyx_t_6);
14884 __Pyx_XGIVEREF(__pyx_t_7);
14885 __Pyx_XGIVEREF(__pyx_t_8);
14886 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14901 __Pyx_XDECREF(__pyx_t_3);
14902 __Pyx_XDECREF(__pyx_t_5);
14903 __Pyx_XDECREF(__pyx_t_9);
14904 __Pyx_XDECREF(__pyx_t_10);
14905 __Pyx_XDECREF(__pyx_t_11);
14906 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14909 __Pyx_XGIVEREF(__pyx_r);
14910 __Pyx_RefNannyFinishContext();
14915 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14916 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 ";
14917 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14918 PyObject *__pyx_v_obj = 0;
14919 PyObject *__pyx_v_i = 0;
14920 int __pyx_lineno = 0;
14921 const char *__pyx_filename = NULL;
14922 int __pyx_clineno = 0;
14923 PyObject *__pyx_r = 0;
14924 __Pyx_RefNannyDeclarations
14925 __Pyx_RefNannySetupContext(
"acosh (wrapper)", 0);
14927 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14928 PyObject* values[2] = {0,0};
14929 values[1] = ((PyObject *)Py_None);
14930 if (unlikely(__pyx_kwds)) {
14931 Py_ssize_t kw_args;
14932 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14933 switch (pos_args) {
14934 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14935 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14937 default:
goto __pyx_L5_argtuple_error;
14939 kw_args = PyDict_Size(__pyx_kwds);
14940 switch (pos_args) {
14942 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14943 else goto __pyx_L5_argtuple_error;
14946 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14947 if (value) { values[1] = value; kw_args--; }
14950 if (unlikely(kw_args > 0)) {
14951 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;}
14954 switch (PyTuple_GET_SIZE(__pyx_args)) {
14955 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14956 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14958 default:
goto __pyx_L5_argtuple_error;
14961 __pyx_v_obj = values[0];
14962 __pyx_v_i = values[1];
14964 goto __pyx_L4_argument_unpacking_done;
14965 __pyx_L5_argtuple_error:;
14966 __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;}
14968 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14969 __Pyx_RefNannyFinishContext();
14971 __pyx_L4_argument_unpacking_done:;
14972 __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
14975 __Pyx_RefNannyFinishContext();
14979 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14980 PyObject *__pyx_r = NULL;
14981 __Pyx_RefNannyDeclarations
14982 PyObject *__pyx_t_1 = NULL;
14983 struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
14984 int __pyx_lineno = 0;
14985 const char *__pyx_filename = NULL;
14986 int __pyx_clineno = 0;
14987 __Pyx_RefNannySetupContext(
"acosh", 0);
14988 __Pyx_XDECREF(__pyx_r);
14989 __pyx_t_2.__pyx_n = 1;
14990 __pyx_t_2.i = __pyx_v_i;
14991 __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;}
14992 __Pyx_GOTREF(__pyx_t_1);
14993 __pyx_r = __pyx_t_1;
14999 __Pyx_XDECREF(__pyx_t_1);
15000 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15003 __Pyx_XGIVEREF(__pyx_r);
15004 __Pyx_RefNannyFinishContext();
15016 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15017 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) {
15018 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15019 PyObject *__pyx_r = NULL;
15020 __Pyx_RefNannyDeclarations
15023 PyObject *__pyx_t_3 = NULL;
15025 PyObject *__pyx_t_5 = NULL;
15026 PyObject *__pyx_t_6 = NULL;
15027 PyObject *__pyx_t_7 = NULL;
15028 PyObject *__pyx_t_8 = NULL;
15029 PyObject *__pyx_t_9 = NULL;
15030 PyObject *__pyx_t_10 = NULL;
15031 PyObject *__pyx_t_11 = NULL;
15032 int __pyx_lineno = 0;
15033 const char *__pyx_filename = NULL;
15034 int __pyx_clineno = 0;
15035 __Pyx_RefNannySetupContext(
"sin", 0);
15036 if (__pyx_optional_args) {
15037 if (__pyx_optional_args->__pyx_n > 0) {
15038 __pyx_v_i = __pyx_optional_args->i;
15049 __pyx_t_1 = (__pyx_v_i != Py_None);
15050 __pyx_t_2 = (__pyx_t_1 != 0);
15060 __Pyx_XDECREF(__pyx_r);
15061 __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;}
15062 __Pyx_GOTREF(__pyx_t_3);
15064 __pyx_t_4 =
sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15066 __Pyx_CppExn2PyErr();
15067 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15069 __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;}
15070 __Pyx_GOTREF(__pyx_t_5);
15071 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15072 __pyx_r = __pyx_t_5;
15094 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15095 __Pyx_XGOTREF(__pyx_t_6);
15096 __Pyx_XGOTREF(__pyx_t_7);
15097 __Pyx_XGOTREF(__pyx_t_8);
15107 __Pyx_XDECREF(__pyx_r);
15108 __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;}
15109 __Pyx_GOTREF(__pyx_t_3);
15110 __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;}
15111 __Pyx_GOTREF(__pyx_t_9);
15112 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15114 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15115 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15116 if (likely(__pyx_t_3)) {
15117 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15118 __Pyx_INCREF(__pyx_t_3);
15119 __Pyx_INCREF(
function);
15120 __Pyx_DECREF_SET(__pyx_t_9,
function);
15124 __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;}
15125 __Pyx_GOTREF(__pyx_t_5);
15127 __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;}
15128 __Pyx_GOTREF(__pyx_t_10);
15129 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15130 __Pyx_INCREF(__pyx_v_obj);
15131 __Pyx_GIVEREF(__pyx_v_obj);
15132 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15133 __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;}
15134 __Pyx_GOTREF(__pyx_t_5);
15135 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15137 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15138 __pyx_r = __pyx_t_5;
15140 goto __pyx_L8_try_return;
15151 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15152 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15153 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15154 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15164 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15165 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;}
15166 __Pyx_GOTREF(__pyx_t_5);
15167 __Pyx_GOTREF(__pyx_t_9);
15168 __Pyx_GOTREF(__pyx_t_10);
15177 __Pyx_XDECREF(__pyx_r);
15178 __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;}
15179 __Pyx_GOTREF(__pyx_t_3);
15180 __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;}
15181 __Pyx_GOTREF(__pyx_t_11);
15182 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15183 __pyx_r = __pyx_t_11;
15185 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15186 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15187 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15188 goto __pyx_L7_except_return;
15190 __pyx_L6_except_error:;
15199 __Pyx_XGIVEREF(__pyx_t_6);
15200 __Pyx_XGIVEREF(__pyx_t_7);
15201 __Pyx_XGIVEREF(__pyx_t_8);
15202 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15203 goto __pyx_L1_error;
15204 __pyx_L8_try_return:;
15205 __Pyx_XGIVEREF(__pyx_t_6);
15206 __Pyx_XGIVEREF(__pyx_t_7);
15207 __Pyx_XGIVEREF(__pyx_t_8);
15208 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15210 __pyx_L7_except_return:;
15211 __Pyx_XGIVEREF(__pyx_t_6);
15212 __Pyx_XGIVEREF(__pyx_t_7);
15213 __Pyx_XGIVEREF(__pyx_t_8);
15214 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15229 __Pyx_XDECREF(__pyx_t_3);
15230 __Pyx_XDECREF(__pyx_t_5);
15231 __Pyx_XDECREF(__pyx_t_9);
15232 __Pyx_XDECREF(__pyx_t_10);
15233 __Pyx_XDECREF(__pyx_t_11);
15234 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15237 __Pyx_XGIVEREF(__pyx_r);
15238 __Pyx_RefNannyFinishContext();
15243 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15244 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 ";
15245 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15246 PyObject *__pyx_v_obj = 0;
15247 PyObject *__pyx_v_i = 0;
15248 int __pyx_lineno = 0;
15249 const char *__pyx_filename = NULL;
15250 int __pyx_clineno = 0;
15251 PyObject *__pyx_r = 0;
15252 __Pyx_RefNannyDeclarations
15253 __Pyx_RefNannySetupContext(
"sin (wrapper)", 0);
15255 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15256 PyObject* values[2] = {0,0};
15257 values[1] = ((PyObject *)Py_None);
15258 if (unlikely(__pyx_kwds)) {
15259 Py_ssize_t kw_args;
15260 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15261 switch (pos_args) {
15262 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15263 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15265 default:
goto __pyx_L5_argtuple_error;
15267 kw_args = PyDict_Size(__pyx_kwds);
15268 switch (pos_args) {
15270 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15271 else goto __pyx_L5_argtuple_error;
15274 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15275 if (value) { values[1] = value; kw_args--; }
15278 if (unlikely(kw_args > 0)) {
15279 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;}
15282 switch (PyTuple_GET_SIZE(__pyx_args)) {
15283 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15284 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15286 default:
goto __pyx_L5_argtuple_error;
15289 __pyx_v_obj = values[0];
15290 __pyx_v_i = values[1];
15292 goto __pyx_L4_argument_unpacking_done;
15293 __pyx_L5_argtuple_error:;
15294 __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;}
15296 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15297 __Pyx_RefNannyFinishContext();
15299 __pyx_L4_argument_unpacking_done:;
15300 __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15303 __Pyx_RefNannyFinishContext();
15307 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15308 PyObject *__pyx_r = NULL;
15309 __Pyx_RefNannyDeclarations
15310 PyObject *__pyx_t_1 = NULL;
15311 struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15312 int __pyx_lineno = 0;
15313 const char *__pyx_filename = NULL;
15314 int __pyx_clineno = 0;
15315 __Pyx_RefNannySetupContext(
"sin", 0);
15316 __Pyx_XDECREF(__pyx_r);
15317 __pyx_t_2.__pyx_n = 1;
15318 __pyx_t_2.i = __pyx_v_i;
15319 __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;}
15320 __Pyx_GOTREF(__pyx_t_1);
15321 __pyx_r = __pyx_t_1;
15327 __Pyx_XDECREF(__pyx_t_1);
15328 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15331 __Pyx_XGIVEREF(__pyx_r);
15332 __Pyx_RefNannyFinishContext();
15344 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15345 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) {
15346 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15347 PyObject *__pyx_r = NULL;
15348 __Pyx_RefNannyDeclarations
15351 PyObject *__pyx_t_3 = NULL;
15353 PyObject *__pyx_t_5 = NULL;
15354 PyObject *__pyx_t_6 = NULL;
15355 PyObject *__pyx_t_7 = NULL;
15356 PyObject *__pyx_t_8 = NULL;
15357 PyObject *__pyx_t_9 = NULL;
15358 PyObject *__pyx_t_10 = NULL;
15359 PyObject *__pyx_t_11 = NULL;
15360 int __pyx_lineno = 0;
15361 const char *__pyx_filename = NULL;
15362 int __pyx_clineno = 0;
15363 __Pyx_RefNannySetupContext(
"asin", 0);
15364 if (__pyx_optional_args) {
15365 if (__pyx_optional_args->__pyx_n > 0) {
15366 __pyx_v_i = __pyx_optional_args->i;
15377 __pyx_t_1 = (__pyx_v_i != Py_None);
15378 __pyx_t_2 = (__pyx_t_1 != 0);
15388 __Pyx_XDECREF(__pyx_r);
15389 __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;}
15390 __Pyx_GOTREF(__pyx_t_3);
15392 __pyx_t_4 =
asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15394 __Pyx_CppExn2PyErr();
15395 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15397 __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;}
15398 __Pyx_GOTREF(__pyx_t_5);
15399 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15400 __pyx_r = __pyx_t_5;
15422 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15423 __Pyx_XGOTREF(__pyx_t_6);
15424 __Pyx_XGOTREF(__pyx_t_7);
15425 __Pyx_XGOTREF(__pyx_t_8);
15435 __Pyx_XDECREF(__pyx_r);
15436 __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;}
15437 __Pyx_GOTREF(__pyx_t_3);
15438 __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;}
15439 __Pyx_GOTREF(__pyx_t_9);
15440 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15442 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15443 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15444 if (likely(__pyx_t_3)) {
15445 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15446 __Pyx_INCREF(__pyx_t_3);
15447 __Pyx_INCREF(
function);
15448 __Pyx_DECREF_SET(__pyx_t_9,
function);
15452 __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;}
15453 __Pyx_GOTREF(__pyx_t_5);
15455 __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;}
15456 __Pyx_GOTREF(__pyx_t_10);
15457 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15458 __Pyx_INCREF(__pyx_v_obj);
15459 __Pyx_GIVEREF(__pyx_v_obj);
15460 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15461 __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;}
15462 __Pyx_GOTREF(__pyx_t_5);
15463 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15465 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15466 __pyx_r = __pyx_t_5;
15468 goto __pyx_L8_try_return;
15479 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15480 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15481 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15482 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15492 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15493 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;}
15494 __Pyx_GOTREF(__pyx_t_5);
15495 __Pyx_GOTREF(__pyx_t_9);
15496 __Pyx_GOTREF(__pyx_t_10);
15505 __Pyx_XDECREF(__pyx_r);
15506 __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;}
15507 __Pyx_GOTREF(__pyx_t_3);
15508 __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;}
15509 __Pyx_GOTREF(__pyx_t_11);
15510 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15511 __pyx_r = __pyx_t_11;
15513 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15514 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15515 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15516 goto __pyx_L7_except_return;
15518 __pyx_L6_except_error:;
15527 __Pyx_XGIVEREF(__pyx_t_6);
15528 __Pyx_XGIVEREF(__pyx_t_7);
15529 __Pyx_XGIVEREF(__pyx_t_8);
15530 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15531 goto __pyx_L1_error;
15532 __pyx_L8_try_return:;
15533 __Pyx_XGIVEREF(__pyx_t_6);
15534 __Pyx_XGIVEREF(__pyx_t_7);
15535 __Pyx_XGIVEREF(__pyx_t_8);
15536 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15538 __pyx_L7_except_return:;
15539 __Pyx_XGIVEREF(__pyx_t_6);
15540 __Pyx_XGIVEREF(__pyx_t_7);
15541 __Pyx_XGIVEREF(__pyx_t_8);
15542 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15557 __Pyx_XDECREF(__pyx_t_3);
15558 __Pyx_XDECREF(__pyx_t_5);
15559 __Pyx_XDECREF(__pyx_t_9);
15560 __Pyx_XDECREF(__pyx_t_10);
15561 __Pyx_XDECREF(__pyx_t_11);
15562 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15565 __Pyx_XGIVEREF(__pyx_r);
15566 __Pyx_RefNannyFinishContext();
15571 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15572 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 ";
15573 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15574 PyObject *__pyx_v_obj = 0;
15575 PyObject *__pyx_v_i = 0;
15576 int __pyx_lineno = 0;
15577 const char *__pyx_filename = NULL;
15578 int __pyx_clineno = 0;
15579 PyObject *__pyx_r = 0;
15580 __Pyx_RefNannyDeclarations
15581 __Pyx_RefNannySetupContext(
"asin (wrapper)", 0);
15583 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15584 PyObject* values[2] = {0,0};
15585 values[1] = ((PyObject *)Py_None);
15586 if (unlikely(__pyx_kwds)) {
15587 Py_ssize_t kw_args;
15588 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15589 switch (pos_args) {
15590 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15591 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15593 default:
goto __pyx_L5_argtuple_error;
15595 kw_args = PyDict_Size(__pyx_kwds);
15596 switch (pos_args) {
15598 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15599 else goto __pyx_L5_argtuple_error;
15602 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15603 if (value) { values[1] = value; kw_args--; }
15606 if (unlikely(kw_args > 0)) {
15607 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;}
15610 switch (PyTuple_GET_SIZE(__pyx_args)) {
15611 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15612 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15614 default:
goto __pyx_L5_argtuple_error;
15617 __pyx_v_obj = values[0];
15618 __pyx_v_i = values[1];
15620 goto __pyx_L4_argument_unpacking_done;
15621 __pyx_L5_argtuple_error:;
15622 __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;}
15624 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15625 __Pyx_RefNannyFinishContext();
15627 __pyx_L4_argument_unpacking_done:;
15628 __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15631 __Pyx_RefNannyFinishContext();
15635 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15636 PyObject *__pyx_r = NULL;
15637 __Pyx_RefNannyDeclarations
15638 PyObject *__pyx_t_1 = NULL;
15639 struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15640 int __pyx_lineno = 0;
15641 const char *__pyx_filename = NULL;
15642 int __pyx_clineno = 0;
15643 __Pyx_RefNannySetupContext(
"asin", 0);
15644 __Pyx_XDECREF(__pyx_r);
15645 __pyx_t_2.__pyx_n = 1;
15646 __pyx_t_2.i = __pyx_v_i;
15647 __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;}
15648 __Pyx_GOTREF(__pyx_t_1);
15649 __pyx_r = __pyx_t_1;
15655 __Pyx_XDECREF(__pyx_t_1);
15656 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15659 __Pyx_XGIVEREF(__pyx_r);
15660 __Pyx_RefNannyFinishContext();
15672 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
15674 PyObject *__pyx_r = NULL;
15675 __Pyx_RefNannyDeclarations
15676 PyObject *__pyx_t_1 = NULL;
15677 PyObject *__pyx_t_2 = NULL;
15678 PyObject *__pyx_t_3 = NULL;
15679 PyObject *__pyx_t_4 = NULL;
15680 PyObject *__pyx_t_5 = NULL;
15681 PyObject *__pyx_t_6 = NULL;
15682 PyObject *__pyx_t_7 = NULL;
15683 PyObject *__pyx_t_8 = NULL;
15684 int __pyx_lineno = 0;
15685 const char *__pyx_filename = NULL;
15686 int __pyx_clineno = 0;
15687 __Pyx_RefNannySetupContext(
"sinh", 0);
15697 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15698 __Pyx_XGOTREF(__pyx_t_1);
15699 __Pyx_XGOTREF(__pyx_t_2);
15700 __Pyx_XGOTREF(__pyx_t_3);
15710 __Pyx_XDECREF(__pyx_r);
15711 __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;}
15712 __Pyx_GOTREF(__pyx_t_5);
15713 __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;}
15714 __Pyx_GOTREF(__pyx_t_6);
15715 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15717 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
15718 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15719 if (likely(__pyx_t_5)) {
15720 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
15721 __Pyx_INCREF(__pyx_t_5);
15722 __Pyx_INCREF(
function);
15723 __Pyx_DECREF_SET(__pyx_t_6,
function);
15727 __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;}
15728 __Pyx_GOTREF(__pyx_t_4);
15730 __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;}
15731 __Pyx_GOTREF(__pyx_t_7);
15732 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
15733 __Pyx_INCREF(__pyx_v_obj);
15734 __Pyx_GIVEREF(__pyx_v_obj);
15735 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15736 __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;}
15737 __Pyx_GOTREF(__pyx_t_4);
15738 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15740 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15741 __pyx_r = __pyx_t_4;
15743 goto __pyx_L7_try_return;
15754 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15755 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15756 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15757 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15767 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15768 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;}
15769 __Pyx_GOTREF(__pyx_t_4);
15770 __Pyx_GOTREF(__pyx_t_6);
15771 __Pyx_GOTREF(__pyx_t_7);
15780 __Pyx_XDECREF(__pyx_r);
15781 __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;}
15782 __Pyx_GOTREF(__pyx_t_5);
15783 __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;}
15784 __Pyx_GOTREF(__pyx_t_8);
15785 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15786 __pyx_r = __pyx_t_8;
15788 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15789 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15790 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15791 goto __pyx_L6_except_return;
15793 __pyx_L5_except_error:;
15802 __Pyx_XGIVEREF(__pyx_t_1);
15803 __Pyx_XGIVEREF(__pyx_t_2);
15804 __Pyx_XGIVEREF(__pyx_t_3);
15805 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15806 goto __pyx_L1_error;
15807 __pyx_L7_try_return:;
15808 __Pyx_XGIVEREF(__pyx_t_1);
15809 __Pyx_XGIVEREF(__pyx_t_2);
15810 __Pyx_XGIVEREF(__pyx_t_3);
15811 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15813 __pyx_L6_except_return:;
15814 __Pyx_XGIVEREF(__pyx_t_1);
15815 __Pyx_XGIVEREF(__pyx_t_2);
15816 __Pyx_XGIVEREF(__pyx_t_3);
15817 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15831 __Pyx_XDECREF(__pyx_t_4);
15832 __Pyx_XDECREF(__pyx_t_5);
15833 __Pyx_XDECREF(__pyx_t_6);
15834 __Pyx_XDECREF(__pyx_t_7);
15835 __Pyx_XDECREF(__pyx_t_8);
15836 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15839 __Pyx_XGIVEREF(__pyx_r);
15840 __Pyx_RefNannyFinishContext();
15845 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15846 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 ";
15847 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15848 PyObject *__pyx_r = 0;
15849 __Pyx_RefNannyDeclarations
15850 __Pyx_RefNannySetupContext(
"sinh (wrapper)", 0);
15851 __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15854 __Pyx_RefNannyFinishContext();
15858 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15859 PyObject *__pyx_r = NULL;
15860 __Pyx_RefNannyDeclarations
15861 PyObject *__pyx_t_1 = NULL;
15862 int __pyx_lineno = 0;
15863 const char *__pyx_filename = NULL;
15864 int __pyx_clineno = 0;
15865 __Pyx_RefNannySetupContext(
"sinh", 0);
15866 __Pyx_XDECREF(__pyx_r);
15867 __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;}
15868 __Pyx_GOTREF(__pyx_t_1);
15869 __pyx_r = __pyx_t_1;
15875 __Pyx_XDECREF(__pyx_t_1);
15876 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15879 __Pyx_XGIVEREF(__pyx_r);
15880 __Pyx_RefNannyFinishContext();
15892 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15893 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) {
15894 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15895 PyObject *__pyx_r = NULL;
15896 __Pyx_RefNannyDeclarations
15899 PyObject *__pyx_t_3 = NULL;
15901 PyObject *__pyx_t_5 = NULL;
15902 PyObject *__pyx_t_6 = NULL;
15903 PyObject *__pyx_t_7 = NULL;
15904 PyObject *__pyx_t_8 = NULL;
15905 PyObject *__pyx_t_9 = NULL;
15906 PyObject *__pyx_t_10 = NULL;
15907 PyObject *__pyx_t_11 = NULL;
15908 int __pyx_lineno = 0;
15909 const char *__pyx_filename = NULL;
15910 int __pyx_clineno = 0;
15911 __Pyx_RefNannySetupContext(
"asinh", 0);
15912 if (__pyx_optional_args) {
15913 if (__pyx_optional_args->__pyx_n > 0) {
15914 __pyx_v_i = __pyx_optional_args->i;
15925 __pyx_t_1 = (__pyx_v_i != Py_None);
15926 __pyx_t_2 = (__pyx_t_1 != 0);
15936 __Pyx_XDECREF(__pyx_r);
15937 __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;}
15938 __Pyx_GOTREF(__pyx_t_3);
15940 __pyx_t_4 =
asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15942 __Pyx_CppExn2PyErr();
15943 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15945 __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;}
15946 __Pyx_GOTREF(__pyx_t_5);
15947 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15948 __pyx_r = __pyx_t_5;
15970 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15971 __Pyx_XGOTREF(__pyx_t_6);
15972 __Pyx_XGOTREF(__pyx_t_7);
15973 __Pyx_XGOTREF(__pyx_t_8);
15983 __Pyx_XDECREF(__pyx_r);
15984 __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;}
15985 __Pyx_GOTREF(__pyx_t_3);
15986 __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;}
15987 __Pyx_GOTREF(__pyx_t_9);
15988 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15990 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15991 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15992 if (likely(__pyx_t_3)) {
15993 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15994 __Pyx_INCREF(__pyx_t_3);
15995 __Pyx_INCREF(
function);
15996 __Pyx_DECREF_SET(__pyx_t_9,
function);
16000 __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;}
16001 __Pyx_GOTREF(__pyx_t_5);
16003 __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;}
16004 __Pyx_GOTREF(__pyx_t_10);
16005 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16006 __Pyx_INCREF(__pyx_v_obj);
16007 __Pyx_GIVEREF(__pyx_v_obj);
16008 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16009 __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;}
16010 __Pyx_GOTREF(__pyx_t_5);
16011 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16013 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16014 __pyx_r = __pyx_t_5;
16016 goto __pyx_L8_try_return;
16027 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16028 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16029 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16030 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16040 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16041 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;}
16042 __Pyx_GOTREF(__pyx_t_5);
16043 __Pyx_GOTREF(__pyx_t_9);
16044 __Pyx_GOTREF(__pyx_t_10);
16053 __Pyx_XDECREF(__pyx_r);
16054 __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;}
16055 __Pyx_GOTREF(__pyx_t_3);
16056 __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;}
16057 __Pyx_GOTREF(__pyx_t_11);
16058 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16059 __pyx_r = __pyx_t_11;
16061 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16062 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16063 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16064 goto __pyx_L7_except_return;
16066 __pyx_L6_except_error:;
16075 __Pyx_XGIVEREF(__pyx_t_6);
16076 __Pyx_XGIVEREF(__pyx_t_7);
16077 __Pyx_XGIVEREF(__pyx_t_8);
16078 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16079 goto __pyx_L1_error;
16080 __pyx_L8_try_return:;
16081 __Pyx_XGIVEREF(__pyx_t_6);
16082 __Pyx_XGIVEREF(__pyx_t_7);
16083 __Pyx_XGIVEREF(__pyx_t_8);
16084 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16086 __pyx_L7_except_return:;
16087 __Pyx_XGIVEREF(__pyx_t_6);
16088 __Pyx_XGIVEREF(__pyx_t_7);
16089 __Pyx_XGIVEREF(__pyx_t_8);
16090 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16105 __Pyx_XDECREF(__pyx_t_3);
16106 __Pyx_XDECREF(__pyx_t_5);
16107 __Pyx_XDECREF(__pyx_t_9);
16108 __Pyx_XDECREF(__pyx_t_10);
16109 __Pyx_XDECREF(__pyx_t_11);
16110 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16113 __Pyx_XGIVEREF(__pyx_r);
16114 __Pyx_RefNannyFinishContext();
16119 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16120 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 ";
16121 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16122 PyObject *__pyx_v_obj = 0;
16123 PyObject *__pyx_v_i = 0;
16124 int __pyx_lineno = 0;
16125 const char *__pyx_filename = NULL;
16126 int __pyx_clineno = 0;
16127 PyObject *__pyx_r = 0;
16128 __Pyx_RefNannyDeclarations
16129 __Pyx_RefNannySetupContext(
"asinh (wrapper)", 0);
16131 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16132 PyObject* values[2] = {0,0};
16133 values[1] = ((PyObject *)Py_None);
16134 if (unlikely(__pyx_kwds)) {
16135 Py_ssize_t kw_args;
16136 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16137 switch (pos_args) {
16138 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16139 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16141 default:
goto __pyx_L5_argtuple_error;
16143 kw_args = PyDict_Size(__pyx_kwds);
16144 switch (pos_args) {
16146 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16147 else goto __pyx_L5_argtuple_error;
16150 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16151 if (value) { values[1] = value; kw_args--; }
16154 if (unlikely(kw_args > 0)) {
16155 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;}
16158 switch (PyTuple_GET_SIZE(__pyx_args)) {
16159 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16160 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16162 default:
goto __pyx_L5_argtuple_error;
16165 __pyx_v_obj = values[0];
16166 __pyx_v_i = values[1];
16168 goto __pyx_L4_argument_unpacking_done;
16169 __pyx_L5_argtuple_error:;
16170 __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;}
16172 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16173 __Pyx_RefNannyFinishContext();
16175 __pyx_L4_argument_unpacking_done:;
16176 __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16179 __Pyx_RefNannyFinishContext();
16183 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16184 PyObject *__pyx_r = NULL;
16185 __Pyx_RefNannyDeclarations
16186 PyObject *__pyx_t_1 = NULL;
16187 struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16188 int __pyx_lineno = 0;
16189 const char *__pyx_filename = NULL;
16190 int __pyx_clineno = 0;
16191 __Pyx_RefNannySetupContext(
"asinh", 0);
16192 __Pyx_XDECREF(__pyx_r);
16193 __pyx_t_2.__pyx_n = 1;
16194 __pyx_t_2.i = __pyx_v_i;
16195 __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;}
16196 __Pyx_GOTREF(__pyx_t_1);
16197 __pyx_r = __pyx_t_1;
16203 __Pyx_XDECREF(__pyx_t_1);
16204 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16207 __Pyx_XGIVEREF(__pyx_r);
16208 __Pyx_RefNannyFinishContext();
16220 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16221 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) {
16222 PyObject *__pyx_v_i = ((PyObject *)Py_None);
16223 PyObject *__pyx_r = NULL;
16224 __Pyx_RefNannyDeclarations
16227 PyObject *__pyx_t_3 = NULL;
16229 PyObject *__pyx_t_5 = NULL;
16230 PyObject *__pyx_t_6 = NULL;
16231 PyObject *__pyx_t_7 = NULL;
16232 PyObject *__pyx_t_8 = NULL;
16233 PyObject *__pyx_t_9 = NULL;
16234 PyObject *__pyx_t_10 = NULL;
16235 PyObject *__pyx_t_11 = NULL;
16236 int __pyx_lineno = 0;
16237 const char *__pyx_filename = NULL;
16238 int __pyx_clineno = 0;
16239 __Pyx_RefNannySetupContext(
"tan", 0);
16240 if (__pyx_optional_args) {
16241 if (__pyx_optional_args->__pyx_n > 0) {
16242 __pyx_v_i = __pyx_optional_args->i;
16253 __pyx_t_1 = (__pyx_v_i != Py_None);
16254 __pyx_t_2 = (__pyx_t_1 != 0);
16264 __Pyx_XDECREF(__pyx_r);
16265 __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;}
16266 __Pyx_GOTREF(__pyx_t_3);
16268 __pyx_t_4 =
tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16270 __Pyx_CppExn2PyErr();
16271 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16273 __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;}
16274 __Pyx_GOTREF(__pyx_t_5);
16275 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16276 __pyx_r = __pyx_t_5;
16298 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16299 __Pyx_XGOTREF(__pyx_t_6);
16300 __Pyx_XGOTREF(__pyx_t_7);
16301 __Pyx_XGOTREF(__pyx_t_8);
16311 __Pyx_XDECREF(__pyx_r);
16312 __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;}
16313 __Pyx_GOTREF(__pyx_t_3);
16314 __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;}
16315 __Pyx_GOTREF(__pyx_t_9);
16316 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16318 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
16319 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16320 if (likely(__pyx_t_3)) {
16321 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
16322 __Pyx_INCREF(__pyx_t_3);
16323 __Pyx_INCREF(
function);
16324 __Pyx_DECREF_SET(__pyx_t_9,
function);
16328 __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;}
16329 __Pyx_GOTREF(__pyx_t_5);
16331 __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;}
16332 __Pyx_GOTREF(__pyx_t_10);
16333 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16334 __Pyx_INCREF(__pyx_v_obj);
16335 __Pyx_GIVEREF(__pyx_v_obj);
16336 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16337 __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;}
16338 __Pyx_GOTREF(__pyx_t_5);
16339 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16341 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16342 __pyx_r = __pyx_t_5;
16344 goto __pyx_L8_try_return;
16355 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16356 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16357 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16358 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16368 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16369 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;}
16370 __Pyx_GOTREF(__pyx_t_5);
16371 __Pyx_GOTREF(__pyx_t_9);
16372 __Pyx_GOTREF(__pyx_t_10);
16381 __Pyx_XDECREF(__pyx_r);
16382 __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;}
16383 __Pyx_GOTREF(__pyx_t_3);
16384 __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;}
16385 __Pyx_GOTREF(__pyx_t_11);
16386 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16387 __pyx_r = __pyx_t_11;
16389 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16390 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16391 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16392 goto __pyx_L7_except_return;
16394 __pyx_L6_except_error:;
16403 __Pyx_XGIVEREF(__pyx_t_6);
16404 __Pyx_XGIVEREF(__pyx_t_7);
16405 __Pyx_XGIVEREF(__pyx_t_8);
16406 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16407 goto __pyx_L1_error;
16408 __pyx_L8_try_return:;
16409 __Pyx_XGIVEREF(__pyx_t_6);
16410 __Pyx_XGIVEREF(__pyx_t_7);
16411 __Pyx_XGIVEREF(__pyx_t_8);
16412 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16414 __pyx_L7_except_return:;
16415 __Pyx_XGIVEREF(__pyx_t_6);
16416 __Pyx_XGIVEREF(__pyx_t_7);
16417 __Pyx_XGIVEREF(__pyx_t_8);
16418 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16433 __Pyx_XDECREF(__pyx_t_3);
16434 __Pyx_XDECREF(__pyx_t_5);
16435 __Pyx_XDECREF(__pyx_t_9);
16436 __Pyx_XDECREF(__pyx_t_10);
16437 __Pyx_XDECREF(__pyx_t_11);
16438 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16441 __Pyx_XGIVEREF(__pyx_r);
16442 __Pyx_RefNannyFinishContext();
16447 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16448 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 ";
16449 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16450 PyObject *__pyx_v_obj = 0;
16451 PyObject *__pyx_v_i = 0;
16452 int __pyx_lineno = 0;
16453 const char *__pyx_filename = NULL;
16454 int __pyx_clineno = 0;
16455 PyObject *__pyx_r = 0;
16456 __Pyx_RefNannyDeclarations
16457 __Pyx_RefNannySetupContext(
"tan (wrapper)", 0);
16459 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16460 PyObject* values[2] = {0,0};
16461 values[1] = ((PyObject *)Py_None);
16462 if (unlikely(__pyx_kwds)) {
16463 Py_ssize_t kw_args;
16464 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16465 switch (pos_args) {
16466 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16467 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16469 default:
goto __pyx_L5_argtuple_error;
16471 kw_args = PyDict_Size(__pyx_kwds);
16472 switch (pos_args) {
16474 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16475 else goto __pyx_L5_argtuple_error;
16478 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16479 if (value) { values[1] = value; kw_args--; }
16482 if (unlikely(kw_args > 0)) {
16483 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;}
16486 switch (PyTuple_GET_SIZE(__pyx_args)) {
16487 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16488 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16490 default:
goto __pyx_L5_argtuple_error;
16493 __pyx_v_obj = values[0];
16494 __pyx_v_i = values[1];
16496 goto __pyx_L4_argument_unpacking_done;
16497 __pyx_L5_argtuple_error:;
16498 __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;}
16500 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16501 __Pyx_RefNannyFinishContext();
16503 __pyx_L4_argument_unpacking_done:;
16504 __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16507 __Pyx_RefNannyFinishContext();
16511 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16512 PyObject *__pyx_r = NULL;
16513 __Pyx_RefNannyDeclarations
16514 PyObject *__pyx_t_1 = NULL;
16515 struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16516 int __pyx_lineno = 0;
16517 const char *__pyx_filename = NULL;
16518 int __pyx_clineno = 0;
16519 __Pyx_RefNannySetupContext(
"tan", 0);
16520 __Pyx_XDECREF(__pyx_r);
16521 __pyx_t_2.__pyx_n = 1;
16522 __pyx_t_2.i = __pyx_v_i;
16523 __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;}
16524 __Pyx_GOTREF(__pyx_t_1);
16525 __pyx_r = __pyx_t_1;
16531 __Pyx_XDECREF(__pyx_t_1);
16532 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16535 __Pyx_XGIVEREF(__pyx_r);
16536 __Pyx_RefNannyFinishContext();
16548 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16549 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) {
16550 PyObject *__pyx_v_i = ((PyObject *)Py_None);
16551 PyObject *__pyx_r = NULL;
16552 __Pyx_RefNannyDeclarations
16555 PyObject *__pyx_t_3 = NULL;
16557 PyObject *__pyx_t_5 = NULL;
16558 PyObject *__pyx_t_6 = NULL;
16559 PyObject *__pyx_t_7 = NULL;
16560 PyObject *__pyx_t_8 = NULL;
16561 PyObject *__pyx_t_9 = NULL;
16562 PyObject *__pyx_t_10 = NULL;
16563 PyObject *__pyx_t_11 = NULL;
16564 int __pyx_lineno = 0;
16565 const char *__pyx_filename = NULL;
16566 int __pyx_clineno = 0;
16567 __Pyx_RefNannySetupContext(
"atan", 0);
16568 if (__pyx_optional_args) {
16569 if (__pyx_optional_args->__pyx_n > 0) {
16570 __pyx_v_i = __pyx_optional_args->i;
16581 __pyx_t_1 = (__pyx_v_i != Py_None);
16582 __pyx_t_2 = (__pyx_t_1 != 0);
16592 __Pyx_XDECREF(__pyx_r);
16593 __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;}
16594 __Pyx_GOTREF(__pyx_t_3);
16596 __pyx_t_4 =
atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16598 __Pyx_CppExn2PyErr();
16599 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16601 __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;}
16602 __Pyx_GOTREF(__pyx_t_5);
16603 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16604 __pyx_r = __pyx_t_5;
16626 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16627 __Pyx_XGOTREF(__pyx_t_6);
16628 __Pyx_XGOTREF(__pyx_t_7);
16629 __Pyx_XGOTREF(__pyx_t_8);
16639 __Pyx_XDECREF(__pyx_r);
16640 __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;}
16641 __Pyx_GOTREF(__pyx_t_3);
16642 __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;}
16643 __Pyx_GOTREF(__pyx_t_9);
16644 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16646 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
16647 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16648 if (likely(__pyx_t_3)) {
16649 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
16650 __Pyx_INCREF(__pyx_t_3);
16651 __Pyx_INCREF(
function);
16652 __Pyx_DECREF_SET(__pyx_t_9,
function);
16656 __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;}
16657 __Pyx_GOTREF(__pyx_t_5);
16659 __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;}
16660 __Pyx_GOTREF(__pyx_t_10);
16661 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16662 __Pyx_INCREF(__pyx_v_obj);
16663 __Pyx_GIVEREF(__pyx_v_obj);
16664 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16665 __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;}
16666 __Pyx_GOTREF(__pyx_t_5);
16667 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16669 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16670 __pyx_r = __pyx_t_5;
16672 goto __pyx_L8_try_return;
16683 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16684 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16685 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16686 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16696 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16697 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;}
16698 __Pyx_GOTREF(__pyx_t_5);
16699 __Pyx_GOTREF(__pyx_t_9);
16700 __Pyx_GOTREF(__pyx_t_10);
16709 __Pyx_XDECREF(__pyx_r);
16710 __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;}
16711 __Pyx_GOTREF(__pyx_t_3);
16712 __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;}
16713 __Pyx_GOTREF(__pyx_t_11);
16714 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16715 __pyx_r = __pyx_t_11;
16717 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16718 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16719 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16720 goto __pyx_L7_except_return;
16722 __pyx_L6_except_error:;
16731 __Pyx_XGIVEREF(__pyx_t_6);
16732 __Pyx_XGIVEREF(__pyx_t_7);
16733 __Pyx_XGIVEREF(__pyx_t_8);
16734 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16735 goto __pyx_L1_error;
16736 __pyx_L8_try_return:;
16737 __Pyx_XGIVEREF(__pyx_t_6);
16738 __Pyx_XGIVEREF(__pyx_t_7);
16739 __Pyx_XGIVEREF(__pyx_t_8);
16740 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16742 __pyx_L7_except_return:;
16743 __Pyx_XGIVEREF(__pyx_t_6);
16744 __Pyx_XGIVEREF(__pyx_t_7);
16745 __Pyx_XGIVEREF(__pyx_t_8);
16746 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16761 __Pyx_XDECREF(__pyx_t_3);
16762 __Pyx_XDECREF(__pyx_t_5);
16763 __Pyx_XDECREF(__pyx_t_9);
16764 __Pyx_XDECREF(__pyx_t_10);
16765 __Pyx_XDECREF(__pyx_t_11);
16766 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16769 __Pyx_XGIVEREF(__pyx_r);
16770 __Pyx_RefNannyFinishContext();
16775 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16776 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 ";
16777 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16778 PyObject *__pyx_v_obj = 0;
16779 PyObject *__pyx_v_i = 0;
16780 int __pyx_lineno = 0;
16781 const char *__pyx_filename = NULL;
16782 int __pyx_clineno = 0;
16783 PyObject *__pyx_r = 0;
16784 __Pyx_RefNannyDeclarations
16785 __Pyx_RefNannySetupContext(
"atan (wrapper)", 0);
16787 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16788 PyObject* values[2] = {0,0};
16789 values[1] = ((PyObject *)Py_None);
16790 if (unlikely(__pyx_kwds)) {
16791 Py_ssize_t kw_args;
16792 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16793 switch (pos_args) {
16794 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16795 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16797 default:
goto __pyx_L5_argtuple_error;
16799 kw_args = PyDict_Size(__pyx_kwds);
16800 switch (pos_args) {
16802 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16803 else goto __pyx_L5_argtuple_error;
16806 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16807 if (value) { values[1] = value; kw_args--; }
16810 if (unlikely(kw_args > 0)) {
16811 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;}
16814 switch (PyTuple_GET_SIZE(__pyx_args)) {
16815 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16816 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16818 default:
goto __pyx_L5_argtuple_error;
16821 __pyx_v_obj = values[0];
16822 __pyx_v_i = values[1];
16824 goto __pyx_L4_argument_unpacking_done;
16825 __pyx_L5_argtuple_error:;
16826 __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;}
16828 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16829 __Pyx_RefNannyFinishContext();
16831 __pyx_L4_argument_unpacking_done:;
16832 __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16835 __Pyx_RefNannyFinishContext();
16839 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16840 PyObject *__pyx_r = NULL;
16841 __Pyx_RefNannyDeclarations
16842 PyObject *__pyx_t_1 = NULL;
16843 struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16844 int __pyx_lineno = 0;
16845 const char *__pyx_filename = NULL;
16846 int __pyx_clineno = 0;
16847 __Pyx_RefNannySetupContext(
"atan", 0);
16848 __Pyx_XDECREF(__pyx_r);
16849 __pyx_t_2.__pyx_n = 1;
16850 __pyx_t_2.i = __pyx_v_i;
16851 __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;}
16852 __Pyx_GOTREF(__pyx_t_1);
16853 __pyx_r = __pyx_t_1;
16859 __Pyx_XDECREF(__pyx_t_1);
16860 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16863 __Pyx_XGIVEREF(__pyx_r);
16864 __Pyx_RefNannyFinishContext();
16876 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16877 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16878 PyObject *__pyx_r = NULL;
16879 __Pyx_RefNannyDeclarations
16880 PyObject *__pyx_t_1 = NULL;
16881 PyObject *__pyx_t_2 = NULL;
16882 PyObject *__pyx_t_3 = NULL;
16883 PyObject *__pyx_t_4 = NULL;
16884 PyObject *__pyx_t_5 = NULL;
16885 PyObject *__pyx_t_6 = NULL;
16886 PyObject *__pyx_t_7 = NULL;
16887 PyObject *__pyx_t_8 = NULL;
16888 int __pyx_lineno = 0;
16889 const char *__pyx_filename = NULL;
16890 int __pyx_clineno = 0;
16891 __Pyx_RefNannySetupContext(
"tanh", 0);
16901 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16902 __Pyx_XGOTREF(__pyx_t_1);
16903 __Pyx_XGOTREF(__pyx_t_2);
16904 __Pyx_XGOTREF(__pyx_t_3);
16914 __Pyx_XDECREF(__pyx_r);
16915 __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;}
16916 __Pyx_GOTREF(__pyx_t_5);
16917 __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;}
16918 __Pyx_GOTREF(__pyx_t_6);
16919 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16921 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
16922 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16923 if (likely(__pyx_t_5)) {
16924 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
16925 __Pyx_INCREF(__pyx_t_5);
16926 __Pyx_INCREF(
function);
16927 __Pyx_DECREF_SET(__pyx_t_6,
function);
16931 __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;}
16932 __Pyx_GOTREF(__pyx_t_4);
16934 __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;}
16935 __Pyx_GOTREF(__pyx_t_7);
16936 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16937 __Pyx_INCREF(__pyx_v_obj);
16938 __Pyx_GIVEREF(__pyx_v_obj);
16939 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16940 __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;}
16941 __Pyx_GOTREF(__pyx_t_4);
16942 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16944 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16945 __pyx_r = __pyx_t_4;
16947 goto __pyx_L7_try_return;
16958 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16959 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16960 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16961 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16971 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16972 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;}
16973 __Pyx_GOTREF(__pyx_t_4);
16974 __Pyx_GOTREF(__pyx_t_6);
16975 __Pyx_GOTREF(__pyx_t_7);
16984 __Pyx_XDECREF(__pyx_r);
16985 __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;}
16986 __Pyx_GOTREF(__pyx_t_5);
16987 __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;}
16988 __Pyx_GOTREF(__pyx_t_8);
16989 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16990 __pyx_r = __pyx_t_8;
16992 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16993 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16994 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16995 goto __pyx_L6_except_return;
16997 __pyx_L5_except_error:;
17006 __Pyx_XGIVEREF(__pyx_t_1);
17007 __Pyx_XGIVEREF(__pyx_t_2);
17008 __Pyx_XGIVEREF(__pyx_t_3);
17009 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17010 goto __pyx_L1_error;
17011 __pyx_L7_try_return:;
17012 __Pyx_XGIVEREF(__pyx_t_1);
17013 __Pyx_XGIVEREF(__pyx_t_2);
17014 __Pyx_XGIVEREF(__pyx_t_3);
17015 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17017 __pyx_L6_except_return:;
17018 __Pyx_XGIVEREF(__pyx_t_1);
17019 __Pyx_XGIVEREF(__pyx_t_2);
17020 __Pyx_XGIVEREF(__pyx_t_3);
17021 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17035 __Pyx_XDECREF(__pyx_t_4);
17036 __Pyx_XDECREF(__pyx_t_5);
17037 __Pyx_XDECREF(__pyx_t_6);
17038 __Pyx_XDECREF(__pyx_t_7);
17039 __Pyx_XDECREF(__pyx_t_8);
17040 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17043 __Pyx_XGIVEREF(__pyx_r);
17044 __Pyx_RefNannyFinishContext();
17049 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17050 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 ";
17051 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17052 PyObject *__pyx_r = 0;
17053 __Pyx_RefNannyDeclarations
17054 __Pyx_RefNannySetupContext(
"tanh (wrapper)", 0);
17055 __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17058 __Pyx_RefNannyFinishContext();
17062 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17063 PyObject *__pyx_r = NULL;
17064 __Pyx_RefNannyDeclarations
17065 PyObject *__pyx_t_1 = NULL;
17066 int __pyx_lineno = 0;
17067 const char *__pyx_filename = NULL;
17068 int __pyx_clineno = 0;
17069 __Pyx_RefNannySetupContext(
"tanh", 0);
17070 __Pyx_XDECREF(__pyx_r);
17071 __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;}
17072 __Pyx_GOTREF(__pyx_t_1);
17073 __pyx_r = __pyx_t_1;
17079 __Pyx_XDECREF(__pyx_t_1);
17080 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17083 __Pyx_XGIVEREF(__pyx_r);
17084 __Pyx_RefNannyFinishContext();
17096 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17097 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) {
17098 PyObject *__pyx_v_i = ((PyObject *)Py_None);
17099 PyObject *__pyx_r = NULL;
17100 __Pyx_RefNannyDeclarations
17103 PyObject *__pyx_t_3 = NULL;
17105 PyObject *__pyx_t_5 = NULL;
17106 PyObject *__pyx_t_6 = NULL;
17107 PyObject *__pyx_t_7 = NULL;
17108 PyObject *__pyx_t_8 = NULL;
17109 PyObject *__pyx_t_9 = NULL;
17110 PyObject *__pyx_t_10 = NULL;
17111 PyObject *__pyx_t_11 = NULL;
17112 int __pyx_lineno = 0;
17113 const char *__pyx_filename = NULL;
17114 int __pyx_clineno = 0;
17115 __Pyx_RefNannySetupContext(
"atanh", 0);
17116 if (__pyx_optional_args) {
17117 if (__pyx_optional_args->__pyx_n > 0) {
17118 __pyx_v_i = __pyx_optional_args->i;
17129 __pyx_t_1 = (__pyx_v_i != Py_None);
17130 __pyx_t_2 = (__pyx_t_1 != 0);
17140 __Pyx_XDECREF(__pyx_r);
17141 __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;}
17142 __Pyx_GOTREF(__pyx_t_3);
17144 __pyx_t_4 =
atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17146 __Pyx_CppExn2PyErr();
17147 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17149 __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;}
17150 __Pyx_GOTREF(__pyx_t_5);
17151 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17152 __pyx_r = __pyx_t_5;
17174 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17175 __Pyx_XGOTREF(__pyx_t_6);
17176 __Pyx_XGOTREF(__pyx_t_7);
17177 __Pyx_XGOTREF(__pyx_t_8);
17187 __Pyx_XDECREF(__pyx_r);
17188 __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;}
17189 __Pyx_GOTREF(__pyx_t_3);
17190 __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;}
17191 __Pyx_GOTREF(__pyx_t_9);
17192 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17194 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
17195 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17196 if (likely(__pyx_t_3)) {
17197 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
17198 __Pyx_INCREF(__pyx_t_3);
17199 __Pyx_INCREF(
function);
17200 __Pyx_DECREF_SET(__pyx_t_9,
function);
17204 __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;}
17205 __Pyx_GOTREF(__pyx_t_5);
17207 __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;}
17208 __Pyx_GOTREF(__pyx_t_10);
17209 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17210 __Pyx_INCREF(__pyx_v_obj);
17211 __Pyx_GIVEREF(__pyx_v_obj);
17212 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17213 __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;}
17214 __Pyx_GOTREF(__pyx_t_5);
17215 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17217 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17218 __pyx_r = __pyx_t_5;
17220 goto __pyx_L8_try_return;
17231 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17232 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17233 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17234 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17244 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17245 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;}
17246 __Pyx_GOTREF(__pyx_t_5);
17247 __Pyx_GOTREF(__pyx_t_9);
17248 __Pyx_GOTREF(__pyx_t_10);
17257 __Pyx_XDECREF(__pyx_r);
17258 __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;}
17259 __Pyx_GOTREF(__pyx_t_3);
17260 __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;}
17261 __Pyx_GOTREF(__pyx_t_11);
17262 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17263 __pyx_r = __pyx_t_11;
17265 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17266 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17267 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17268 goto __pyx_L7_except_return;
17270 __pyx_L6_except_error:;
17279 __Pyx_XGIVEREF(__pyx_t_6);
17280 __Pyx_XGIVEREF(__pyx_t_7);
17281 __Pyx_XGIVEREF(__pyx_t_8);
17282 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17283 goto __pyx_L1_error;
17284 __pyx_L8_try_return:;
17285 __Pyx_XGIVEREF(__pyx_t_6);
17286 __Pyx_XGIVEREF(__pyx_t_7);
17287 __Pyx_XGIVEREF(__pyx_t_8);
17288 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17290 __pyx_L7_except_return:;
17291 __Pyx_XGIVEREF(__pyx_t_6);
17292 __Pyx_XGIVEREF(__pyx_t_7);
17293 __Pyx_XGIVEREF(__pyx_t_8);
17294 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17309 __Pyx_XDECREF(__pyx_t_3);
17310 __Pyx_XDECREF(__pyx_t_5);
17311 __Pyx_XDECREF(__pyx_t_9);
17312 __Pyx_XDECREF(__pyx_t_10);
17313 __Pyx_XDECREF(__pyx_t_11);
17314 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17317 __Pyx_XGIVEREF(__pyx_r);
17318 __Pyx_RefNannyFinishContext();
17323 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17324 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 ";
17325 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17326 PyObject *__pyx_v_obj = 0;
17327 PyObject *__pyx_v_i = 0;
17328 int __pyx_lineno = 0;
17329 const char *__pyx_filename = NULL;
17330 int __pyx_clineno = 0;
17331 PyObject *__pyx_r = 0;
17332 __Pyx_RefNannyDeclarations
17333 __Pyx_RefNannySetupContext(
"atanh (wrapper)", 0);
17335 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17336 PyObject* values[2] = {0,0};
17337 values[1] = ((PyObject *)Py_None);
17338 if (unlikely(__pyx_kwds)) {
17339 Py_ssize_t kw_args;
17340 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17341 switch (pos_args) {
17342 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17343 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17345 default:
goto __pyx_L5_argtuple_error;
17347 kw_args = PyDict_Size(__pyx_kwds);
17348 switch (pos_args) {
17350 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17351 else goto __pyx_L5_argtuple_error;
17354 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17355 if (value) { values[1] = value; kw_args--; }
17358 if (unlikely(kw_args > 0)) {
17359 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;}
17362 switch (PyTuple_GET_SIZE(__pyx_args)) {
17363 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17364 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17366 default:
goto __pyx_L5_argtuple_error;
17369 __pyx_v_obj = values[0];
17370 __pyx_v_i = values[1];
17372 goto __pyx_L4_argument_unpacking_done;
17373 __pyx_L5_argtuple_error:;
17374 __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;}
17376 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17377 __Pyx_RefNannyFinishContext();
17379 __pyx_L4_argument_unpacking_done:;
17380 __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17383 __Pyx_RefNannyFinishContext();
17387 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17388 PyObject *__pyx_r = NULL;
17389 __Pyx_RefNannyDeclarations
17390 PyObject *__pyx_t_1 = NULL;
17391 struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17392 int __pyx_lineno = 0;
17393 const char *__pyx_filename = NULL;
17394 int __pyx_clineno = 0;
17395 __Pyx_RefNannySetupContext(
"atanh", 0);
17396 __Pyx_XDECREF(__pyx_r);
17397 __pyx_t_2.__pyx_n = 1;
17398 __pyx_t_2.i = __pyx_v_i;
17399 __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;}
17400 __Pyx_GOTREF(__pyx_t_1);
17401 __pyx_r = __pyx_t_1;
17407 __Pyx_XDECREF(__pyx_t_1);
17408 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17411 __Pyx_XGIVEREF(__pyx_r);
17412 __Pyx_RefNannyFinishContext();
17424 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17425 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) {
17426 PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17427 PyObject *__pyx_r = NULL;
17428 __Pyx_RefNannyDeclarations
17429 PyObject *__pyx_t_1 = NULL;
17430 PyObject *__pyx_t_2 = NULL;
17432 PyObject *__pyx_t_4 = NULL;
17433 int __pyx_lineno = 0;
17434 const char *__pyx_filename = NULL;
17435 int __pyx_clineno = 0;
17436 __Pyx_RefNannySetupContext(
"random_clifford", 0);
17437 if (__pyx_optional_args) {
17438 if (__pyx_optional_args->__pyx_n > 0) {
17439 __pyx_v_fill = __pyx_optional_args->fill;
17450 __Pyx_XDECREF(__pyx_r);
17451 __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;}
17452 __Pyx_GOTREF(__pyx_t_1);
17453 __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;}
17454 __Pyx_GOTREF(__pyx_t_2);
17455 __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;}
17456 __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;}
17457 __Pyx_GOTREF(__pyx_t_4);
17458 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17459 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17460 __pyx_r = __pyx_t_4;
17474 __Pyx_XDECREF(__pyx_t_1);
17475 __Pyx_XDECREF(__pyx_t_2);
17476 __Pyx_XDECREF(__pyx_t_4);
17477 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17480 __Pyx_XGIVEREF(__pyx_r);
17481 __Pyx_RefNannyFinishContext();
17486 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17487 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 ";
17488 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17489 struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17490 PyObject *__pyx_v_fill = 0;
17491 int __pyx_lineno = 0;
17492 const char *__pyx_filename = NULL;
17493 int __pyx_clineno = 0;
17494 PyObject *__pyx_r = 0;
17495 __Pyx_RefNannyDeclarations
17496 __Pyx_RefNannySetupContext(
"random_clifford (wrapper)", 0);
17498 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17499 PyObject* values[2] = {0,0};
17500 values[1] = ((PyObject *)__pyx_float_1_0);
17501 if (unlikely(__pyx_kwds)) {
17502 Py_ssize_t kw_args;
17503 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17504 switch (pos_args) {
17505 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17506 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17508 default:
goto __pyx_L5_argtuple_error;
17510 kw_args = PyDict_Size(__pyx_kwds);
17511 switch (pos_args) {
17513 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17514 else goto __pyx_L5_argtuple_error;
17517 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
17518 if (value) { values[1] = value; kw_args--; }
17521 if (unlikely(kw_args > 0)) {
17522 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;}
17525 switch (PyTuple_GET_SIZE(__pyx_args)) {
17526 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17527 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17529 default:
goto __pyx_L5_argtuple_error;
17532 __pyx_v_ixt = ((
struct __pyx_obj_8PyClical_index_set *)values[0]);
17533 __pyx_v_fill = values[1];
17535 goto __pyx_L4_argument_unpacking_done;
17536 __pyx_L5_argtuple_error:;
17537 __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;}
17539 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17540 __Pyx_RefNannyFinishContext();
17542 __pyx_L4_argument_unpacking_done:;
17543 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;}
17544 __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17551 __Pyx_RefNannyFinishContext();
17555 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) {
17556 PyObject *__pyx_r = NULL;
17557 __Pyx_RefNannyDeclarations
17558 PyObject *__pyx_t_1 = NULL;
17559 struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17560 int __pyx_lineno = 0;
17561 const char *__pyx_filename = NULL;
17562 int __pyx_clineno = 0;
17563 __Pyx_RefNannySetupContext(
"random_clifford", 0);
17564 __Pyx_XDECREF(__pyx_r);
17565 __pyx_t_2.__pyx_n = 1;
17566 __pyx_t_2.fill = __pyx_v_fill;
17567 __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;}
17568 __Pyx_GOTREF(__pyx_t_1);
17569 __pyx_r = __pyx_t_1;
17575 __Pyx_XDECREF(__pyx_t_1);
17576 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17579 __Pyx_XGIVEREF(__pyx_r);
17580 __Pyx_RefNannyFinishContext();
17592 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17593 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17594 PyObject *__pyx_r = NULL;
17595 __Pyx_RefNannyDeclarations
17596 PyObject *__pyx_t_1 = NULL;
17597 PyObject *__pyx_t_2 = NULL;
17598 int __pyx_lineno = 0;
17599 const char *__pyx_filename = NULL;
17600 int __pyx_clineno = 0;
17601 __Pyx_RefNannySetupContext(
"cga3", 0);
17610 __Pyx_XDECREF(__pyx_r);
17611 __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;}
17612 __Pyx_GOTREF(__pyx_t_1);
17613 __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;}
17614 __Pyx_GOTREF(__pyx_t_2);
17615 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17616 __pyx_r = __pyx_t_2;
17630 __Pyx_XDECREF(__pyx_t_1);
17631 __Pyx_XDECREF(__pyx_t_2);
17632 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17635 __Pyx_XGIVEREF(__pyx_r);
17636 __Pyx_RefNannyFinishContext();
17641 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17642 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 ";
17643 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17644 PyObject *__pyx_r = 0;
17645 __Pyx_RefNannyDeclarations
17646 __Pyx_RefNannySetupContext(
"cga3 (wrapper)", 0);
17647 __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17650 __Pyx_RefNannyFinishContext();
17654 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17655 PyObject *__pyx_r = NULL;
17656 __Pyx_RefNannyDeclarations
17657 PyObject *__pyx_t_1 = NULL;
17658 int __pyx_lineno = 0;
17659 const char *__pyx_filename = NULL;
17660 int __pyx_clineno = 0;
17661 __Pyx_RefNannySetupContext(
"cga3", 0);
17662 __Pyx_XDECREF(__pyx_r);
17663 __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;}
17664 __Pyx_GOTREF(__pyx_t_1);
17665 __pyx_r = __pyx_t_1;
17671 __Pyx_XDECREF(__pyx_t_1);
17672 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17675 __Pyx_XGIVEREF(__pyx_r);
17676 __Pyx_RefNannyFinishContext();
17688 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17690 PyObject *__pyx_r = NULL;
17691 __Pyx_RefNannyDeclarations
17692 PyObject *__pyx_t_1 = NULL;
17693 PyObject *__pyx_t_2 = NULL;
17694 int __pyx_lineno = 0;
17695 const char *__pyx_filename = NULL;
17696 int __pyx_clineno = 0;
17697 __Pyx_RefNannySetupContext(
"cga3std", 0);
17706 __Pyx_XDECREF(__pyx_r);
17707 __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;}
17708 __Pyx_GOTREF(__pyx_t_1);
17709 __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;}
17710 __Pyx_GOTREF(__pyx_t_2);
17711 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17712 __pyx_r = __pyx_t_2;
17726 __Pyx_XDECREF(__pyx_t_1);
17727 __Pyx_XDECREF(__pyx_t_2);
17728 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17731 __Pyx_XGIVEREF(__pyx_r);
17732 __Pyx_RefNannyFinishContext();
17737 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17738 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 ";
17739 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17740 PyObject *__pyx_r = 0;
17741 __Pyx_RefNannyDeclarations
17742 __Pyx_RefNannySetupContext(
"cga3std (wrapper)", 0);
17743 __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17746 __Pyx_RefNannyFinishContext();
17750 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17751 PyObject *__pyx_r = NULL;
17752 __Pyx_RefNannyDeclarations
17753 PyObject *__pyx_t_1 = NULL;
17754 int __pyx_lineno = 0;
17755 const char *__pyx_filename = NULL;
17756 int __pyx_clineno = 0;
17757 __Pyx_RefNannySetupContext(
"cga3std", 0);
17758 __Pyx_XDECREF(__pyx_r);
17759 __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;}
17760 __Pyx_GOTREF(__pyx_t_1);
17761 __pyx_r = __pyx_t_1;
17767 __Pyx_XDECREF(__pyx_t_1);
17768 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17771 __Pyx_XGIVEREF(__pyx_r);
17772 __Pyx_RefNannyFinishContext();
17784 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17785 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
17786 PyObject *__pyx_r = NULL;
17787 __Pyx_RefNannyDeclarations
17788 PyObject *__pyx_t_1 = NULL;
17789 PyObject *__pyx_t_2 = NULL;
17790 int __pyx_lineno = 0;
17791 const char *__pyx_filename = NULL;
17792 int __pyx_clineno = 0;
17793 __Pyx_RefNannySetupContext(
"agc3", 0);
17802 __Pyx_XDECREF(__pyx_r);
17803 __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;}
17804 __Pyx_GOTREF(__pyx_t_1);
17805 __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;}
17806 __Pyx_GOTREF(__pyx_t_2);
17807 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17808 __pyx_r = __pyx_t_2;
17822 __Pyx_XDECREF(__pyx_t_1);
17823 __Pyx_XDECREF(__pyx_t_2);
17824 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17827 __Pyx_XGIVEREF(__pyx_r);
17828 __Pyx_RefNannyFinishContext();
17833 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17834 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 ";
17835 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17836 PyObject *__pyx_r = 0;
17837 __Pyx_RefNannyDeclarations
17838 __Pyx_RefNannySetupContext(
"agc3 (wrapper)", 0);
17839 __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17842 __Pyx_RefNannyFinishContext();
17846 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17847 PyObject *__pyx_r = NULL;
17848 __Pyx_RefNannyDeclarations
17849 PyObject *__pyx_t_1 = NULL;
17850 int __pyx_lineno = 0;
17851 const char *__pyx_filename = NULL;
17852 int __pyx_clineno = 0;
17853 __Pyx_RefNannySetupContext(
"agc3", 0);
17854 __Pyx_XDECREF(__pyx_r);
17855 __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;}
17856 __Pyx_GOTREF(__pyx_t_1);
17857 __pyx_r = __pyx_t_1;
17863 __Pyx_XDECREF(__pyx_t_1);
17864 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17867 __Pyx_XGIVEREF(__pyx_r);
17868 __Pyx_RefNannyFinishContext();
17881 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17882 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 ";
17883 static PyMethodDef __pyx_mdef_8PyClical_83e = {
"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17884 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17885 PyObject *__pyx_r = 0;
17886 __Pyx_RefNannyDeclarations
17887 __Pyx_RefNannySetupContext(
"e (wrapper)", 0);
17888 __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17891 __Pyx_RefNannyFinishContext();
17895 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17896 PyObject *__pyx_r = NULL;
17897 __Pyx_RefNannyDeclarations
17898 PyObject *__pyx_t_1 = NULL;
17899 PyObject *__pyx_t_2 = NULL;
17900 int __pyx_lineno = 0;
17901 const char *__pyx_filename = NULL;
17902 int __pyx_clineno = 0;
17903 __Pyx_RefNannySetupContext(
"e", 0);
17912 __Pyx_XDECREF(__pyx_r);
17913 __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;}
17914 __Pyx_GOTREF(__pyx_t_1);
17915 __Pyx_INCREF(__pyx_v_obj);
17916 __Pyx_GIVEREF(__pyx_v_obj);
17917 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
17918 __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;}
17919 __Pyx_GOTREF(__pyx_t_2);
17920 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17921 __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;}
17922 __Pyx_GOTREF(__pyx_t_1);
17923 __Pyx_GIVEREF(__pyx_t_2);
17924 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
17926 __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;}
17927 __Pyx_GOTREF(__pyx_t_2);
17928 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17929 __pyx_r = __pyx_t_2;
17943 __Pyx_XDECREF(__pyx_t_1);
17944 __Pyx_XDECREF(__pyx_t_2);
17945 __Pyx_AddTraceback(
"PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17948 __Pyx_XGIVEREF(__pyx_r);
17949 __Pyx_RefNannyFinishContext();
17962 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17963 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 ";
17964 static PyMethodDef __pyx_mdef_8PyClical_85istpq = {
"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17965 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17966 PyObject *__pyx_v_p = 0;
17967 PyObject *__pyx_v_q = 0;
17968 int __pyx_lineno = 0;
17969 const char *__pyx_filename = NULL;
17970 int __pyx_clineno = 0;
17971 PyObject *__pyx_r = 0;
17972 __Pyx_RefNannyDeclarations
17973 __Pyx_RefNannySetupContext(
"istpq (wrapper)", 0);
17975 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17976 PyObject* values[2] = {0,0};
17977 if (unlikely(__pyx_kwds)) {
17978 Py_ssize_t kw_args;
17979 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17980 switch (pos_args) {
17981 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17982 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17984 default:
goto __pyx_L5_argtuple_error;
17986 kw_args = PyDict_Size(__pyx_kwds);
17987 switch (pos_args) {
17989 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17990 else goto __pyx_L5_argtuple_error;
17992 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17994 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17997 if (unlikely(kw_args > 0)) {
17998 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;}
18000 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18001 goto __pyx_L5_argtuple_error;
18003 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18004 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18006 __pyx_v_p = values[0];
18007 __pyx_v_q = values[1];
18009 goto __pyx_L4_argument_unpacking_done;
18010 __pyx_L5_argtuple_error:;
18011 __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;}
18013 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18014 __Pyx_RefNannyFinishContext();
18016 __pyx_L4_argument_unpacking_done:;
18017 __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18020 __Pyx_RefNannyFinishContext();
18024 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18025 PyObject *__pyx_r = NULL;
18026 __Pyx_RefNannyDeclarations
18027 PyObject *__pyx_t_1 = NULL;
18028 PyObject *__pyx_t_2 = NULL;
18029 PyObject *__pyx_t_3 = NULL;
18030 int __pyx_lineno = 0;
18031 const char *__pyx_filename = NULL;
18032 int __pyx_clineno = 0;
18033 __Pyx_RefNannySetupContext(
"istpq", 0);
18042 __Pyx_XDECREF(__pyx_r);
18043 __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;}
18044 __Pyx_GOTREF(__pyx_t_1);
18045 __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;}
18046 __Pyx_GOTREF(__pyx_t_2);
18047 __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;}
18048 __Pyx_GOTREF(__pyx_t_3);
18049 __Pyx_GIVEREF(__pyx_t_1);
18050 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18051 __Pyx_GIVEREF(__pyx_t_2);
18052 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18055 __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;}
18056 __Pyx_GOTREF(__pyx_t_2);
18057 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18058 __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;}
18059 __Pyx_GOTREF(__pyx_t_3);
18060 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18061 __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;}
18062 __Pyx_GOTREF(__pyx_t_2);
18063 __Pyx_GIVEREF(__pyx_t_3);
18064 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
18066 __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;}
18067 __Pyx_GOTREF(__pyx_t_3);
18068 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18069 __pyx_r = __pyx_t_3;
18083 __Pyx_XDECREF(__pyx_t_1);
18084 __Pyx_XDECREF(__pyx_t_2);
18085 __Pyx_XDECREF(__pyx_t_3);
18086 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18089 __Pyx_XGIVEREF(__pyx_r);
18090 __Pyx_RefNannyFinishContext();
18103 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
18104 static PyMethodDef __pyx_mdef_8PyClical_87_test = {
"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18105 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18106 PyObject *__pyx_r = 0;
18107 __Pyx_RefNannyDeclarations
18108 __Pyx_RefNannySetupContext(
"_test (wrapper)", 0);
18109 __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18112 __Pyx_RefNannyFinishContext();
18116 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18117 PyObject *__pyx_v_PyClical = NULL;
18118 PyObject *__pyx_v_doctest = NULL;
18119 PyObject *__pyx_r = NULL;
18120 __Pyx_RefNannyDeclarations
18121 PyObject *__pyx_t_1 = NULL;
18122 PyObject *__pyx_t_2 = NULL;
18123 PyObject *__pyx_t_3 = NULL;
18124 PyObject *__pyx_t_4 = NULL;
18125 int __pyx_lineno = 0;
18126 const char *__pyx_filename = NULL;
18127 int __pyx_clineno = 0;
18128 __Pyx_RefNannySetupContext(
"_test", 0);
18137 __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;}
18138 __Pyx_GOTREF(__pyx_t_1);
18139 __pyx_v_PyClical = __pyx_t_1;
18141 __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;}
18142 __Pyx_GOTREF(__pyx_t_1);
18143 __pyx_v_doctest = __pyx_t_1;
18153 __Pyx_XDECREF(__pyx_r);
18154 __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;}
18155 __Pyx_GOTREF(__pyx_t_2);
18157 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
18158 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18159 if (likely(__pyx_t_3)) {
18160 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
18161 __Pyx_INCREF(__pyx_t_3);
18162 __Pyx_INCREF(
function);
18163 __Pyx_DECREF_SET(__pyx_t_2,
function);
18167 __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;}
18168 __Pyx_GOTREF(__pyx_t_1);
18170 __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;}
18171 __Pyx_GOTREF(__pyx_t_4);
18172 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18173 __Pyx_INCREF(__pyx_v_PyClical);
18174 __Pyx_GIVEREF(__pyx_v_PyClical);
18175 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18176 __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;}
18177 __Pyx_GOTREF(__pyx_t_1);
18178 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18180 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18181 __pyx_r = __pyx_t_1;
18195 __Pyx_XDECREF(__pyx_t_1);
18196 __Pyx_XDECREF(__pyx_t_2);
18197 __Pyx_XDECREF(__pyx_t_3);
18198 __Pyx_XDECREF(__pyx_t_4);
18199 __Pyx_AddTraceback(
"PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18202 __Pyx_XDECREF(__pyx_v_PyClical);
18203 __Pyx_XDECREF(__pyx_v_doctest);
18204 __Pyx_XGIVEREF(__pyx_r);
18205 __Pyx_RefNannyFinishContext();
18208 static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18210 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18211 struct __pyx_obj_8PyClical_index_set *p;
18213 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18214 o = (*t->tp_alloc)(t, 0);
18216 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18218 if (unlikely(!o))
return 0;
18219 p = ((
struct __pyx_obj_8PyClical_index_set *)o);
18220 p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18221 if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) {
18222 Py_DECREF(o); o = 0;
18227 static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18228 #if PY_VERSION_HEX >= 0x030400a1 18229 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18230 if (PyObject_CallFinalizerFromDealloc(o))
return;
18234 PyObject *etype, *eval, *etb;
18235 PyErr_Fetch(&etype, &eval, &etb);
18237 __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18239 PyErr_Restore(etype, eval, etb);
18241 (*Py_TYPE(o)->tp_free)(o);
18243 static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t
i) {
18245 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
18246 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18251 static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *
i, PyObject *v) {
18253 return __pyx_pw_8PyClical_9index_set_9__setitem__(o,
i, v);
18256 PyErr_Format(PyExc_NotImplementedError,
18257 "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18262 static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18263 {
"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18264 {
"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18265 {
"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18266 {
"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18267 {
"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18268 {
"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18269 {
"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18270 {
"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18271 {
"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18275 static PyNumberMethods __pyx_tp_as_number_index_set = {
18279 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18289 __pyx_pw_8PyClical_9index_set_18__invert__,
18292 __pyx_pw_8PyClical_9index_set_24__and__,
18293 __pyx_pw_8PyClical_9index_set_20__xor__,
18294 __pyx_pw_8PyClical_9index_set_28__or__,
18295 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18299 #if PY_MAJOR_VERSION < 3 18305 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18308 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18314 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18321 __pyx_pw_8PyClical_9index_set_26__iand__,
18322 __pyx_pw_8PyClical_9index_set_22__ixor__,
18323 __pyx_pw_8PyClical_9index_set_30__ior__,
18329 #if PY_VERSION_HEX >= 0x03050000 18332 #if PY_VERSION_HEX >= 0x03050000 18337 static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18341 __pyx_sq_item_8PyClical_index_set,
18345 __pyx_pw_8PyClical_9index_set_13__contains__,
18350 static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18352 __pyx_pw_8PyClical_9index_set_11__getitem__,
18353 __pyx_mp_ass_subscript_8PyClical_index_set,
18356 static PyTypeObject __pyx_type_8PyClical_index_set = {
18357 PyVarObject_HEAD_INIT(0, 0)
18358 "PyClical.index_set",
18359 sizeof(
struct __pyx_obj_8PyClical_index_set),
18361 __pyx_tp_dealloc_8PyClical_index_set,
18365 #if PY_MAJOR_VERSION < 3
18368 #if PY_MAJOR_VERSION >= 3
18371 __pyx_pw_8PyClical_9index_set_48__repr__,
18372 &__pyx_tp_as_number_index_set,
18373 &__pyx_tp_as_sequence_index_set,
18374 &__pyx_tp_as_mapping_index_set,
18377 __pyx_pw_8PyClical_9index_set_50__str__,
18381 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
18382 "\n Python class index_set wraps C++ class IndexSet.\n ",
18385 __pyx_pw_8PyClical_9index_set_7__richcmp__,
18387 __pyx_pw_8PyClical_9index_set_15__iter__,
18389 __pyx_methods_8PyClical_index_set,
18399 __pyx_tp_new_8PyClical_index_set,
18409 #if PY_VERSION_HEX >= 0x030400a1 18413 static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18415 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18416 struct __pyx_obj_8PyClical_clifford *p;
18418 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18419 o = (*t->tp_alloc)(t, 0);
18421 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18423 if (unlikely(!o))
return 0;
18424 p = ((
struct __pyx_obj_8PyClical_clifford *)o);
18425 p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18426 if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) {
18427 Py_DECREF(o); o = 0;
18432 static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18433 #if PY_VERSION_HEX >= 0x030400a1 18434 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18435 if (PyObject_CallFinalizerFromDealloc(o))
return;
18439 PyObject *etype, *eval, *etb;
18440 PyErr_Fetch(&etype, &eval, &etb);
18442 __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18444 PyErr_Restore(etype, eval, etb);
18446 (*Py_TYPE(o)->tp_free)(o);
18448 static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t
i) {
18450 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
18451 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18456 static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18457 {
"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18458 {
"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18459 {
"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18460 {
"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18461 {
"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18462 {
"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18463 {
"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18464 {
"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18465 {
"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18466 {
"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18467 {
"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18468 {
"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18469 {
"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18470 {
"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18471 {
"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18472 {
"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18473 {
"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18474 {
"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18475 {
"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18476 {
"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18480 static PyNumberMethods __pyx_tp_as_number_clifford = {
18481 __pyx_pw_8PyClical_8clifford_21__add__,
18482 __pyx_pw_8PyClical_8clifford_25__sub__,
18483 __pyx_pw_8PyClical_8clifford_29__mul__,
18484 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18485 __pyx_pw_8PyClical_8clifford_45__div__,
18487 __pyx_pw_8PyClical_8clifford_33__mod__,
18489 __pyx_pw_8PyClical_8clifford_55__pow__,
18490 __pyx_pw_8PyClical_8clifford_17__neg__,
18491 __pyx_pw_8PyClical_8clifford_19__pos__,
18497 __pyx_pw_8PyClical_8clifford_37__and__,
18498 __pyx_pw_8PyClical_8clifford_41__xor__,
18499 __pyx_pw_8PyClical_8clifford_51__or__,
18500 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18504 #if PY_MAJOR_VERSION < 3 18510 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18513 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18516 __pyx_pw_8PyClical_8clifford_23__iadd__,
18517 __pyx_pw_8PyClical_8clifford_27__isub__,
18518 __pyx_pw_8PyClical_8clifford_31__imul__,
18519 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 18520 __pyx_pw_8PyClical_8clifford_47__idiv__,
18522 __pyx_pw_8PyClical_8clifford_35__imod__,
18526 __pyx_pw_8PyClical_8clifford_39__iand__,
18527 __pyx_pw_8PyClical_8clifford_43__ixor__,
18528 __pyx_pw_8PyClical_8clifford_53__ior__,
18534 #if PY_VERSION_HEX >= 0x03050000 18537 #if PY_VERSION_HEX >= 0x03050000 18542 static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18546 __pyx_sq_item_8PyClical_clifford,
18550 __pyx_pw_8PyClical_8clifford_7__contains__,
18555 static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18557 __pyx_pw_8PyClical_8clifford_15__getitem__,
18561 static PyTypeObject __pyx_type_8PyClical_clifford = {
18562 PyVarObject_HEAD_INIT(0, 0)
18563 "PyClical.clifford",
18564 sizeof(
struct __pyx_obj_8PyClical_clifford),
18566 __pyx_tp_dealloc_8PyClical_clifford,
18570 #if PY_MAJOR_VERSION < 3
18573 #if PY_MAJOR_VERSION >= 3
18576 __pyx_pw_8PyClical_8clifford_93__repr__,
18577 &__pyx_tp_as_number_clifford,
18578 &__pyx_tp_as_sequence_clifford,
18579 &__pyx_tp_as_mapping_clifford,
18581 __pyx_pw_8PyClical_8clifford_61__call__,
18582 __pyx_pw_8PyClical_8clifford_95__str__,
18586 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
18587 "\n Python class clifford wraps C++ class Clifford.\n ",
18590 __pyx_pw_8PyClical_8clifford_13__richcmp__,
18592 __pyx_pw_8PyClical_8clifford_9__iter__,
18594 __pyx_methods_8PyClical_clifford,
18604 __pyx_tp_new_8PyClical_clifford,
18614 #if PY_VERSION_HEX >= 0x030400a1 18619 static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18620 static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18622 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18624 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__)))) {
18625 o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18626 memset(o, 0,
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18627 (void) PyObject_INIT(o, t);
18628 PyObject_GC_Track(o);
18630 o = (*t->tp_alloc)(t, 0);
18631 if (unlikely(!o))
return 0;
18636 static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18637 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18638 PyObject_GC_UnTrack(o);
18639 Py_CLEAR(p->__pyx_v_idx);
18640 Py_CLEAR(p->__pyx_v_self);
18641 Py_CLEAR(p->__pyx_t_0);
18642 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__)))) {
18643 __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18645 (*Py_TYPE(o)->tp_free)(o);
18649 static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v,
void *a) {
18651 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18652 if (p->__pyx_v_idx) {
18653 e = (*v)(p->__pyx_v_idx, a);
if (e)
return e;
18655 if (p->__pyx_v_self) {
18656 e = (*v)(((PyObject*)p->__pyx_v_self), a);
if (e)
return e;
18658 if (p->__pyx_t_0) {
18659 e = (*v)(p->__pyx_t_0, a);
if (e)
return e;
18664 static int __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18666 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18667 tmp = ((PyObject*)p->__pyx_v_idx);
18668 p->__pyx_v_idx = Py_None; Py_INCREF(Py_None);
18670 tmp = ((PyObject*)p->__pyx_v_self);
18671 p->__pyx_v_self = ((
struct __pyx_obj_8PyClical_index_set *)Py_None); Py_INCREF(Py_None);
18673 tmp = ((PyObject*)p->__pyx_t_0);
18674 p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
18679 static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18680 PyVarObject_HEAD_INIT(0, 0)
18681 "PyClical.__pyx_scope_struct____iter__",
18682 sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__),
18684 __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__,
18688 #if PY_MAJOR_VERSION < 3
18691 #if PY_MAJOR_VERSION >= 3
18704 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
18706 __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__,
18707 __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__,
18722 __pyx_tp_new_8PyClical___pyx_scope_struct____iter__,
18732 #if PY_VERSION_HEX >= 0x030400a1 18737 static PyMethodDef __pyx_methods[] = {
18738 {
"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18739 {
"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18740 {
"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18741 {
"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18742 {
"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18743 {
"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18744 {
"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18745 {
"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18746 {
"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18747 {
"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18748 {
"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18749 {
"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18750 {
"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18751 {
"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18752 {
"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18753 {
"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18754 {
"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18755 {
"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18756 {
"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18757 {
"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18758 {
"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18759 {
"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18760 {
"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18761 {
"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18762 {
"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18763 {
"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18764 {
"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18765 {
"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18766 {
"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18767 {
"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18768 {
"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18769 {
"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18770 {
"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18771 {
"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18772 {
"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18773 {
"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18774 {
"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18775 {
"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18776 {
"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18780 #if PY_MAJOR_VERSION >= 3 18781 static struct PyModuleDef __pyx_moduledef = {
18782 #if PY_VERSION_HEX < 0x03020000 18783 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
18785 PyModuleDef_HEAD_INIT,
18798 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18799 {&__pyx_kp_s_, __pyx_k_,
sizeof(__pyx_k_), 0, 0, 1, 0},
18800 {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2,
sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18801 {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index,
sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18802 {&__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},
18803 {&__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},
18804 {&__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},
18805 {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec,
sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18806 {&__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},
18807 {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe,
sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18808 {&__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},
18809 {&__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},
18810 {&__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},
18811 {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute,
sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18812 {&__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},
18813 {&__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},
18814 {&__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},
18815 {&__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},
18816 {&__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},
18817 {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto,
sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18818 {&__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},
18819 {&__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},
18820 {&__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},
18821 {&__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},
18822 {&__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},
18823 {&__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},
18824 {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif,
sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18825 {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford,
sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18826 {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers,
sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18827 {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2,
sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18828 {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor,
sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18829 {&__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},
18830 {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo,
sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18831 {&__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},
18832 {&__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},
18833 {&__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},
18834 {&__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},
18835 {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto,
sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18836 {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector,
sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18837 {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect,
sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18838 {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway,
sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18839 {&__pyx_n_s_IndexError, __pyx_k_IndexError,
sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18840 {&__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},
18841 {&__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},
18842 {&__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},
18843 {&__pyx_n_s_Integral, __pyx_k_Integral,
sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18844 {&__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},
18845 {&__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},
18846 {&__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},
18847 {&__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},
18848 {&__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},
18849 {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector,
sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18850 {&__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},
18851 {&__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},
18852 {&__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},
18853 {&__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},
18854 {&__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},
18855 {&__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},
18856 {&__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},
18857 {&__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},
18858 {&__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},
18859 {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto,
sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18860 {&__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},
18861 {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented,
sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18862 {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable,
sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18863 {&__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},
18864 {&__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},
18865 {&__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},
18866 {&__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},
18867 {&__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},
18868 {&__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},
18869 {&__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},
18870 {&__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},
18871 {&__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},
18872 {&__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},
18873 {&__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},
18874 {&__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},
18875 {&__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},
18876 {&__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},
18877 {&__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},
18878 {&__pyx_n_s_PyClical, __pyx_k_PyClical,
sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18879 {&__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},
18880 {&__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},
18881 {&__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},
18882 {&__pyx_n_s_Real, __pyx_k_Real,
sizeof(__pyx_k_Real), 0, 0, 1, 1},
18883 {&__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},
18884 {&__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},
18885 {&__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},
18886 {&__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},
18887 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError,
sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18888 {&__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},
18889 {&__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},
18890 {&__pyx_n_s_Sequence, __pyx_k_Sequence,
sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18891 {&__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},
18892 {&__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},
18893 {&__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},
18894 {&__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},
18895 {&__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},
18896 {&__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},
18897 {&__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},
18898 {&__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},
18899 {&__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},
18900 {&__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},
18901 {&__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},
18902 {&__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},
18903 {&__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},
18904 {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus,
sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18905 {&__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},
18906 {&__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},
18907 {&__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},
18908 {&__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},
18909 {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat,
sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18910 {&__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},
18911 {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat,
sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18912 {&__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},
18913 {&__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},
18914 {&__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},
18915 {&__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},
18916 {&__pyx_n_s_TypeError, __pyx_k_TypeError,
sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18917 {&__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},
18918 {&__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},
18919 {&__pyx_n_s_ValueError, __pyx_k_ValueError,
sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18920 {&__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},
18921 {&__pyx_kp_s__2, __pyx_k__2,
sizeof(__pyx_k__2), 0, 0, 1, 0},
18922 {&__pyx_kp_s__3, __pyx_k__3,
sizeof(__pyx_k__3), 0, 0, 1, 0},
18923 {&__pyx_kp_s__4, __pyx_k__4,
sizeof(__pyx_k__4), 0, 0, 1, 0},
18924 {&__pyx_kp_s__5, __pyx_k__5,
sizeof(__pyx_k__5), 0, 0, 1, 0},
18925 {&__pyx_kp_s__6, __pyx_k__6,
sizeof(__pyx_k__6), 0, 0, 1, 0},
18926 {&__pyx_kp_s__7, __pyx_k__7,
sizeof(__pyx_k__7), 0, 0, 1, 0},
18927 {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473,
sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18928 {&__pyx_n_s_acos, __pyx_k_acos,
sizeof(__pyx_k_acos), 0, 0, 1, 1},
18929 {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619,
sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18930 {&__pyx_n_s_acosh, __pyx_k_acosh,
sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18931 {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656,
sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18932 {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844,
sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18933 {&__pyx_n_s_args, __pyx_k_args,
sizeof(__pyx_k_args), 0, 0, 1, 1},
18934 {&__pyx_kp_s_as_frame, __pyx_k_as_frame,
sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18935 {&__pyx_n_s_asin, __pyx_k_asin,
sizeof(__pyx_k_asin), 0, 0, 1, 1},
18936 {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698,
sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18937 {&__pyx_n_s_asinh, __pyx_k_asinh,
sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18938 {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733,
sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18939 {&__pyx_n_s_atan, __pyx_k_atan,
sizeof(__pyx_k_atan), 0, 0, 1, 1},
18940 {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769,
sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18941 {&__pyx_n_s_atanh, __pyx_k_atanh,
sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18942 {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798,
sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18943 {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824,
sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18944 {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833,
sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18945 {&__pyx_n_s_cl, __pyx_k_cl,
sizeof(__pyx_k_cl), 0, 0, 1, 1},
18946 {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739,
sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18947 {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835,
sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18948 {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019,
sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18949 {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895,
sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18950 {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706,
sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18951 {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750,
sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18952 {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850,
sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18953 {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910,
sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18954 {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820,
sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18955 {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792,
sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18956 {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949,
sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18957 {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770,
sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18958 {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637,
sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18959 {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880,
sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18960 {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805,
sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18961 {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779,
sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18962 {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721,
sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18963 {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938,
sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18964 {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730,
sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18965 {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960,
sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18966 {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225,
sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18967 {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234,
sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18968 {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759,
sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18969 {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865,
sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18970 {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174,
sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18971 {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137,
sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18972 {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554,
sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18973 {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060,
sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18974 {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214,
sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18975 {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests,
sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18976 {&__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},
18977 {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925,
sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18978 {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106,
sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18979 {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205,
sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18980 {&__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},
18981 {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163,
sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18982 {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069,
sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18983 {&__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},
18984 {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979,
sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18985 {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049,
sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18986 {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152,
sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18987 {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648,
sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18988 {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122,
sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18989 {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038,
sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18990 {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194,
sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18991 {&__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},
18992 {&__pyx_n_s_close, __pyx_k_close,
sizeof(__pyx_k_close), 0, 0, 1, 1},
18993 {&__pyx_n_s_collections, __pyx_k_collections,
sizeof(__pyx_k_collections), 0, 0, 1, 1},
18994 {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490,
sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18995 {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527,
sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18996 {&__pyx_n_s_conj, __pyx_k_conj,
sizeof(__pyx_k_conj), 0, 0, 1, 1},
18997 {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436,
sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18998 {&__pyx_n_s_copy, __pyx_k_copy,
sizeof(__pyx_k_copy), 0, 0, 1, 1},
18999 {&__pyx_n_s_cos, __pyx_k_cos,
sizeof(__pyx_k_cos), 0, 0, 1, 1},
19000 {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602,
sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19001 {&__pyx_n_s_cosh, __pyx_k_cosh,
sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19002 {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640,
sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19003 {&__pyx_n_s_doctest, __pyx_k_doctest,
sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19004 {&__pyx_n_s_e, __pyx_k_e,
sizeof(__pyx_k_e), 0, 0, 1, 1},
19005 {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887,
sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19006 {&__pyx_n_s_even, __pyx_k_even,
sizeof(__pyx_k_even), 0, 0, 1, 1},
19007 {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388,
sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19008 {&__pyx_n_s_exp, __pyx_k_exp,
sizeof(__pyx_k_exp), 0, 0, 1, 1},
19009 {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565,
sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19010 {&__pyx_n_s_fill, __pyx_k_fill,
sizeof(__pyx_k_fill), 0, 0, 1, 1},
19011 {&__pyx_n_s_frm, __pyx_k_frm,
sizeof(__pyx_k_frm), 0, 0, 1, 1},
19012 {&__pyx_kp_s_from, __pyx_k_from,
sizeof(__pyx_k_from), 0, 0, 1, 0},
19013 {&__pyx_n_s_grade, __pyx_k_grade,
sizeof(__pyx_k_grade), 0, 0, 1, 1},
19014 {&__pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_k_home_abuild_rpmbuild_BUILD_gluc,
sizeof(__pyx_k_home_abuild_rpmbuild_BUILD_gluc), 0, 0, 1, 0},
19015 {&__pyx_n_s_i, __pyx_k_i,
sizeof(__pyx_k_i), 0, 0, 1, 1},
19016 {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366,
sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19017 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
19018 {&__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},
19019 {&__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},
19020 {&__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},
19021 {&__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},
19022 {&__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},
19023 {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter,
sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19024 {&__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},
19025 {&__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},
19026 {&__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},
19027 {&__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},
19028 {&__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},
19029 {&__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},
19030 {&__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},
19031 {&__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},
19032 {&__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},
19033 {&__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},
19034 {&__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},
19035 {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests,
sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19036 {&__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},
19037 {&__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},
19038 {&__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},
19039 {&__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},
19040 {&__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},
19041 {&__pyx_n_s_inv, __pyx_k_inv,
sizeof(__pyx_k_inv), 0, 0, 1, 1},
19042 {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329,
sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19043 {&__pyx_kp_s_invalid, __pyx_k_invalid,
sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19044 {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string,
sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19045 {&__pyx_n_s_involute, __pyx_k_involute,
sizeof(__pyx_k_involute), 0, 0, 1, 1},
19046 {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406,
sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19047 {&__pyx_n_s_ist, __pyx_k_ist,
sizeof(__pyx_k_ist), 0, 0, 1, 1},
19048 {&__pyx_n_s_istpq, __pyx_k_istpq,
sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19049 {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900,
sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19050 {&__pyx_n_s_iter, __pyx_k_iter,
sizeof(__pyx_k_iter), 0, 0, 1, 1},
19051 {&__pyx_n_s_ixt, __pyx_k_ixt,
sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19052 {&__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},
19053 {&__pyx_n_s_lhs, __pyx_k_lhs,
sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19054 {&__pyx_n_s_log, __pyx_k_log,
sizeof(__pyx_k_log), 0, 0, 1, 1},
19055 {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579,
sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19056 {&__pyx_n_s_m, __pyx_k_m,
sizeof(__pyx_k_m), 0, 0, 1, 1},
19057 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
19058 {&__pyx_n_s_math, __pyx_k_math,
sizeof(__pyx_k_math), 0, 0, 1, 1},
19059 {&__pyx_n_s_max, __pyx_k_max,
sizeof(__pyx_k_max), 0, 0, 1, 1},
19060 {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482,
sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19061 {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511,
sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19062 {&__pyx_n_s_min, __pyx_k_min,
sizeof(__pyx_k_min), 0, 0, 1, 1},
19063 {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502,
sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19064 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
19065 {&__pyx_n_s_nbar3, __pyx_k_nbar3,
sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19066 {&__pyx_n_s_ninf3, __pyx_k_ninf3,
sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19067 {&__pyx_n_s_norm, __pyx_k_norm,
sizeof(__pyx_k_norm), 0, 0, 1, 1},
19068 {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462,
sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19069 {&__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},
19070 {&__pyx_n_s_numbers, __pyx_k_numbers,
sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19071 {&__pyx_n_s_obj, __pyx_k_obj,
sizeof(__pyx_k_obj), 0, 0, 1, 1},
19072 {&__pyx_n_s_odd, __pyx_k_odd,
sizeof(__pyx_k_odd), 0, 0, 1, 1},
19073 {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397,
sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19074 {&__pyx_n_s_other, __pyx_k_other,
sizeof(__pyx_k_other), 0, 0, 1, 1},
19075 {&__pyx_n_s_outer_pow, __pyx_k_outer_pow,
sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19076 {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518,
sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19077 {&__pyx_n_s_p, __pyx_k_p,
sizeof(__pyx_k_p), 0, 0, 1, 1},
19078 {&__pyx_n_s_pi, __pyx_k_pi,
sizeof(__pyx_k_pi), 0, 0, 1, 1},
19079 {&__pyx_n_s_pow, __pyx_k_pow,
sizeof(__pyx_k_pow), 0, 0, 1, 1},
19080 {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494,
sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19081 {&__pyx_n_s_pure, __pyx_k_pure,
sizeof(__pyx_k_pure), 0, 0, 1, 1},
19082 {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377,
sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19083 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable,
sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19084 {&__pyx_n_s_q, __pyx_k_q,
sizeof(__pyx_k_q), 0, 0, 1, 1},
19085 {&__pyx_n_s_quad, __pyx_k_quad,
sizeof(__pyx_k_quad), 0, 0, 1, 1},
19086 {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451,
sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19087 {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815,
sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19088 {&__pyx_n_s_range, __pyx_k_range,
sizeof(__pyx_k_range), 0, 0, 1, 1},
19089 {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355,
sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19090 {&__pyx_n_s_reverse, __pyx_k_reverse,
sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19091 {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421,
sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19092 {&__pyx_n_s_rhs, __pyx_k_rhs,
sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19093 {&__pyx_n_s_scalar, __pyx_k_scalar,
sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19094 {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344,
sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19095 {&__pyx_n_s_send, __pyx_k_send,
sizeof(__pyx_k_send), 0, 0, 1, 1},
19096 {&__pyx_n_s_sin, __pyx_k_sin,
sizeof(__pyx_k_sin), 0, 0, 1, 1},
19097 {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679,
sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19098 {&__pyx_n_s_sinh, __pyx_k_sinh,
sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19099 {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719,
sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19100 {&__pyx_n_s_sqrt, __pyx_k_sqrt,
sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19101 {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542,
sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19102 {&__pyx_n_s_tan, __pyx_k_tan,
sizeof(__pyx_k_tan), 0, 0, 1, 1},
19103 {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752,
sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19104 {&__pyx_n_s_tanh, __pyx_k_tanh,
sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19105 {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786,
sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19106 {&__pyx_n_s_tau, __pyx_k_tau,
sizeof(__pyx_k_tau), 0, 0, 1, 1},
19107 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
19108 {&__pyx_n_s_test_2, __pyx_k_test_2,
sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19109 {&__pyx_n_s_testmod, __pyx_k_testmod,
sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19110 {&__pyx_n_s_throw, __pyx_k_throw,
sizeof(__pyx_k_throw), 0, 0, 1, 1},
19111 {&__pyx_kp_s_to_frame, __pyx_k_to_frame,
sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19112 {&__pyx_kp_s_using, __pyx_k_using,
sizeof(__pyx_k_using), 0, 0, 1, 0},
19113 {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid,
sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19114 {&__pyx_kp_s_value, __pyx_k_value,
sizeof(__pyx_k_value), 0, 0, 1, 0},
19115 {&__pyx_n_s_version, __pyx_k_version,
sizeof(__pyx_k_version), 0, 0, 1, 1},
19116 {&__pyx_n_s_xrange, __pyx_k_xrange,
sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19117 {0, 0, 0, 0, 0, 0, 0}
19119 static int __Pyx_InitCachedBuiltins(
void) {
19120 __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;}
19121 __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;}
19122 __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;}
19123 __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;}
19124 __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;}
19125 __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;}
19126 #if PY_MAJOR_VERSION >= 3 19127 __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;}
19129 __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;}
19136 static int __Pyx_InitCachedConstants(
void) {
19137 __Pyx_RefNannyDeclarations
19138 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
19147 __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;}
19148 __Pyx_GOTREF(__pyx_tuple__8);
19149 __Pyx_GIVEREF(__pyx_tuple__8);
19158 __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;}
19159 __Pyx_GOTREF(__pyx_tuple__9);
19160 __Pyx_GIVEREF(__pyx_tuple__9);
19169 __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_abuild_rpmbuild_BUILD_gluc, __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;}
19178 __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_abuild_rpmbuild_BUILD_gluc, __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;}
19187 __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;}
19188 __Pyx_GOTREF(__pyx_tuple__12);
19189 __Pyx_GIVEREF(__pyx_tuple__12);
19198 __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;}
19199 __Pyx_GOTREF(__pyx_tuple__13);
19200 __Pyx_GIVEREF(__pyx_tuple__13);
19201 __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_abuild_rpmbuild_BUILD_gluc, __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;}
19210 __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;}
19211 __Pyx_GOTREF(__pyx_tuple__15);
19212 __Pyx_GIVEREF(__pyx_tuple__15);
19213 __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_abuild_rpmbuild_BUILD_gluc, __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;}
19222 __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;}
19223 __Pyx_GOTREF(__pyx_tuple__17);
19224 __Pyx_GIVEREF(__pyx_tuple__17);
19225 __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;}
19226 __Pyx_GOTREF(__pyx_tuple__18);
19227 __Pyx_GIVEREF(__pyx_tuple__18);
19236 __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;}
19237 __Pyx_GOTREF(__pyx_tuple__19);
19238 __Pyx_GIVEREF(__pyx_tuple__19);
19239 __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;}
19240 __Pyx_GOTREF(__pyx_tuple__20);
19241 __Pyx_GIVEREF(__pyx_tuple__20);
19250 __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;}
19251 __Pyx_GOTREF(__pyx_tuple__21);
19252 __Pyx_GIVEREF(__pyx_tuple__21);
19253 __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_abuild_rpmbuild_BUILD_gluc, __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;}
19254 __Pyx_RefNannyFinishContext();
19257 __Pyx_RefNannyFinishContext();
19261 static int __Pyx_InitGlobals(
void) {
19262 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
19263 __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;}
19264 __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;}
19265 __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;}
19266 __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;}
19267 __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;}
19268 __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;}
19269 __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;}
19270 __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;}
19276 #if PY_MAJOR_VERSION < 3 19277 PyMODINIT_FUNC initPyClical(
void);
19278 PyMODINIT_FUNC initPyClical(
void)
19280 PyMODINIT_FUNC PyInit_PyClical(
void);
19281 PyMODINIT_FUNC PyInit_PyClical(
void)
19284 PyObject *__pyx_t_1 = NULL;
19285 PyObject *__pyx_t_2 = NULL;
19286 PyObject *__pyx_t_3 = NULL;
19288 int __pyx_lineno = 0;
19289 const char *__pyx_filename = NULL;
19290 int __pyx_clineno = 0;
19291 __Pyx_RefNannyDeclarations
19292 #if CYTHON_REFNANNY 19293 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
19294 if (!__Pyx_RefNanny) {
19296 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
19297 if (!__Pyx_RefNanny)
19298 Py_FatalError(
"failed to import 'refnanny' module");
19301 __Pyx_RefNannySetupContext(
"PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19302 if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19303 __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;}
19304 __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;}
19305 #ifdef __Pyx_CyFunction_USED 19306 if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19308 #ifdef __Pyx_FusedFunction_USED 19309 if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19311 #ifdef __Pyx_Coroutine_USED 19312 if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19314 #ifdef __Pyx_Generator_USED 19315 if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19317 #ifdef __Pyx_StopAsyncIteration_USED 19318 if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19322 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS 19324 PyEval_InitThreads();
19328 #if PY_MAJOR_VERSION < 3 19329 __pyx_m = Py_InitModule4(
"PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19331 __pyx_m = PyModule_Create(&__pyx_moduledef);
19333 if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19334 __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;}
19335 Py_INCREF(__pyx_d);
19336 __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;}
19337 #if CYTHON_COMPILING_IN_PYPY 19338 Py_INCREF(__pyx_b);
19340 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
19342 if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19343 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) 19344 if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19346 if (__pyx_module_is_main_PyClical) {
19347 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;}
19349 #if PY_MAJOR_VERSION >= 3 19351 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19352 if (!PyDict_GetItemString(modules,
"PyClical")) {
19353 if (unlikely(PyDict_SetItemString(modules,
"PyClical", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19358 if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19360 if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19365 __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19366 __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19367 __pyx_vtable_8PyClical_index_set.unwrap = (
IndexSet (*)(
struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19368 __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19369 if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19370 __pyx_type_8PyClical_index_set.tp_print = 0;
19371 #if CYTHON_COMPILING_IN_CPYTHON 19373 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;}
19374 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19375 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19376 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19377 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19381 #if CYTHON_COMPILING_IN_CPYTHON 19383 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;}
19384 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19385 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19386 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19387 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19391 #if CYTHON_COMPILING_IN_CPYTHON 19393 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;}
19394 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19395 __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19396 __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19397 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19401 #if CYTHON_COMPILING_IN_CPYTHON 19403 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;}
19404 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19405 __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19406 __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19407 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19411 #if CYTHON_COMPILING_IN_CPYTHON 19413 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;}
19414 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19415 __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19416 __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19417 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19421 #if CYTHON_COMPILING_IN_CPYTHON 19423 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;}
19424 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19425 __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19426 __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19427 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19431 #if CYTHON_COMPILING_IN_CPYTHON 19433 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;}
19434 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19435 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19436 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19437 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19441 #if CYTHON_COMPILING_IN_CPYTHON 19443 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;}
19444 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19445 __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19446 __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19447 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19451 #if CYTHON_COMPILING_IN_CPYTHON 19453 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;}
19454 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19455 __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19456 __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19457 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19461 #if CYTHON_COMPILING_IN_CPYTHON 19463 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;}
19464 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19465 __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19466 __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19467 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19471 #if CYTHON_COMPILING_IN_CPYTHON 19473 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;}
19474 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19475 __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19476 __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19477 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19481 #if CYTHON_COMPILING_IN_CPYTHON 19483 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;}
19484 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19485 __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19486 __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19487 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19491 #if CYTHON_COMPILING_IN_CPYTHON 19493 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;}
19494 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19495 __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19496 __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19497 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19501 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;}
19502 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;}
19503 __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19504 __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19505 __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
Clifford))__pyx_f_8PyClical_8clifford_wrap;
19506 __pyx_vtable_8PyClical_clifford.unwrap = (
Clifford (*)(
struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19507 __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19508 if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19509 __pyx_type_8PyClical_clifford.tp_print = 0;
19510 #if CYTHON_COMPILING_IN_CPYTHON 19512 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;}
19513 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19514 __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19515 __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19516 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19520 #if CYTHON_COMPILING_IN_CPYTHON 19522 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;}
19523 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19524 __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19525 __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19526 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19530 #if CYTHON_COMPILING_IN_CPYTHON 19532 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;}
19533 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19534 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19535 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19536 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19540 #if CYTHON_COMPILING_IN_CPYTHON 19542 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;}
19543 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19544 __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19545 __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19546 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19550 #if CYTHON_COMPILING_IN_CPYTHON 19552 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;}
19553 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19554 __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19555 __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19556 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19560 #if CYTHON_COMPILING_IN_CPYTHON 19562 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;}
19563 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19564 __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19565 __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19566 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19570 #if CYTHON_COMPILING_IN_CPYTHON 19572 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;}
19573 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19574 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19575 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19576 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19580 #if CYTHON_COMPILING_IN_CPYTHON 19582 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;}
19583 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19584 __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19585 __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19586 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19590 #if CYTHON_COMPILING_IN_CPYTHON 19592 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;}
19593 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19594 __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19595 __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19596 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19600 #if CYTHON_COMPILING_IN_CPYTHON 19602 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;}
19603 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19604 __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19605 __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19606 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19610 #if CYTHON_COMPILING_IN_CPYTHON 19612 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;}
19613 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19614 __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19615 __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19616 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19620 #if CYTHON_COMPILING_IN_CPYTHON 19622 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;}
19623 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19624 __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19625 __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19626 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19630 #if CYTHON_COMPILING_IN_CPYTHON 19632 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;}
19633 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19634 __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19635 __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19636 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19640 #if CYTHON_COMPILING_IN_CPYTHON 19642 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;}
19643 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19644 __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19645 __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19646 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19650 #if CYTHON_COMPILING_IN_CPYTHON 19652 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;}
19653 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19654 __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19655 __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19656 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19660 #if CYTHON_COMPILING_IN_CPYTHON 19662 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;}
19663 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19664 __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19665 __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19666 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19670 #if CYTHON_COMPILING_IN_CPYTHON 19672 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;}
19673 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19674 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19675 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19676 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19680 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 19681 #if CYTHON_COMPILING_IN_CPYTHON 19683 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;}
19684 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19685 __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19686 __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19687 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19692 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 19693 #if CYTHON_COMPILING_IN_CPYTHON 19695 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;}
19696 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19697 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19698 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19699 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19704 #if CYTHON_COMPILING_IN_CPYTHON 19706 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;}
19707 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19708 __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19709 __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19710 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19714 #if CYTHON_COMPILING_IN_CPYTHON 19716 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;}
19717 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19718 __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19719 __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19720 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19724 #if CYTHON_COMPILING_IN_CPYTHON 19726 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;}
19727 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19728 __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19729 __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19730 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19734 #if CYTHON_COMPILING_IN_CPYTHON 19736 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;}
19737 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19738 __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19739 __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19740 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19744 #if CYTHON_COMPILING_IN_CPYTHON 19746 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;}
19747 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19748 __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19749 __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19750 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19754 #if CYTHON_COMPILING_IN_CPYTHON 19756 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;}
19757 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19758 __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19759 __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19760 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19764 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;}
19765 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;}
19766 __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19767 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;}
19768 __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19769 __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19774 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 19775 if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19785 __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;}
19786 __Pyx_GOTREF(__pyx_t_1);
19787 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;}
19788 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19797 __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;}
19798 __Pyx_GOTREF(__pyx_t_1);
19799 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;}
19800 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19809 __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;}
19810 __Pyx_GOTREF(__pyx_t_1);
19811 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;}
19812 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19821 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;}
19830 __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;}
19831 __Pyx_GOTREF(__pyx_t_1);
19832 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;}
19833 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19842 __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;}
19843 __Pyx_GOTREF(__pyx_t_1);
19844 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;}
19845 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19854 __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;}
19855 __Pyx_GOTREF(__pyx_t_1);
19856 __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;}
19857 __Pyx_GOTREF(__pyx_t_2);
19858 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19859 __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;}
19860 __Pyx_GOTREF(__pyx_t_1);
19861 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19862 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;}
19863 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19872 __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;}
19873 __Pyx_GOTREF(__pyx_t_1);
19874 __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;}
19875 __Pyx_GOTREF(__pyx_t_2);
19876 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19877 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;}
19878 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19887 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;}
19896 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;}
19905 __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;}
19906 __Pyx_GOTREF(__pyx_t_2);
19907 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;}
19908 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19917 __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;}
19918 __Pyx_GOTREF(__pyx_t_2);
19919 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;}
19920 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19929 __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;}
19930 __Pyx_GOTREF(__pyx_t_2);
19931 __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;}
19932 __Pyx_GOTREF(__pyx_t_1);
19933 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19934 __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;}
19935 __Pyx_GOTREF(__pyx_t_2);
19936 __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;}
19937 __Pyx_GOTREF(__pyx_t_3);
19938 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19939 __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;}
19940 __Pyx_GOTREF(__pyx_t_2);
19941 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19942 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19943 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;}
19944 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19953 __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;}
19954 __Pyx_GOTREF(__pyx_t_2);
19955 __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;}
19956 __Pyx_GOTREF(__pyx_t_3);
19957 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19958 __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;}
19959 __Pyx_GOTREF(__pyx_t_2);
19960 __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;}
19961 __Pyx_GOTREF(__pyx_t_1);
19962 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19963 __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;}
19964 __Pyx_GOTREF(__pyx_t_2);
19965 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19966 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19967 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;}
19968 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19977 __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;}
19978 __Pyx_GOTREF(__pyx_t_2);
19979 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;}
19980 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19988 __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;}
19989 __Pyx_GOTREF(__pyx_t_2);
19990 __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;}
19991 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19999 __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;}
20000 __Pyx_GOTREF(__pyx_t_1);
20002 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
20003 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
20004 if (likely(__pyx_t_3)) {
20005 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
20006 __Pyx_INCREF(__pyx_t_3);
20007 __Pyx_INCREF(
function);
20008 __Pyx_DECREF_SET(__pyx_t_1,
function);
20012 __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;}
20013 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20015 __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;}
20017 __Pyx_GOTREF(__pyx_t_2);
20018 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20019 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20034 __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;}
20035 __Pyx_GOTREF(__pyx_t_2);
20036 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;}
20037 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;}
20038 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;}
20039 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;}
20040 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;}
20041 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;}
20042 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;}
20043 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;}
20044 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;}
20045 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;}
20046 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;}
20047 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;}
20048 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;}
20049 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;}
20050 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;}
20051 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;}
20052 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;}
20053 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;}
20054 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;}
20055 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;}
20056 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;}
20057 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;}
20058 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;}
20059 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;}
20060 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;}
20061 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;}
20062 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;}
20063 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;}
20064 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;}
20065 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;}
20066 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;}
20067 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;}
20068 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;}
20069 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;}
20070 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;}
20071 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;}
20072 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;}
20073 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;}
20074 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;}
20075 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;}
20076 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;}
20077 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;}
20078 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;}
20079 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;}
20080 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;}
20081 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;}
20082 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;}
20083 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;}
20084 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;}
20085 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;}
20086 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;}
20087 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;}
20088 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;}
20089 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;}
20090 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;}
20091 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;}
20092 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;}
20093 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;}
20094 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;}
20095 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;}
20096 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;}
20097 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;}
20098 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;}
20099 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;}
20100 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;}
20101 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;}
20102 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;}
20103 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;}
20104 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;}
20105 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;}
20106 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;}
20107 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;}
20108 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;}
20109 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;}
20110 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;}
20111 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;}
20112 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;}
20113 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;}
20114 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;}
20115 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;}
20116 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;}
20117 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;}
20118 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;}
20119 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;}
20120 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;}
20121 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;}
20122 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;}
20123 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;}
20124 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;}
20125 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;}
20126 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;}
20127 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;}
20128 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;}
20129 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;}
20130 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;}
20131 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;}
20132 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;}
20133 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;}
20134 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;}
20135 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;}
20136 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;}
20137 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;}
20138 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;}
20139 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;}
20140 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;}
20141 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;}
20142 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;}
20143 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;}
20144 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20150 __Pyx_XDECREF(__pyx_t_1);
20151 __Pyx_XDECREF(__pyx_t_2);
20152 __Pyx_XDECREF(__pyx_t_3);
20155 __Pyx_AddTraceback(
"init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20157 Py_DECREF(__pyx_m); __pyx_m = 0;
20158 }
else if (!PyErr_Occurred()) {
20159 PyErr_SetString(PyExc_ImportError,
"init PyClical");
20162 __Pyx_RefNannyFinishContext();
20163 #if PY_MAJOR_VERSION < 3 20171 #if CYTHON_REFNANNY 20172 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
20173 PyObject *m = NULL, *p = NULL;
20175 m = PyImport_ImportModule((
char *)modname);
20177 p = PyObject_GetAttrString(m, (
char *)
"RefNannyAPI");
20179 r = PyLong_AsVoidPtr(p);
20183 return (__Pyx_RefNannyAPIStruct *)r;
20187 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20188 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20189 if (unlikely(!result)) {
20190 PyErr_Format(PyExc_NameError,
20191 #
if PY_MAJOR_VERSION >= 3
20192 "name '%U' is not defined", name);
20194 "name '%.200s' is not defined", PyString_AS_STRING(name));
20200 #if CYTHON_COMPILING_IN_CPYTHON 20201 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20203 ternaryfunc call = func->ob_type->tp_call;
20204 if (unlikely(!call))
20205 return PyObject_Call(func, arg, kw);
20206 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
20208 result = (*call)(func, arg, kw);
20209 Py_LeaveRecursiveCall();
20210 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20213 "NULL result without error in PyObject_Call");
20219 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
20220 #if CYTHON_COMPILING_IN_CPYTHON 20221 PyObject *tmp_type, *tmp_value, *tmp_tb;
20222 PyThreadState *tstate = PyThreadState_GET();
20223 tmp_type = tstate->curexc_type;
20224 tmp_value = tstate->curexc_value;
20225 tmp_tb = tstate->curexc_traceback;
20226 tstate->curexc_type = type;
20227 tstate->curexc_value = value;
20228 tstate->curexc_traceback = tb;
20229 Py_XDECREF(tmp_type);
20230 Py_XDECREF(tmp_value);
20231 Py_XDECREF(tmp_tb);
20233 PyErr_Restore(type, value, tb);
20236 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
20237 #if CYTHON_COMPILING_IN_CPYTHON 20238 PyThreadState *tstate = PyThreadState_GET();
20239 *type = tstate->curexc_type;
20240 *value = tstate->curexc_value;
20241 *tb = tstate->curexc_traceback;
20242 tstate->curexc_type = 0;
20243 tstate->curexc_value = 0;
20244 tstate->curexc_traceback = 0;
20246 PyErr_Fetch(type, value, tb);
20250 static void __Pyx_WriteUnraisable(
const char *name, CYTHON_UNUSED
int clineno,
20251 CYTHON_UNUSED
int lineno, CYTHON_UNUSED
const char *filename,
20252 int full_traceback, CYTHON_UNUSED
int nogil) {
20253 PyObject *old_exc, *old_val, *old_tb;
20256 PyGILState_STATE state;
20258 state = PyGILState_Ensure();
20260 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20261 if (full_traceback) {
20262 Py_XINCREF(old_exc);
20263 Py_XINCREF(old_val);
20264 Py_XINCREF(old_tb);
20265 __Pyx_ErrRestore(old_exc, old_val, old_tb);
20268 #if PY_MAJOR_VERSION < 3 20269 ctx = PyString_FromString(name);
20271 ctx = PyUnicode_FromString(name);
20273 __Pyx_ErrRestore(old_exc, old_val, old_tb);
20275 PyErr_WriteUnraisable(Py_None);
20277 PyErr_WriteUnraisable(ctx);
20282 PyGILState_Release(state);
20286 #if CYTHON_COMPILING_IN_CPYTHON 20287 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20288 PyObject *
self, *result;
20290 cfunc = PyCFunction_GET_FUNCTION(func);
20291 self = PyCFunction_GET_SELF(func);
20292 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
20294 result = cfunc(
self, arg);
20295 Py_LeaveRecursiveCall();
20296 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20299 "NULL result without error in PyObject_Call");
20305 #if CYTHON_COMPILING_IN_CPYTHON 20306 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20308 PyObject *args = PyTuple_New(1);
20309 if (unlikely(!args))
return NULL;
20311 PyTuple_SET_ITEM(args, 0, arg);
20312 result = __Pyx_PyObject_Call(func, args, NULL);
20316 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20317 #ifdef __Pyx_CyFunction_USED 20318 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
20320 if (likely(PyCFunction_Check(func))) {
20322 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20323 return __Pyx_PyObject_CallMethO(func, arg);
20326 return __Pyx__PyObject_CallOneArg(func, arg);
20329 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20331 PyObject *args = PyTuple_Pack(1, arg);
20332 if (unlikely(!args))
return NULL;
20333 result = __Pyx_PyObject_Call(func, args, NULL);
20339 #if CYTHON_COMPILING_IN_CPYTHON 20340 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20341 #ifdef __Pyx_CyFunction_USED 20342 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
20344 if (likely(PyCFunction_Check(func))) {
20346 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20347 return __Pyx_PyObject_CallMethO(func, NULL);
20350 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20354 static void __Pyx_RaiseDoubleKeywordsError(
20355 const char* func_name,
20358 PyErr_Format(PyExc_TypeError,
20359 #
if PY_MAJOR_VERSION >= 3
20360 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20362 "%s() got multiple values for keyword argument '%s'", func_name,
20363 PyString_AsString(kw_name));
20367 static int __Pyx_ParseOptionalKeywords(
20369 PyObject **argnames[],
20371 PyObject *values[],
20372 Py_ssize_t num_pos_args,
20373 const char* function_name)
20375 PyObject *key = 0, *value = 0;
20376 Py_ssize_t pos = 0;
20378 PyObject*** first_kw_arg = argnames + num_pos_args;
20379 while (PyDict_Next(kwds, &pos, &key, &value)) {
20380 name = first_kw_arg;
20381 while (*name && (**name != key)) name++;
20383 values[name-argnames] = value;
20386 name = first_kw_arg;
20387 #if PY_MAJOR_VERSION < 3 20388 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20390 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20391 && _PyString_Eq(**name, key)) {
20392 values[name-argnames] = value;
20397 if (*name)
continue;
20399 PyObject*** argname = argnames;
20400 while (argname != first_kw_arg) {
20401 if ((**argname == key) || (
20402 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20403 && _PyString_Eq(**argname, key))) {
20404 goto arg_passed_twice;
20411 if (likely(PyUnicode_Check(key))) {
20413 int cmp = (**name == key) ? 0 :
20414 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20415 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20417 PyUnicode_Compare(**name, key);
20418 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
20420 values[name-argnames] = value;
20425 if (*name)
continue;
20427 PyObject*** argname = argnames;
20428 while (argname != first_kw_arg) {
20429 int cmp = (**argname == key) ? 0 :
20430 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20431 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20433 PyUnicode_Compare(**argname, key);
20434 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
20435 if (cmp == 0)
goto arg_passed_twice;
20440 goto invalid_keyword_type;
20442 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
20444 goto invalid_keyword;
20449 __Pyx_RaiseDoubleKeywordsError(function_name, key);
20451 invalid_keyword_type:
20452 PyErr_Format(PyExc_TypeError,
20453 "%.200s() keywords must be strings", function_name);
20456 PyErr_Format(PyExc_TypeError,
20457 #
if PY_MAJOR_VERSION < 3
20458 "%.200s() got an unexpected keyword argument '%.200s'",
20459 function_name, PyString_AsString(key));
20461 "%s() got an unexpected keyword argument '%U'",
20462 function_name, key);
20468 static void __Pyx_RaiseArgtupleInvalid(
20469 const char* func_name,
20471 Py_ssize_t num_min,
20472 Py_ssize_t num_max,
20473 Py_ssize_t num_found)
20475 Py_ssize_t num_expected;
20476 const char *more_or_less;
20477 if (num_found < num_min) {
20478 num_expected = num_min;
20479 more_or_less =
"at least";
20481 num_expected = num_max;
20482 more_or_less =
"at most";
20485 more_or_less =
"exactly";
20487 PyErr_Format(PyExc_TypeError,
20488 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
20489 func_name, more_or_less, num_expected,
20490 (num_expected == 1) ?
"" :
"s", num_found);
20493 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
20495 #if CYTHON_COMPILING_IN_CPYTHON 20496 result = PyDict_GetItem(__pyx_d, name);
20497 if (likely(result)) {
20501 result = PyObject_GetItem(__pyx_d, name);
20505 result = __Pyx_GetBuiltinName(name);
20510 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
20511 #if CYTHON_COMPILING_IN_CPYTHON 20512 PyThreadState *tstate = PyThreadState_GET();
20513 *type = tstate->exc_type;
20514 *value = tstate->exc_value;
20515 *tb = tstate->exc_traceback;
20517 Py_XINCREF(*value);
20520 PyErr_GetExcInfo(type, value, tb);
20523 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
20524 #if CYTHON_COMPILING_IN_CPYTHON 20525 PyObject *tmp_type, *tmp_value, *tmp_tb;
20526 PyThreadState *tstate = PyThreadState_GET();
20527 tmp_type = tstate->exc_type;
20528 tmp_value = tstate->exc_value;
20529 tmp_tb = tstate->exc_traceback;
20530 tstate->exc_type = type;
20531 tstate->exc_value = value;
20532 tstate->exc_traceback = tb;
20533 Py_XDECREF(tmp_type);
20534 Py_XDECREF(tmp_value);
20535 Py_XDECREF(tmp_tb);
20537 PyErr_SetExcInfo(type, value, tb);
20541 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
20542 PyObject *local_type, *local_value, *local_tb;
20543 #if CYTHON_COMPILING_IN_CPYTHON 20544 PyObject *tmp_type, *tmp_value, *tmp_tb;
20545 PyThreadState *tstate = PyThreadState_GET();
20546 local_type = tstate->curexc_type;
20547 local_value = tstate->curexc_value;
20548 local_tb = tstate->curexc_traceback;
20549 tstate->curexc_type = 0;
20550 tstate->curexc_value = 0;
20551 tstate->curexc_traceback = 0;
20553 PyErr_Fetch(&local_type, &local_value, &local_tb);
20555 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20556 #if CYTHON_COMPILING_IN_CPYTHON 20557 if (unlikely(tstate->curexc_type))
20559 if (unlikely(PyErr_Occurred()))
20562 #if PY_MAJOR_VERSION >= 3 20564 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20568 Py_XINCREF(local_tb);
20569 Py_XINCREF(local_type);
20570 Py_XINCREF(local_value);
20571 *type = local_type;
20572 *value = local_value;
20574 #if CYTHON_COMPILING_IN_CPYTHON 20575 tmp_type = tstate->exc_type;
20576 tmp_value = tstate->exc_value;
20577 tmp_tb = tstate->exc_traceback;
20578 tstate->exc_type = local_type;
20579 tstate->exc_value = local_value;
20580 tstate->exc_traceback = local_tb;
20581 Py_XDECREF(tmp_type);
20582 Py_XDECREF(tmp_value);
20583 Py_XDECREF(tmp_tb);
20585 PyErr_SetExcInfo(local_type, local_value, local_tb);
20592 Py_XDECREF(local_type);
20593 Py_XDECREF(local_value);
20594 Py_XDECREF(local_tb);
20598 #if PY_MAJOR_VERSION < 3 20599 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
20600 CYTHON_UNUSED PyObject *cause) {
20602 if (!value || value == Py_None)
20606 if (!tb || tb == Py_None)
20610 if (!PyTraceBack_Check(tb)) {
20611 PyErr_SetString(PyExc_TypeError,
20612 "raise: arg 3 must be a traceback or None");
20616 if (PyType_Check(type)) {
20617 #if CYTHON_COMPILING_IN_PYPY 20619 Py_INCREF(Py_None);
20623 PyErr_NormalizeException(&type, &value, &tb);
20626 PyErr_SetString(PyExc_TypeError,
20627 "instance exception may not have a separate value");
20631 type = (PyObject*) Py_TYPE(type);
20633 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
20634 PyErr_SetString(PyExc_TypeError,
20635 "raise: exception class must be a subclass of BaseException");
20639 __Pyx_ErrRestore(type, value, tb);
20648 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
20649 PyObject* owned_instance = NULL;
20650 if (tb == Py_None) {
20652 }
else if (tb && !PyTraceBack_Check(tb)) {
20653 PyErr_SetString(PyExc_TypeError,
20654 "raise: arg 3 must be a traceback or None");
20657 if (value == Py_None)
20659 if (PyExceptionInstance_Check(type)) {
20661 PyErr_SetString(PyExc_TypeError,
20662 "instance exception may not have a separate value");
20666 type = (PyObject*) Py_TYPE(value);
20667 }
else if (PyExceptionClass_Check(type)) {
20668 PyObject *instance_class = NULL;
20669 if (value && PyExceptionInstance_Check(value)) {
20670 instance_class = (PyObject*) Py_TYPE(value);
20671 if (instance_class != type) {
20672 int is_subclass = PyObject_IsSubclass(instance_class, type);
20673 if (!is_subclass) {
20674 instance_class = NULL;
20675 }
else if (unlikely(is_subclass == -1)) {
20678 type = instance_class;
20682 if (!instance_class) {
20685 args = PyTuple_New(0);
20686 else if (PyTuple_Check(value)) {
20690 args = PyTuple_Pack(1, value);
20693 owned_instance = PyObject_Call(type, args, NULL);
20695 if (!owned_instance)
20697 value = owned_instance;
20698 if (!PyExceptionInstance_Check(value)) {
20699 PyErr_Format(PyExc_TypeError,
20700 "calling %R should have returned an instance of " 20701 "BaseException, not %R",
20702 type, Py_TYPE(value));
20707 PyErr_SetString(PyExc_TypeError,
20708 "raise: exception class must be a subclass of BaseException");
20711 #if PY_VERSION_HEX >= 0x03030000 20714 if (cause && cause != Py_None) {
20716 PyObject *fixed_cause;
20717 if (cause == Py_None) {
20718 fixed_cause = NULL;
20719 }
else if (PyExceptionClass_Check(cause)) {
20720 fixed_cause = PyObject_CallObject(cause, NULL);
20721 if (fixed_cause == NULL)
20723 }
else if (PyExceptionInstance_Check(cause)) {
20724 fixed_cause = cause;
20725 Py_INCREF(fixed_cause);
20727 PyErr_SetString(PyExc_TypeError,
20728 "exception causes must derive from " 20732 PyException_SetCause(value, fixed_cause);
20734 PyErr_SetObject(type, value);
20736 #if CYTHON_COMPILING_IN_PYPY 20737 PyObject *tmp_type, *tmp_value, *tmp_tb;
20738 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
20740 PyErr_Restore(tmp_type, tmp_value, tb);
20741 Py_XDECREF(tmp_tb);
20743 PyThreadState *tstate = PyThreadState_GET();
20744 PyObject* tmp_tb = tstate->curexc_traceback;
20745 if (tb != tmp_tb) {
20747 tstate->curexc_traceback = tb;
20748 Py_XDECREF(tmp_tb);
20753 Py_XDECREF(owned_instance);
20758 #if CYTHON_USE_PYLONG_INTERNALS 20759 #include "longintrepr.h" 20762 #if CYTHON_COMPILING_IN_CPYTHON 20763 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
long intval, CYTHON_UNUSED
int inplace) {
20764 #if PY_MAJOR_VERSION < 3 20765 if (likely(PyInt_CheckExact(op1))) {
20766 const long b = intval;
20768 long a = PyInt_AS_LONG(op1);
20769 x = (long)((
unsigned long)a + b);
20770 if (likely((x^a) >= 0 || (x^b) >= 0))
20771 return PyInt_FromLong(x);
20772 return PyLong_Type.tp_as_number->nb_add(op1, op2);
20775 #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 20776 if (likely(PyLong_CheckExact(op1))) {
20777 const long b = intval;
20779 const PY_LONG_LONG llb = intval;
20780 PY_LONG_LONG lla, llx;
20781 const digit* digits = ((PyLongObject*)op1)->ob_digit;
20782 const Py_ssize_t size = Py_SIZE(op1);
20783 if (likely(__Pyx_sst_abs(size) <= 1)) {
20784 a = likely(size) ? digits[0] : 0;
20785 if (size == -1) a = -a;
20789 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
20790 a = -(long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20792 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
20793 lla = -(PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
20797 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
20798 a = (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20800 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
20801 lla = (PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
20805 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
20806 a = -(long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20808 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
20809 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]));
20813 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
20814 a = (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20816 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
20817 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]));
20821 if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
20822 a = -(long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20824 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
20825 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]));
20829 if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
20830 a = (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
20832 }
else if (8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
20833 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]));
20836 default:
return PyLong_Type.tp_as_number->nb_add(op1, op2);
20840 return PyLong_FromLong(x);
20843 return PyLong_FromLongLong(llx);
20846 if (PyFloat_CheckExact(op1)) {
20847 const long b = intval;
20848 double a = PyFloat_AS_DOUBLE(op1);
20850 PyFPE_START_PROTECT(
"add",
return NULL)
20851 result = ((double)a) + (double)b;
20852 PyFPE_END_PROTECT(result)
20855 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
20859 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
20862 r = PyObject_SetItem(o, j, v);
20866 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t
i, PyObject *v,
int is_list,
20867 CYTHON_NCP_UNUSED
int wraparound, CYTHON_NCP_UNUSED
int boundscheck) {
20868 #if CYTHON_COMPILING_IN_CPYTHON 20869 if (is_list || PyList_CheckExact(o)) {
20870 Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
20871 if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
20872 PyObject* old = PyList_GET_ITEM(o, n);
20874 PyList_SET_ITEM(o, n, v);
20879 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
20880 if (likely(m && m->sq_ass_item)) {
20881 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
20882 Py_ssize_t l = m->sq_length(o);
20883 if (likely(l >= 0)) {
20886 if (PyErr_ExceptionMatches(PyExc_OverflowError))
20892 return m->sq_ass_item(o, i, v);
20896 #if CYTHON_COMPILING_IN_PYPY 20897 if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
20899 if (is_list || PySequence_Check(o)) {
20901 return PySequence_SetItem(o, i, v);
20904 return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
20907 static void __Pyx_RaiseArgumentTypeInvalid(
const char* name, PyObject *
obj, PyTypeObject *type) {
20908 PyErr_Format(PyExc_TypeError,
20909 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
20910 name, type->tp_name, Py_TYPE(obj)->tp_name);
20912 static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
20913 const char *name,
int exact)
20915 if (unlikely(!type)) {
20916 PyErr_SetString(PyExc_SystemError,
"Missing type object");
20919 if (none_allowed && obj == Py_None)
return 1;
20921 if (likely(Py_TYPE(obj) == type))
return 1;
20922 #if PY_MAJOR_VERSION == 2 20923 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj)))
return 1;
20927 if (likely(PyObject_TypeCheck(obj, type)))
return 1;
20929 __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
20933 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
20934 PyObject *empty_list = 0;
20935 PyObject *module = 0;
20936 PyObject *global_dict = 0;
20937 PyObject *empty_dict = 0;
20939 #if PY_VERSION_HEX < 0x03030000 20940 PyObject *py_import;
20941 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
20948 empty_list = PyList_New(0);
20953 global_dict = PyModule_GetDict(__pyx_m);
20956 empty_dict = PyDict_New();
20960 #if PY_MAJOR_VERSION >= 3 20962 if (strchr(__Pyx_MODULE_NAME,
'.')) {
20963 #if PY_VERSION_HEX < 0x03030000 20964 PyObject *py_level = PyInt_FromLong(1);
20967 module = PyObject_CallFunctionObjArgs(py_import,
20968 name, global_dict, empty_dict, list, py_level, NULL);
20969 Py_DECREF(py_level);
20971 module = PyImport_ImportModuleLevelObject(
20972 name, global_dict, empty_dict, list, 1);
20975 if (!PyErr_ExceptionMatches(PyExc_ImportError))
20984 #if PY_VERSION_HEX < 0x03030000 20985 PyObject *py_level = PyInt_FromLong(level);
20988 module = PyObject_CallFunctionObjArgs(py_import,
20989 name, global_dict, empty_dict, list, py_level, NULL);
20990 Py_DECREF(py_level);
20992 module = PyImport_ImportModuleLevelObject(
20993 name, global_dict, empty_dict, list, level);
20998 #if PY_VERSION_HEX < 0x03030000 20999 Py_XDECREF(py_import);
21001 Py_XDECREF(empty_list);
21002 Py_XDECREF(empty_dict);
21006 static int __Pyx_SetVtable(PyObject *dict,
void *vtable) {
21007 #if PY_VERSION_HEX >= 0x02070000 21008 PyObject *ob = PyCapsule_New(vtable, 0, 0);
21010 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21014 if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21023 #if CYTHON_COMPILING_IN_CPYTHON 21024 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2,
double floatval, CYTHON_UNUSED
int inplace) {
21025 const double b = floatval;
21027 if (likely(PyFloat_CheckExact(op1))) {
21028 a = PyFloat_AS_DOUBLE(op1);
21030 #if PY_MAJOR_VERSION < 3 21031 if (likely(PyInt_CheckExact(op1))) {
21032 a = (double) PyInt_AS_LONG(op1);
21035 if (likely(PyLong_CheckExact(op1))) {
21036 #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 21037 const digit* digits = ((PyLongObject*)op1)->ob_digit;
21038 const Py_ssize_t size = Py_SIZE(op1);
21040 case 0: a = 0.0;
break;
21041 case -1: a = -(double) digits[0];
break;
21042 case 1: a = (double) digits[0];
break;
21045 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21046 a = (double) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
21047 if ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
21055 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21056 a = (double) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
21057 if ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
21065 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21066 a = (double) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
21067 if ((8 *
sizeof(
unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
21077 a = PyLong_AsDouble(op1);
21078 if (unlikely(a == -1.0 && PyErr_Occurred()))
return NULL;
21081 return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21083 PyFPE_START_PROTECT(
"divide",
return NULL)
21085 PyFPE_END_PROTECT(result)
21090 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals) {
21091 #if CYTHON_COMPILING_IN_PYPY 21092 return PyObject_RichCompareBool(s1, s2, equals);
21095 return (equals == Py_EQ);
21096 }
else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21097 const char *ps1, *ps2;
21098 Py_ssize_t length = PyBytes_GET_SIZE(s1);
21099 if (length != PyBytes_GET_SIZE(s2))
21100 return (equals == Py_NE);
21101 ps1 = PyBytes_AS_STRING(s1);
21102 ps2 = PyBytes_AS_STRING(s2);
21103 if (ps1[0] != ps2[0]) {
21104 return (equals == Py_NE);
21105 }
else if (length == 1) {
21106 return (equals == Py_EQ);
21108 int result = memcmp(ps1, ps2, (
size_t)length);
21109 return (equals == Py_EQ) ? (result == 0) : (result != 0);
21111 }
else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21112 return (equals == Py_NE);
21113 }
else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21114 return (equals == Py_NE);
21117 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21120 result = __Pyx_PyObject_IsTrue(py_result);
21121 Py_DECREF(py_result);
21127 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals) {
21128 #if CYTHON_COMPILING_IN_PYPY 21129 return PyObject_RichCompareBool(s1, s2, equals);
21131 #if PY_MAJOR_VERSION < 3 21132 PyObject* owned_ref = NULL;
21134 int s1_is_unicode, s2_is_unicode;
21138 s1_is_unicode = PyUnicode_CheckExact(s1);
21139 s2_is_unicode = PyUnicode_CheckExact(s2);
21140 #if PY_MAJOR_VERSION < 3 21141 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21142 owned_ref = PyUnicode_FromObject(s2);
21143 if (unlikely(!owned_ref))
21147 }
else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21148 owned_ref = PyUnicode_FromObject(s1);
21149 if (unlikely(!owned_ref))
21153 }
else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21154 return __Pyx_PyBytes_Equals(s1, s2, equals);
21157 if (s1_is_unicode & s2_is_unicode) {
21160 void *data1, *data2;
21161 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21163 length = __Pyx_PyUnicode_GET_LENGTH(s1);
21164 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21167 kind = __Pyx_PyUnicode_KIND(s1);
21168 if (kind != __Pyx_PyUnicode_KIND(s2)) {
21171 data1 = __Pyx_PyUnicode_DATA(s1);
21172 data2 = __Pyx_PyUnicode_DATA(s2);
21173 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21175 }
else if (length == 1) {
21178 int result = memcmp(data1, data2, (
size_t)(length * kind));
21179 #if PY_MAJOR_VERSION < 3 21180 Py_XDECREF(owned_ref);
21182 return (equals == Py_EQ) ? (result == 0) : (result != 0);
21184 }
else if ((s1 == Py_None) & s2_is_unicode) {
21186 }
else if ((s2 == Py_None) & s1_is_unicode) {
21190 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21193 result = __Pyx_PyObject_IsTrue(py_result);
21194 Py_DECREF(py_result);
21198 #if PY_MAJOR_VERSION < 3 21199 Py_XDECREF(owned_ref);
21201 return (equals == Py_EQ);
21203 #if PY_MAJOR_VERSION < 3 21204 Py_XDECREF(owned_ref);
21206 return (equals == Py_NE);
21210 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
21211 int start = 0, mid = 0, end = count - 1;
21212 if (end >= 0 && code_line > entries[end].code_line) {
21215 while (start < end) {
21216 mid = start + (end - start) / 2;
21217 if (code_line < entries[mid].code_line) {
21219 }
else if (code_line > entries[mid].code_line) {
21225 if (code_line <= entries[mid].code_line) {
21231 static PyCodeObject *__pyx_find_code_object(
int code_line) {
21232 PyCodeObject* code_object;
21234 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21237 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21238 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21241 code_object = __pyx_code_cache.entries[pos].code_object;
21242 Py_INCREF(code_object);
21243 return code_object;
21245 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
21247 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21248 if (unlikely(!code_line)) {
21251 if (unlikely(!entries)) {
21252 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
21253 if (likely(entries)) {
21254 __pyx_code_cache.entries = entries;
21255 __pyx_code_cache.max_count = 64;
21256 __pyx_code_cache.count = 1;
21257 entries[0].code_line = code_line;
21258 entries[0].code_object = code_object;
21259 Py_INCREF(code_object);
21263 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21264 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21265 PyCodeObject* tmp = entries[pos].code_object;
21266 entries[pos].code_object = code_object;
21270 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21271 int new_max = __pyx_code_cache.max_count + 64;
21272 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21273 __pyx_code_cache.entries, (
size_t)new_max*
sizeof(__Pyx_CodeObjectCacheEntry));
21274 if (unlikely(!entries)) {
21277 __pyx_code_cache.entries = entries;
21278 __pyx_code_cache.max_count = new_max;
21280 for (i=__pyx_code_cache.count; i>pos; i--) {
21281 entries[
i] = entries[i-1];
21283 entries[pos].code_line = code_line;
21284 entries[pos].code_object = code_object;
21285 __pyx_code_cache.count++;
21286 Py_INCREF(code_object);
21289 #include "compile.h" 21290 #include "frameobject.h" 21291 #include "traceback.h" 21292 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21293 const char *funcname,
int c_line,
21294 int py_line,
const char *filename) {
21295 PyCodeObject *py_code = 0;
21296 PyObject *py_srcfile = 0;
21297 PyObject *py_funcname = 0;
21298 #if PY_MAJOR_VERSION < 3 21299 py_srcfile = PyString_FromString(filename);
21301 py_srcfile = PyUnicode_FromString(filename);
21303 if (!py_srcfile)
goto bad;
21305 #if PY_MAJOR_VERSION < 3 21306 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21308 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21312 #if PY_MAJOR_VERSION < 3 21313 py_funcname = PyString_FromString(funcname);
21315 py_funcname = PyUnicode_FromString(funcname);
21318 if (!py_funcname)
goto bad;
21319 py_code = __Pyx_PyCode_New(
21336 Py_DECREF(py_srcfile);
21337 Py_DECREF(py_funcname);
21340 Py_XDECREF(py_srcfile);
21341 Py_XDECREF(py_funcname);
21344 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
21345 int py_line,
const char *filename) {
21346 PyCodeObject *py_code = 0;
21347 PyFrameObject *py_frame = 0;
21348 py_code = __pyx_find_code_object(c_line ? c_line : py_line);
21350 py_code = __Pyx_CreateCodeObjectForTraceback(
21351 funcname, c_line, py_line, filename);
21352 if (!py_code)
goto bad;
21353 __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
21355 py_frame = PyFrame_New(
21356 PyThreadState_GET(),
21361 if (!py_frame)
goto bad;
21362 py_frame->f_lineno = py_line;
21363 PyTraceBack_Here(py_frame);
21365 Py_XDECREF(py_code);
21366 Py_XDECREF(py_frame);
21369 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ 21370 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) 21371 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ 21372 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) 21373 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ 21375 func_type value = func_value;\ 21376 if (sizeof(target_type) < sizeof(func_type)) {\ 21377 if (unlikely(value != (func_type) (target_type) value)) {\ 21378 func_type zero = 0;\ 21379 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ 21380 return (target_type) -1;\ 21381 if (is_unsigned && unlikely(value < zero))\ 21382 goto raise_neg_overflow;\ 21384 goto raise_overflow;\ 21387 return (target_type) value;\ 21390 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
21391 const int neg_one = (int) -1, const_zero = (
int) 0;
21392 const int is_unsigned = neg_one > const_zero;
21393 #if PY_MAJOR_VERSION < 3 21394 if (likely(PyInt_Check(x))) {
21395 if (
sizeof(
int) <
sizeof(long)) {
21396 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
21398 long val = PyInt_AS_LONG(x);
21399 if (is_unsigned && unlikely(val < 0)) {
21400 goto raise_neg_overflow;
21406 if (likely(PyLong_Check(x))) {
21408 #if CYTHON_USE_PYLONG_INTERNALS 21409 const digit* digits = ((PyLongObject*)x)->ob_digit;
21410 switch (Py_SIZE(x)) {
21411 case 0:
return (
int) 0;
21412 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, digits[0])
21414 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
21415 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21416 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21417 }
else if (8 *
sizeof(
int) >= 2 * PyLong_SHIFT) {
21418 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
21423 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
21424 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21425 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21426 }
else if (8 *
sizeof(
int) >= 3 * PyLong_SHIFT) {
21427 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
21432 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
21433 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21434 __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])))
21435 }
else if (8 *
sizeof(
int) >= 4 * PyLong_SHIFT) {
21436 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
21442 #if CYTHON_COMPILING_IN_CPYTHON 21443 if (unlikely(Py_SIZE(x) < 0)) {
21444 goto raise_neg_overflow;
21448 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
21449 if (unlikely(result < 0))
21451 if (unlikely(result == 1))
21452 goto raise_neg_overflow;
21455 if (
sizeof(
int) <=
sizeof(
unsigned long)) {
21456 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
21457 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
21458 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
21461 #if CYTHON_USE_PYLONG_INTERNALS 21462 const digit* digits = ((PyLongObject*)x)->ob_digit;
21463 switch (Py_SIZE(x)) {
21464 case 0:
return (
int) 0;
21465 case -1: __PYX_VERIFY_RETURN_INT(
int, sdigit, -(sdigit) digits[0])
21466 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, +digits[0])
21468 if (8 *
sizeof(
int) - 1 > 1 * PyLong_SHIFT) {
21469 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21470 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21471 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
21472 return (
int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21477 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
21478 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21479 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21480 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
21481 return (
int) ((((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21486 if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
21487 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21488 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21489 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
21490 return (
int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
21495 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
21496 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21497 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21498 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
21499 return (
int) ((((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
21504 if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
21505 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21506 __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])))
21507 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
21508 return (
int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21513 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
21514 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21515 __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])))
21516 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
21517 return (
int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
21523 if (
sizeof(
int) <=
sizeof(long)) {
21524 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
21525 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
21526 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
21530 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 21531 PyErr_SetString(PyExc_RuntimeError,
21532 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
21535 PyObject *v = __Pyx_PyNumber_Int(x);
21536 #if PY_MAJOR_VERSION < 3 21537 if (likely(v) && !PyLong_Check(v)) {
21539 v = PyNumber_Long(tmp);
21544 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
21545 unsigned char *bytes = (
unsigned char *)&val;
21546 int ret = _PyLong_AsByteArray((PyLongObject *)v,
21547 bytes,
sizeof(val),
21548 is_little, !is_unsigned);
21558 PyObject *tmp = __Pyx_PyNumber_Int(x);
21559 if (!tmp)
return (
int) -1;
21560 val = __Pyx_PyInt_As_int(tmp);
21565 PyErr_SetString(PyExc_OverflowError,
21566 "value too large to convert to int");
21568 raise_neg_overflow:
21569 PyErr_SetString(PyExc_OverflowError,
21570 "can't convert negative value to int");
21574 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
21575 const int neg_one = (int) -1, const_zero = (
int) 0;
21576 const int is_unsigned = neg_one > const_zero;
21578 if (
sizeof(
int) <
sizeof(long)) {
21579 return PyInt_FromLong((
long) value);
21580 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
21581 return PyLong_FromUnsignedLong((
unsigned long) value);
21582 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
21583 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
21586 if (
sizeof(
int) <=
sizeof(
long)) {
21587 return PyInt_FromLong((
long) value);
21588 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
21589 return PyLong_FromLongLong((PY_LONG_LONG) value);
21593 int one = 1;
int little = (int)*(
unsigned char *)&one;
21594 unsigned char *bytes = (
unsigned char *)&value;
21595 return _PyLong_FromByteArray(bytes,
sizeof(
int),
21596 little, !is_unsigned);
21600 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
21601 const long neg_one = (long) -1, const_zero = (
long) 0;
21602 const int is_unsigned = neg_one > const_zero;
21604 if (
sizeof(
long) <
sizeof(long)) {
21605 return PyInt_FromLong((
long) value);
21606 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
21607 return PyLong_FromUnsignedLong((
unsigned long) value);
21608 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
21609 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
21612 if (
sizeof(
long) <=
sizeof(
long)) {
21613 return PyInt_FromLong((
long) value);
21614 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
21615 return PyLong_FromLongLong((PY_LONG_LONG) value);
21619 int one = 1;
int little = (int)*(
unsigned char *)&one;
21620 unsigned char *bytes = (
unsigned char *)&value;
21621 return _PyLong_FromByteArray(bytes,
sizeof(
long),
21622 little, !is_unsigned);
21626 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
21627 const long neg_one = (long) -1, const_zero = (
long) 0;
21628 const int is_unsigned = neg_one > const_zero;
21629 #if PY_MAJOR_VERSION < 3 21630 if (likely(PyInt_Check(x))) {
21631 if (
sizeof(
long) <
sizeof(long)) {
21632 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
21634 long val = PyInt_AS_LONG(x);
21635 if (is_unsigned && unlikely(val < 0)) {
21636 goto raise_neg_overflow;
21642 if (likely(PyLong_Check(x))) {
21644 #if CYTHON_USE_PYLONG_INTERNALS 21645 const digit* digits = ((PyLongObject*)x)->ob_digit;
21646 switch (Py_SIZE(x)) {
21647 case 0:
return (
long) 0;
21648 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, digits[0])
21650 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
21651 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21652 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21653 }
else if (8 *
sizeof(
long) >= 2 * PyLong_SHIFT) {
21654 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
21659 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
21660 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21661 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21662 }
else if (8 *
sizeof(
long) >= 3 * PyLong_SHIFT) {
21663 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
21668 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
21669 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21670 __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])))
21671 }
else if (8 *
sizeof(
long) >= 4 * PyLong_SHIFT) {
21672 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
21678 #if CYTHON_COMPILING_IN_CPYTHON 21679 if (unlikely(Py_SIZE(x) < 0)) {
21680 goto raise_neg_overflow;
21684 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
21685 if (unlikely(result < 0))
21687 if (unlikely(result == 1))
21688 goto raise_neg_overflow;
21691 if (
sizeof(
long) <=
sizeof(
unsigned long)) {
21692 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
21693 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
21694 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
21697 #if CYTHON_USE_PYLONG_INTERNALS 21698 const digit* digits = ((PyLongObject*)x)->ob_digit;
21699 switch (Py_SIZE(x)) {
21700 case 0:
return (
long) 0;
21701 case -1: __PYX_VERIFY_RETURN_INT(
long, sdigit, -(sdigit) digits[0])
21702 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, +digits[0])
21704 if (8 *
sizeof(
long) - 1 > 1 * PyLong_SHIFT) {
21705 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21706 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21707 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
21708 return (
long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21713 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
21714 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
21715 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21716 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
21717 return (
long) ((((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21722 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
21723 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21724 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21725 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
21726 return (
long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
21731 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
21732 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
21733 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
21734 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
21735 return (
long) ((((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
21740 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
21741 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21742 __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])))
21743 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
21744 return (
long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21749 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
21750 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
21751 __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])))
21752 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
21753 return (
long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
21759 if (
sizeof(
long) <=
sizeof(long)) {
21760 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
21761 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
21762 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
21766 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 21767 PyErr_SetString(PyExc_RuntimeError,
21768 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
21771 PyObject *v = __Pyx_PyNumber_Int(x);
21772 #if PY_MAJOR_VERSION < 3 21773 if (likely(v) && !PyLong_Check(v)) {
21775 v = PyNumber_Long(tmp);
21780 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
21781 unsigned char *bytes = (
unsigned char *)&val;
21782 int ret = _PyLong_AsByteArray((PyLongObject *)v,
21783 bytes,
sizeof(val),
21784 is_little, !is_unsigned);
21794 PyObject *tmp = __Pyx_PyNumber_Int(x);
21795 if (!tmp)
return (
long) -1;
21796 val = __Pyx_PyInt_As_long(tmp);
21801 PyErr_SetString(PyExc_OverflowError,
21802 "value too large to convert to long");
21804 raise_neg_overflow:
21805 PyErr_SetString(PyExc_OverflowError,
21806 "can't convert negative value to long");
21810 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
21811 PyObject* fake_module;
21812 PyTypeObject* cached_type = NULL;
21813 fake_module = PyImport_AddModule((
char*)
"_cython_" CYTHON_ABI);
21814 if (!fake_module)
return NULL;
21815 Py_INCREF(fake_module);
21816 cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
21818 if (!PyType_Check((PyObject*)cached_type)) {
21819 PyErr_Format(PyExc_TypeError,
21820 "Shared Cython type %.200s is not a type object",
21824 if (cached_type->tp_basicsize != type->tp_basicsize) {
21825 PyErr_Format(PyExc_TypeError,
21826 "Shared Cython type %.200s has the wrong size, try recompiling",
21831 if (!PyErr_ExceptionMatches(PyExc_AttributeError))
goto bad;
21833 if (PyType_Ready(type) < 0)
goto bad;
21834 if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
21837 cached_type = type;
21840 Py_DECREF(fake_module);
21841 return cached_type;
21843 Py_XDECREF(cached_type);
21844 cached_type = NULL;
21848 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
21849 PyObject *tmp_type, *tmp_value, *tmp_tb;
21850 #if CYTHON_COMPILING_IN_CPYTHON 21851 PyThreadState *tstate = PyThreadState_GET();
21852 tmp_type = tstate->exc_type;
21853 tmp_value = tstate->exc_value;
21854 tmp_tb = tstate->exc_traceback;
21855 tstate->exc_type = *type;
21856 tstate->exc_value = *value;
21857 tstate->exc_traceback = *tb;
21859 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
21860 PyErr_SetExcInfo(*type, *value, *tb);
21863 *value = tmp_value;
21867 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
21868 PyObject *method, *result = NULL;
21869 method = __Pyx_PyObject_GetAttrStr(obj, method_name);
21870 if (unlikely(!method))
goto bad;
21871 #if CYTHON_COMPILING_IN_CPYTHON 21872 if (likely(PyMethod_Check(method))) {
21873 PyObject *
self = PyMethod_GET_SELF(method);
21874 if (likely(
self)) {
21876 PyObject *
function = PyMethod_GET_FUNCTION(method);
21877 args = PyTuple_New(2);
21878 if (unlikely(!args))
goto bad;
21880 PyTuple_SET_ITEM(args, 0,
self);
21882 PyTuple_SET_ITEM(args, 1, arg);
21883 Py_INCREF(
function);
21884 Py_DECREF(method); method = NULL;
21885 result = __Pyx_PyObject_Call(
function, args, NULL);
21887 Py_DECREF(
function);
21892 result = __Pyx_PyObject_CallOneArg(method, arg);
21894 Py_XDECREF(method);
21898 #include <structmember.h> 21899 #include <frameobject.h> 21900 static PyObject *__Pyx_Coroutine_Send(PyObject *
self, PyObject *value);
21901 static PyObject *__Pyx_Coroutine_Close(PyObject *
self);
21902 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
21903 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) 21904 #if 1 || PY_VERSION_HEX < 0x030300B0 21905 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
21906 PyObject *et, *ev, *tb;
21907 PyObject *value = NULL;
21908 __Pyx_ErrFetch(&et, &ev, &tb);
21912 Py_INCREF(Py_None);
21916 if (likely(et == PyExc_StopIteration)) {
21917 #if PY_VERSION_HEX >= 0x030300A0 21918 if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
21919 value = ((PyStopIterationObject *)ev)->value;
21928 if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
21930 Py_INCREF(Py_None);
21932 }
else if (PyTuple_Check(ev)) {
21933 if (PyTuple_GET_SIZE(ev) >= 1) {
21935 #if CYTHON_COMPILING_IN_CPYTHON 21936 value = PySequence_ITEM(ev, 0);
21938 value = PyTuple_GET_ITEM(ev, 0);
21944 Py_INCREF(Py_None);
21954 }
else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
21955 __Pyx_ErrRestore(et, ev, tb);
21958 PyErr_NormalizeException(&et, &ev, &tb);
21959 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
21960 __Pyx_ErrRestore(et, ev, tb);
21965 #if PY_VERSION_HEX >= 0x030300A0 21966 value = ((PyStopIterationObject *)ev)->value;
21971 PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
21973 if (likely(args)) {
21974 value = PySequence_GetItem(args, 0);
21977 if (unlikely(!value)) {
21978 __Pyx_ErrRestore(NULL, NULL, NULL);
21979 Py_INCREF(Py_None);
21988 static CYTHON_INLINE
21989 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *
self) {
21990 PyObject *exc_type =
self->exc_type;
21991 PyObject *exc_value =
self->exc_value;
21992 PyObject *exc_traceback =
self->exc_traceback;
21993 self->exc_type = NULL;
21994 self->exc_value = NULL;
21995 self->exc_traceback = NULL;
21996 Py_XDECREF(exc_type);
21997 Py_XDECREF(exc_value);
21998 Py_XDECREF(exc_traceback);
22000 static CYTHON_INLINE
22001 int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
22002 if (unlikely(gen->is_running)) {
22003 PyErr_SetString(PyExc_ValueError,
22004 "generator already executing");
22009 static CYTHON_INLINE
22010 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *
self, PyObject *value) {
22012 assert(!self->is_running);
22013 if (unlikely(self->resume_label == 0)) {
22014 if (unlikely(value && value != Py_None)) {
22015 PyErr_SetString(PyExc_TypeError,
22016 "can't send non-None value to a " 22017 "just-started generator");
22021 if (unlikely(self->resume_label == -1)) {
22022 PyErr_SetNone(PyExc_StopIteration);
22026 #if CYTHON_COMPILING_IN_PYPY 22028 if (self->exc_traceback) {
22029 PyThreadState *tstate = PyThreadState_GET();
22030 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
22031 PyFrameObject *f = tb->tb_frame;
22032 Py_XINCREF(tstate->frame);
22033 assert(f->f_back == NULL);
22034 f->f_back = tstate->frame;
22037 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
22038 &self->exc_traceback);
22040 __Pyx_Coroutine_ExceptionClear(
self);
22042 self->is_running = 1;
22043 retval =
self->body((PyObject *)
self, value);
22044 self->is_running = 0;
22046 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
22047 &self->exc_traceback);
22048 #if CYTHON_COMPILING_IN_PYPY 22050 if (self->exc_traceback) {
22051 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
22052 PyFrameObject *f = tb->tb_frame;
22053 Py_CLEAR(f->f_back);
22057 __Pyx_Coroutine_ExceptionClear(
self);
22061 static CYTHON_INLINE
22062 PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
22063 if (unlikely(!retval && !PyErr_Occurred())) {
22064 PyErr_SetNone(PyExc_StopIteration);
22068 static CYTHON_INLINE
22069 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
22071 PyObject *val = NULL;
22072 __Pyx_Coroutine_Undelegate(gen);
22073 __Pyx_PyGen_FetchStopIterationValue(&val);
22074 ret = __Pyx_Coroutine_SendEx(gen, val);
22078 static PyObject *__Pyx_Coroutine_Send(PyObject *
self, PyObject *value) {
22080 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)
self;
22081 PyObject *yf = gen->yieldfrom;
22082 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22086 gen->is_running = 1;
22087 #ifdef __Pyx_Generator_USED 22088 if (__Pyx_Generator_CheckExact(yf)) {
22089 ret = __Pyx_Coroutine_Send(yf, value);
22092 #ifdef __Pyx_Coroutine_USED 22093 if (__Pyx_Coroutine_CheckExact(yf)) {
22094 ret = __Pyx_Coroutine_Send(yf, value);
22098 if (value == Py_None)
22099 ret = PyIter_Next(yf);
22101 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
22103 gen->is_running = 0;
22107 retval = __Pyx_Coroutine_FinishDelegation(gen);
22109 retval = __Pyx_Coroutine_SendEx(gen, value);
22111 return __Pyx_Coroutine_MethodReturn(retval);
22113 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
22114 PyObject *retval = NULL;
22116 #ifdef __Pyx_Generator_USED 22117 if (__Pyx_Generator_CheckExact(yf)) {
22118 retval = __Pyx_Coroutine_Close(yf);
22123 #ifdef __Pyx_Coroutine_USED 22124 if (__Pyx_Coroutine_CheckExact(yf)) {
22125 retval = __Pyx_Coroutine_Close(yf);
22132 gen->is_running = 1;
22133 meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
22134 if (unlikely(!meth)) {
22135 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
22136 PyErr_WriteUnraisable(yf);
22140 retval = PyObject_CallFunction(meth, NULL);
22145 gen->is_running = 0;
22147 Py_XDECREF(retval);
22150 static PyObject *__Pyx_Generator_Next(PyObject *
self) {
22151 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)
self;
22152 PyObject *yf = gen->yieldfrom;
22153 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22157 gen->is_running = 1;
22158 ret = Py_TYPE(yf)->tp_iternext(yf);
22159 gen->is_running = 0;
22163 return __Pyx_Coroutine_FinishDelegation(gen);
22165 return __Pyx_Coroutine_SendEx(gen, Py_None);
22167 static PyObject *__Pyx_Coroutine_Close(PyObject *
self) {
22168 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22169 PyObject *retval, *raised_exception;
22170 PyObject *yf = gen->yieldfrom;
22172 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22176 err = __Pyx_Coroutine_CloseIter(gen, yf);
22177 __Pyx_Coroutine_Undelegate(gen);
22181 PyErr_SetNone(PyExc_GeneratorExit);
22182 retval = __Pyx_Coroutine_SendEx(gen, NULL);
22185 PyErr_SetString(PyExc_RuntimeError,
22186 "generator ignored GeneratorExit");
22189 raised_exception = PyErr_Occurred();
22190 if (!raised_exception
22191 || raised_exception == PyExc_StopIteration
22192 || raised_exception == PyExc_GeneratorExit
22193 || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
22194 || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
22196 if (raised_exception) PyErr_Clear();
22197 Py_INCREF(Py_None);
22202 static PyObject *__Pyx_Coroutine_Throw(PyObject *
self, PyObject *args) {
22203 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22205 PyObject *tb = NULL;
22206 PyObject *val = NULL;
22207 PyObject *yf = gen->yieldfrom;
22208 if (!PyArg_UnpackTuple(args, (
char *)
"throw", 1, 3, &typ, &val, &tb))
22210 if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
22215 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
22216 int err = __Pyx_Coroutine_CloseIter(gen, yf);
22218 __Pyx_Coroutine_Undelegate(gen);
22220 return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
22223 gen->is_running = 1;
22224 #ifdef __Pyx_Generator_USED 22225 if (__Pyx_Generator_CheckExact(yf)) {
22226 ret = __Pyx_Coroutine_Throw(yf, args);
22229 #ifdef __Pyx_Coroutine_USED 22230 if (__Pyx_Coroutine_CheckExact(yf)) {
22231 ret = __Pyx_Coroutine_Throw(yf, args);
22235 PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
22236 if (unlikely(!meth)) {
22238 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
22239 gen->is_running = 0;
22243 __Pyx_Coroutine_Undelegate(gen);
22244 gen->is_running = 0;
22247 ret = PyObject_CallObject(meth, args);
22250 gen->is_running = 0;
22253 ret = __Pyx_Coroutine_FinishDelegation(gen);
22255 return __Pyx_Coroutine_MethodReturn(ret);
22258 __Pyx_Raise(typ, val, tb, NULL);
22259 return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
22261 static int __Pyx_Coroutine_traverse(PyObject *
self, visitproc visit,
void *arg) {
22262 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22263 Py_VISIT(gen->closure);
22264 Py_VISIT(gen->classobj);
22265 Py_VISIT(gen->yieldfrom);
22266 Py_VISIT(gen->exc_type);
22267 Py_VISIT(gen->exc_value);
22268 Py_VISIT(gen->exc_traceback);
22271 static int __Pyx_Coroutine_clear(PyObject *
self) {
22272 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22273 Py_CLEAR(gen->closure);
22274 Py_CLEAR(gen->classobj);
22275 Py_CLEAR(gen->yieldfrom);
22276 Py_CLEAR(gen->exc_type);
22277 Py_CLEAR(gen->exc_value);
22278 Py_CLEAR(gen->exc_traceback);
22279 Py_CLEAR(gen->gi_name);
22280 Py_CLEAR(gen->gi_qualname);
22283 static void __Pyx_Coroutine_dealloc(PyObject *
self) {
22284 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22285 PyObject_GC_UnTrack(gen);
22286 if (gen->gi_weakreflist != NULL)
22287 PyObject_ClearWeakRefs(
self);
22288 if (gen->resume_label > 0) {
22289 PyObject_GC_Track(
self);
22290 #if PY_VERSION_HEX >= 0x030400a1 22291 if (PyObject_CallFinalizerFromDealloc(
self))
22293 Py_TYPE(gen)->tp_del(
self);
22294 if (self->ob_refcnt > 0)
22299 PyObject_GC_UnTrack(
self);
22301 __Pyx_Coroutine_clear(
self);
22302 PyObject_GC_Del(gen);
22304 static void __Pyx_Coroutine_del(PyObject *
self) {
22306 PyObject *error_type, *error_value, *error_traceback;
22307 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *)
self;
22308 if (gen->resume_label <= 0)
22310 #if PY_VERSION_HEX < 0x030400a1 22311 assert(self->ob_refcnt == 0);
22312 self->ob_refcnt = 1;
22314 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
22315 res = __Pyx_Coroutine_Close(
self);
22317 PyErr_WriteUnraisable(
self);
22320 __Pyx_ErrRestore(error_type, error_value, error_traceback);
22321 #if PY_VERSION_HEX < 0x030400a1 22322 assert(self->ob_refcnt > 0);
22323 if (--self->ob_refcnt == 0) {
22327 Py_ssize_t refcnt =
self->ob_refcnt;
22328 _Py_NewReference(
self);
22329 self->ob_refcnt = refcnt;
22331 #if CYTHON_COMPILING_IN_CPYTHON 22332 assert(PyType_IS_GC(self->ob_type) &&
22333 _Py_AS_GC(
self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
22336 #ifdef COUNT_ALLOCS 22337 --Py_TYPE(
self)->tp_frees;
22338 --Py_TYPE(
self)->tp_allocs;
22343 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *
self)
22345 Py_INCREF(self->gi_name);
22346 return self->gi_name;
22349 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *
self, PyObject *value)
22352 #if PY_MAJOR_VERSION >= 3 22353 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
22355 if (unlikely(value == NULL || !PyString_Check(value))) {
22357 PyErr_SetString(PyExc_TypeError,
22358 "__name__ must be set to a string object");
22361 tmp =
self->gi_name;
22363 self->gi_name = value;
22368 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *
self)
22370 Py_INCREF(self->gi_qualname);
22371 return self->gi_qualname;
22374 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *
self, PyObject *value)
22377 #if PY_MAJOR_VERSION >= 3 22378 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
22380 if (unlikely(value == NULL || !PyString_Check(value))) {
22382 PyErr_SetString(PyExc_TypeError,
22383 "__qualname__ must be set to a string object");
22386 tmp =
self->gi_qualname;
22388 self->gi_qualname = value;
22392 static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
22393 PyObject *closure, PyObject *name, PyObject *qualname) {
22394 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
22398 gen->closure = closure;
22399 Py_XINCREF(closure);
22400 gen->is_running = 0;
22401 gen->resume_label = 0;
22402 gen->classobj = NULL;
22403 gen->yieldfrom = NULL;
22404 gen->exc_type = NULL;
22405 gen->exc_value = NULL;
22406 gen->exc_traceback = NULL;
22407 gen->gi_weakreflist = NULL;
22408 Py_XINCREF(qualname);
22409 gen->gi_qualname = qualname;
22411 gen->gi_name = name;
22412 PyObject_GC_Track(gen);
22416 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module,
const char* py_code) {
22417 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 22419 PyObject *globals, *result_obj;
22420 globals = PyDict_New();
if (unlikely(!globals))
goto ignore;
22421 result = PyDict_SetItemString(globals,
"_cython_coroutine_type",
22422 #ifdef __Pyx_Coroutine_USED
22423 (PyObject*)__pyx_CoroutineType);
22427 if (unlikely(result < 0))
goto ignore;
22428 result = PyDict_SetItemString(globals,
"_cython_generator_type",
22429 #ifdef __Pyx_Generator_USED
22430 (PyObject*)__pyx_GeneratorType);
22434 if (unlikely(result < 0))
goto ignore;
22435 if (unlikely(PyDict_SetItemString(globals,
"_module", module) < 0))
goto ignore;
22436 if (unlikely(PyDict_SetItemString(globals,
"__builtins__", __pyx_b) < 0))
goto ignore;
22437 result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
22438 if (unlikely(!result_obj))
goto ignore;
22439 Py_DECREF(result_obj);
22440 Py_DECREF(globals);
22443 Py_XDECREF(globals);
22444 PyErr_WriteUnraisable(module);
22445 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
"Cython module failed to patch module with custom type", 1) < 0)) {
22455 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 22456 static PyObject* __Pyx_patch_abc_module(PyObject *module);
22457 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
22458 module = __Pyx_Coroutine_patch_module(
22460 "if _cython_generator_type is not None:\n" 22461 " try: Generator = _module.Generator\n" 22462 " except AttributeError: pass\n" 22463 " else: Generator.register(_cython_generator_type)\n" 22464 "if _cython_coroutine_type is not None:\n" 22465 " try: Coroutine = _module.Coroutine\n" 22466 " except AttributeError: pass\n" 22467 " else: Coroutine.register(_cython_coroutine_type)\n" 22472 static int __Pyx_patch_abc(
void) {
22473 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) 22474 static int abc_patched = 0;
22475 if (!abc_patched) {
22477 module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ?
"collections.abc" :
"collections");
22479 PyErr_WriteUnraisable(NULL);
22480 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
22481 ((PY_VERSION_HEX >= 0x03030000) ?
22482 "Cython module failed to register with collections.abc module" :
22483 "Cython module failed to register with collections module"), 1) < 0)) {
22487 module = __Pyx_patch_abc_module(module);
22489 if (unlikely(!module))
22493 module = PyImport_ImportModule(
"backports_abc");
22495 module = __Pyx_patch_abc_module(module);
22496 Py_XDECREF(module);
22503 if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
22508 static PyMethodDef __pyx_Generator_methods[] = {
22509 {
"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
22510 (
char*) PyDoc_STR(
"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
22511 {
"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
22512 (
char*) PyDoc_STR(
"throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
22513 {
"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
22514 (
char*) PyDoc_STR(
"close() -> raise GeneratorExit inside generator.")},
22517 static PyMemberDef __pyx_Generator_memberlist[] = {
22518 {(
char *)
"gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
22519 {(
char*)
"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
22520 (
char*) PyDoc_STR(
"object being iterated by 'yield from', or None")},
22523 static PyGetSetDef __pyx_Generator_getsets[] = {
22524 {(
char *)
"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
22525 (
char*) PyDoc_STR(
"name of the generator"), 0},
22526 {(
char *)
"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
22527 (
char*) PyDoc_STR(
"qualified name of the generator"), 0},
22530 static PyTypeObject __pyx_GeneratorType_type = {
22531 PyVarObject_HEAD_INIT(0, 0)
22533 sizeof(__pyx_CoroutineObject),
22535 (destructor) __Pyx_Coroutine_dealloc,
22550 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
22552 (traverseproc) __Pyx_Coroutine_traverse,
22555 offsetof(__pyx_CoroutineObject, gi_weakreflist),
22557 (iternextfunc) __Pyx_Generator_Next,
22558 __pyx_Generator_methods,
22559 __pyx_Generator_memberlist,
22560 __pyx_Generator_getsets,
22576 #
if PY_VERSION_HEX >= 0x030400a1
22579 __Pyx_Coroutine_del,
22582 #
if PY_VERSION_HEX >= 0x030400a1
22583 __Pyx_Coroutine_del,
22586 static int __pyx_Generator_init(
void) {
22587 __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
22588 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
22589 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
22590 if (unlikely(!__pyx_GeneratorType)) {
22596 static int __Pyx_check_binary_version(
void) {
22597 char ctversion[4], rtversion[4];
22598 PyOS_snprintf(ctversion, 4,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
22599 PyOS_snprintf(rtversion, 4,
"%s", Py_GetVersion());
22600 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
22602 PyOS_snprintf(message,
sizeof(message),
22603 "compiletime version %s of module '%.100s' " 22604 "does not match runtime version %s",
22605 ctversion, __Pyx_MODULE_NAME, rtversion);
22606 return PyErr_WarnEx(NULL, message, 1);
22611 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
22613 #if PY_MAJOR_VERSION < 3 22614 if (t->is_unicode) {
22615 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
22616 }
else if (t->intern) {
22617 *t->p = PyString_InternFromString(t->s);
22619 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
22622 if (t->is_unicode | t->is_str) {
22624 *t->p = PyUnicode_InternFromString(t->s);
22625 }
else if (t->encoding) {
22626 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
22628 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
22631 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
22641 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
22642 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
22644 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject* o) {
22646 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
22648 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
22649 #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) 22651 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
22652 __Pyx_sys_getdefaultencoding_not_ascii &&
22654 PyUnicode_Check(o)) {
22655 #if PY_VERSION_HEX < 0x03030000 22657 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
22658 if (!defenc)
return NULL;
22659 defenc_c = PyBytes_AS_STRING(defenc);
22660 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 22662 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
22664 for (c = defenc_c; c < end; c++) {
22665 if ((
unsigned char) (*c) >= 128) {
22666 PyUnicode_AsASCIIString(o);
22672 *length = PyBytes_GET_SIZE(defenc);
22675 if (__Pyx_PyUnicode_READY(o) == -1)
return NULL;
22676 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 22677 if (PyUnicode_IS_ASCII(o)) {
22678 *length = PyUnicode_GET_LENGTH(o);
22679 return PyUnicode_AsUTF8(o);
22681 PyUnicode_AsASCIIString(o);
22685 return PyUnicode_AsUTF8AndSize(o, length);
22690 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) 22691 if (PyByteArray_Check(o)) {
22692 *length = PyByteArray_GET_SIZE(o);
22693 return PyByteArray_AS_STRING(o);
22698 int r = PyBytes_AsStringAndSize(o, &result, length);
22699 if (unlikely(r < 0)) {
22706 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
22707 int is_true = x == Py_True;
22708 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
22709 else return PyObject_IsTrue(x);
22711 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
22712 PyNumberMethods *m;
22713 const char *name = NULL;
22714 PyObject *res = NULL;
22715 #if PY_MAJOR_VERSION < 3 22716 if (PyInt_Check(x) || PyLong_Check(x))
22718 if (PyLong_Check(x))
22720 return __Pyx_NewRef(x);
22721 m = Py_TYPE(x)->tp_as_number;
22722 #if PY_MAJOR_VERSION < 3 22723 if (m && m->nb_int) {
22725 res = PyNumber_Int(x);
22727 else if (m && m->nb_long) {
22729 res = PyNumber_Long(x);
22732 if (m && m->nb_int) {
22734 res = PyNumber_Long(x);
22738 #if PY_MAJOR_VERSION < 3 22739 if (!PyInt_Check(res) && !PyLong_Check(res)) {
22741 if (!PyLong_Check(res)) {
22743 PyErr_Format(PyExc_TypeError,
22744 "__%.4s__ returned non-%.4s (type %.200s)",
22745 name, name, Py_TYPE(res)->tp_name);
22750 else if (!PyErr_Occurred()) {
22751 PyErr_SetString(PyExc_TypeError,
22752 "an integer is required");
22756 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
22759 #if PY_MAJOR_VERSION < 3 22760 if (likely(PyInt_CheckExact(b))) {
22761 if (
sizeof(Py_ssize_t) >=
sizeof(
long))
22762 return PyInt_AS_LONG(b);
22764 return PyInt_AsSsize_t(x);
22767 if (likely(PyLong_CheckExact(b))) {
22768 #if CYTHON_USE_PYLONG_INTERNALS 22769 const digit* digits = ((PyLongObject*)b)->ob_digit;
22770 const Py_ssize_t size = Py_SIZE(b);
22771 if (likely(__Pyx_sst_abs(size) <= 1)) {
22772 ival = likely(size) ? digits[0] : 0;
22773 if (size == -1) ival = -ival;
22778 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
22779 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
22783 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
22784 return -(Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
22788 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
22789 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
22793 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
22794 return -(Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
22798 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
22799 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]));
22803 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
22804 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]));
22810 return PyLong_AsSsize_t(b);
22812 x = PyNumber_Index(b);
22814 ival = PyInt_AsSsize_t(x);
22818 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
22819 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)].