3 #define PY_SSIZE_T_CLEAN
4 #ifndef CYTHON_USE_PYLONG_INTERNALS
5 #ifdef PYLONG_BITS_IN_DIGIT
6 #define CYTHON_USE_PYLONG_INTERNALS 0
9 #ifdef PYLONG_BITS_IN_DIGIT
10 #define CYTHON_USE_PYLONG_INTERNALS 1
12 #define CYTHON_USE_PYLONG_INTERNALS 0
18 #error Python headers needed to compile C extensions, please install development version of Python.
19 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
20 #error Cython requires Python 2.6+ or Python 3.2+.
22 #define CYTHON_ABI "0_21"
25 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
27 #if !defined(WIN32) && !defined(MS_WINDOWS)
39 #define DL_IMPORT(t) t
42 #define DL_EXPORT(t) t
45 #define PY_LONG_LONG LONG_LONG
48 #define Py_HUGE_VAL HUGE_VAL
51 #define CYTHON_COMPILING_IN_PYPY 1
52 #define CYTHON_COMPILING_IN_CPYTHON 0
54 #define CYTHON_COMPILING_IN_PYPY 0
55 #define CYTHON_COMPILING_IN_CPYTHON 1
57 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
58 #define Py_OptimizeFlag 0
60 #define __PYX_BUILD_PY_SSIZE_T "n"
61 #define CYTHON_FORMAT_SSIZE_T "z"
62 #if PY_MAJOR_VERSION < 3
63 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
64 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
65 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
66 #define __Pyx_DefaultClassType PyClass_Type
68 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
69 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
70 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
71 #define __Pyx_DefaultClassType PyType_Type
73 #if PY_MAJOR_VERSION >= 3
74 #define Py_TPFLAGS_CHECKTYPES 0
75 #define Py_TPFLAGS_HAVE_INDEX 0
77 #if PY_MAJOR_VERSION >= 3
78 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
80 #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
81 #define Py_TPFLAGS_HAVE_FINALIZE 0
83 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
84 #define CYTHON_PEP393_ENABLED 1
85 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \
86 0 : _PyUnicode_Ready((PyObject *)(op)))
87 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
88 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
89 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
90 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
91 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
93 #define CYTHON_PEP393_ENABLED 0
94 #define __Pyx_PyUnicode_READY(op) (0)
95 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
96 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
97 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
98 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
99 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
101 #if CYTHON_COMPILING_IN_PYPY
102 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
103 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
105 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
106 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
107 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
109 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
110 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
111 #if PY_MAJOR_VERSION >= 3
112 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
114 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
116 #if PY_MAJOR_VERSION >= 3
117 #define PyBaseString_Type PyUnicode_Type
118 #define PyStringObject PyUnicodeObject
119 #define PyString_Type PyUnicode_Type
120 #define PyString_Check PyUnicode_Check
121 #define PyString_CheckExact PyUnicode_CheckExact
123 #if PY_MAJOR_VERSION >= 3
124 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
125 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
127 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
128 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
130 #ifndef PySet_CheckExact
131 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
133 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
134 #if PY_MAJOR_VERSION >= 3
135 #define PyIntObject PyLongObject
136 #define PyInt_Type PyLong_Type
137 #define PyInt_Check(op) PyLong_Check(op)
138 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
139 #define PyInt_FromString PyLong_FromString
140 #define PyInt_FromUnicode PyLong_FromUnicode
141 #define PyInt_FromLong PyLong_FromLong
142 #define PyInt_FromSize_t PyLong_FromSize_t
143 #define PyInt_FromSsize_t PyLong_FromSsize_t
144 #define PyInt_AsLong PyLong_AsLong
145 #define PyInt_AS_LONG PyLong_AS_LONG
146 #define PyInt_AsSsize_t PyLong_AsSsize_t
147 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
148 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
149 #define PyNumber_Int PyNumber_Long
151 #if PY_MAJOR_VERSION >= 3
152 #define PyBoolObject PyLongObject
154 #if PY_VERSION_HEX < 0x030200A4
155 typedef long Py_hash_t;
156 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
157 #define __Pyx_PyInt_AsHash_t PyInt_AsLong
159 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
160 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
162 #if PY_MAJOR_VERSION >= 3
163 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
165 #ifndef CYTHON_INLINE
166 #if defined(__GNUC__)
167 #define CYTHON_INLINE __inline__
168 #elif defined(_MSC_VER)
169 #define CYTHON_INLINE __inline
170 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
171 #define CYTHON_INLINE inline
173 #define CYTHON_INLINE
176 #ifndef CYTHON_RESTRICT
177 #if defined(__GNUC__)
178 #define CYTHON_RESTRICT __restrict__
179 #elif defined(_MSC_VER) && _MSC_VER >= 1400
180 #define CYTHON_RESTRICT __restrict
181 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
182 #define CYTHON_RESTRICT restrict
184 #define CYTHON_RESTRICT
188 #define __PYX_NAN() ((float) NAN)
190 static CYTHON_INLINE
float __PYX_NAN() {
195 memset(&value, 0xFF,
sizeof(value));
201 void __Pyx_call_destructor(T* x) {
207 #if PY_MAJOR_VERSION >= 3
208 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
209 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
211 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
212 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
215 #ifndef __PYX_EXTERN_C
217 #define __PYX_EXTERN_C extern "C"
219 #define __PYX_EXTERN_C extern
223 #if defined(WIN32) || defined(MS_WINDOWS)
224 #define _USE_MATH_DEFINES
227 #define __PYX_HAVE__PyClical
228 #define __PYX_HAVE_API__PyClical
239 #ifdef PYREX_WITHOUT_ASSERTIONS
240 #define CYTHON_WITHOUT_ASSERTIONS
243 #ifndef CYTHON_UNUSED
244 # if defined(__GNUC__)
245 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
246 # define CYTHON_UNUSED __attribute__ ((__unused__))
248 # define CYTHON_UNUSED
250 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
251 # define CYTHON_UNUSED __attribute__ ((__unused__))
253 # define CYTHON_UNUSED
256 typedef struct {PyObject **p;
char *s;
const Py_ssize_t n;
const char* encoding;
257 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
259 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
260 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
261 #define __PYX_DEFAULT_STRING_ENCODING ""
262 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
263 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
264 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \
265 (sizeof(type) < sizeof(Py_ssize_t)) || \
266 (sizeof(type) > sizeof(Py_ssize_t) && \
267 likely(v < (type)PY_SSIZE_T_MAX || \
268 v == (type)PY_SSIZE_T_MAX) && \
269 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \
270 v == (type)PY_SSIZE_T_MIN))) || \
271 (sizeof(type) == sizeof(Py_ssize_t) && \
272 (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \
273 v == (type)PY_SSIZE_T_MAX))) )
274 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject*);
275 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
276 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
277 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
278 #define __Pyx_PyBytes_FromString PyBytes_FromString
279 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
280 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
281 #if PY_MAJOR_VERSION < 3
282 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
283 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
285 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
286 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
288 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
289 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
290 #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s)
291 #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s)
292 #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s)
293 #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s)
294 #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
295 #if PY_MAJOR_VERSION < 3
296 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *u)
298 const Py_UNICODE *u_end = u;
300 return (
size_t)(u_end - u - 1);
303 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
305 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
306 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
307 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
308 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
309 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
310 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
311 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
312 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
313 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
314 #if CYTHON_COMPILING_IN_CPYTHON
315 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
317 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
319 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
320 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
321 static int __Pyx_sys_getdefaultencoding_not_ascii;
322 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
324 PyObject* default_encoding = NULL;
325 PyObject* ascii_chars_u = NULL;
326 PyObject* ascii_chars_b = NULL;
327 const char* default_encoding_c;
328 sys = PyImport_ImportModule(
"sys");
330 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
332 if (!default_encoding)
goto bad;
333 default_encoding_c = PyBytes_AsString(default_encoding);
334 if (!default_encoding_c)
goto bad;
335 if (strcmp(default_encoding_c,
"ascii") == 0) {
336 __Pyx_sys_getdefaultencoding_not_ascii = 0;
338 char ascii_chars[128];
340 for (c = 0; c < 128; c++) {
343 __Pyx_sys_getdefaultencoding_not_ascii = 1;
344 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
345 if (!ascii_chars_u)
goto bad;
346 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
347 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
350 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
354 Py_DECREF(ascii_chars_u);
355 Py_DECREF(ascii_chars_b);
357 Py_DECREF(default_encoding);
360 Py_XDECREF(default_encoding);
361 Py_XDECREF(ascii_chars_u);
362 Py_XDECREF(ascii_chars_b);
366 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
367 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
369 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
370 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
371 static char* __PYX_DEFAULT_STRING_ENCODING;
372 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
374 PyObject* default_encoding = NULL;
375 char* default_encoding_c;
376 sys = PyImport_ImportModule(
"sys");
378 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
380 if (!default_encoding)
goto bad;
381 default_encoding_c = PyBytes_AsString(default_encoding);
382 if (!default_encoding_c)
goto bad;
383 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c));
384 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
385 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
386 Py_DECREF(default_encoding);
389 Py_XDECREF(default_encoding);
397 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
398 #define likely(x) __builtin_expect(!!(x), 1)
399 #define unlikely(x) __builtin_expect(!!(x), 0)
401 #define likely(x) (x)
402 #define unlikely(x) (x)
405 static PyObject *__pyx_m;
406 static PyObject *__pyx_d;
407 static PyObject *__pyx_b;
408 static PyObject *__pyx_empty_tuple;
409 static PyObject *__pyx_empty_bytes;
410 static int __pyx_lineno;
411 static int __pyx_clineno = 0;
412 static const char * __pyx_cfilenm= __FILE__;
413 static const char *__pyx_filename;
416 static const char *__pyx_f[] = {
421 struct __pyx_obj_8PyClical_index_set;
422 struct __pyx_obj_8PyClical_clifford;
423 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
424 struct __pyx_opt_args_8PyClical_sqrt;
425 struct __pyx_opt_args_8PyClical_log;
426 struct __pyx_opt_args_8PyClical_cos;
427 struct __pyx_opt_args_8PyClical_acos;
428 struct __pyx_opt_args_8PyClical_acosh;
429 struct __pyx_opt_args_8PyClical_sin;
430 struct __pyx_opt_args_8PyClical_asin;
431 struct __pyx_opt_args_8PyClical_asinh;
432 struct __pyx_opt_args_8PyClical_tan;
433 struct __pyx_opt_args_8PyClical_atan;
434 struct __pyx_opt_args_8PyClical_atanh;
435 struct __pyx_opt_args_8PyClical_random_clifford;
444 struct __pyx_opt_args_8PyClical_sqrt {
456 struct __pyx_opt_args_8PyClical_log {
468 struct __pyx_opt_args_8PyClical_cos {
480 struct __pyx_opt_args_8PyClical_acos {
492 struct __pyx_opt_args_8PyClical_acosh {
504 struct __pyx_opt_args_8PyClical_sin {
516 struct __pyx_opt_args_8PyClical_asin {
528 struct __pyx_opt_args_8PyClical_asinh {
540 struct __pyx_opt_args_8PyClical_tan {
552 struct __pyx_opt_args_8PyClical_atan {
564 struct __pyx_opt_args_8PyClical_atanh {
576 struct __pyx_opt_args_8PyClical_random_clifford {
588 struct __pyx_obj_8PyClical_index_set {
590 struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
602 struct __pyx_obj_8PyClical_clifford {
604 struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
616 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
618 PyObject *__pyx_v_idx;
619 struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
621 Py_ssize_t __pyx_t_1;
622 PyObject *(*__pyx_t_2)(PyObject *);
635 struct __pyx_vtabstruct_8PyClical_index_set {
636 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
637 IndexSet (*unwrap)(
struct __pyx_obj_8PyClical_index_set *);
638 PyObject *(*copy)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch);
640 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
641 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
642 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *);
653 struct __pyx_vtabstruct_8PyClical_clifford {
654 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
655 Clifford (*unwrap)(
struct __pyx_obj_8PyClical_clifford *);
656 PyObject *(*copy)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch);
658 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
659 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
660 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *);
661 #ifndef CYTHON_REFNANNY
662 #define CYTHON_REFNANNY 0
666 void (*INCREF)(
void*, PyObject*, int);
667 void (*DECREF)(
void*, PyObject*, int);
668 void (*GOTREF)(
void*, PyObject*, int);
669 void (*GIVEREF)(
void*, PyObject*, int);
670 void* (*SetupContext)(
const char*, int,
const char*);
671 void (*FinishContext)(
void**);
672 } __Pyx_RefNannyAPIStruct;
673 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
674 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
675 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
677 #define __Pyx_RefNannySetupContext(name, acquire_gil) \
679 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
680 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
681 PyGILState_Release(__pyx_gilstate_save); \
683 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
686 #define __Pyx_RefNannySetupContext(name, acquire_gil) \
687 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
689 #define __Pyx_RefNannyFinishContext() \
690 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
691 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
692 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
693 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
694 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
695 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
696 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
697 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
698 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
700 #define __Pyx_RefNannyDeclarations
701 #define __Pyx_RefNannySetupContext(name, acquire_gil)
702 #define __Pyx_RefNannyFinishContext()
703 #define __Pyx_INCREF(r) Py_INCREF(r)
704 #define __Pyx_DECREF(r) Py_DECREF(r)
705 #define __Pyx_GOTREF(r)
706 #define __Pyx_GIVEREF(r)
707 #define __Pyx_XINCREF(r) Py_XINCREF(r)
708 #define __Pyx_XDECREF(r) Py_XDECREF(r)
709 #define __Pyx_XGOTREF(r)
710 #define __Pyx_XGIVEREF(r)
712 #define __Pyx_XDECREF_SET(r, v) do { \
713 PyObject *tmp = (PyObject *) r; \
714 r = v; __Pyx_XDECREF(tmp); \
716 #define __Pyx_DECREF_SET(r, v) do { \
717 PyObject *tmp = (PyObject *) r; \
718 r = v; __Pyx_DECREF(tmp); \
720 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
721 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
723 #if CYTHON_COMPILING_IN_CPYTHON
724 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
725 PyTypeObject* tp = Py_TYPE(obj);
726 if (likely(tp->tp_getattro))
727 return tp->tp_getattro(obj, attr_name);
728 #if PY_MAJOR_VERSION < 3
729 if (likely(tp->tp_getattr))
730 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
732 return PyObject_GetAttr(obj, attr_name);
735 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
738 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
740 #if CYTHON_COMPILING_IN_CPYTHON
741 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
743 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
746 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
747 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
749 static void __Pyx_WriteUnraisable(
const char *name,
int clineno,
750 int lineno,
const char *filename,
753 #if CYTHON_COMPILING_IN_CPYTHON
754 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
757 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
759 #if CYTHON_COMPILING_IN_CPYTHON
760 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
762 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
765 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
767 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
768 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
769 const char* function_name);
771 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
772 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
774 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
776 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
777 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
779 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
781 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
783 static CYTHON_INLINE
int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq,
int eq) {
784 int result = PySequence_Contains(seq, item);
785 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
788 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
789 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
790 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
791 (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
792 __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
793 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
794 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
795 int is_list,
int wraparound,
int boundscheck);
797 static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
798 const char *name,
int exact);
802 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
804 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
806 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
808 #if PY_MAJOR_VERSION >= 3
809 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
811 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
816 PyCodeObject* code_object;
817 } __Pyx_CodeObjectCacheEntry;
818 struct __Pyx_CodeObjectCache {
821 __Pyx_CodeObjectCacheEntry* entries;
823 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
824 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
825 static PyCodeObject *__pyx_find_code_object(
int code_line);
826 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
828 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
829 int py_line,
const char *filename);
831 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
833 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
835 #ifndef __Pyx_CppExn2PyErr
840 static void __Pyx_CppExn2PyErr() {
842 if (PyErr_Occurred())
846 }
catch (
const std::bad_alloc& exn) {
847 PyErr_SetString(PyExc_MemoryError, exn.what());
848 }
catch (
const std::bad_cast& exn) {
849 PyErr_SetString(PyExc_TypeError, exn.what());
850 }
catch (
const std::domain_error& exn) {
851 PyErr_SetString(PyExc_ValueError, exn.what());
852 }
catch (
const std::invalid_argument& exn) {
853 PyErr_SetString(PyExc_ValueError, exn.what());
854 }
catch (
const std::ios_base::failure& exn) {
855 PyErr_SetString(PyExc_IOError, exn.what());
856 }
catch (
const std::out_of_range& exn) {
857 PyErr_SetString(PyExc_IndexError, exn.what());
858 }
catch (
const std::overflow_error& exn) {
859 PyErr_SetString(PyExc_OverflowError, exn.what());
860 }
catch (
const std::range_error& exn) {
861 PyErr_SetString(PyExc_ArithmeticError, exn.what());
862 }
catch (
const std::underflow_error& exn) {
863 PyErr_SetString(PyExc_ArithmeticError, exn.what());
864 }
catch (
const std::exception& exn) {
865 PyErr_SetString(PyExc_RuntimeError, exn.what());
869 PyErr_SetString(PyExc_RuntimeError,
"Unknown exception");
874 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
876 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
878 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
880 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
882 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
884 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
886 #define __Pyx_Generator_USED
887 #include <structmember.h>
888 #include <frameobject.h>
889 typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
892 __pyx_generator_body_t body;
896 PyObject *exc_traceback;
897 PyObject *gi_weakreflist;
901 PyObject *gi_qualname;
904 } __pyx_GeneratorObject;
905 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
906 PyObject *closure, PyObject *name, PyObject *qualname);
907 static int __pyx_Generator_init(
void);
908 static int __Pyx_Generator_clear(PyObject*
self);
909 #if 1 || PY_VERSION_HEX < 0x030300B0
910 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
912 #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
915 static int __Pyx_check_binary_version(
void);
917 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
919 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other);
920 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
921 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch);
922 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other);
923 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
924 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch);
931 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
932 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
933 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
934 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *);
935 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *,
int __pyx_skip_dispatch);
936 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *,
int __pyx_skip_dispatch);
937 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *,
int __pyx_skip_dispatch);
938 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *);
939 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *);
940 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *,
int __pyx_skip_dispatch);
941 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *,
int __pyx_skip_dispatch);
942 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *,
int __pyx_skip_dispatch);
943 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *,
int __pyx_skip_dispatch);
944 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *,
int __pyx_skip_dispatch);
945 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *,
int __pyx_skip_dispatch);
946 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *,
int __pyx_skip_dispatch);
947 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *,
int __pyx_skip_dispatch);
948 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *,
int __pyx_skip_dispatch);
949 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *,
int __pyx_skip_dispatch);
950 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *,
int __pyx_skip_dispatch);
951 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *,
int __pyx_skip_dispatch);
952 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *,
int __pyx_skip_dispatch);
953 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *,
int __pyx_skip_dispatch);
954 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
955 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
956 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *,
int __pyx_skip_dispatch);
957 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args);
958 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *,
int __pyx_skip_dispatch);
959 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_log *__pyx_optional_args);
960 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args);
961 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args);
962 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *,
int __pyx_skip_dispatch);
963 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args);
964 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args);
965 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args);
966 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *,
int __pyx_skip_dispatch);
967 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args);
968 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args);
969 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args);
970 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *,
int __pyx_skip_dispatch);
971 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args);
972 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);
973 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *,
int __pyx_skip_dispatch);
974 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *,
int __pyx_skip_dispatch);
975 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *,
int __pyx_skip_dispatch);
976 #define __Pyx_MODULE_NAME "PyClical"
977 int __pyx_module_is_main_PyClical = 0;
980 static PyObject *__pyx_builtin_IndexError;
981 static PyObject *__pyx_builtin_RuntimeError;
982 static PyObject *__pyx_builtin_TypeError;
983 static PyObject *__pyx_builtin_ValueError;
984 static PyObject *__pyx_builtin_NotImplemented;
985 static PyObject *__pyx_builtin_range;
986 static PyObject *__pyx_builtin_xrange;
987 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
988 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other);
989 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
990 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
991 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);
992 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
993 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
994 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
995 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
996 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
997 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
998 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
999 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1000 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1001 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1002 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1003 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1004 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1005 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1006 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1007 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1008 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1009 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1010 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1011 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1012 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1013 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1014 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1015 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1016 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1017 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt);
1018 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1019 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x);
1020 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1021 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1022 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1023 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1024 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1025 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1026 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1027 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1028 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1029 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1030 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1031 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1032 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1033 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1034 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1035 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1036 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1037 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1038 #if PY_MAJOR_VERSION < 3
1039 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1041 #if PY_MAJOR_VERSION < 3
1042 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1044 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1045 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1046 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1047 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy);
1048 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1049 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1050 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade);
1051 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1052 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1053 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1054 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1055 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm);
1056 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1057 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1058 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1059 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1060 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1061 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1062 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1063 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit);
1064 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1065 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1066 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1067 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1068 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1069 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1070 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1071 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1072 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1073 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1074 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1075 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1076 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1077 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1078 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1079 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1080 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1081 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1082 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1083 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1084 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1085 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1086 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1087 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1088 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1089 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1090 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1091 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1092 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1093 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1094 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1095 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1096 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1097 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1098 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1099 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1100 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1101 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);
1102 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1103 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1104 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1105 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1106 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q);
1107 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self);
1108 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k);
1109 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k);
1110 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k);
1111 static char __pyx_k_[] =
".";
1112 static char __pyx_k_e[] =
"e";
1113 static char __pyx_k_i[] =
"i";
1114 static char __pyx_k_m[] =
"m";
1115 static char __pyx_k_p[] =
"p";
1116 static char __pyx_k_q[] =
"q";
1117 static char __pyx_k__2[] =
" ";
1118 static char __pyx_k__3[] =
":";
1119 static char __pyx_k__4[] =
"\n\t";
1120 static char __pyx_k__5[] =
" (";
1121 static char __pyx_k__6[] =
", ";
1122 static char __pyx_k__7[] =
").";
1123 static char __pyx_k_cl[] =
"cl";
1124 static char __pyx_k_pi[] =
"pi";
1125 static char __pyx_k_cos[] =
"cos";
1126 static char __pyx_k_exp[] =
"exp";
1127 static char __pyx_k_frm[] =
"frm";
1128 static char __pyx_k_inv[] =
"inv";
1129 static char __pyx_k_ist[] =
"ist";
1130 static char __pyx_k_ixt[] =
"ixt";
1131 static char __pyx_k_lhs[] =
"lhs";
1132 static char __pyx_k_log[] =
"log";
1133 static char __pyx_k_max[] =
"max";
1134 static char __pyx_k_min[] =
"min";
1135 static char __pyx_k_obj[] =
"obj";
1136 static char __pyx_k_odd[] =
"odd";
1137 static char __pyx_k_pow[] =
"pow";
1138 static char __pyx_k_rhs[] =
"rhs";
1139 static char __pyx_k_sin[] =
"sin";
1140 static char __pyx_k_tan[] =
"tan";
1141 static char __pyx_k_tau[] =
"tau";
1142 static char __pyx_k_Real[] =
"Real";
1143 static char __pyx_k_acos[] =
"acos";
1144 static char __pyx_k_args[] =
"args";
1145 static char __pyx_k_asin[] =
"asin";
1146 static char __pyx_k_atan[] =
"atan";
1147 static char __pyx_k_conj[] =
"conj";
1148 static char __pyx_k_copy[] =
"copy";
1149 static char __pyx_k_cosh[] =
"cosh";
1150 static char __pyx_k_even[] =
"even";
1151 static char __pyx_k_fill[] =
"fill";
1152 static char __pyx_k_from[] =
" from ";
1153 static char __pyx_k_iter[] =
"__iter__";
1154 static char __pyx_k_main[] =
"__main__";
1155 static char __pyx_k_math[] =
"math";
1156 static char __pyx_k_name[] =
"__name__";
1157 static char __pyx_k_norm[] =
"norm";
1158 static char __pyx_k_pure[] =
"pure";
1159 static char __pyx_k_quad[] =
"quad";
1160 static char __pyx_k_send[] =
"send";
1161 static char __pyx_k_sinh[] =
"sinh";
1162 static char __pyx_k_sqrt[] =
"sqrt";
1163 static char __pyx_k_tanh[] =
"tanh";
1164 static char __pyx_k_test[] =
"_test";
1165 static char __pyx_k_0_8_2[] =
"0.8.2";
1166 static char __pyx_k_acosh[] =
"acosh";
1167 static char __pyx_k_asinh[] =
"asinh";
1168 static char __pyx_k_atanh[] =
"atanh";
1169 static char __pyx_k_close[] =
"close";
1170 static char __pyx_k_grade[] =
"grade";
1171 static char __pyx_k_istpq[] =
"istpq";
1172 static char __pyx_k_nbar3[] =
"nbar3";
1173 static char __pyx_k_ninf3[] =
"ninf3";
1174 static char __pyx_k_other[] =
"other";
1175 static char __pyx_k_range[] =
"range";
1176 static char __pyx_k_throw[] =
"throw";
1177 static char __pyx_k_using[] =
" using (";
1178 static char __pyx_k_value[] =
" value ";
1179 static char __pyx_k_import[] =
"__import__";
1180 static char __pyx_k_scalar[] =
"scalar";
1181 static char __pyx_k_test_2[] =
"__test__";
1182 static char __pyx_k_xrange[] =
"xrange";
1183 static char __pyx_k_doctest[] =
"doctest";
1184 static char __pyx_k_invalid[] =
" invalid ";
1185 static char __pyx_k_numbers[] =
"numbers";
1186 static char __pyx_k_reverse[] =
"reverse";
1187 static char __pyx_k_testmod[] =
"testmod";
1188 static char __pyx_k_version[] =
"__version__";
1189 static char __pyx_k_Integral[] =
"Integral";
1190 static char __pyx_k_PyClical[] =
"PyClical";
1191 static char __pyx_k_Sequence[] =
"Sequence";
1192 static char __pyx_k_as_frame[] =
" as frame:\n\t";
1193 static char __pyx_k_involute[] =
"involute";
1194 static char __pyx_k_to_frame[] =
" to frame ";
1195 static char __pyx_k_TypeError[] =
"TypeError";
1196 static char __pyx_k_outer_pow[] =
"outer_pow";
1197 static char __pyx_k_IndexError[] =
"IndexError";
1198 static char __pyx_k_ValueError[] =
"ValueError";
1199 static char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
1200 static char __pyx_k_collections[] =
"collections";
1201 static char __pyx_k_e_line_1887[] =
"e (line 1887)";
1202 static char __pyx_k_RuntimeError[] =
"RuntimeError";
1203 static char __pyx_k_abs_line_1473[] =
"abs (line 1473)";
1204 static char __pyx_k_cos_line_1602[] =
"cos (line 1602)";
1205 static char __pyx_k_exp_line_1565[] =
"exp (line 1565)";
1206 static char __pyx_k_inv_line_1329[] =
"inv (line 1329)";
1207 static char __pyx_k_log_line_1579[] =
"log (line 1579)";
1208 static char __pyx_k_odd_line_1397[] =
"odd (line 1397)";
1209 static char __pyx_k_pow_line_1494[] =
"pow (line 1494)";
1210 static char __pyx_k_sin_line_1679[] =
"sin (line 1679)";
1211 static char __pyx_k_tan_line_1752[] =
"tan (line 1752)";
1212 static char __pyx_k_using_invalid[] =
" using invalid ";
1213 static char __pyx_k_Cannot_reframe[] =
"Cannot reframe";
1214 static char __pyx_k_NotImplemented[] =
"NotImplemented";
1215 static char __pyx_k_Not_applicable[] =
"Not applicable.";
1216 static char __pyx_k_acos_line_1619[] =
"acos (line 1619)";
1217 static char __pyx_k_agc3_line_1844[] =
"agc3 (line 1844)";
1218 static char __pyx_k_asin_line_1698[] =
"asin (line 1698)";
1219 static char __pyx_k_atan_line_1769[] =
"atan (line 1769)";
1220 static char __pyx_k_cga3_line_1824[] =
"cga3 (line 1824)";
1221 static char __pyx_k_conj_line_1436[] =
"conj (line 1436)";
1222 static char __pyx_k_cosh_line_1640[] =
"cosh (line 1640)";
1223 static char __pyx_k_even_line_1388[] =
"even (line 1388)";
1224 static char __pyx_k_imag_line_1366[] =
"imag (line 1366)";
1225 static char __pyx_k_invalid_string[] =
" invalid string ";
1226 static char __pyx_k_norm_line_1462[] =
"norm (line 1462)";
1227 static char __pyx_k_pure_line_1377[] =
"pure (line 1377)";
1228 static char __pyx_k_quad_line_1451[] =
"quad (line 1451)";
1229 static char __pyx_k_real_line_1355[] =
"real (line 1355)";
1230 static char __pyx_k_sinh_line_1719[] =
"sinh (line 1719)";
1231 static char __pyx_k_sqrt_line_1542[] =
"sqrt (line 1542)";
1232 static char __pyx_k_tanh_line_1786[] =
"tanh (line 1786)";
1233 static char __pyx_k_acosh_line_1656[] =
"acosh (line 1656)";
1234 static char __pyx_k_asinh_line_1733[] =
"asinh (line 1733)";
1235 static char __pyx_k_atanh_line_1798[] =
"atanh (line 1798)";
1236 static char __pyx_k_istpq_line_1900[] =
"istpq (line 1900)";
1237 static char __pyx_k_compare_line_490[] =
"compare (line 490)";
1238 static char __pyx_k_index_set___iter[] =
"index_set.__iter__";
1239 static char __pyx_k_max_pos_line_511[] =
"max_pos (line 511)";
1240 static char __pyx_k_min_neg_line_502[] =
"min_neg (line 502)";
1241 static char __pyx_k_scalar_line_1344[] =
"scalar (line 1344)";
1242 static char __pyx_k_cga3std_line_1833[] =
"cga3std (line 1833)";
1243 static char __pyx_k_max_abs_line_1482[] =
"max_abs (line 1482)";
1244 static char __pyx_k_reverse_line_1421[] =
"reverse (line 1421)";
1245 static char __pyx_k_involute_line_1406[] =
"involute (line 1406)";
1246 static char __pyx_k_outer_pow_line_1518[] =
"outer_pow (line 1518)";
1247 static char __pyx_k_clifford_inv_line_925[] =
"clifford.inv (line 925)";
1248 static char __pyx_k_clifford_pow_line_979[] =
"clifford.pow (line 979)";
1249 static char __pyx_k_clifford_abs_line_1174[] =
"clifford.abs (line 1174)";
1250 static char __pyx_k_clifford_copy_line_554[] =
"clifford.copy (line 554)";
1251 static char __pyx_k_clifford_odd_line_1069[] =
"clifford.odd (line 1069)";
1252 static char __pyx_k_complexifier_line_1527[] =
"complexifier (line 1527)";
1253 static char __pyx_k_index_set_copy_line_64[] =
"index_set.copy (line 64)";
1254 static char __pyx_k_index_set_max_line_349[] =
"index_set.max (line 349)";
1255 static char __pyx_k_index_set_min_line_340[] =
"index_set.min (line 340)";
1256 static char __pyx_k_clifford_conj_line_1137[] =
"clifford.conj (line 1137)";
1257 static char __pyx_k_clifford_even_line_1060[] =
"clifford.even (line 1060)";
1258 static char __pyx_k_clifford_norm_line_1163[] =
"clifford.norm (line 1163)";
1259 static char __pyx_k_clifford_pure_line_1049[] =
"clifford.pure (line 1049)";
1260 static char __pyx_k_clifford_quad_line_1152[] =
"clifford.quad (line 1152)";
1261 static char __pyx_k_Unary_print_clifford_1_1[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1262 static char __pyx_k_clifford___or___line_938[] =
"clifford.__or__ (line 938)";
1263 static char __pyx_k_clifford_frame_line_1214[] =
"clifford.frame (line 1214)";
1264 static char __pyx_k_clifford_hidden_doctests[] =
"clifford_hidden_doctests";
1265 static char __pyx_k_clifford_isnan_line_1205[] =
"clifford.isnan (line 1205)";
1266 static char __pyx_k_index_set_count_line_313[] =
"index_set.count (line 313)";
1267 static char __pyx_k_clifford___add___line_739[] =
"clifford.__add__ (line 739)";
1268 static char __pyx_k_clifford___and___line_835[] =
"clifford.__and__ (line 835)";
1269 static char __pyx_k_clifford___div___line_895[] =
"clifford.__div__ (line 895)";
1270 static char __pyx_k_clifford___ior___line_949[] =
"clifford.__ior__ (line 949)";
1271 static char __pyx_k_clifford___mod___line_805[] =
"clifford.__mod__ (line 805)";
1272 static char __pyx_k_clifford___mul___line_779[] =
"clifford.__mul__ (line 779)";
1273 static char __pyx_k_clifford___neg___line_721[] =
"clifford.__neg__ (line 721)";
1274 static char __pyx_k_clifford___pos___line_730[] =
"clifford.__pos__ (line 730)";
1275 static char __pyx_k_clifford___pow___line_960[] =
"clifford.__pow__ (line 960)";
1276 static char __pyx_k_clifford___sub___line_759[] =
"clifford.__sub__ (line 759)";
1277 static char __pyx_k_clifford___xor___line_865[] =
"clifford.__xor__ (line 865)";
1278 static char __pyx_k_clifford_reframe_line_648[] =
"clifford.reframe (line 648)";
1279 static char __pyx_k_clifford_scalar_line_1038[] =
"clifford.scalar (line 1038)";
1280 static char __pyx_k_index_set___or___line_291[] =
"index_set.__or__ (line 291)";
1281 static char __pyx_k_index_set_hidden_doctests[] =
"index_set_hidden_doctests";
1282 static char __pyx_k_random_clifford_line_1815[] =
"random_clifford (line 1815)";
1283 static char __pyx_k_Cannot_take_vector_part_of[] =
"Cannot take vector part of ";
1284 static char __pyx_k_Unary_print_clifford_1_1_2[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1285 static char __pyx_k_clifford___iadd___line_750[] =
"clifford.__iadd__ (line 750)";
1286 static char __pyx_k_clifford___iand___line_850[] =
"clifford.__iand__ (line 850)";
1287 static char __pyx_k_clifford___idiv___line_910[] =
"clifford.__idiv__ (line 910)";
1288 static char __pyx_k_clifford___imod___line_820[] =
"clifford.__imod__ (line 820)";
1289 static char __pyx_k_clifford___imul___line_792[] =
"clifford.__imul__ (line 792)";
1290 static char __pyx_k_clifford___isub___line_770[] =
"clifford.__isub__ (line 770)";
1291 static char __pyx_k_clifford___iter___line_637[] =
"clifford.__iter__ (line 637)";
1292 static char __pyx_k_clifford___ixor___line_880[] =
"clifford.__ixor__ (line 880)";
1293 static char __pyx_k_clifford___str___line_1234[] =
"clifford.__str__ (line 1234)";
1294 static char __pyx_k_clifford_max_abs_line_1183[] =
"clifford.max_abs (line 1183)";
1295 static char __pyx_k_clifford_reverse_line_1122[] =
"clifford.reverse (line 1122)";
1296 static char __pyx_k_index_set___and___line_269[] =
"index_set.__and__ (line 269)";
1297 static char __pyx_k_index_set___ior___line_302[] =
"index_set.__ior__ (line 302)";
1298 static char __pyx_k_index_set___str___line_393[] =
"index_set.__str__ (line 393)";
1299 static char __pyx_k_index_set___xor___line_247[] =
"index_set.__xor__ (line 247)";
1300 static char __pyx_k_clifford___call___line_1019[] =
"clifford.__call__ (line 1019)";
1301 static char __pyx_k_clifford___repr___line_1225[] =
"clifford.__repr__ (line 1225)";
1302 static char __pyx_k_clifford_involute_line_1106[] =
"clifford.involute (line 1106)";
1303 static char __pyx_k_index_set___iand___line_280[] =
"index_set.__iand__ (line 280)";
1304 static char __pyx_k_index_set___iter___line_227[] =
"index_set.__iter__ (line 227)";
1305 static char __pyx_k_index_set___ixor___line_258[] =
"index_set.__ixor__ (line 258)";
1306 static char __pyx_k_index_set___repr___line_382[] =
"index_set.__repr__ (line 382)";
1307 static char __pyx_k_clifford_outer_pow_line_1003[] =
"clifford.outer_pow (line 1003)";
1308 static char __pyx_k_clifford_truncated_line_1194[] =
"clifford.truncated (line 1194)";
1309 static char __pyx_k_index_set_count_neg_line_322[] =
"index_set.count_neg (line 322)";
1310 static char __pyx_k_index_set_count_pos_line_331[] =
"index_set.count_pos (line 331)";
1311 static char __pyx_k_clifford___getitem___line_706[] =
"clifford.__getitem__ (line 706)";
1312 static char __pyx_k_index_set___invert___line_238[] =
"index_set.__invert__ (line 238)";
1313 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 ";
1314 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 ";
1315 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 ";
1316 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 ";
1317 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 ";
1318 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 ";
1319 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 ";
1320 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 ";
1321 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 ";
1322 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 ";
1323 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 ";
1324 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 ";
1325 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 ";
1326 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 ";
1327 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 ";
1328 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 ";
1329 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 ";
1330 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 ";
1331 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 ";
1332 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 ";
1333 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 ";
1334 static char __pyx_k_clifford_vector_part_line_1078[] =
"clifford.vector_part (line 1078)";
1335 static char __pyx_k_index_set___getitem___line_189[] =
"index_set.__getitem__ (line 189)";
1336 static char __pyx_k_index_set___setitem___line_177[] =
"index_set.__setitem__ (line 177)";
1337 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 ";
1338 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 ";
1339 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 ";
1340 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 ";
1341 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 ";
1342 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 ";
1343 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 ";
1344 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 ";
1345 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 ";
1346 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 ";
1347 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 ";
1348 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 ";
1349 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 ";
1350 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 ";
1351 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 ";
1352 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 ";
1353 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 ";
1354 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 ";
1355 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 ";
1356 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 ";
1357 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 ";
1358 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 ";
1359 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 ";
1360 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 ";
1361 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 ";
1362 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 ";
1363 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 ";
1364 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 ";
1365 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 ";
1366 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 ";
1367 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 ";
1368 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 ";
1369 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 ";
1370 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 ";
1371 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 ";
1372 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 ";
1373 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 ";
1374 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 ";
1375 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 ";
1376 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 ";
1377 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 ";
1378 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 ";
1379 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 ";
1380 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 ";
1381 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 ";
1382 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 ";
1383 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 ";
1384 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 ";
1385 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 ";
1386 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 ";
1387 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 ";
1388 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 ";
1389 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 ";
1390 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 ";
1391 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 ";
1392 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 ";
1393 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 ";
1394 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 ";
1395 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 ";
1396 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 ";
1397 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 ";
1398 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 ";
1399 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 ";
1400 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 ";
1401 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 ";
1402 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 ";
1403 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 ";
1404 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 ";
1405 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 ";
1406 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 ";
1407 static char __pyx_k_This_comparison_operator_is_not[] =
"This comparison operator is not implemented for ";
1408 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 ";
1409 static char __pyx_k_home_abuild_rpmbuild_BUILD_gluc[] =
"/home/abuild/rpmbuild/BUILD/glucat-0.8.2/pyclical/PyClical.pyx";
1410 static char __pyx_k_index_set_sign_of_mult_line_364[] =
"index_set.sign_of_mult (line 364)";
1411 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 ";
1412 static char __pyx_k_Cannot_initialize_clifford_objec[] =
"Cannot initialize clifford object from";
1413 static char __pyx_k_Cannot_initialize_index_set_obje[] =
"Cannot initialize index_set object from";
1414 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 ";
1415 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 ";
1416 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 ";
1417 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 ";
1418 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 ";
1419 static char __pyx_k_clifford_hidden_doctests_line_12[] =
"clifford_hidden_doctests (line 1243)";
1420 static char __pyx_k_index_set_hidden_doctests_line_4[] =
"index_set_hidden_doctests (line 404)";
1421 static char __pyx_k_index_set_sign_of_square_line_37[] =
"index_set.sign_of_square (line 373)";
1422 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 ";
1423 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 ";
1424 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 ";
1425 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 ";
1426 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 ";
1427 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 ";
1428 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 ";
1429 static PyObject *__pyx_kp_s_;
1430 static PyObject *__pyx_kp_s_0_8_2;
1431 static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1432 static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1433 static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1434 static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1435 static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1436 static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1437 static PyObject *__pyx_kp_s_Cannot_reframe;
1438 static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1439 static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1440 static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1441 static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1442 static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1443 static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1444 static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1445 static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1446 static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1447 static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1448 static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1449 static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1450 static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1451 static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1452 static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1453 static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1454 static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1455 static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1456 static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1457 static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1458 static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1459 static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1460 static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1461 static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1462 static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1463 static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1464 static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1465 static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1466 static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1467 static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1468 static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1469 static PyObject *__pyx_n_s_IndexError;
1470 static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1471 static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1472 static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1473 static PyObject *__pyx_n_s_Integral;
1474 static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1475 static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1476 static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1477 static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1478 static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1479 static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1480 static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1481 static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1482 static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1483 static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1484 static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1485 static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1486 static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1487 static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1488 static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1489 static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1490 static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1491 static PyObject *__pyx_n_s_NotImplemented;
1492 static PyObject *__pyx_kp_s_Not_applicable;
1493 static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1494 static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1495 static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1496 static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1497 static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1498 static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1499 static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1500 static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1501 static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1502 static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1503 static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1504 static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1505 static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1506 static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1507 static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1508 static PyObject *__pyx_n_s_PyClical;
1509 static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1510 static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1511 static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1512 static PyObject *__pyx_n_s_Real;
1513 static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1514 static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1515 static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1516 static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1517 static PyObject *__pyx_n_s_RuntimeError;
1518 static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1519 static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1520 static PyObject *__pyx_n_s_Sequence;
1521 static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1522 static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1523 static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1524 static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1525 static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1526 static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1527 static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1528 static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1529 static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1530 static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1531 static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1532 static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1533 static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1534 static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1535 static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1536 static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1537 static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1538 static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1539 static PyObject *__pyx_kp_u_The_informal_string_representat;
1540 static PyObject *__pyx_kp_u_The_informal_string_representat_2;
1541 static PyObject *__pyx_kp_u_The_official_string_representat;
1542 static PyObject *__pyx_kp_u_The_official_string_representat_2;
1543 static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
1544 static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
1545 static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
1546 static PyObject *__pyx_n_s_TypeError;
1547 static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
1548 static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
1549 static PyObject *__pyx_n_s_ValueError;
1550 static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
1551 static PyObject *__pyx_kp_s__2;
1552 static PyObject *__pyx_kp_s__3;
1553 static PyObject *__pyx_kp_s__4;
1554 static PyObject *__pyx_kp_s__5;
1555 static PyObject *__pyx_kp_s__6;
1556 static PyObject *__pyx_kp_s__7;
1557 static PyObject *__pyx_kp_u_abs_line_1473;
1558 static PyObject *__pyx_n_s_acos;
1559 static PyObject *__pyx_kp_u_acos_line_1619;
1560 static PyObject *__pyx_n_s_acosh;
1561 static PyObject *__pyx_kp_u_acosh_line_1656;
1562 static PyObject *__pyx_kp_u_agc3_line_1844;
1563 static PyObject *__pyx_n_s_args;
1564 static PyObject *__pyx_kp_s_as_frame;
1565 static PyObject *__pyx_n_s_asin;
1566 static PyObject *__pyx_kp_u_asin_line_1698;
1567 static PyObject *__pyx_n_s_asinh;
1568 static PyObject *__pyx_kp_u_asinh_line_1733;
1569 static PyObject *__pyx_n_s_atan;
1570 static PyObject *__pyx_kp_u_atan_line_1769;
1571 static PyObject *__pyx_n_s_atanh;
1572 static PyObject *__pyx_kp_u_atanh_line_1798;
1573 static PyObject *__pyx_kp_u_cga3_line_1824;
1574 static PyObject *__pyx_kp_u_cga3std_line_1833;
1575 static PyObject *__pyx_n_s_cl;
1576 static PyObject *__pyx_kp_u_clifford___add___line_739;
1577 static PyObject *__pyx_kp_u_clifford___and___line_835;
1578 static PyObject *__pyx_kp_u_clifford___call___line_1019;
1579 static PyObject *__pyx_kp_u_clifford___div___line_895;
1580 static PyObject *__pyx_kp_u_clifford___getitem___line_706;
1581 static PyObject *__pyx_kp_u_clifford___iadd___line_750;
1582 static PyObject *__pyx_kp_u_clifford___iand___line_850;
1583 static PyObject *__pyx_kp_u_clifford___idiv___line_910;
1584 static PyObject *__pyx_kp_u_clifford___imod___line_820;
1585 static PyObject *__pyx_kp_u_clifford___imul___line_792;
1586 static PyObject *__pyx_kp_u_clifford___ior___line_949;
1587 static PyObject *__pyx_kp_u_clifford___isub___line_770;
1588 static PyObject *__pyx_kp_u_clifford___iter___line_637;
1589 static PyObject *__pyx_kp_u_clifford___ixor___line_880;
1590 static PyObject *__pyx_kp_u_clifford___mod___line_805;
1591 static PyObject *__pyx_kp_u_clifford___mul___line_779;
1592 static PyObject *__pyx_kp_u_clifford___neg___line_721;
1593 static PyObject *__pyx_kp_u_clifford___or___line_938;
1594 static PyObject *__pyx_kp_u_clifford___pos___line_730;
1595 static PyObject *__pyx_kp_u_clifford___pow___line_960;
1596 static PyObject *__pyx_kp_u_clifford___repr___line_1225;
1597 static PyObject *__pyx_kp_u_clifford___str___line_1234;
1598 static PyObject *__pyx_kp_u_clifford___sub___line_759;
1599 static PyObject *__pyx_kp_u_clifford___xor___line_865;
1600 static PyObject *__pyx_kp_u_clifford_abs_line_1174;
1601 static PyObject *__pyx_kp_u_clifford_conj_line_1137;
1602 static PyObject *__pyx_kp_u_clifford_copy_line_554;
1603 static PyObject *__pyx_kp_u_clifford_even_line_1060;
1604 static PyObject *__pyx_kp_u_clifford_frame_line_1214;
1605 static PyObject *__pyx_n_s_clifford_hidden_doctests;
1606 static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
1607 static PyObject *__pyx_kp_u_clifford_inv_line_925;
1608 static PyObject *__pyx_kp_u_clifford_involute_line_1106;
1609 static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
1610 static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
1611 static PyObject *__pyx_kp_u_clifford_norm_line_1163;
1612 static PyObject *__pyx_kp_u_clifford_odd_line_1069;
1613 static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
1614 static PyObject *__pyx_kp_u_clifford_pow_line_979;
1615 static PyObject *__pyx_kp_u_clifford_pure_line_1049;
1616 static PyObject *__pyx_kp_u_clifford_quad_line_1152;
1617 static PyObject *__pyx_kp_u_clifford_reframe_line_648;
1618 static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
1619 static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
1620 static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
1621 static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
1622 static PyObject *__pyx_n_s_close;
1623 static PyObject *__pyx_n_s_collections;
1624 static PyObject *__pyx_kp_u_compare_line_490;
1625 static PyObject *__pyx_kp_u_complexifier_line_1527;
1626 static PyObject *__pyx_n_s_conj;
1627 static PyObject *__pyx_kp_u_conj_line_1436;
1628 static PyObject *__pyx_n_s_copy;
1629 static PyObject *__pyx_n_s_cos;
1630 static PyObject *__pyx_kp_u_cos_line_1602;
1631 static PyObject *__pyx_n_s_cosh;
1632 static PyObject *__pyx_kp_u_cosh_line_1640;
1633 static PyObject *__pyx_n_s_doctest;
1634 static PyObject *__pyx_n_s_e;
1635 static PyObject *__pyx_kp_u_e_line_1887;
1636 static PyObject *__pyx_n_s_even;
1637 static PyObject *__pyx_kp_u_even_line_1388;
1638 static PyObject *__pyx_n_s_exp;
1639 static PyObject *__pyx_kp_u_exp_line_1565;
1640 static PyObject *__pyx_n_s_fill;
1641 static PyObject *__pyx_n_s_frm;
1642 static PyObject *__pyx_kp_s_from;
1643 static PyObject *__pyx_n_s_grade;
1644 static PyObject *__pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc;
1645 static PyObject *__pyx_n_s_i;
1646 static PyObject *__pyx_kp_u_imag_line_1366;
1647 static PyObject *__pyx_n_s_import;
1648 static PyObject *__pyx_kp_u_index_set___and___line_269;
1649 static PyObject *__pyx_kp_u_index_set___getitem___line_189;
1650 static PyObject *__pyx_kp_u_index_set___iand___line_280;
1651 static PyObject *__pyx_kp_u_index_set___invert___line_238;
1652 static PyObject *__pyx_kp_u_index_set___ior___line_302;
1653 static PyObject *__pyx_n_s_index_set___iter;
1654 static PyObject *__pyx_kp_u_index_set___iter___line_227;
1655 static PyObject *__pyx_kp_u_index_set___ixor___line_258;
1656 static PyObject *__pyx_kp_u_index_set___or___line_291;
1657 static PyObject *__pyx_kp_u_index_set___repr___line_382;
1658 static PyObject *__pyx_kp_u_index_set___setitem___line_177;
1659 static PyObject *__pyx_kp_u_index_set___str___line_393;
1660 static PyObject *__pyx_kp_u_index_set___xor___line_247;
1661 static PyObject *__pyx_kp_u_index_set_copy_line_64;
1662 static PyObject *__pyx_kp_u_index_set_count_line_313;
1663 static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
1664 static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
1665 static PyObject *__pyx_n_s_index_set_hidden_doctests;
1666 static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
1667 static PyObject *__pyx_kp_u_index_set_max_line_349;
1668 static PyObject *__pyx_kp_u_index_set_min_line_340;
1669 static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
1670 static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
1671 static PyObject *__pyx_n_s_inv;
1672 static PyObject *__pyx_kp_u_inv_line_1329;
1673 static PyObject *__pyx_kp_s_invalid;
1674 static PyObject *__pyx_kp_s_invalid_string;
1675 static PyObject *__pyx_n_s_involute;
1676 static PyObject *__pyx_kp_u_involute_line_1406;
1677 static PyObject *__pyx_n_s_ist;
1678 static PyObject *__pyx_n_s_istpq;
1679 static PyObject *__pyx_kp_u_istpq_line_1900;
1680 static PyObject *__pyx_n_s_iter;
1681 static PyObject *__pyx_n_s_ixt;
1682 static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
1683 static PyObject *__pyx_n_s_lhs;
1684 static PyObject *__pyx_n_s_log;
1685 static PyObject *__pyx_kp_u_log_line_1579;
1686 static PyObject *__pyx_n_s_m;
1687 static PyObject *__pyx_n_s_main;
1688 static PyObject *__pyx_n_s_math;
1689 static PyObject *__pyx_n_s_max;
1690 static PyObject *__pyx_kp_u_max_abs_line_1482;
1691 static PyObject *__pyx_kp_u_max_pos_line_511;
1692 static PyObject *__pyx_n_s_min;
1693 static PyObject *__pyx_kp_u_min_neg_line_502;
1694 static PyObject *__pyx_n_s_name;
1695 static PyObject *__pyx_n_s_nbar3;
1696 static PyObject *__pyx_n_s_ninf3;
1697 static PyObject *__pyx_n_s_norm;
1698 static PyObject *__pyx_kp_u_norm_line_1462;
1699 static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
1700 static PyObject *__pyx_n_s_numbers;
1701 static PyObject *__pyx_n_s_obj;
1702 static PyObject *__pyx_n_s_odd;
1703 static PyObject *__pyx_kp_u_odd_line_1397;
1704 static PyObject *__pyx_n_s_other;
1705 static PyObject *__pyx_n_s_outer_pow;
1706 static PyObject *__pyx_kp_u_outer_pow_line_1518;
1707 static PyObject *__pyx_n_s_p;
1708 static PyObject *__pyx_n_s_pi;
1709 static PyObject *__pyx_n_s_pow;
1710 static PyObject *__pyx_kp_u_pow_line_1494;
1711 static PyObject *__pyx_n_s_pure;
1712 static PyObject *__pyx_kp_u_pure_line_1377;
1713 static PyObject *__pyx_n_s_pyx_vtable;
1714 static PyObject *__pyx_n_s_q;
1715 static PyObject *__pyx_n_s_quad;
1716 static PyObject *__pyx_kp_u_quad_line_1451;
1717 static PyObject *__pyx_kp_u_random_clifford_line_1815;
1718 static PyObject *__pyx_n_s_range;
1719 static PyObject *__pyx_kp_u_real_line_1355;
1720 static PyObject *__pyx_n_s_reverse;
1721 static PyObject *__pyx_kp_u_reverse_line_1421;
1722 static PyObject *__pyx_n_s_rhs;
1723 static PyObject *__pyx_n_s_scalar;
1724 static PyObject *__pyx_kp_u_scalar_line_1344;
1725 static PyObject *__pyx_n_s_send;
1726 static PyObject *__pyx_n_s_sin;
1727 static PyObject *__pyx_kp_u_sin_line_1679;
1728 static PyObject *__pyx_n_s_sinh;
1729 static PyObject *__pyx_kp_u_sinh_line_1719;
1730 static PyObject *__pyx_n_s_sqrt;
1731 static PyObject *__pyx_kp_u_sqrt_line_1542;
1732 static PyObject *__pyx_n_s_tan;
1733 static PyObject *__pyx_kp_u_tan_line_1752;
1734 static PyObject *__pyx_n_s_tanh;
1735 static PyObject *__pyx_kp_u_tanh_line_1786;
1736 static PyObject *__pyx_n_s_tau;
1737 static PyObject *__pyx_n_s_test;
1738 static PyObject *__pyx_n_s_test_2;
1739 static PyObject *__pyx_n_s_testmod;
1740 static PyObject *__pyx_n_s_throw;
1741 static PyObject *__pyx_kp_s_to_frame;
1742 static PyObject *__pyx_kp_s_using;
1743 static PyObject *__pyx_kp_s_using_invalid;
1744 static PyObject *__pyx_kp_s_value;
1745 static PyObject *__pyx_n_s_version;
1746 static PyObject *__pyx_n_s_xrange;
1747 static PyObject *__pyx_float_0_0;
1748 static PyObject *__pyx_float_1_0;
1749 static PyObject *__pyx_float_2_0;
1750 static PyObject *__pyx_float_8_0;
1751 static PyObject *__pyx_int_0;
1752 static PyObject *__pyx_int_1;
1753 static PyObject *__pyx_int_4;
1754 static PyObject *__pyx_int_neg_1;
1755 static PyObject *__pyx_tuple__8;
1756 static PyObject *__pyx_tuple__9;
1757 static PyObject *__pyx_tuple__12;
1758 static PyObject *__pyx_tuple__13;
1759 static PyObject *__pyx_tuple__15;
1760 static PyObject *__pyx_tuple__17;
1761 static PyObject *__pyx_tuple__18;
1762 static PyObject *__pyx_tuple__19;
1763 static PyObject *__pyx_tuple__20;
1764 static PyObject *__pyx_tuple__21;
1765 static PyObject *__pyx_codeobj__10;
1766 static PyObject *__pyx_codeobj__11;
1767 static PyObject *__pyx_codeobj__14;
1768 static PyObject *__pyx_codeobj__16;
1769 static PyObject *__pyx_codeobj__22;
1779 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
1781 __Pyx_RefNannyDeclarations
1782 PyObject *__pyx_t_1 = NULL;
1783 PyObject *__pyx_t_2 = NULL;
1784 int __pyx_lineno = 0;
1785 const char *__pyx_filename = NULL;
1786 int __pyx_clineno = 0;
1787 __Pyx_RefNannySetupContext(
"toIndexSet", 0);
1796 __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;}
1797 __Pyx_GOTREF(__pyx_t_1);
1798 __Pyx_INCREF(__pyx_v_obj);
1799 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
1800 __Pyx_GIVEREF(__pyx_v_obj);
1801 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
1802 __Pyx_GOTREF(__pyx_t_2);
1803 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1804 __pyx_r = (((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
1805 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1818 __Pyx_XDECREF(__pyx_t_1);
1819 __Pyx_XDECREF(__pyx_t_2);
1820 __Pyx_WriteUnraisable(
"PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
1822 __Pyx_RefNannyFinishContext();
1834 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other) {
1835 PyObject *__pyx_r = NULL;
1836 __Pyx_RefNannyDeclarations
1837 __Pyx_RefNannySetupContext(
"wrap", 0);
1846 (__pyx_v_self->instance[0]) = __pyx_v_other;
1855 __Pyx_XDECREF(__pyx_r);
1856 __Pyx_INCREF(((PyObject *)__pyx_v_self));
1857 __pyx_r = ((PyObject *)__pyx_v_self);
1870 __Pyx_XGIVEREF(__pyx_r);
1871 __Pyx_RefNannyFinishContext();
1883 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
1885 __Pyx_RefNannyDeclarations
1886 __Pyx_RefNannySetupContext(
"unwrap", 0);
1895 __pyx_r = (__pyx_v_self->instance[0]);
1908 __Pyx_RefNannyFinishContext();
1920 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
1921 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch) {
1922 PyObject *__pyx_r = NULL;
1923 __Pyx_RefNannyDeclarations
1924 PyObject *__pyx_t_1 = NULL;
1925 PyObject *__pyx_t_2 = NULL;
1926 PyObject *__pyx_t_3 = NULL;
1927 PyObject *__pyx_t_4 = NULL;
1928 int __pyx_lineno = 0;
1929 const char *__pyx_filename = NULL;
1930 int __pyx_clineno = 0;
1931 __Pyx_RefNannySetupContext(
"copy", 0);
1933 if (unlikely(__pyx_skip_dispatch)) ;
1935 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
1936 __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;}
1937 __Pyx_GOTREF(__pyx_t_1);
1938 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
1939 __Pyx_XDECREF(__pyx_r);
1940 __Pyx_INCREF(__pyx_t_1);
1941 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
1942 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
1943 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
1944 if (likely(__pyx_t_4)) {
1945 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
1946 __Pyx_INCREF(__pyx_t_4);
1947 __Pyx_INCREF(
function);
1948 __Pyx_DECREF_SET(__pyx_t_3,
function);
1952 __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;}
1953 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1955 __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;}
1957 __Pyx_GOTREF(__pyx_t_2);
1958 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1959 __pyx_r = __pyx_t_2;
1961 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1964 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1974 __Pyx_XDECREF(__pyx_r);
1975 __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;}
1976 __Pyx_GOTREF(__pyx_t_1);
1977 __Pyx_INCREF(((PyObject *)__pyx_v_self));
1978 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
1979 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
1980 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
1981 __Pyx_GOTREF(__pyx_t_2);
1982 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1983 __pyx_r = __pyx_t_2;
1997 __Pyx_XDECREF(__pyx_t_1);
1998 __Pyx_XDECREF(__pyx_t_2);
1999 __Pyx_XDECREF(__pyx_t_3);
2000 __Pyx_XDECREF(__pyx_t_4);
2001 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2004 __Pyx_XGIVEREF(__pyx_r);
2005 __Pyx_RefNannyFinishContext();
2010 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
2011 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 ";
2012 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2013 PyObject *__pyx_r = 0;
2014 __Pyx_RefNannyDeclarations
2015 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
2016 __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2019 __Pyx_RefNannyFinishContext();
2023 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2024 PyObject *__pyx_r = NULL;
2025 __Pyx_RefNannyDeclarations
2026 PyObject *__pyx_t_1 = NULL;
2027 int __pyx_lineno = 0;
2028 const char *__pyx_filename = NULL;
2029 int __pyx_clineno = 0;
2030 __Pyx_RefNannySetupContext(
"copy", 0);
2031 __Pyx_XDECREF(__pyx_r);
2032 __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;}
2033 __Pyx_GOTREF(__pyx_t_1);
2034 __pyx_r = __pyx_t_1;
2040 __Pyx_XDECREF(__pyx_t_1);
2041 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2044 __Pyx_XGIVEREF(__pyx_r);
2045 __Pyx_RefNannyFinishContext();
2058 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2059 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2060 PyObject *__pyx_v_other = 0;
2061 int __pyx_lineno = 0;
2062 const char *__pyx_filename = NULL;
2063 int __pyx_clineno = 0;
2065 __Pyx_RefNannyDeclarations
2066 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
2068 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2069 PyObject* values[1] = {0};
2070 values[0] = ((PyObject *)__pyx_int_0);
2071 if (unlikely(__pyx_kwds)) {
2073 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2075 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2077 default:
goto __pyx_L5_argtuple_error;
2079 kw_args = PyDict_Size(__pyx_kwds);
2083 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2084 if (value) { values[0] = value; kw_args--; }
2087 if (unlikely(kw_args > 0)) {
2088 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;}
2091 switch (PyTuple_GET_SIZE(__pyx_args)) {
2092 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2094 default:
goto __pyx_L5_argtuple_error;
2097 __pyx_v_other = values[0];
2099 goto __pyx_L4_argument_unpacking_done;
2100 __pyx_L5_argtuple_error:;
2101 __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;}
2103 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2104 __Pyx_RefNannyFinishContext();
2106 __pyx_L4_argument_unpacking_done:;
2107 __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2110 __Pyx_RefNannyFinishContext();
2114 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2115 PyObject *__pyx_v_error_msg_prefix = NULL;
2116 PyObject *__pyx_v_idx = NULL;
2118 __Pyx_RefNannyDeclarations
2122 PyObject *__pyx_t_4 = NULL;
2123 PyObject *__pyx_t_5 = NULL;
2126 PyObject *__pyx_t_8 = NULL;
2127 PyObject *__pyx_t_9 = NULL;
2128 PyObject *__pyx_t_10 = NULL;
2129 Py_ssize_t __pyx_t_11;
2130 PyObject *(*__pyx_t_12)(PyObject *);
2131 PyObject *__pyx_t_13 = NULL;
2132 PyObject *__pyx_t_14 = NULL;
2133 PyObject *__pyx_t_15 = NULL;
2134 PyObject *__pyx_t_16 = NULL;
2136 int __pyx_lineno = 0;
2137 const char *__pyx_filename = NULL;
2138 int __pyx_clineno = 0;
2139 __Pyx_RefNannySetupContext(
"__cinit__", 0);
2148 __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2149 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2158 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
2159 __pyx_t_2 = (__pyx_t_1 != 0);
2170 __pyx_t_3 =
new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2172 __Pyx_CppExn2PyErr();
2173 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2175 __pyx_v_self->instance = __pyx_t_3;
2186 __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;}
2187 __Pyx_GOTREF(__pyx_t_4);
2188 __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;}
2189 __Pyx_GOTREF(__pyx_t_5);
2190 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2191 __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;}
2192 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2193 __pyx_t_1 = (__pyx_t_2 != 0);
2203 __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;}
2205 __pyx_t_3 =
new IndexSet(((
int)__pyx_t_6));
2207 __Pyx_CppExn2PyErr();
2208 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2210 __pyx_v_self->instance = __pyx_t_3;
2221 __pyx_t_2 = PySet_Check(__pyx_v_other);
2222 __pyx_t_7 = (__pyx_t_2 != 0);
2224 goto __pyx_L5_next_or;
2226 __pyx_t_1 = __pyx_t_7;
2227 goto __pyx_L4_bool_binop_done;
2230 __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2231 __pyx_t_2 = (__pyx_t_7 != 0);
2232 __pyx_t_1 = __pyx_t_2;
2233 __pyx_L4_bool_binop_done:;
2234 __pyx_t_2 = (__pyx_t_1 != 0);
2245 __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2246 __Pyx_XGOTREF(__pyx_t_8);
2247 __Pyx_XGOTREF(__pyx_t_9);
2248 __Pyx_XGOTREF(__pyx_t_10);
2258 __pyx_v_self->instance =
new IndexSet();
2267 if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2268 __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2271 __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;}
2272 __Pyx_GOTREF(__pyx_t_5);
2273 __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;}
2276 if (likely(!__pyx_t_12)) {
2277 if (likely(PyList_CheckExact(__pyx_t_5))) {
2278 if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5))
break;
2279 #if CYTHON_COMPILING_IN_CPYTHON
2280 __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;}
2282 __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;}
2285 if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5))
break;
2286 #if CYTHON_COMPILING_IN_CPYTHON
2287 __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;}
2289 __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;}
2293 __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2294 if (unlikely(!__pyx_t_4)) {
2295 PyObject* exc_type = PyErr_Occurred();
2297 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2298 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L6_error;}
2302 __Pyx_GOTREF(__pyx_t_4);
2304 __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2314 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;}
2324 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2326 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2327 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2328 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2329 goto __pyx_L13_try_end;
2331 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2332 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2341 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2343 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2344 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;}
2345 __Pyx_GOTREF(__pyx_t_5);
2346 __Pyx_GOTREF(__pyx_t_4);
2347 __Pyx_GOTREF(__pyx_t_13);
2356 __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;}
2357 __Pyx_GOTREF(__pyx_t_14);
2358 __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;}
2359 __Pyx_GOTREF(__pyx_t_15);
2360 __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;}
2361 __Pyx_GOTREF(__pyx_t_16);
2362 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2363 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2364 __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;}
2365 __Pyx_GOTREF(__pyx_t_15);
2366 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2367 __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;}
2368 __Pyx_GOTREF(__pyx_t_16);
2369 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2370 __Pyx_GIVEREF(__pyx_t_15);
2372 __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;}
2373 __Pyx_GOTREF(__pyx_t_15);
2374 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2375 __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2376 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2377 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2387 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
2389 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2390 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;}
2391 __Pyx_GOTREF(__pyx_t_13);
2392 __Pyx_GOTREF(__pyx_t_4);
2393 __Pyx_GOTREF(__pyx_t_5);
2402 __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;}
2403 __Pyx_GOTREF(__pyx_t_15);
2404 __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;}
2405 __Pyx_GOTREF(__pyx_t_16);
2406 __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;}
2407 __Pyx_GOTREF(__pyx_t_14);
2408 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2409 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2410 __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;}
2411 __Pyx_GOTREF(__pyx_t_16);
2412 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2413 __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;}
2414 __Pyx_GOTREF(__pyx_t_14);
2415 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
2416 __Pyx_GIVEREF(__pyx_t_16);
2418 __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;}
2419 __Pyx_GOTREF(__pyx_t_16);
2420 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2421 __Pyx_Raise(__pyx_t_16, 0, 0, 0);
2422 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2423 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L8_except_error;}
2425 goto __pyx_L8_except_error;
2426 __pyx_L8_except_error:;
2427 __Pyx_XGIVEREF(__pyx_t_8);
2428 __Pyx_XGIVEREF(__pyx_t_9);
2429 __Pyx_XGIVEREF(__pyx_t_10);
2430 __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
2431 goto __pyx_L1_error;
2444 __pyx_t_2 = PyString_Check(__pyx_v_other);
2445 __pyx_t_1 = (__pyx_t_2 != 0);
2456 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
2457 __Pyx_XGOTREF(__pyx_t_10);
2458 __Pyx_XGOTREF(__pyx_t_9);
2459 __Pyx_XGOTREF(__pyx_t_8);
2469 __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;}
2471 __pyx_t_3 =
new IndexSet(((
char *)__pyx_t_17));
2473 __Pyx_CppExn2PyErr();
2474 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__;
goto __pyx_L20_error;}
2476 __pyx_v_self->instance = __pyx_t_3;
2478 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2479 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2480 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2481 goto __pyx_L27_try_end;
2483 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
2484 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
2485 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
2486 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
2487 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2488 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2497 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
2499 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2500 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;}
2501 __Pyx_GOTREF(__pyx_t_5);
2502 __Pyx_GOTREF(__pyx_t_4);
2503 __Pyx_GOTREF(__pyx_t_13);
2512 __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;}
2513 __Pyx_GOTREF(__pyx_t_16);
2514 __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;}
2515 __Pyx_GOTREF(__pyx_t_14);
2516 __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;}
2517 __Pyx_GOTREF(__pyx_t_15);
2518 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2519 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2520 __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;}
2521 __Pyx_GOTREF(__pyx_t_14);
2522 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2523 __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;}
2524 __Pyx_GOTREF(__pyx_t_15);
2525 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
2526 __Pyx_GIVEREF(__pyx_t_14);
2528 __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;}
2529 __Pyx_GOTREF(__pyx_t_14);
2530 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2531 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
2532 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2533 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L22_except_error;}
2535 goto __pyx_L22_except_error;
2536 __pyx_L22_except_error:;
2537 __Pyx_XGIVEREF(__pyx_t_10);
2538 __Pyx_XGIVEREF(__pyx_t_9);
2539 __Pyx_XGIVEREF(__pyx_t_8);
2540 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
2541 goto __pyx_L1_error;
2555 __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;}
2556 __Pyx_GOTREF(__pyx_t_13);
2557 __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;}
2558 __Pyx_GOTREF(__pyx_t_4);
2559 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2560 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
2561 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2562 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((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;}
2563 __Pyx_GOTREF(__pyx_t_5);
2564 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2565 __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;}
2566 __Pyx_GOTREF(__pyx_t_4);
2567 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2568 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2569 __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;}
2570 __Pyx_GOTREF(__pyx_t_5);
2571 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2572 __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;}
2573 __Pyx_GOTREF(__pyx_t_4);
2574 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
2575 __Pyx_GIVEREF(__pyx_t_5);
2577 __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;}
2578 __Pyx_GOTREF(__pyx_t_5);
2579 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2580 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
2581 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2582 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2598 __Pyx_XDECREF(__pyx_t_4);
2599 __Pyx_XDECREF(__pyx_t_5);
2600 __Pyx_XDECREF(__pyx_t_13);
2601 __Pyx_XDECREF(__pyx_t_14);
2602 __Pyx_XDECREF(__pyx_t_15);
2603 __Pyx_XDECREF(__pyx_t_16);
2604 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2607 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
2608 __Pyx_XDECREF(__pyx_v_idx);
2609 __Pyx_RefNannyFinishContext();
2622 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self);
2623 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
2624 __Pyx_RefNannyDeclarations
2625 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
2626 __pyx_pf_8PyClical_9index_set_4__dealloc__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2629 __Pyx_RefNannyFinishContext();
2632 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2633 __Pyx_RefNannyDeclarations
2634 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
2643 delete __pyx_v_self->instance;
2654 __Pyx_RefNannyFinishContext();
2666 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
2667 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2668 PyObject *__pyx_r = 0;
2669 __Pyx_RefNannyDeclarations
2670 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
2671 __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
2674 __Pyx_RefNannyFinishContext();
2678 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2679 PyObject *__pyx_v_eq = NULL;
2680 PyObject *__pyx_v_lt = NULL;
2681 PyObject *__pyx_r = NULL;
2682 __Pyx_RefNannyDeclarations
2686 PyObject *__pyx_t_4 = NULL;
2687 int __pyx_lineno = 0;
2688 const char *__pyx_filename = NULL;
2689 int __pyx_clineno = 0;
2690 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
2699 __pyx_t_2 = (__pyx_v_lhs == Py_None);
2700 __pyx_t_3 = (__pyx_t_2 != 0);
2702 goto __pyx_L5_next_or;
2704 __pyx_t_1 = __pyx_t_3;
2705 goto __pyx_L4_bool_binop_done;
2708 __pyx_t_3 = (__pyx_v_rhs == Py_None);
2709 __pyx_t_2 = (__pyx_t_3 != 0);
2710 __pyx_t_1 = __pyx_t_2;
2711 __pyx_L4_bool_binop_done:;
2721 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
2722 __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;}
2723 __Pyx_GOTREF(__pyx_t_4);
2724 __pyx_v_eq = __pyx_t_4;
2734 switch (__pyx_v_op) {
2752 __Pyx_XDECREF(__pyx_r);
2753 __Pyx_INCREF(__pyx_v_eq);
2754 __pyx_r = __pyx_v_eq;
2774 __Pyx_XDECREF(__pyx_r);
2775 __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;}
2776 __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;}
2777 __Pyx_GOTREF(__pyx_t_4);
2778 __pyx_r = __pyx_t_4;
2791 __pyx_t_1 = ((__pyx_v_op == 0) != 0);
2801 __Pyx_XDECREF(__pyx_r);
2802 __Pyx_INCREF(Py_False);
2814 __pyx_t_1 = ((__pyx_v_op == 1) != 0);
2824 __Pyx_XDECREF(__pyx_r);
2825 __Pyx_INCREF(__pyx_v_eq);
2826 __pyx_r = __pyx_v_eq;
2837 __pyx_t_1 = ((__pyx_v_op == 4) != 0);
2847 __Pyx_XDECREF(__pyx_r);
2848 __Pyx_INCREF(Py_False);
2860 __pyx_t_1 = ((__pyx_v_op == 5) != 0);
2870 __Pyx_XDECREF(__pyx_r);
2871 __Pyx_INCREF(__pyx_v_eq);
2872 __pyx_r = __pyx_v_eq;
2884 __Pyx_XDECREF(__pyx_r);
2885 __Pyx_INCREF(__pyx_builtin_NotImplemented);
2886 __pyx_r = __pyx_builtin_NotImplemented;
2901 __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
2902 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2903 __Pyx_GOTREF(__pyx_t_4);
2904 __pyx_v_eq = __pyx_t_4;
2914 switch (__pyx_v_op) {
2932 __Pyx_XDECREF(__pyx_r);
2933 __Pyx_INCREF(__pyx_v_eq);
2934 __pyx_r = __pyx_v_eq;
2954 __Pyx_XDECREF(__pyx_r);
2955 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2956 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2957 __Pyx_GOTREF(__pyx_t_4);
2958 __pyx_r = __pyx_t_4;
2971 __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
2972 __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;}
2973 __Pyx_GOTREF(__pyx_t_4);
2974 __pyx_v_lt = __pyx_t_4;
2984 __pyx_t_1 = ((__pyx_v_op == 0) != 0);
2994 __Pyx_XDECREF(__pyx_r);
2995 __Pyx_INCREF(__pyx_v_lt);
2996 __pyx_r = __pyx_v_lt;
3007 __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3017 __Pyx_XDECREF(__pyx_r);
3018 __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;}
3020 goto __pyx_L9_next_or;
3022 __Pyx_INCREF(__pyx_v_lt);
3023 __pyx_t_4 = __pyx_v_lt;
3024 goto __pyx_L8_bool_binop_done;
3027 __Pyx_INCREF(__pyx_v_eq);
3028 __pyx_t_4 = __pyx_v_eq;
3029 __pyx_L8_bool_binop_done:;
3030 __pyx_r = __pyx_t_4;
3042 __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3052 __Pyx_XDECREF(__pyx_r);
3053 __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;}
3055 goto __pyx_L11_next_or;
3057 __pyx_t_1 = __pyx_t_2;
3058 goto __pyx_L10_bool_binop_done;
3061 __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;}
3062 __pyx_t_1 = __pyx_t_2;
3063 __pyx_L10_bool_binop_done:;
3064 __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;}
3065 __Pyx_GOTREF(__pyx_t_4);
3066 __pyx_r = __pyx_t_4;
3078 __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3088 __Pyx_XDECREF(__pyx_r);
3089 __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;}
3090 __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;}
3091 __Pyx_GOTREF(__pyx_t_4);
3092 __pyx_r = __pyx_t_4;
3105 __Pyx_XDECREF(__pyx_r);
3106 __Pyx_INCREF(__pyx_builtin_NotImplemented);
3107 __pyx_r = __pyx_builtin_NotImplemented;
3124 __Pyx_XDECREF(__pyx_t_4);
3125 __Pyx_AddTraceback(
"PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3128 __Pyx_XDECREF(__pyx_v_eq);
3129 __Pyx_XDECREF(__pyx_v_lt);
3130 __Pyx_XGIVEREF(__pyx_r);
3131 __Pyx_RefNannyFinishContext();
3144 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val);
3145 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 ";
3146 #if CYTHON_COMPILING_IN_CPYTHON
3147 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3149 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3151 __Pyx_RefNannyDeclarations
3152 __Pyx_RefNannySetupContext(
"__setitem__ (wrapper)", 0);
3153 __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));
3156 __Pyx_RefNannyFinishContext();
3160 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) {
3162 __Pyx_RefNannyDeclarations
3166 int __pyx_lineno = 0;
3167 const char *__pyx_filename = NULL;
3168 int __pyx_clineno = 0;
3169 __Pyx_RefNannySetupContext(
"__setitem__", 0);
3178 __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;}
3179 __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;}
3181 __pyx_t_3 = __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3183 __Pyx_CppExn2PyErr();
3184 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3207 __Pyx_AddTraceback(
"PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3210 __Pyx_RefNannyFinishContext();
3223 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3224 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 ";
3225 #if CYTHON_COMPILING_IN_CPYTHON
3226 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3228 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3229 PyObject *__pyx_r = 0;
3230 __Pyx_RefNannyDeclarations
3231 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
3232 __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3235 __Pyx_RefNannyFinishContext();
3239 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3240 PyObject *__pyx_r = NULL;
3241 __Pyx_RefNannyDeclarations
3243 PyObject *__pyx_t_2 = NULL;
3244 int __pyx_lineno = 0;
3245 const char *__pyx_filename = NULL;
3246 int __pyx_clineno = 0;
3247 __Pyx_RefNannySetupContext(
"__getitem__", 0);
3256 __Pyx_XDECREF(__pyx_r);
3257 __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;}
3258 __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;}
3259 __Pyx_GOTREF(__pyx_t_2);
3260 __pyx_r = __pyx_t_2;
3274 __Pyx_XDECREF(__pyx_t_2);
3275 __Pyx_AddTraceback(
"PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3278 __Pyx_XGIVEREF(__pyx_r);
3279 __Pyx_RefNannyFinishContext();
3292 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3293 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 ";
3294 #if CYTHON_COMPILING_IN_CPYTHON
3295 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
3297 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3299 __Pyx_RefNannyDeclarations
3300 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
3301 __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3304 __Pyx_RefNannyFinishContext();
3308 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3310 __Pyx_RefNannyDeclarations
3312 int __pyx_lineno = 0;
3313 const char *__pyx_filename = NULL;
3314 int __pyx_clineno = 0;
3315 __Pyx_RefNannySetupContext(
"__contains__", 0);
3324 __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;}
3325 __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
3338 __Pyx_AddTraceback(
"PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3341 __Pyx_RefNannyFinishContext();
3344 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value);
3355 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self);
3356 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 ";
3357 #if CYTHON_COMPILING_IN_CPYTHON
3358 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
3360 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
3361 PyObject *__pyx_r = 0;
3362 __Pyx_RefNannyDeclarations
3363 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
3364 __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3367 __Pyx_RefNannyFinishContext();
3371 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3372 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
3373 PyObject *__pyx_r = NULL;
3374 __Pyx_RefNannyDeclarations
3375 int __pyx_lineno = 0;
3376 const char *__pyx_filename = NULL;
3377 int __pyx_clineno = 0;
3378 __Pyx_RefNannySetupContext(
"__iter__", 0);
3379 __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);
3380 if (unlikely(!__pyx_cur_scope)) {
3381 __Pyx_RefNannyFinishContext();
3384 __Pyx_GOTREF(__pyx_cur_scope);
3385 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
3386 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3387 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3389 __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_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;}
3390 __Pyx_DECREF(__pyx_cur_scope);
3391 __Pyx_RefNannyFinishContext();
3392 return (PyObject *) gen;
3397 __Pyx_AddTraceback(
"PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3399 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
3400 __Pyx_XGIVEREF(__pyx_r);
3401 __Pyx_RefNannyFinishContext();
3405 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value)
3407 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
3408 PyObject *__pyx_r = NULL;
3409 PyObject *__pyx_t_1 = NULL;
3410 PyObject *__pyx_t_2 = NULL;
3411 PyObject *__pyx_t_3 = NULL;
3412 PyObject *__pyx_t_4 = NULL;
3413 Py_ssize_t __pyx_t_5;
3414 PyObject *(*__pyx_t_6)(PyObject *);
3417 int __pyx_lineno = 0;
3418 const char *__pyx_filename = NULL;
3419 int __pyx_clineno = 0;
3420 __Pyx_RefNannyDeclarations
3421 __Pyx_RefNannySetupContext(
"None", 0);
3422 switch (__pyx_generator->resume_label) {
3423 case 0:
goto __pyx_L3_first_run;
3424 case 1:
goto __pyx_L7_resume_from_yield;
3426 __Pyx_RefNannyFinishContext();
3429 __pyx_L3_first_run:;
3430 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3439 __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;}
3440 __Pyx_GOTREF(__pyx_t_2);
3442 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
3443 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3444 if (likely(__pyx_t_3)) {
3445 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3446 __Pyx_INCREF(__pyx_t_3);
3447 __Pyx_INCREF(
function);
3448 __Pyx_DECREF_SET(__pyx_t_2,
function);
3452 __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;}
3453 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3455 __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;}
3457 __Pyx_GOTREF(__pyx_t_1);
3458 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3459 __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;}
3460 __Pyx_GOTREF(__pyx_t_3);
3462 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
3463 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3464 if (likely(__pyx_t_4)) {
3465 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3466 __Pyx_INCREF(__pyx_t_4);
3467 __Pyx_INCREF(
function);
3468 __Pyx_DECREF_SET(__pyx_t_3,
function);
3472 __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;}
3473 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3475 __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;}
3477 __Pyx_GOTREF(__pyx_t_2);
3478 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3479 __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_int_1);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3480 __Pyx_GOTREF(__pyx_t_3);
3481 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3482 __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;}
3483 __Pyx_GOTREF(__pyx_t_2);
3484 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
3485 __Pyx_GIVEREF(__pyx_t_1);
3486 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
3487 __Pyx_GIVEREF(__pyx_t_3);
3490 __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;}
3491 __Pyx_GOTREF(__pyx_t_3);
3492 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3493 if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
3494 __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
3497 __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;}
3498 __Pyx_GOTREF(__pyx_t_2);
3499 __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;}
3501 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3503 if (likely(!__pyx_t_6)) {
3504 if (likely(PyList_CheckExact(__pyx_t_2))) {
3505 if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2))
break;
3506 #if CYTHON_COMPILING_IN_CPYTHON
3507 __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;}
3509 __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;}
3512 if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2))
break;
3513 #if CYTHON_COMPILING_IN_CPYTHON
3514 __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;}
3516 __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;}
3520 __pyx_t_3 = __pyx_t_6(__pyx_t_2);
3521 if (unlikely(!__pyx_t_3)) {
3522 PyObject* exc_type = PyErr_Occurred();
3524 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3525 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3529 __Pyx_GOTREF(__pyx_t_3);
3531 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
3532 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
3533 __Pyx_GIVEREF(__pyx_t_3);
3543 __pyx_t_7 = (__Pyx_PySequence_Contains(__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;}
3544 __pyx_t_8 = (__pyx_t_7 != 0);
3554 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
3555 __pyx_r = __pyx_cur_scope->__pyx_v_idx;
3556 __Pyx_XGIVEREF(__pyx_t_2);
3557 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
3558 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
3559 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
3560 __Pyx_XGIVEREF(__pyx_r);
3561 __Pyx_RefNannyFinishContext();
3563 __pyx_generator->resume_label = 1;
3565 __pyx_L7_resume_from_yield:;
3566 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
3567 __pyx_cur_scope->__pyx_t_0 = 0;
3568 __Pyx_XGOTREF(__pyx_t_2);
3569 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
3570 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
3571 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3584 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3595 PyErr_SetNone(PyExc_StopIteration);
3598 __Pyx_XDECREF(__pyx_t_1);
3599 __Pyx_XDECREF(__pyx_t_2);
3600 __Pyx_XDECREF(__pyx_t_3);
3601 __Pyx_XDECREF(__pyx_t_4);
3602 __Pyx_AddTraceback(
"__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3604 __Pyx_XDECREF(__pyx_r);
3605 __pyx_generator->resume_label = -1;
3606 __Pyx_Generator_clear((PyObject*)__pyx_generator);
3607 __Pyx_RefNannyFinishContext();
3620 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self);
3621 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 ";
3622 #if CYTHON_COMPILING_IN_CPYTHON
3623 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
3625 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
3626 PyObject *__pyx_r = 0;
3627 __Pyx_RefNannyDeclarations
3628 __Pyx_RefNannySetupContext(
"__invert__ (wrapper)", 0);
3629 __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3632 __Pyx_RefNannyFinishContext();
3636 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3637 PyObject *__pyx_r = NULL;
3638 __Pyx_RefNannyDeclarations
3639 PyObject *__pyx_t_1 = NULL;
3640 PyObject *__pyx_t_2 = NULL;
3641 int __pyx_lineno = 0;
3642 const char *__pyx_filename = NULL;
3643 int __pyx_clineno = 0;
3644 __Pyx_RefNannySetupContext(
"__invert__", 0);
3653 __Pyx_XDECREF(__pyx_r);
3654 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
3655 __Pyx_GOTREF(__pyx_t_1);
3656 __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;}
3657 __Pyx_GOTREF(__pyx_t_2);
3658 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3659 __pyx_r = __pyx_t_2;
3673 __Pyx_XDECREF(__pyx_t_1);
3674 __Pyx_XDECREF(__pyx_t_2);
3675 __Pyx_AddTraceback(
"PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3678 __Pyx_XGIVEREF(__pyx_r);
3679 __Pyx_RefNannyFinishContext();
3692 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3693 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 ";
3694 #if CYTHON_COMPILING_IN_CPYTHON
3695 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
3697 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3698 PyObject *__pyx_r = 0;
3699 __Pyx_RefNannyDeclarations
3700 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
3701 __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3704 __Pyx_RefNannyFinishContext();
3708 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3709 PyObject *__pyx_r = NULL;
3710 __Pyx_RefNannyDeclarations
3711 PyObject *__pyx_t_1 = NULL;
3712 PyObject *__pyx_t_2 = NULL;
3713 int __pyx_lineno = 0;
3714 const char *__pyx_filename = NULL;
3715 int __pyx_clineno = 0;
3716 __Pyx_RefNannySetupContext(
"__xor__", 0);
3725 __Pyx_XDECREF(__pyx_r);
3726 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
3727 __Pyx_GOTREF(__pyx_t_1);
3728 __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;}
3729 __Pyx_GOTREF(__pyx_t_2);
3730 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3731 __pyx_r = __pyx_t_2;
3745 __Pyx_XDECREF(__pyx_t_1);
3746 __Pyx_XDECREF(__pyx_t_2);
3747 __Pyx_AddTraceback(
"PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3750 __Pyx_XGIVEREF(__pyx_r);
3751 __Pyx_RefNannyFinishContext();
3764 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
3765 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 ";
3766 #if CYTHON_COMPILING_IN_CPYTHON
3767 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
3769 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3770 PyObject *__pyx_r = 0;
3771 __Pyx_RefNannyDeclarations
3772 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
3773 __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3776 __Pyx_RefNannyFinishContext();
3780 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3781 PyObject *__pyx_r = NULL;
3782 __Pyx_RefNannyDeclarations
3783 PyObject *__pyx_t_1 = NULL;
3784 int __pyx_lineno = 0;
3785 const char *__pyx_filename = NULL;
3786 int __pyx_clineno = 0;
3787 __Pyx_RefNannySetupContext(
"__ixor__", 0);
3796 __Pyx_XDECREF(__pyx_r);
3797 __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;}
3798 __Pyx_GOTREF(__pyx_t_1);
3799 __pyx_r = __pyx_t_1;
3813 __Pyx_XDECREF(__pyx_t_1);
3814 __Pyx_AddTraceback(
"PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3817 __Pyx_XGIVEREF(__pyx_r);
3818 __Pyx_RefNannyFinishContext();
3831 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3832 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 ";
3833 #if CYTHON_COMPILING_IN_CPYTHON
3834 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
3836 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3837 PyObject *__pyx_r = 0;
3838 __Pyx_RefNannyDeclarations
3839 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
3840 __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3843 __Pyx_RefNannyFinishContext();
3847 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3848 PyObject *__pyx_r = NULL;
3849 __Pyx_RefNannyDeclarations
3850 PyObject *__pyx_t_1 = NULL;
3851 PyObject *__pyx_t_2 = NULL;
3852 int __pyx_lineno = 0;
3853 const char *__pyx_filename = NULL;
3854 int __pyx_clineno = 0;
3855 __Pyx_RefNannySetupContext(
"__and__", 0);
3864 __Pyx_XDECREF(__pyx_r);
3865 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
3866 __Pyx_GOTREF(__pyx_t_1);
3867 __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;}
3868 __Pyx_GOTREF(__pyx_t_2);
3869 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3870 __pyx_r = __pyx_t_2;
3884 __Pyx_XDECREF(__pyx_t_1);
3885 __Pyx_XDECREF(__pyx_t_2);
3886 __Pyx_AddTraceback(
"PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3889 __Pyx_XGIVEREF(__pyx_r);
3890 __Pyx_RefNannyFinishContext();
3903 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
3904 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 ";
3905 #if CYTHON_COMPILING_IN_CPYTHON
3906 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
3908 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3909 PyObject *__pyx_r = 0;
3910 __Pyx_RefNannyDeclarations
3911 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
3912 __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3915 __Pyx_RefNannyFinishContext();
3919 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3920 PyObject *__pyx_r = NULL;
3921 __Pyx_RefNannyDeclarations
3922 PyObject *__pyx_t_1 = NULL;
3923 int __pyx_lineno = 0;
3924 const char *__pyx_filename = NULL;
3925 int __pyx_clineno = 0;
3926 __Pyx_RefNannySetupContext(
"__iand__", 0);
3935 __Pyx_XDECREF(__pyx_r);
3936 __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;}
3937 __Pyx_GOTREF(__pyx_t_1);
3938 __pyx_r = __pyx_t_1;
3952 __Pyx_XDECREF(__pyx_t_1);
3953 __Pyx_AddTraceback(
"PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3956 __Pyx_XGIVEREF(__pyx_r);
3957 __Pyx_RefNannyFinishContext();
3970 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3971 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 ";
3972 #if CYTHON_COMPILING_IN_CPYTHON
3973 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
3975 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3976 PyObject *__pyx_r = 0;
3977 __Pyx_RefNannyDeclarations
3978 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
3979 __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3982 __Pyx_RefNannyFinishContext();
3986 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3987 PyObject *__pyx_r = NULL;
3988 __Pyx_RefNannyDeclarations
3989 PyObject *__pyx_t_1 = NULL;
3990 PyObject *__pyx_t_2 = NULL;
3991 int __pyx_lineno = 0;
3992 const char *__pyx_filename = NULL;
3993 int __pyx_clineno = 0;
3994 __Pyx_RefNannySetupContext(
"__or__", 0);
4003 __Pyx_XDECREF(__pyx_r);
4004 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
4005 __Pyx_GOTREF(__pyx_t_1);
4006 __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;}
4007 __Pyx_GOTREF(__pyx_t_2);
4008 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4009 __pyx_r = __pyx_t_2;
4023 __Pyx_XDECREF(__pyx_t_1);
4024 __Pyx_XDECREF(__pyx_t_2);
4025 __Pyx_AddTraceback(
"PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4028 __Pyx_XGIVEREF(__pyx_r);
4029 __Pyx_RefNannyFinishContext();
4042 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4043 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 ";
4044 #if CYTHON_COMPILING_IN_CPYTHON
4045 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4047 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4048 PyObject *__pyx_r = 0;
4049 __Pyx_RefNannyDeclarations
4050 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
4051 __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4054 __Pyx_RefNannyFinishContext();
4058 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4059 PyObject *__pyx_r = NULL;
4060 __Pyx_RefNannyDeclarations
4061 PyObject *__pyx_t_1 = NULL;
4062 int __pyx_lineno = 0;
4063 const char *__pyx_filename = NULL;
4064 int __pyx_clineno = 0;
4065 __Pyx_RefNannySetupContext(
"__ior__", 0);
4074 __Pyx_XDECREF(__pyx_r);
4075 __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;}
4076 __Pyx_GOTREF(__pyx_t_1);
4077 __pyx_r = __pyx_t_1;
4091 __Pyx_XDECREF(__pyx_t_1);
4092 __Pyx_AddTraceback(
"PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4095 __Pyx_XGIVEREF(__pyx_r);
4096 __Pyx_RefNannyFinishContext();
4109 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4110 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 ";
4111 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4112 PyObject *__pyx_r = 0;
4113 __Pyx_RefNannyDeclarations
4114 __Pyx_RefNannySetupContext(
"count (wrapper)", 0);
4115 __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4118 __Pyx_RefNannyFinishContext();
4122 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4123 PyObject *__pyx_r = NULL;
4124 __Pyx_RefNannyDeclarations
4125 PyObject *__pyx_t_1 = NULL;
4126 int __pyx_lineno = 0;
4127 const char *__pyx_filename = NULL;
4128 int __pyx_clineno = 0;
4129 __Pyx_RefNannySetupContext(
"count", 0);
4138 __Pyx_XDECREF(__pyx_r);
4139 __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;}
4140 __Pyx_GOTREF(__pyx_t_1);
4141 __pyx_r = __pyx_t_1;
4155 __Pyx_XDECREF(__pyx_t_1);
4156 __Pyx_AddTraceback(
"PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4159 __Pyx_XGIVEREF(__pyx_r);
4160 __Pyx_RefNannyFinishContext();
4173 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4174 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 ";
4175 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4176 PyObject *__pyx_r = 0;
4177 __Pyx_RefNannyDeclarations
4178 __Pyx_RefNannySetupContext(
"count_neg (wrapper)", 0);
4179 __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4182 __Pyx_RefNannyFinishContext();
4186 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4187 PyObject *__pyx_r = NULL;
4188 __Pyx_RefNannyDeclarations
4189 PyObject *__pyx_t_1 = NULL;
4190 int __pyx_lineno = 0;
4191 const char *__pyx_filename = NULL;
4192 int __pyx_clineno = 0;
4193 __Pyx_RefNannySetupContext(
"count_neg", 0);
4202 __Pyx_XDECREF(__pyx_r);
4203 __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;}
4204 __Pyx_GOTREF(__pyx_t_1);
4205 __pyx_r = __pyx_t_1;
4219 __Pyx_XDECREF(__pyx_t_1);
4220 __Pyx_AddTraceback(
"PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4223 __Pyx_XGIVEREF(__pyx_r);
4224 __Pyx_RefNannyFinishContext();
4237 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4238 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 ";
4239 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4240 PyObject *__pyx_r = 0;
4241 __Pyx_RefNannyDeclarations
4242 __Pyx_RefNannySetupContext(
"count_pos (wrapper)", 0);
4243 __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4246 __Pyx_RefNannyFinishContext();
4250 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4251 PyObject *__pyx_r = NULL;
4252 __Pyx_RefNannyDeclarations
4253 PyObject *__pyx_t_1 = NULL;
4254 int __pyx_lineno = 0;
4255 const char *__pyx_filename = NULL;
4256 int __pyx_clineno = 0;
4257 __Pyx_RefNannySetupContext(
"count_pos", 0);
4266 __Pyx_XDECREF(__pyx_r);
4267 __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;}
4268 __Pyx_GOTREF(__pyx_t_1);
4269 __pyx_r = __pyx_t_1;
4283 __Pyx_XDECREF(__pyx_t_1);
4284 __Pyx_AddTraceback(
"PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4287 __Pyx_XGIVEREF(__pyx_r);
4288 __Pyx_RefNannyFinishContext();
4301 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4302 static char __pyx_doc_8PyClical_9index_set_37min[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
4303 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4304 PyObject *__pyx_r = 0;
4305 __Pyx_RefNannyDeclarations
4306 __Pyx_RefNannySetupContext(
"min (wrapper)", 0);
4307 __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4310 __Pyx_RefNannyFinishContext();
4314 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4315 PyObject *__pyx_r = NULL;
4316 __Pyx_RefNannyDeclarations
4317 PyObject *__pyx_t_1 = NULL;
4318 int __pyx_lineno = 0;
4319 const char *__pyx_filename = NULL;
4320 int __pyx_clineno = 0;
4321 __Pyx_RefNannySetupContext(
"min", 0);
4330 __Pyx_XDECREF(__pyx_r);
4331 __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;}
4332 __Pyx_GOTREF(__pyx_t_1);
4333 __pyx_r = __pyx_t_1;
4347 __Pyx_XDECREF(__pyx_t_1);
4348 __Pyx_AddTraceback(
"PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
4351 __Pyx_XGIVEREF(__pyx_r);
4352 __Pyx_RefNannyFinishContext();
4365 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4366 static char __pyx_doc_8PyClical_9index_set_39max[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
4367 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4368 PyObject *__pyx_r = 0;
4369 __Pyx_RefNannyDeclarations
4370 __Pyx_RefNannySetupContext(
"max (wrapper)", 0);
4371 __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4374 __Pyx_RefNannyFinishContext();
4378 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4379 PyObject *__pyx_r = NULL;
4380 __Pyx_RefNannyDeclarations
4381 PyObject *__pyx_t_1 = NULL;
4382 int __pyx_lineno = 0;
4383 const char *__pyx_filename = NULL;
4384 int __pyx_clineno = 0;
4385 __Pyx_RefNannySetupContext(
"max", 0);
4394 __Pyx_XDECREF(__pyx_r);
4395 __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;}
4396 __Pyx_GOTREF(__pyx_t_1);
4397 __pyx_r = __pyx_t_1;
4411 __Pyx_XDECREF(__pyx_t_1);
4412 __Pyx_AddTraceback(
"PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
4415 __Pyx_XGIVEREF(__pyx_r);
4416 __Pyx_RefNannyFinishContext();
4429 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4430 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] =
"\n Hash function.\n ";
4431 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4432 PyObject *__pyx_r = 0;
4433 __Pyx_RefNannyDeclarations
4434 __Pyx_RefNannySetupContext(
"hash_fn (wrapper)", 0);
4435 __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4438 __Pyx_RefNannyFinishContext();
4442 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4443 PyObject *__pyx_r = NULL;
4444 __Pyx_RefNannyDeclarations
4445 PyObject *__pyx_t_1 = NULL;
4446 int __pyx_lineno = 0;
4447 const char *__pyx_filename = NULL;
4448 int __pyx_clineno = 0;
4449 __Pyx_RefNannySetupContext(
"hash_fn", 0);
4458 __Pyx_XDECREF(__pyx_r);
4459 __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;}
4460 __Pyx_GOTREF(__pyx_t_1);
4461 __pyx_r = __pyx_t_1;
4475 __Pyx_XDECREF(__pyx_t_1);
4476 __Pyx_AddTraceback(
"PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
4479 __Pyx_XGIVEREF(__pyx_r);
4480 __Pyx_RefNannyFinishContext();
4493 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4494 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 ";
4495 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4496 PyObject *__pyx_r = 0;
4497 __Pyx_RefNannyDeclarations
4498 __Pyx_RefNannySetupContext(
"sign_of_mult (wrapper)", 0);
4499 __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4502 __Pyx_RefNannyFinishContext();
4506 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4507 PyObject *__pyx_r = NULL;
4508 __Pyx_RefNannyDeclarations
4509 PyObject *__pyx_t_1 = NULL;
4510 int __pyx_lineno = 0;
4511 const char *__pyx_filename = NULL;
4512 int __pyx_clineno = 0;
4513 __Pyx_RefNannySetupContext(
"sign_of_mult", 0);
4522 __Pyx_XDECREF(__pyx_r);
4523 __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;}
4524 __Pyx_GOTREF(__pyx_t_1);
4525 __pyx_r = __pyx_t_1;
4539 __Pyx_XDECREF(__pyx_t_1);
4540 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
4543 __Pyx_XGIVEREF(__pyx_r);
4544 __Pyx_RefNannyFinishContext();
4557 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4558 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 ";
4559 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4560 PyObject *__pyx_r = 0;
4561 __Pyx_RefNannyDeclarations
4562 __Pyx_RefNannySetupContext(
"sign_of_square (wrapper)", 0);
4563 __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4566 __Pyx_RefNannyFinishContext();
4570 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4571 PyObject *__pyx_r = NULL;
4572 __Pyx_RefNannyDeclarations
4573 PyObject *__pyx_t_1 = NULL;
4574 int __pyx_lineno = 0;
4575 const char *__pyx_filename = NULL;
4576 int __pyx_clineno = 0;
4577 __Pyx_RefNannySetupContext(
"sign_of_square", 0);
4586 __Pyx_XDECREF(__pyx_r);
4587 __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;}
4588 __Pyx_GOTREF(__pyx_t_1);
4589 __pyx_r = __pyx_t_1;
4603 __Pyx_XDECREF(__pyx_t_1);
4604 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
4607 __Pyx_XGIVEREF(__pyx_r);
4608 __Pyx_RefNannyFinishContext();
4621 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self);
4622 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 ";
4623 #if CYTHON_COMPILING_IN_CPYTHON
4624 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
4626 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
4627 PyObject *__pyx_r = 0;
4628 __Pyx_RefNannyDeclarations
4629 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
4630 __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4633 __Pyx_RefNannyFinishContext();
4637 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4638 PyObject *__pyx_r = NULL;
4639 __Pyx_RefNannyDeclarations
4640 PyObject *__pyx_t_1 = NULL;
4641 int __pyx_lineno = 0;
4642 const char *__pyx_filename = NULL;
4643 int __pyx_clineno = 0;
4644 __Pyx_RefNannySetupContext(
"__repr__", 0);
4653 __Pyx_XDECREF(__pyx_r);
4654 __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;}
4655 __Pyx_GOTREF(__pyx_t_1);
4656 __pyx_r = __pyx_t_1;
4670 __Pyx_XDECREF(__pyx_t_1);
4671 __Pyx_AddTraceback(
"PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4674 __Pyx_XGIVEREF(__pyx_r);
4675 __Pyx_RefNannyFinishContext();
4688 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self);
4689 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 ";
4690 #if CYTHON_COMPILING_IN_CPYTHON
4691 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
4693 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
4694 PyObject *__pyx_r = 0;
4695 __Pyx_RefNannyDeclarations
4696 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
4697 __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4700 __Pyx_RefNannyFinishContext();
4704 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4705 PyObject *__pyx_r = NULL;
4706 __Pyx_RefNannyDeclarations
4707 PyObject *__pyx_t_1 = NULL;
4708 int __pyx_lineno = 0;
4709 const char *__pyx_filename = NULL;
4710 int __pyx_clineno = 0;
4711 __Pyx_RefNannySetupContext(
"__str__", 0);
4720 __Pyx_XDECREF(__pyx_r);
4721 __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;}
4722 __Pyx_GOTREF(__pyx_t_1);
4723 __pyx_r = __pyx_t_1;
4737 __Pyx_XDECREF(__pyx_t_1);
4738 __Pyx_AddTraceback(
"PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4741 __Pyx_XGIVEREF(__pyx_r);
4742 __Pyx_RefNannyFinishContext();
4755 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
4756 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 ";
4757 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};
4758 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
4759 PyObject *__pyx_r = 0;
4760 __Pyx_RefNannyDeclarations
4761 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests (wrapper)", 0);
4762 __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
4765 __Pyx_RefNannyFinishContext();
4769 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
4770 PyObject *__pyx_r = NULL;
4771 __Pyx_RefNannyDeclarations
4772 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests", 0);
4781 __Pyx_XDECREF(__pyx_r);
4782 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4795 __Pyx_XGIVEREF(__pyx_r);
4796 __Pyx_RefNannyFinishContext();
4808 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4809 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED
int __pyx_skip_dispatch) {
4810 PyObject *__pyx_r = NULL;
4811 __Pyx_RefNannyDeclarations
4812 PyObject *__pyx_t_1 = NULL;
4813 int __pyx_lineno = 0;
4814 const char *__pyx_filename = NULL;
4815 int __pyx_clineno = 0;
4816 __Pyx_RefNannySetupContext(
"compare", 0);
4825 __Pyx_XDECREF(__pyx_r);
4826 __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;}
4827 __Pyx_GOTREF(__pyx_t_1);
4828 __pyx_r = __pyx_t_1;
4842 __Pyx_XDECREF(__pyx_t_1);
4843 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4846 __Pyx_XGIVEREF(__pyx_r);
4847 __Pyx_RefNannyFinishContext();
4852 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4853 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 ";
4854 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4855 PyObject *__pyx_v_lhs = 0;
4856 PyObject *__pyx_v_rhs = 0;
4857 int __pyx_lineno = 0;
4858 const char *__pyx_filename = NULL;
4859 int __pyx_clineno = 0;
4860 PyObject *__pyx_r = 0;
4861 __Pyx_RefNannyDeclarations
4862 __Pyx_RefNannySetupContext(
"compare (wrapper)", 0);
4864 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
4865 PyObject* values[2] = {0,0};
4866 if (unlikely(__pyx_kwds)) {
4868 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4870 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4871 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4873 default:
goto __pyx_L5_argtuple_error;
4875 kw_args = PyDict_Size(__pyx_kwds);
4878 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
4879 else goto __pyx_L5_argtuple_error;
4881 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
4883 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
4886 if (unlikely(kw_args > 0)) {
4887 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;}
4889 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4890 goto __pyx_L5_argtuple_error;
4892 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4893 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4895 __pyx_v_lhs = values[0];
4896 __pyx_v_rhs = values[1];
4898 goto __pyx_L4_argument_unpacking_done;
4899 __pyx_L5_argtuple_error:;
4900 __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;}
4902 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4903 __Pyx_RefNannyFinishContext();
4905 __pyx_L4_argument_unpacking_done:;
4906 __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
4909 __Pyx_RefNannyFinishContext();
4913 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4914 PyObject *__pyx_r = NULL;
4915 __Pyx_RefNannyDeclarations
4916 PyObject *__pyx_t_1 = NULL;
4917 int __pyx_lineno = 0;
4918 const char *__pyx_filename = NULL;
4919 int __pyx_clineno = 0;
4920 __Pyx_RefNannySetupContext(
"compare", 0);
4921 __Pyx_XDECREF(__pyx_r);
4922 __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;}
4923 __Pyx_GOTREF(__pyx_t_1);
4924 __pyx_r = __pyx_t_1;
4930 __Pyx_XDECREF(__pyx_t_1);
4931 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4934 __Pyx_XGIVEREF(__pyx_r);
4935 __Pyx_RefNannyFinishContext();
4947 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
4948 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
4949 PyObject *__pyx_r = NULL;
4950 __Pyx_RefNannyDeclarations
4951 PyObject *__pyx_t_1 = NULL;
4952 int __pyx_lineno = 0;
4953 const char *__pyx_filename = NULL;
4954 int __pyx_clineno = 0;
4955 __Pyx_RefNannySetupContext(
"min_neg", 0);
4964 __Pyx_XDECREF(__pyx_r);
4965 __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;}
4966 __Pyx_GOTREF(__pyx_t_1);
4967 __pyx_r = __pyx_t_1;
4981 __Pyx_XDECREF(__pyx_t_1);
4982 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4985 __Pyx_XGIVEREF(__pyx_r);
4986 __Pyx_RefNannyFinishContext();
4991 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
4992 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 ";
4993 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
4994 PyObject *__pyx_r = 0;
4995 __Pyx_RefNannyDeclarations
4996 __Pyx_RefNannySetupContext(
"min_neg (wrapper)", 0);
4997 __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5000 __Pyx_RefNannyFinishContext();
5004 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5005 PyObject *__pyx_r = NULL;
5006 __Pyx_RefNannyDeclarations
5007 PyObject *__pyx_t_1 = NULL;
5008 int __pyx_lineno = 0;
5009 const char *__pyx_filename = NULL;
5010 int __pyx_clineno = 0;
5011 __Pyx_RefNannySetupContext(
"min_neg", 0);
5012 __Pyx_XDECREF(__pyx_r);
5013 __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;}
5014 __Pyx_GOTREF(__pyx_t_1);
5015 __pyx_r = __pyx_t_1;
5021 __Pyx_XDECREF(__pyx_t_1);
5022 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5025 __Pyx_XGIVEREF(__pyx_r);
5026 __Pyx_RefNannyFinishContext();
5038 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5039 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
5040 PyObject *__pyx_r = NULL;
5041 __Pyx_RefNannyDeclarations
5042 PyObject *__pyx_t_1 = NULL;
5043 int __pyx_lineno = 0;
5044 const char *__pyx_filename = NULL;
5045 int __pyx_clineno = 0;
5046 __Pyx_RefNannySetupContext(
"max_pos", 0);
5055 __Pyx_XDECREF(__pyx_r);
5056 __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;}
5057 __Pyx_GOTREF(__pyx_t_1);
5058 __pyx_r = __pyx_t_1;
5072 __Pyx_XDECREF(__pyx_t_1);
5073 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5076 __Pyx_XGIVEREF(__pyx_r);
5077 __Pyx_RefNannyFinishContext();
5082 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
5083 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 ";
5084 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5085 PyObject *__pyx_r = 0;
5086 __Pyx_RefNannyDeclarations
5087 __Pyx_RefNannySetupContext(
"max_pos (wrapper)", 0);
5088 __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5091 __Pyx_RefNannyFinishContext();
5095 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5096 PyObject *__pyx_r = NULL;
5097 __Pyx_RefNannyDeclarations
5098 PyObject *__pyx_t_1 = NULL;
5099 int __pyx_lineno = 0;
5100 const char *__pyx_filename = NULL;
5101 int __pyx_clineno = 0;
5102 __Pyx_RefNannySetupContext(
"max_pos", 0);
5103 __Pyx_XDECREF(__pyx_r);
5104 __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;}
5105 __Pyx_GOTREF(__pyx_t_1);
5106 __pyx_r = __pyx_t_1;
5112 __Pyx_XDECREF(__pyx_t_1);
5113 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5116 __Pyx_XGIVEREF(__pyx_r);
5117 __Pyx_RefNannyFinishContext();
5129 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5130 std::vector<scalar_t> __pyx_v_v;
5131 PyObject *__pyx_v_s = NULL;
5132 std::vector<scalar_t> __pyx_r;
5133 __Pyx_RefNannyDeclarations
5134 PyObject *__pyx_t_1 = NULL;
5135 Py_ssize_t __pyx_t_2;
5136 PyObject *(*__pyx_t_3)(PyObject *);
5137 PyObject *__pyx_t_4 = NULL;
5139 int __pyx_lineno = 0;
5140 const char *__pyx_filename = NULL;
5141 int __pyx_clineno = 0;
5142 __Pyx_RefNannySetupContext(
"list_to_vector", 0);
5151 if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5152 __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5155 __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;}
5156 __Pyx_GOTREF(__pyx_t_1);
5157 __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;}
5160 if (likely(!__pyx_t_3)) {
5161 if (likely(PyList_CheckExact(__pyx_t_1))) {
5162 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1))
break;
5163 #if CYTHON_COMPILING_IN_CPYTHON
5164 __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;}
5166 __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;}
5169 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1))
break;
5170 #if CYTHON_COMPILING_IN_CPYTHON
5171 __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;}
5173 __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;}
5177 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5178 if (unlikely(!__pyx_t_4)) {
5179 PyObject* exc_type = PyErr_Occurred();
5181 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5182 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5186 __Pyx_GOTREF(__pyx_t_4);
5188 __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5198 __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;}
5199 __pyx_v_v.push_back(((
scalar_t)__pyx_t_5));
5209 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5218 __pyx_r = __pyx_v_v;
5231 __Pyx_XDECREF(__pyx_t_1);
5232 __Pyx_XDECREF(__pyx_t_4);
5233 __Pyx_WriteUnraisable(
"PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
5235 __Pyx_XDECREF(__pyx_v_s);
5236 __Pyx_RefNannyFinishContext();
5248 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
5250 __Pyx_RefNannyDeclarations
5251 PyObject *__pyx_t_1 = NULL;
5252 PyObject *__pyx_t_2 = NULL;
5253 int __pyx_lineno = 0;
5254 const char *__pyx_filename = NULL;
5255 int __pyx_clineno = 0;
5256 __Pyx_RefNannySetupContext(
"toClifford", 0);
5265 __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;}
5266 __Pyx_GOTREF(__pyx_t_1);
5267 __Pyx_INCREF(__pyx_v_obj);
5268 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
5269 __Pyx_GIVEREF(__pyx_v_obj);
5270 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
5271 __Pyx_GOTREF(__pyx_t_2);
5272 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5273 __pyx_r = (((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
5274 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5287 __Pyx_XDECREF(__pyx_t_1);
5288 __Pyx_XDECREF(__pyx_t_2);
5289 __Pyx_WriteUnraisable(
"PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
5291 __Pyx_RefNannyFinishContext();
5303 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other) {
5304 PyObject *__pyx_r = NULL;
5305 __Pyx_RefNannyDeclarations
5306 __Pyx_RefNannySetupContext(
"wrap", 0);
5315 (__pyx_v_self->instance[0]) = __pyx_v_other;
5324 __Pyx_XDECREF(__pyx_r);
5325 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5326 __pyx_r = ((PyObject *)__pyx_v_self);
5339 __Pyx_XGIVEREF(__pyx_r);
5340 __Pyx_RefNannyFinishContext();
5352 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5354 __Pyx_RefNannyDeclarations
5355 __Pyx_RefNannySetupContext(
"unwrap", 0);
5364 __pyx_r = (__pyx_v_self->instance[0]);
5377 __Pyx_RefNannyFinishContext();
5389 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5390 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch) {
5391 PyObject *__pyx_r = NULL;
5392 __Pyx_RefNannyDeclarations
5393 PyObject *__pyx_t_1 = NULL;
5394 PyObject *__pyx_t_2 = NULL;
5395 PyObject *__pyx_t_3 = NULL;
5396 PyObject *__pyx_t_4 = NULL;
5397 int __pyx_lineno = 0;
5398 const char *__pyx_filename = NULL;
5399 int __pyx_clineno = 0;
5400 __Pyx_RefNannySetupContext(
"copy", 0);
5402 if (unlikely(__pyx_skip_dispatch)) ;
5404 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
5405 __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;}
5406 __Pyx_GOTREF(__pyx_t_1);
5407 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
5408 __Pyx_XDECREF(__pyx_r);
5409 __Pyx_INCREF(__pyx_t_1);
5410 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
5411 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
5412 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5413 if (likely(__pyx_t_4)) {
5414 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
5415 __Pyx_INCREF(__pyx_t_4);
5416 __Pyx_INCREF(
function);
5417 __Pyx_DECREF_SET(__pyx_t_3,
function);
5421 __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;}
5422 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5424 __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;}
5426 __Pyx_GOTREF(__pyx_t_2);
5427 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5428 __pyx_r = __pyx_t_2;
5430 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5433 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5443 __Pyx_XDECREF(__pyx_r);
5444 __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;}
5445 __Pyx_GOTREF(__pyx_t_1);
5446 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5447 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
5448 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5449 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
5450 __Pyx_GOTREF(__pyx_t_2);
5451 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5452 __pyx_r = __pyx_t_2;
5466 __Pyx_XDECREF(__pyx_t_1);
5467 __Pyx_XDECREF(__pyx_t_2);
5468 __Pyx_XDECREF(__pyx_t_3);
5469 __Pyx_XDECREF(__pyx_t_4);
5470 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5473 __Pyx_XGIVEREF(__pyx_r);
5474 __Pyx_RefNannyFinishContext();
5479 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5480 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 ";
5481 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5482 PyObject *__pyx_r = 0;
5483 __Pyx_RefNannyDeclarations
5484 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
5485 __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
5488 __Pyx_RefNannyFinishContext();
5492 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5493 PyObject *__pyx_r = NULL;
5494 __Pyx_RefNannyDeclarations
5495 PyObject *__pyx_t_1 = NULL;
5496 int __pyx_lineno = 0;
5497 const char *__pyx_filename = NULL;
5498 int __pyx_clineno = 0;
5499 __Pyx_RefNannySetupContext(
"copy", 0);
5500 __Pyx_XDECREF(__pyx_r);
5501 __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;}
5502 __Pyx_GOTREF(__pyx_t_1);
5503 __pyx_r = __pyx_t_1;
5509 __Pyx_XDECREF(__pyx_t_1);
5510 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5513 __Pyx_XGIVEREF(__pyx_r);
5514 __Pyx_RefNannyFinishContext();
5527 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5528 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5529 PyObject *__pyx_v_other = 0;
5530 PyObject *__pyx_v_ixt = 0;
5531 int __pyx_lineno = 0;
5532 const char *__pyx_filename = NULL;
5533 int __pyx_clineno = 0;
5535 __Pyx_RefNannyDeclarations
5536 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
5538 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
5539 PyObject* values[2] = {0,0};
5540 values[0] = ((PyObject *)__pyx_int_0);
5541 values[1] = ((PyObject *)Py_None);
5542 if (unlikely(__pyx_kwds)) {
5544 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5546 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5547 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5549 default:
goto __pyx_L5_argtuple_error;
5551 kw_args = PyDict_Size(__pyx_kwds);
5555 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
5556 if (value) { values[0] = value; kw_args--; }
5560 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
5561 if (value) { values[1] = value; kw_args--; }
5564 if (unlikely(kw_args > 0)) {
5565 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;}
5568 switch (PyTuple_GET_SIZE(__pyx_args)) {
5569 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5570 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5572 default:
goto __pyx_L5_argtuple_error;
5575 __pyx_v_other = values[0];
5576 __pyx_v_ixt = values[1];
5578 goto __pyx_L4_argument_unpacking_done;
5579 __pyx_L5_argtuple_error:;
5580 __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;}
5582 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5583 __Pyx_RefNannyFinishContext();
5585 __pyx_L4_argument_unpacking_done:;
5586 __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
5589 __Pyx_RefNannyFinishContext();
5593 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
5594 PyObject *__pyx_v_error_msg_prefix = NULL;
5595 PyObject *__pyx_v_err = NULL;
5597 __Pyx_RefNannyDeclarations
5600 PyObject *__pyx_t_3 = NULL;
5601 PyObject *__pyx_t_4 = NULL;
5602 PyObject *__pyx_t_5 = NULL;
5604 PyObject *__pyx_t_7 = NULL;
5605 PyObject *__pyx_t_8 = NULL;
5607 PyObject *__pyx_t_10 = NULL;
5608 PyObject *__pyx_t_11 = NULL;
5609 PyObject *__pyx_t_12 = NULL;
5612 PyObject *__pyx_t_15 = NULL;
5613 PyObject *__pyx_t_16 = NULL;
5614 PyObject *__pyx_t_17 = NULL;
5615 PyObject *__pyx_t_18 = NULL;
5616 int __pyx_lineno = 0;
5617 const char *__pyx_filename = NULL;
5618 int __pyx_clineno = 0;
5619 __Pyx_RefNannySetupContext(
"__cinit__", 0);
5628 __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
5629 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
5638 __pyx_t_1 = (__pyx_v_ixt == Py_None);
5639 __pyx_t_2 = (__pyx_t_1 != 0);
5650 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
5651 __Pyx_XGOTREF(__pyx_t_3);
5652 __Pyx_XGOTREF(__pyx_t_4);
5653 __Pyx_XGOTREF(__pyx_t_5);
5663 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_clifford));
5664 __pyx_t_1 = (__pyx_t_2 != 0);
5675 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
5677 __Pyx_CppExn2PyErr();
5678 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5680 __pyx_v_self->instance = __pyx_t_6;
5691 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
5692 __pyx_t_2 = (__pyx_t_1 != 0);
5703 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((
scalar_t)1.0));
5705 __Pyx_CppExn2PyErr();
5706 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5708 __pyx_v_self->instance = __pyx_t_6;
5719 __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;}
5720 __Pyx_GOTREF(__pyx_t_7);
5721 __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;}
5722 __Pyx_GOTREF(__pyx_t_8);
5723 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5724 __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;}
5725 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5726 __pyx_t_1 = (__pyx_t_2 != 0);
5736 __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;}
5740 __Pyx_CppExn2PyErr();
5741 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5743 __pyx_v_self->instance = __pyx_t_6;
5754 __pyx_t_1 = PyString_Check(__pyx_v_other);
5755 __pyx_t_2 = (__pyx_t_1 != 0);
5766 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
5767 __Pyx_XGOTREF(__pyx_t_10);
5768 __Pyx_XGOTREF(__pyx_t_11);
5769 __Pyx_XGOTREF(__pyx_t_12);
5779 __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;}
5781 __pyx_t_6 =
new Clifford(((
char *)__pyx_t_13));
5783 __Pyx_CppExn2PyErr();
5784 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__;
goto __pyx_L13_error;}
5786 __pyx_v_self->instance = __pyx_t_6;
5788 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
5789 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5790 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
5791 goto __pyx_L20_try_end;
5793 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5794 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5803 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5805 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5806 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;}
5807 __Pyx_GOTREF(__pyx_t_8);
5808 __Pyx_GOTREF(__pyx_t_7);
5809 __Pyx_GOTREF(__pyx_t_15);
5818 __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;}
5819 __Pyx_GOTREF(__pyx_t_16);
5820 __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;}
5821 __Pyx_GOTREF(__pyx_t_17);
5822 __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;}
5823 __Pyx_GOTREF(__pyx_t_18);
5824 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5825 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5826 __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;}
5827 __Pyx_GOTREF(__pyx_t_17);
5828 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5829 __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;}
5830 __Pyx_GOTREF(__pyx_t_18);
5831 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
5832 __Pyx_GIVEREF(__pyx_t_17);
5834 __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;}
5835 __Pyx_GOTREF(__pyx_t_17);
5836 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5837 __Pyx_Raise(__pyx_t_17, 0, 0, 0);
5838 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5839 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
5841 goto __pyx_L15_except_error;
5842 __pyx_L15_except_error:;
5843 __Pyx_XGIVEREF(__pyx_t_10);
5844 __Pyx_XGIVEREF(__pyx_t_11);
5845 __Pyx_XGIVEREF(__pyx_t_12);
5846 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
5847 goto __pyx_L4_error;
5861 __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;}
5862 __Pyx_GOTREF(__pyx_t_15);
5863 __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;}
5864 __Pyx_GOTREF(__pyx_t_7);
5865 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5866 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5867 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5868 __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((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;}
5869 __Pyx_GOTREF(__pyx_t_8);
5870 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5871 __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;}
5872 __Pyx_GOTREF(__pyx_t_7);
5873 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5874 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5875 __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;}
5876 __Pyx_GOTREF(__pyx_t_8);
5877 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5878 __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;}
5879 __Pyx_GOTREF(__pyx_t_7);
5880 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
5881 __Pyx_GIVEREF(__pyx_t_8);
5883 __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;}
5884 __Pyx_GOTREF(__pyx_t_8);
5885 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5886 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5887 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5888 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5892 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5893 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5894 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5895 goto __pyx_L11_try_end;
5897 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
5898 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
5899 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
5900 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
5901 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5902 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5911 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5913 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5914 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;}
5915 __Pyx_GOTREF(__pyx_t_8);
5916 __Pyx_GOTREF(__pyx_t_7);
5917 __Pyx_GOTREF(__pyx_t_15);
5918 __Pyx_INCREF(__pyx_t_7);
5919 __pyx_v_err = __pyx_t_7;
5928 __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;}
5929 __Pyx_GOTREF(__pyx_t_17);
5930 __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;}
5931 __Pyx_GOTREF(__pyx_t_18);
5932 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5933 PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5934 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5935 __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)((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;}
5936 __Pyx_GOTREF(__pyx_t_16);
5937 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5938 __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;}
5939 __Pyx_GOTREF(__pyx_t_18);
5940 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5941 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5950 __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;}
5951 __Pyx_GOTREF(__pyx_t_16);
5952 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5953 __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;}
5954 __Pyx_GOTREF(__pyx_t_18);
5955 __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;}
5956 __Pyx_GOTREF(__pyx_t_17);
5957 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5958 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5959 __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;}
5960 __Pyx_GOTREF(__pyx_t_18);
5961 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5970 __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;}
5971 __Pyx_GOTREF(__pyx_t_17);
5972 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5973 __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;}
5974 __Pyx_GOTREF(__pyx_t_18);
5975 __Pyx_INCREF(__pyx_v_err);
5976 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
5977 __Pyx_GIVEREF(__pyx_v_err);
5978 __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)((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;}
5979 __Pyx_GOTREF(__pyx_t_16);
5980 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5981 __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;}
5982 __Pyx_GOTREF(__pyx_t_18);
5983 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5984 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5993 __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;}
5994 __Pyx_GOTREF(__pyx_t_16);
5995 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
5996 __Pyx_GIVEREF(__pyx_t_18);
5998 __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;}
5999 __Pyx_GOTREF(__pyx_t_18);
6000 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6001 __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6002 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6003 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6005 goto __pyx_L6_except_error;
6006 __pyx_L6_except_error:;
6007 __Pyx_XGIVEREF(__pyx_t_3);
6008 __Pyx_XGIVEREF(__pyx_t_4);
6009 __Pyx_XGIVEREF(__pyx_t_5);
6010 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6011 goto __pyx_L1_error;
6024 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
6025 __pyx_t_1 = (__pyx_t_2 != 0);
6035 __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;}
6036 __Pyx_GOTREF(__pyx_t_15);
6037 __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;}
6038 __Pyx_GOTREF(__pyx_t_7);
6039 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6040 __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;}
6041 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6042 __pyx_t_2 = (__pyx_t_1 != 0);
6052 __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;}
6054 __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));
6056 __Pyx_CppExn2PyErr();
6057 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6059 __pyx_v_self->instance = __pyx_t_6;
6070 __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;}
6071 __Pyx_GOTREF(__pyx_t_7);
6072 __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;}
6073 __Pyx_GOTREF(__pyx_t_15);
6074 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6075 __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;}
6076 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6077 __pyx_t_1 = (__pyx_t_2 != 0);
6088 __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)));
6090 __Pyx_CppExn2PyErr();
6091 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6093 __pyx_v_self->instance = __pyx_t_6;
6105 __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;}
6106 __Pyx_GOTREF(__pyx_t_15);
6107 __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;}
6108 __Pyx_GOTREF(__pyx_t_7);
6109 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6110 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6111 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6112 __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((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;}
6113 __Pyx_GOTREF(__pyx_t_8);
6114 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6115 __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;}
6116 __Pyx_GOTREF(__pyx_t_7);
6117 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6118 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6127 __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;}
6128 __Pyx_GOTREF(__pyx_t_8);
6129 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6130 __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;}
6131 __Pyx_GOTREF(__pyx_t_7);
6132 __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;}
6133 __Pyx_GOTREF(__pyx_t_15);
6134 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6135 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6136 __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;}
6137 __Pyx_GOTREF(__pyx_t_7);
6138 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6147 __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;}
6148 __Pyx_GOTREF(__pyx_t_15);
6149 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6150 __Pyx_GIVEREF(__pyx_t_7);
6152 __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;}
6153 __Pyx_GOTREF(__pyx_t_7);
6154 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6155 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6156 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6157 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6171 __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;}
6172 __Pyx_GOTREF(__pyx_t_7);
6173 __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;}
6174 __Pyx_GOTREF(__pyx_t_15);
6175 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6176 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6177 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6178 __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((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;}
6179 __Pyx_GOTREF(__pyx_t_8);
6180 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6181 __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;}
6182 __Pyx_GOTREF(__pyx_t_15);
6183 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6184 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6193 __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;}
6194 __Pyx_GOTREF(__pyx_t_8);
6195 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6196 __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;}
6197 __Pyx_GOTREF(__pyx_t_15);
6198 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6199 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6200 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6201 __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((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;}
6202 __Pyx_GOTREF(__pyx_t_7);
6203 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6204 __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;}
6205 __Pyx_GOTREF(__pyx_t_15);
6206 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6207 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6208 __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;}
6209 __Pyx_GOTREF(__pyx_t_7);
6210 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6219 __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;}
6220 __Pyx_GOTREF(__pyx_t_15);
6221 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6222 __Pyx_GIVEREF(__pyx_t_7);
6224 __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;}
6225 __Pyx_GOTREF(__pyx_t_7);
6226 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6227 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6228 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6229 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6245 __Pyx_XDECREF(__pyx_t_7);
6246 __Pyx_XDECREF(__pyx_t_8);
6247 __Pyx_XDECREF(__pyx_t_15);
6248 __Pyx_XDECREF(__pyx_t_16);
6249 __Pyx_XDECREF(__pyx_t_17);
6250 __Pyx_XDECREF(__pyx_t_18);
6251 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6254 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6255 __Pyx_XDECREF(__pyx_v_err);
6256 __Pyx_RefNannyFinishContext();
6269 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self);
6270 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
6271 __Pyx_RefNannyDeclarations
6272 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
6273 __pyx_pf_8PyClical_8clifford_4__dealloc__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6276 __Pyx_RefNannyFinishContext();
6279 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6280 __Pyx_RefNannyDeclarations
6281 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
6290 delete __pyx_v_self->instance;
6301 __Pyx_RefNannyFinishContext();
6313 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x);
6314 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 ";
6315 #if CYTHON_COMPILING_IN_CPYTHON
6316 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
6318 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
6320 __Pyx_RefNannyDeclarations
6321 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
6322 __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
6325 __Pyx_RefNannyFinishContext();
6329 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
6331 __Pyx_RefNannyDeclarations
6332 PyObject *__pyx_t_1 = NULL;
6333 int __pyx_lineno = 0;
6334 const char *__pyx_filename = NULL;
6335 int __pyx_clineno = 0;
6336 __Pyx_RefNannySetupContext(
"__contains__", 0);
6345 __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;}
6346 __Pyx_GOTREF(__pyx_t_1);
6347 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6348 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6349 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6361 __Pyx_XDECREF(__pyx_t_1);
6362 __Pyx_AddTraceback(
"PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6364 __Pyx_RefNannyFinishContext();
6377 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self);
6378 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 ";
6379 #if CYTHON_COMPILING_IN_CPYTHON
6380 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
6382 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
6383 PyObject *__pyx_r = 0;
6384 __Pyx_RefNannyDeclarations
6385 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
6386 __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6389 __Pyx_RefNannyFinishContext();
6393 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6394 PyObject *__pyx_r = NULL;
6395 __Pyx_RefNannyDeclarations
6396 PyObject *__pyx_t_1 = NULL;
6397 int __pyx_lineno = 0;
6398 const char *__pyx_filename = NULL;
6399 int __pyx_clineno = 0;
6400 __Pyx_RefNannySetupContext(
"__iter__", 0);
6409 __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;}
6410 __Pyx_GOTREF(__pyx_t_1);
6411 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6412 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6413 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6425 __Pyx_XDECREF(__pyx_t_1);
6426 __Pyx_AddTraceback(
"PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6428 __Pyx_XGIVEREF(__pyx_r);
6429 __Pyx_RefNannyFinishContext();
6442 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
6443 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 ";
6444 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
6445 PyObject *__pyx_r = 0;
6446 __Pyx_RefNannyDeclarations
6447 __Pyx_RefNannySetupContext(
"reframe (wrapper)", 0);
6448 __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
6451 __Pyx_RefNannyFinishContext();
6455 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
6456 PyObject *__pyx_v_error_msg_prefix = NULL;
6457 struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
6458 PyObject *__pyx_v_err = NULL;
6459 PyObject *__pyx_r = NULL;
6460 __Pyx_RefNannyDeclarations
6463 PyObject *__pyx_t_3 = NULL;
6464 PyObject *__pyx_t_4 = NULL;
6465 PyObject *__pyx_t_5 = NULL;
6466 PyObject *__pyx_t_6 = NULL;
6469 PyObject *__pyx_t_9 = NULL;
6470 PyObject *__pyx_t_10 = NULL;
6471 PyObject *__pyx_t_11 = NULL;
6472 PyObject *__pyx_t_12 = NULL;
6473 PyObject *__pyx_t_13 = NULL;
6474 int __pyx_lineno = 0;
6475 const char *__pyx_filename = NULL;
6476 int __pyx_clineno = 0;
6477 __Pyx_RefNannySetupContext(
"reframe", 0);
6486 __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
6487 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
6496 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
6497 __pyx_t_2 = (__pyx_t_1 != 0);
6508 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6509 __Pyx_XGOTREF(__pyx_t_3);
6510 __Pyx_XGOTREF(__pyx_t_4);
6511 __Pyx_XGOTREF(__pyx_t_5);
6521 __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((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;}
6522 __Pyx_GOTREF(__pyx_t_6);
6523 __pyx_v_result = ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
6534 __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)));
6536 __Pyx_CppExn2PyErr();
6537 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6539 __pyx_v_result->instance = __pyx_t_7;
6541 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6542 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6543 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6544 goto __pyx_L11_try_end;
6546 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6555 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6557 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6558 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;}
6559 __Pyx_GOTREF(__pyx_t_6);
6560 __Pyx_GOTREF(__pyx_t_9);
6561 __Pyx_GOTREF(__pyx_t_10);
6562 __Pyx_INCREF(__pyx_t_9);
6563 __pyx_v_err = __pyx_t_9;
6572 __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;}
6573 __Pyx_GOTREF(__pyx_t_11);
6574 __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;}
6575 __Pyx_GOTREF(__pyx_t_12);
6576 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6577 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
6578 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6579 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((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;}
6580 __Pyx_GOTREF(__pyx_t_13);
6581 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6582 __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;}
6583 __Pyx_GOTREF(__pyx_t_12);
6584 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6585 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6586 __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;}
6587 __Pyx_GOTREF(__pyx_t_13);
6588 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6597 __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;}
6598 __Pyx_GOTREF(__pyx_t_12);
6599 __Pyx_INCREF(__pyx_v_ixt);
6600 PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
6601 __Pyx_GIVEREF(__pyx_v_ixt);
6602 __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((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;}
6603 __Pyx_GOTREF(__pyx_t_11);
6604 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6605 __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;}
6606 __Pyx_GOTREF(__pyx_t_12);
6607 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6608 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6609 __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;}
6610 __Pyx_GOTREF(__pyx_t_11);
6611 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6620 __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;}
6621 __Pyx_GOTREF(__pyx_t_12);
6622 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6623 __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;}
6624 __Pyx_GOTREF(__pyx_t_11);
6625 __Pyx_INCREF(__pyx_v_err);
6626 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
6627 __Pyx_GIVEREF(__pyx_v_err);
6628 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((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;}
6629 __Pyx_GOTREF(__pyx_t_13);
6630 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6631 __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;}
6632 __Pyx_GOTREF(__pyx_t_11);
6633 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6634 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6643 __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;}
6644 __Pyx_GOTREF(__pyx_t_13);
6645 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
6646 __Pyx_GIVEREF(__pyx_t_11);
6648 __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;}
6649 __Pyx_GOTREF(__pyx_t_11);
6650 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6651 __Pyx_Raise(__pyx_t_11, 0, 0, 0);
6652 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6653 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6655 goto __pyx_L6_except_error;
6656 __pyx_L6_except_error:;
6657 __Pyx_XGIVEREF(__pyx_t_3);
6658 __Pyx_XGIVEREF(__pyx_t_4);
6659 __Pyx_XGIVEREF(__pyx_t_5);
6660 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6661 goto __pyx_L1_error;
6675 __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;}
6676 __Pyx_GOTREF(__pyx_t_10);
6677 __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;}
6678 __Pyx_GOTREF(__pyx_t_9);
6679 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6680 PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6681 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6682 __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((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;}
6683 __Pyx_GOTREF(__pyx_t_6);
6684 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6685 __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;}
6686 __Pyx_GOTREF(__pyx_t_9);
6687 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6688 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6689 __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;}
6690 __Pyx_GOTREF(__pyx_t_6);
6691 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6692 __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;}
6693 __Pyx_GOTREF(__pyx_t_9);
6694 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
6695 __Pyx_GIVEREF(__pyx_t_6);
6697 __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;}
6698 __Pyx_GOTREF(__pyx_t_6);
6699 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6700 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6701 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6702 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6713 __Pyx_XDECREF(__pyx_r);
6714 __Pyx_INCREF(((PyObject *)__pyx_v_result));
6715 __pyx_r = ((PyObject *)__pyx_v_result);
6728 __Pyx_XDECREF(__pyx_t_6);
6729 __Pyx_XDECREF(__pyx_t_9);
6730 __Pyx_XDECREF(__pyx_t_10);
6731 __Pyx_XDECREF(__pyx_t_11);
6732 __Pyx_XDECREF(__pyx_t_12);
6733 __Pyx_XDECREF(__pyx_t_13);
6734 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6737 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6738 __Pyx_XDECREF((PyObject *)__pyx_v_result);
6739 __Pyx_XDECREF(__pyx_v_err);
6740 __Pyx_XGIVEREF(__pyx_r);
6741 __Pyx_RefNannyFinishContext();
6754 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
6755 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
6756 PyObject *__pyx_r = 0;
6757 __Pyx_RefNannyDeclarations
6758 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
6759 __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
6762 __Pyx_RefNannyFinishContext();
6766 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
6767 PyObject *__pyx_r = NULL;
6768 __Pyx_RefNannyDeclarations
6772 PyObject *__pyx_t_4 = NULL;
6773 PyObject *__pyx_t_5 = NULL;
6774 PyObject *__pyx_t_6 = NULL;
6775 int __pyx_lineno = 0;
6776 const char *__pyx_filename = NULL;
6777 int __pyx_clineno = 0;
6778 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
6787 __pyx_t_1 = ((__pyx_v_op == 2) != 0);
6797 __pyx_t_2 = (__pyx_v_lhs == Py_None);
6798 __pyx_t_3 = (__pyx_t_2 != 0);
6800 goto __pyx_L6_next_or;
6802 __pyx_t_1 = __pyx_t_3;
6803 goto __pyx_L5_bool_binop_done;
6806 __pyx_t_3 = (__pyx_v_rhs == Py_None);
6807 __pyx_t_2 = (__pyx_t_3 != 0);
6808 __pyx_t_1 = __pyx_t_2;
6809 __pyx_L5_bool_binop_done:;
6819 __Pyx_XDECREF(__pyx_r);
6820 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
6821 __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;}
6822 __Pyx_GOTREF(__pyx_t_4);
6823 __pyx_r = __pyx_t_4;
6836 __Pyx_XDECREF(__pyx_r);
6837 __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
6838 __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;}
6839 __Pyx_GOTREF(__pyx_t_4);
6840 __pyx_r = __pyx_t_4;
6853 __pyx_t_1 = ((__pyx_v_op == 3) != 0);
6863 __pyx_t_2 = (__pyx_v_lhs == Py_None);
6864 __pyx_t_3 = (__pyx_t_2 != 0);
6866 goto __pyx_L9_next_or;
6868 __pyx_t_1 = __pyx_t_3;
6869 goto __pyx_L8_bool_binop_done;
6872 __pyx_t_3 = (__pyx_v_rhs == Py_None);
6873 __pyx_t_2 = (__pyx_t_3 != 0);
6874 __pyx_t_1 = __pyx_t_2;
6875 __pyx_L8_bool_binop_done:;
6885 __Pyx_XDECREF(__pyx_r);
6886 __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
6887 __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;}
6888 __Pyx_GOTREF(__pyx_t_4);
6889 __pyx_r = __pyx_t_4;
6902 __Pyx_XDECREF(__pyx_r);
6903 __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
6904 __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;}
6905 __Pyx_GOTREF(__pyx_t_4);
6906 __pyx_r = __pyx_t_4;
6919 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, ((PyObject*)__pyx_ptype_8PyClical_clifford));
6920 __pyx_t_3 = (__pyx_t_2 != 0);
6922 goto __pyx_L11_next_or;
6924 __pyx_t_1 = __pyx_t_3;
6925 goto __pyx_L10_bool_binop_done;
6928 __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, ((PyObject*)__pyx_ptype_8PyClical_clifford));
6929 __pyx_t_2 = (__pyx_t_3 != 0);
6930 __pyx_t_1 = __pyx_t_2;
6931 __pyx_L10_bool_binop_done:;
6941 __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;}
6942 __Pyx_GOTREF(__pyx_t_4);
6943 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
6944 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
6945 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
6946 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((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;}
6947 __Pyx_GOTREF(__pyx_t_5);
6948 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6949 __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;}
6950 __Pyx_GOTREF(__pyx_t_4);
6951 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6952 __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;}
6953 __Pyx_GOTREF(__pyx_t_5);
6954 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6955 __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;}
6956 __Pyx_GOTREF(__pyx_t_4);
6957 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
6958 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
6959 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
6960 __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((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;}
6961 __Pyx_GOTREF(__pyx_t_6);
6962 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6963 __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;}
6964 __Pyx_GOTREF(__pyx_t_4);
6965 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6966 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6967 __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;}
6968 __Pyx_GOTREF(__pyx_t_6);
6969 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6978 __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;}
6979 __Pyx_GOTREF(__pyx_t_4);
6980 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
6981 __Pyx_GIVEREF(__pyx_t_6);
6983 __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;}
6984 __Pyx_GOTREF(__pyx_t_6);
6985 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6986 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6987 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6988 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6999 __Pyx_XDECREF(__pyx_r);
7000 __Pyx_INCREF(__pyx_builtin_NotImplemented);
7001 __pyx_r = __pyx_builtin_NotImplemented;
7015 __Pyx_XDECREF(__pyx_t_4);
7016 __Pyx_XDECREF(__pyx_t_5);
7017 __Pyx_XDECREF(__pyx_t_6);
7018 __Pyx_AddTraceback(
"PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7021 __Pyx_XGIVEREF(__pyx_r);
7022 __Pyx_RefNannyFinishContext();
7035 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
7036 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 ";
7037 #if CYTHON_COMPILING_IN_CPYTHON
7038 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7040 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7041 PyObject *__pyx_r = 0;
7042 __Pyx_RefNannyDeclarations
7043 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
7044 __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7047 __Pyx_RefNannyFinishContext();
7051 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7052 PyObject *__pyx_r = NULL;
7053 __Pyx_RefNannyDeclarations
7054 PyObject *__pyx_t_1 = NULL;
7055 int __pyx_lineno = 0;
7056 const char *__pyx_filename = NULL;
7057 int __pyx_clineno = 0;
7058 __Pyx_RefNannySetupContext(
"__getitem__", 0);
7067 __Pyx_XDECREF(__pyx_r);
7068 __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;}
7069 __Pyx_GOTREF(__pyx_t_1);
7070 __pyx_r = __pyx_t_1;
7084 __Pyx_XDECREF(__pyx_t_1);
7085 __Pyx_AddTraceback(
"PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7088 __Pyx_XGIVEREF(__pyx_r);
7089 __Pyx_RefNannyFinishContext();
7102 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self);
7103 static char __pyx_doc_8PyClical_8clifford_16__neg__[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7104 #if CYTHON_COMPILING_IN_CPYTHON
7105 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7107 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7108 PyObject *__pyx_r = 0;
7109 __Pyx_RefNannyDeclarations
7110 __Pyx_RefNannySetupContext(
"__neg__ (wrapper)", 0);
7111 __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7114 __Pyx_RefNannyFinishContext();
7118 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7119 PyObject *__pyx_r = NULL;
7120 __Pyx_RefNannyDeclarations
7121 PyObject *__pyx_t_1 = NULL;
7122 PyObject *__pyx_t_2 = NULL;
7123 int __pyx_lineno = 0;
7124 const char *__pyx_filename = NULL;
7125 int __pyx_clineno = 0;
7126 __Pyx_RefNannySetupContext(
"__neg__", 0);
7135 __Pyx_XDECREF(__pyx_r);
7136 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7137 __Pyx_GOTREF(__pyx_t_1);
7138 __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;}
7139 __Pyx_GOTREF(__pyx_t_2);
7140 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7141 __pyx_r = __pyx_t_2;
7155 __Pyx_XDECREF(__pyx_t_1);
7156 __Pyx_XDECREF(__pyx_t_2);
7157 __Pyx_AddTraceback(
"PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7160 __Pyx_XGIVEREF(__pyx_r);
7161 __Pyx_RefNannyFinishContext();
7174 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self);
7175 static char __pyx_doc_8PyClical_8clifford_18__pos__[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
7176 #if CYTHON_COMPILING_IN_CPYTHON
7177 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
7179 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
7180 PyObject *__pyx_r = 0;
7181 __Pyx_RefNannyDeclarations
7182 __Pyx_RefNannySetupContext(
"__pos__ (wrapper)", 0);
7183 __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7186 __Pyx_RefNannyFinishContext();
7190 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7191 PyObject *__pyx_r = NULL;
7192 __Pyx_RefNannyDeclarations
7193 PyObject *__pyx_t_1 = NULL;
7194 PyObject *__pyx_t_2 = NULL;
7195 int __pyx_lineno = 0;
7196 const char *__pyx_filename = NULL;
7197 int __pyx_clineno = 0;
7198 __Pyx_RefNannySetupContext(
"__pos__", 0);
7207 __Pyx_XDECREF(__pyx_r);
7208 __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;}
7209 __Pyx_GOTREF(__pyx_t_1);
7210 __Pyx_INCREF(((PyObject *)__pyx_v_self));
7211 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
7212 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7213 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
7214 __Pyx_GOTREF(__pyx_t_2);
7215 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7216 __pyx_r = __pyx_t_2;
7230 __Pyx_XDECREF(__pyx_t_1);
7231 __Pyx_XDECREF(__pyx_t_2);
7232 __Pyx_AddTraceback(
"PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7235 __Pyx_XGIVEREF(__pyx_r);
7236 __Pyx_RefNannyFinishContext();
7249 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7250 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 ";
7251 #if CYTHON_COMPILING_IN_CPYTHON
7252 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
7254 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7255 PyObject *__pyx_r = 0;
7256 __Pyx_RefNannyDeclarations
7257 __Pyx_RefNannySetupContext(
"__add__ (wrapper)", 0);
7258 __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7261 __Pyx_RefNannyFinishContext();
7265 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7266 PyObject *__pyx_r = NULL;
7267 __Pyx_RefNannyDeclarations
7268 PyObject *__pyx_t_1 = NULL;
7269 PyObject *__pyx_t_2 = NULL;
7270 int __pyx_lineno = 0;
7271 const char *__pyx_filename = NULL;
7272 int __pyx_clineno = 0;
7273 __Pyx_RefNannySetupContext(
"__add__", 0);
7282 __Pyx_XDECREF(__pyx_r);
7283 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7284 __Pyx_GOTREF(__pyx_t_1);
7285 __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;}
7286 __Pyx_GOTREF(__pyx_t_2);
7287 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7288 __pyx_r = __pyx_t_2;
7302 __Pyx_XDECREF(__pyx_t_1);
7303 __Pyx_XDECREF(__pyx_t_2);
7304 __Pyx_AddTraceback(
"PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7307 __Pyx_XGIVEREF(__pyx_r);
7308 __Pyx_RefNannyFinishContext();
7321 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7322 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 ";
7323 #if CYTHON_COMPILING_IN_CPYTHON
7324 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
7326 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7327 PyObject *__pyx_r = 0;
7328 __Pyx_RefNannyDeclarations
7329 __Pyx_RefNannySetupContext(
"__iadd__ (wrapper)", 0);
7330 __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7333 __Pyx_RefNannyFinishContext();
7337 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7338 PyObject *__pyx_r = NULL;
7339 __Pyx_RefNannyDeclarations
7340 PyObject *__pyx_t_1 = NULL;
7341 int __pyx_lineno = 0;
7342 const char *__pyx_filename = NULL;
7343 int __pyx_clineno = 0;
7344 __Pyx_RefNannySetupContext(
"__iadd__", 0);
7353 __Pyx_XDECREF(__pyx_r);
7354 __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;}
7355 __Pyx_GOTREF(__pyx_t_1);
7356 __pyx_r = __pyx_t_1;
7370 __Pyx_XDECREF(__pyx_t_1);
7371 __Pyx_AddTraceback(
"PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7374 __Pyx_XGIVEREF(__pyx_r);
7375 __Pyx_RefNannyFinishContext();
7388 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7389 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 ";
7390 #if CYTHON_COMPILING_IN_CPYTHON
7391 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
7393 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7394 PyObject *__pyx_r = 0;
7395 __Pyx_RefNannyDeclarations
7396 __Pyx_RefNannySetupContext(
"__sub__ (wrapper)", 0);
7397 __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7400 __Pyx_RefNannyFinishContext();
7404 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7405 PyObject *__pyx_r = NULL;
7406 __Pyx_RefNannyDeclarations
7407 PyObject *__pyx_t_1 = NULL;
7408 PyObject *__pyx_t_2 = NULL;
7409 int __pyx_lineno = 0;
7410 const char *__pyx_filename = NULL;
7411 int __pyx_clineno = 0;
7412 __Pyx_RefNannySetupContext(
"__sub__", 0);
7421 __Pyx_XDECREF(__pyx_r);
7422 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7423 __Pyx_GOTREF(__pyx_t_1);
7424 __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;}
7425 __Pyx_GOTREF(__pyx_t_2);
7426 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7427 __pyx_r = __pyx_t_2;
7441 __Pyx_XDECREF(__pyx_t_1);
7442 __Pyx_XDECREF(__pyx_t_2);
7443 __Pyx_AddTraceback(
"PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7446 __Pyx_XGIVEREF(__pyx_r);
7447 __Pyx_RefNannyFinishContext();
7460 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7461 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 ";
7462 #if CYTHON_COMPILING_IN_CPYTHON
7463 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
7465 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7466 PyObject *__pyx_r = 0;
7467 __Pyx_RefNannyDeclarations
7468 __Pyx_RefNannySetupContext(
"__isub__ (wrapper)", 0);
7469 __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7472 __Pyx_RefNannyFinishContext();
7476 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7477 PyObject *__pyx_r = NULL;
7478 __Pyx_RefNannyDeclarations
7479 PyObject *__pyx_t_1 = NULL;
7480 int __pyx_lineno = 0;
7481 const char *__pyx_filename = NULL;
7482 int __pyx_clineno = 0;
7483 __Pyx_RefNannySetupContext(
"__isub__", 0);
7492 __Pyx_XDECREF(__pyx_r);
7493 __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;}
7494 __Pyx_GOTREF(__pyx_t_1);
7495 __pyx_r = __pyx_t_1;
7509 __Pyx_XDECREF(__pyx_t_1);
7510 __Pyx_AddTraceback(
"PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7513 __Pyx_XGIVEREF(__pyx_r);
7514 __Pyx_RefNannyFinishContext();
7527 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7528 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 ";
7529 #if CYTHON_COMPILING_IN_CPYTHON
7530 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
7532 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7533 PyObject *__pyx_r = 0;
7534 __Pyx_RefNannyDeclarations
7535 __Pyx_RefNannySetupContext(
"__mul__ (wrapper)", 0);
7536 __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7539 __Pyx_RefNannyFinishContext();
7543 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7544 PyObject *__pyx_r = NULL;
7545 __Pyx_RefNannyDeclarations
7546 PyObject *__pyx_t_1 = NULL;
7547 PyObject *__pyx_t_2 = NULL;
7548 int __pyx_lineno = 0;
7549 const char *__pyx_filename = NULL;
7550 int __pyx_clineno = 0;
7551 __Pyx_RefNannySetupContext(
"__mul__", 0);
7560 __Pyx_XDECREF(__pyx_r);
7561 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7562 __Pyx_GOTREF(__pyx_t_1);
7563 __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;}
7564 __Pyx_GOTREF(__pyx_t_2);
7565 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7566 __pyx_r = __pyx_t_2;
7580 __Pyx_XDECREF(__pyx_t_1);
7581 __Pyx_XDECREF(__pyx_t_2);
7582 __Pyx_AddTraceback(
"PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7585 __Pyx_XGIVEREF(__pyx_r);
7586 __Pyx_RefNannyFinishContext();
7599 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7600 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 ";
7601 #if CYTHON_COMPILING_IN_CPYTHON
7602 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
7604 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7605 PyObject *__pyx_r = 0;
7606 __Pyx_RefNannyDeclarations
7607 __Pyx_RefNannySetupContext(
"__imul__ (wrapper)", 0);
7608 __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7611 __Pyx_RefNannyFinishContext();
7615 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7616 PyObject *__pyx_r = NULL;
7617 __Pyx_RefNannyDeclarations
7618 PyObject *__pyx_t_1 = NULL;
7619 int __pyx_lineno = 0;
7620 const char *__pyx_filename = NULL;
7621 int __pyx_clineno = 0;
7622 __Pyx_RefNannySetupContext(
"__imul__", 0);
7631 __Pyx_XDECREF(__pyx_r);
7632 __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;}
7633 __Pyx_GOTREF(__pyx_t_1);
7634 __pyx_r = __pyx_t_1;
7648 __Pyx_XDECREF(__pyx_t_1);
7649 __Pyx_AddTraceback(
"PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7652 __Pyx_XGIVEREF(__pyx_r);
7653 __Pyx_RefNannyFinishContext();
7666 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7667 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 ";
7668 #if CYTHON_COMPILING_IN_CPYTHON
7669 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
7671 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7672 PyObject *__pyx_r = 0;
7673 __Pyx_RefNannyDeclarations
7674 __Pyx_RefNannySetupContext(
"__mod__ (wrapper)", 0);
7675 __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7678 __Pyx_RefNannyFinishContext();
7682 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7683 PyObject *__pyx_r = NULL;
7684 __Pyx_RefNannyDeclarations
7685 PyObject *__pyx_t_1 = NULL;
7686 PyObject *__pyx_t_2 = NULL;
7687 int __pyx_lineno = 0;
7688 const char *__pyx_filename = NULL;
7689 int __pyx_clineno = 0;
7690 __Pyx_RefNannySetupContext(
"__mod__", 0);
7699 __Pyx_XDECREF(__pyx_r);
7700 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7701 __Pyx_GOTREF(__pyx_t_1);
7702 __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;}
7703 __Pyx_GOTREF(__pyx_t_2);
7704 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7705 __pyx_r = __pyx_t_2;
7719 __Pyx_XDECREF(__pyx_t_1);
7720 __Pyx_XDECREF(__pyx_t_2);
7721 __Pyx_AddTraceback(
"PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7724 __Pyx_XGIVEREF(__pyx_r);
7725 __Pyx_RefNannyFinishContext();
7738 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7739 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 ";
7740 #if CYTHON_COMPILING_IN_CPYTHON
7741 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
7743 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7744 PyObject *__pyx_r = 0;
7745 __Pyx_RefNannyDeclarations
7746 __Pyx_RefNannySetupContext(
"__imod__ (wrapper)", 0);
7747 __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7750 __Pyx_RefNannyFinishContext();
7754 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7755 PyObject *__pyx_r = NULL;
7756 __Pyx_RefNannyDeclarations
7757 PyObject *__pyx_t_1 = NULL;
7758 int __pyx_lineno = 0;
7759 const char *__pyx_filename = NULL;
7760 int __pyx_clineno = 0;
7761 __Pyx_RefNannySetupContext(
"__imod__", 0);
7770 __Pyx_XDECREF(__pyx_r);
7771 __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;}
7772 __Pyx_GOTREF(__pyx_t_1);
7773 __pyx_r = __pyx_t_1;
7787 __Pyx_XDECREF(__pyx_t_1);
7788 __Pyx_AddTraceback(
"PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7791 __Pyx_XGIVEREF(__pyx_r);
7792 __Pyx_RefNannyFinishContext();
7805 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7806 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 ";
7807 #if CYTHON_COMPILING_IN_CPYTHON
7808 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
7810 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7811 PyObject *__pyx_r = 0;
7812 __Pyx_RefNannyDeclarations
7813 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
7814 __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7817 __Pyx_RefNannyFinishContext();
7821 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7822 PyObject *__pyx_r = NULL;
7823 __Pyx_RefNannyDeclarations
7824 PyObject *__pyx_t_1 = NULL;
7825 PyObject *__pyx_t_2 = NULL;
7826 int __pyx_lineno = 0;
7827 const char *__pyx_filename = NULL;
7828 int __pyx_clineno = 0;
7829 __Pyx_RefNannySetupContext(
"__and__", 0);
7838 __Pyx_XDECREF(__pyx_r);
7839 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7840 __Pyx_GOTREF(__pyx_t_1);
7841 __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;}
7842 __Pyx_GOTREF(__pyx_t_2);
7843 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7844 __pyx_r = __pyx_t_2;
7858 __Pyx_XDECREF(__pyx_t_1);
7859 __Pyx_XDECREF(__pyx_t_2);
7860 __Pyx_AddTraceback(
"PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7863 __Pyx_XGIVEREF(__pyx_r);
7864 __Pyx_RefNannyFinishContext();
7877 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7878 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 ";
7879 #if CYTHON_COMPILING_IN_CPYTHON
7880 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
7882 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7883 PyObject *__pyx_r = 0;
7884 __Pyx_RefNannyDeclarations
7885 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
7886 __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7889 __Pyx_RefNannyFinishContext();
7893 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7894 PyObject *__pyx_r = NULL;
7895 __Pyx_RefNannyDeclarations
7896 PyObject *__pyx_t_1 = NULL;
7897 int __pyx_lineno = 0;
7898 const char *__pyx_filename = NULL;
7899 int __pyx_clineno = 0;
7900 __Pyx_RefNannySetupContext(
"__iand__", 0);
7909 __Pyx_XDECREF(__pyx_r);
7910 __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;}
7911 __Pyx_GOTREF(__pyx_t_1);
7912 __pyx_r = __pyx_t_1;
7926 __Pyx_XDECREF(__pyx_t_1);
7927 __Pyx_AddTraceback(
"PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7930 __Pyx_XGIVEREF(__pyx_r);
7931 __Pyx_RefNannyFinishContext();
7944 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7945 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 ";
7946 #if CYTHON_COMPILING_IN_CPYTHON
7947 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
7949 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7950 PyObject *__pyx_r = 0;
7951 __Pyx_RefNannyDeclarations
7952 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
7953 __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7956 __Pyx_RefNannyFinishContext();
7960 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7961 PyObject *__pyx_r = NULL;
7962 __Pyx_RefNannyDeclarations
7963 PyObject *__pyx_t_1 = NULL;
7964 PyObject *__pyx_t_2 = NULL;
7965 int __pyx_lineno = 0;
7966 const char *__pyx_filename = NULL;
7967 int __pyx_clineno = 0;
7968 __Pyx_RefNannySetupContext(
"__xor__", 0);
7977 __Pyx_XDECREF(__pyx_r);
7978 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
7979 __Pyx_GOTREF(__pyx_t_1);
7980 __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;}
7981 __Pyx_GOTREF(__pyx_t_2);
7982 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7983 __pyx_r = __pyx_t_2;
7997 __Pyx_XDECREF(__pyx_t_1);
7998 __Pyx_XDECREF(__pyx_t_2);
7999 __Pyx_AddTraceback(
"PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8002 __Pyx_XGIVEREF(__pyx_r);
8003 __Pyx_RefNannyFinishContext();
8016 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8017 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 ";
8018 #if CYTHON_COMPILING_IN_CPYTHON
8019 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8021 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8022 PyObject *__pyx_r = 0;
8023 __Pyx_RefNannyDeclarations
8024 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
8025 __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8028 __Pyx_RefNannyFinishContext();
8032 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8033 PyObject *__pyx_r = NULL;
8034 __Pyx_RefNannyDeclarations
8035 PyObject *__pyx_t_1 = NULL;
8036 int __pyx_lineno = 0;
8037 const char *__pyx_filename = NULL;
8038 int __pyx_clineno = 0;
8039 __Pyx_RefNannySetupContext(
"__ixor__", 0);
8048 __Pyx_XDECREF(__pyx_r);
8049 __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;}
8050 __Pyx_GOTREF(__pyx_t_1);
8051 __pyx_r = __pyx_t_1;
8065 __Pyx_XDECREF(__pyx_t_1);
8066 __Pyx_AddTraceback(
"PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8069 __Pyx_XGIVEREF(__pyx_r);
8070 __Pyx_RefNannyFinishContext();
8083 #if PY_MAJOR_VERSION < 3
8084 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8085 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 ";
8086 #if CYTHON_COMPILING_IN_CPYTHON
8087 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8089 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8090 PyObject *__pyx_r = 0;
8091 __Pyx_RefNannyDeclarations
8092 __Pyx_RefNannySetupContext(
"__div__ (wrapper)", 0);
8093 __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8096 __Pyx_RefNannyFinishContext();
8101 #if PY_MAJOR_VERSION < 3
8102 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8103 PyObject *__pyx_r = NULL;
8104 __Pyx_RefNannyDeclarations
8105 PyObject *__pyx_t_1 = NULL;
8106 PyObject *__pyx_t_2 = NULL;
8107 int __pyx_lineno = 0;
8108 const char *__pyx_filename = NULL;
8109 int __pyx_clineno = 0;
8110 __Pyx_RefNannySetupContext(
"__div__", 0);
8119 __Pyx_XDECREF(__pyx_r);
8120 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8121 __Pyx_GOTREF(__pyx_t_1);
8122 __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;}
8123 __Pyx_GOTREF(__pyx_t_2);
8124 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8125 __pyx_r = __pyx_t_2;
8139 __Pyx_XDECREF(__pyx_t_1);
8140 __Pyx_XDECREF(__pyx_t_2);
8141 __Pyx_AddTraceback(
"PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8144 __Pyx_XGIVEREF(__pyx_r);
8145 __Pyx_RefNannyFinishContext();
8159 #if PY_MAJOR_VERSION < 3
8160 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8161 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 ";
8162 #if CYTHON_COMPILING_IN_CPYTHON
8163 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8165 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8166 PyObject *__pyx_r = 0;
8167 __Pyx_RefNannyDeclarations
8168 __Pyx_RefNannySetupContext(
"__idiv__ (wrapper)", 0);
8169 __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8172 __Pyx_RefNannyFinishContext();
8177 #if PY_MAJOR_VERSION < 3
8178 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8179 PyObject *__pyx_r = NULL;
8180 __Pyx_RefNannyDeclarations
8181 PyObject *__pyx_t_1 = NULL;
8182 int __pyx_lineno = 0;
8183 const char *__pyx_filename = NULL;
8184 int __pyx_clineno = 0;
8185 __Pyx_RefNannySetupContext(
"__idiv__", 0);
8194 __Pyx_XDECREF(__pyx_r);
8195 __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;}
8196 __Pyx_GOTREF(__pyx_t_1);
8197 __pyx_r = __pyx_t_1;
8211 __Pyx_XDECREF(__pyx_t_1);
8212 __Pyx_AddTraceback(
"PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8215 __Pyx_XGIVEREF(__pyx_r);
8216 __Pyx_RefNannyFinishContext();
8230 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8231 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 ";
8232 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8233 PyObject *__pyx_r = 0;
8234 __Pyx_RefNannyDeclarations
8235 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
8236 __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8239 __Pyx_RefNannyFinishContext();
8243 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8244 PyObject *__pyx_r = NULL;
8245 __Pyx_RefNannyDeclarations
8246 PyObject *__pyx_t_1 = NULL;
8247 PyObject *__pyx_t_2 = NULL;
8248 int __pyx_lineno = 0;
8249 const char *__pyx_filename = NULL;
8250 int __pyx_clineno = 0;
8251 __Pyx_RefNannySetupContext(
"inv", 0);
8260 __Pyx_XDECREF(__pyx_r);
8261 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8262 __Pyx_GOTREF(__pyx_t_1);
8263 __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;}
8264 __Pyx_GOTREF(__pyx_t_2);
8265 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8266 __pyx_r = __pyx_t_2;
8280 __Pyx_XDECREF(__pyx_t_1);
8281 __Pyx_XDECREF(__pyx_t_2);
8282 __Pyx_AddTraceback(
"PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
8285 __Pyx_XGIVEREF(__pyx_r);
8286 __Pyx_RefNannyFinishContext();
8299 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
8300 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 ";
8301 #if CYTHON_COMPILING_IN_CPYTHON
8302 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
8304 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8305 PyObject *__pyx_r = 0;
8306 __Pyx_RefNannyDeclarations
8307 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
8308 __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8311 __Pyx_RefNannyFinishContext();
8315 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8316 PyObject *__pyx_r = NULL;
8317 __Pyx_RefNannyDeclarations
8318 PyObject *__pyx_t_1 = NULL;
8319 PyObject *__pyx_t_2 = NULL;
8320 int __pyx_lineno = 0;
8321 const char *__pyx_filename = NULL;
8322 int __pyx_clineno = 0;
8323 __Pyx_RefNannySetupContext(
"__or__", 0);
8332 __Pyx_XDECREF(__pyx_r);
8333 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8334 __Pyx_GOTREF(__pyx_t_1);
8335 __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;}
8336 __Pyx_GOTREF(__pyx_t_2);
8337 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8338 __pyx_r = __pyx_t_2;
8352 __Pyx_XDECREF(__pyx_t_1);
8353 __Pyx_XDECREF(__pyx_t_2);
8354 __Pyx_AddTraceback(
"PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8357 __Pyx_XGIVEREF(__pyx_r);
8358 __Pyx_RefNannyFinishContext();
8371 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
8372 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 ";
8373 #if CYTHON_COMPILING_IN_CPYTHON
8374 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
8376 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8377 PyObject *__pyx_r = 0;
8378 __Pyx_RefNannyDeclarations
8379 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
8380 __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8383 __Pyx_RefNannyFinishContext();
8387 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8388 PyObject *__pyx_r = NULL;
8389 __Pyx_RefNannyDeclarations
8390 PyObject *__pyx_t_1 = NULL;
8391 int __pyx_lineno = 0;
8392 const char *__pyx_filename = NULL;
8393 int __pyx_clineno = 0;
8394 __Pyx_RefNannySetupContext(
"__ior__", 0);
8403 __Pyx_XDECREF(__pyx_r);
8404 __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;}
8405 __Pyx_GOTREF(__pyx_t_1);
8406 __pyx_r = __pyx_t_1;
8420 __Pyx_XDECREF(__pyx_t_1);
8421 __Pyx_AddTraceback(
"PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8424 __Pyx_XGIVEREF(__pyx_r);
8425 __Pyx_RefNannyFinishContext();
8438 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy);
8439 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 ";
8440 #if CYTHON_COMPILING_IN_CPYTHON
8441 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
8443 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
8444 PyObject *__pyx_r = 0;
8445 __Pyx_RefNannyDeclarations
8446 __Pyx_RefNannySetupContext(
"__pow__ (wrapper)", 0);
8447 __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
8450 __Pyx_RefNannyFinishContext();
8454 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
8455 PyObject *__pyx_r = NULL;
8456 __Pyx_RefNannyDeclarations
8457 PyObject *__pyx_t_1 = NULL;
8458 int __pyx_lineno = 0;
8459 const char *__pyx_filename = NULL;
8460 int __pyx_clineno = 0;
8461 __Pyx_RefNannySetupContext(
"__pow__", 0);
8470 __Pyx_XDECREF(__pyx_r);
8471 __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;}
8472 __Pyx_GOTREF(__pyx_t_1);
8473 __pyx_r = __pyx_t_1;
8487 __Pyx_XDECREF(__pyx_t_1);
8488 __Pyx_AddTraceback(
"PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8491 __Pyx_XGIVEREF(__pyx_r);
8492 __Pyx_RefNannyFinishContext();
8505 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
8506 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 ";
8507 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8508 PyObject *__pyx_r = 0;
8509 __Pyx_RefNannyDeclarations
8510 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
8511 __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8514 __Pyx_RefNannyFinishContext();
8518 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8519 PyObject *__pyx_r = NULL;
8520 __Pyx_RefNannyDeclarations
8521 PyObject *__pyx_t_1 = NULL;
8522 PyObject *__pyx_t_2 = NULL;
8526 int __pyx_lineno = 0;
8527 const char *__pyx_filename = NULL;
8528 int __pyx_clineno = 0;
8529 __Pyx_RefNannySetupContext(
"pow", 0);
8538 __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;}
8539 __Pyx_GOTREF(__pyx_t_1);
8540 __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;}
8541 __Pyx_GOTREF(__pyx_t_2);
8542 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8543 __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;}
8544 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8545 __pyx_t_4 = (__pyx_t_3 != 0);
8555 __Pyx_XDECREF(__pyx_r);
8556 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
8557 __Pyx_GOTREF(__pyx_t_2);
8558 __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;}
8559 __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;}
8560 __Pyx_GOTREF(__pyx_t_1);
8561 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8562 __pyx_r = __pyx_t_1;
8575 __Pyx_XDECREF(__pyx_r);
8576 __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;}
8577 __Pyx_GOTREF(__pyx_t_1);
8578 __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;}
8579 __Pyx_GOTREF(__pyx_t_2);
8580 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8581 __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;}
8582 __Pyx_GOTREF(__pyx_t_1);
8583 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8584 __pyx_r = __pyx_t_1;
8599 __Pyx_XDECREF(__pyx_t_1);
8600 __Pyx_XDECREF(__pyx_t_2);
8601 __Pyx_AddTraceback(
"PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8604 __Pyx_XGIVEREF(__pyx_r);
8605 __Pyx_RefNannyFinishContext();
8618 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
8619 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 ";
8620 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8621 PyObject *__pyx_r = 0;
8622 __Pyx_RefNannyDeclarations
8623 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
8624 __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8627 __Pyx_RefNannyFinishContext();
8631 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8632 PyObject *__pyx_r = NULL;
8633 __Pyx_RefNannyDeclarations
8634 PyObject *__pyx_t_1 = NULL;
8636 PyObject *__pyx_t_3 = NULL;
8637 int __pyx_lineno = 0;
8638 const char *__pyx_filename = NULL;
8639 int __pyx_clineno = 0;
8640 __Pyx_RefNannySetupContext(
"outer_pow", 0);
8649 __Pyx_XDECREF(__pyx_r);
8650 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8651 __Pyx_GOTREF(__pyx_t_1);
8652 __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;}
8653 __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;}
8654 __Pyx_GOTREF(__pyx_t_3);
8655 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8656 __pyx_r = __pyx_t_3;
8670 __Pyx_XDECREF(__pyx_t_1);
8671 __Pyx_XDECREF(__pyx_t_3);
8672 __Pyx_AddTraceback(
"PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8675 __Pyx_XGIVEREF(__pyx_r);
8676 __Pyx_RefNannyFinishContext();
8689 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8690 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 ";
8691 #if CYTHON_COMPILING_IN_CPYTHON
8692 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
8694 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8695 PyObject *__pyx_v_grade = 0;
8696 int __pyx_lineno = 0;
8697 const char *__pyx_filename = NULL;
8698 int __pyx_clineno = 0;
8699 PyObject *__pyx_r = 0;
8700 __Pyx_RefNannyDeclarations
8701 __Pyx_RefNannySetupContext(
"__call__ (wrapper)", 0);
8703 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
8704 PyObject* values[1] = {0};
8705 if (unlikely(__pyx_kwds)) {
8707 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8709 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8711 default:
goto __pyx_L5_argtuple_error;
8713 kw_args = PyDict_Size(__pyx_kwds);
8716 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
8717 else goto __pyx_L5_argtuple_error;
8719 if (unlikely(kw_args > 0)) {
8720 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;}
8722 }
else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
8723 goto __pyx_L5_argtuple_error;
8725 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8727 __pyx_v_grade = values[0];
8729 goto __pyx_L4_argument_unpacking_done;
8730 __pyx_L5_argtuple_error:;
8731 __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;}
8733 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8734 __Pyx_RefNannyFinishContext();
8736 __pyx_L4_argument_unpacking_done:;
8737 __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
8740 __Pyx_RefNannyFinishContext();
8744 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
8745 PyObject *__pyx_r = NULL;
8746 __Pyx_RefNannyDeclarations
8747 PyObject *__pyx_t_1 = NULL;
8749 PyObject *__pyx_t_3 = NULL;
8750 int __pyx_lineno = 0;
8751 const char *__pyx_filename = NULL;
8752 int __pyx_clineno = 0;
8753 __Pyx_RefNannySetupContext(
"__call__", 0);
8762 __Pyx_XDECREF(__pyx_r);
8763 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8764 __Pyx_GOTREF(__pyx_t_1);
8765 __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;}
8766 __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;}
8767 __Pyx_GOTREF(__pyx_t_3);
8768 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8769 __pyx_r = __pyx_t_3;
8783 __Pyx_XDECREF(__pyx_t_1);
8784 __Pyx_XDECREF(__pyx_t_3);
8785 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8788 __Pyx_XGIVEREF(__pyx_r);
8789 __Pyx_RefNannyFinishContext();
8802 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8803 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 ";
8804 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8805 PyObject *__pyx_r = 0;
8806 __Pyx_RefNannyDeclarations
8807 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
8808 __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8811 __Pyx_RefNannyFinishContext();
8815 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8816 PyObject *__pyx_r = NULL;
8817 __Pyx_RefNannyDeclarations
8818 PyObject *__pyx_t_1 = NULL;
8819 int __pyx_lineno = 0;
8820 const char *__pyx_filename = NULL;
8821 int __pyx_clineno = 0;
8822 __Pyx_RefNannySetupContext(
"scalar", 0);
8831 __Pyx_XDECREF(__pyx_r);
8832 __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;}
8833 __Pyx_GOTREF(__pyx_t_1);
8834 __pyx_r = __pyx_t_1;
8848 __Pyx_XDECREF(__pyx_t_1);
8849 __Pyx_AddTraceback(
"PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
8852 __Pyx_XGIVEREF(__pyx_r);
8853 __Pyx_RefNannyFinishContext();
8866 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8867 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 ";
8868 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8869 PyObject *__pyx_r = 0;
8870 __Pyx_RefNannyDeclarations
8871 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
8872 __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8875 __Pyx_RefNannyFinishContext();
8879 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8880 PyObject *__pyx_r = NULL;
8881 __Pyx_RefNannyDeclarations
8882 PyObject *__pyx_t_1 = NULL;
8883 PyObject *__pyx_t_2 = NULL;
8884 int __pyx_lineno = 0;
8885 const char *__pyx_filename = NULL;
8886 int __pyx_clineno = 0;
8887 __Pyx_RefNannySetupContext(
"pure", 0);
8896 __Pyx_XDECREF(__pyx_r);
8897 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8898 __Pyx_GOTREF(__pyx_t_1);
8899 __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;}
8900 __Pyx_GOTREF(__pyx_t_2);
8901 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8902 __pyx_r = __pyx_t_2;
8916 __Pyx_XDECREF(__pyx_t_1);
8917 __Pyx_XDECREF(__pyx_t_2);
8918 __Pyx_AddTraceback(
"PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
8921 __Pyx_XGIVEREF(__pyx_r);
8922 __Pyx_RefNannyFinishContext();
8935 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8936 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 ";
8937 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8938 PyObject *__pyx_r = 0;
8939 __Pyx_RefNannyDeclarations
8940 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
8941 __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8944 __Pyx_RefNannyFinishContext();
8948 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8949 PyObject *__pyx_r = NULL;
8950 __Pyx_RefNannyDeclarations
8951 PyObject *__pyx_t_1 = NULL;
8952 PyObject *__pyx_t_2 = NULL;
8953 int __pyx_lineno = 0;
8954 const char *__pyx_filename = NULL;
8955 int __pyx_clineno = 0;
8956 __Pyx_RefNannySetupContext(
"even", 0);
8965 __Pyx_XDECREF(__pyx_r);
8966 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
8967 __Pyx_GOTREF(__pyx_t_1);
8968 __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;}
8969 __Pyx_GOTREF(__pyx_t_2);
8970 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8971 __pyx_r = __pyx_t_2;
8985 __Pyx_XDECREF(__pyx_t_1);
8986 __Pyx_XDECREF(__pyx_t_2);
8987 __Pyx_AddTraceback(
"PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
8990 __Pyx_XGIVEREF(__pyx_r);
8991 __Pyx_RefNannyFinishContext();
9004 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9005 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 ";
9006 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9007 PyObject *__pyx_r = 0;
9008 __Pyx_RefNannyDeclarations
9009 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
9010 __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9013 __Pyx_RefNannyFinishContext();
9017 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9018 PyObject *__pyx_r = NULL;
9019 __Pyx_RefNannyDeclarations
9020 PyObject *__pyx_t_1 = NULL;
9021 PyObject *__pyx_t_2 = NULL;
9022 int __pyx_lineno = 0;
9023 const char *__pyx_filename = NULL;
9024 int __pyx_clineno = 0;
9025 __Pyx_RefNannySetupContext(
"odd", 0);
9034 __Pyx_XDECREF(__pyx_r);
9035 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
9036 __Pyx_GOTREF(__pyx_t_1);
9037 __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;}
9038 __Pyx_GOTREF(__pyx_t_2);
9039 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9040 __pyx_r = __pyx_t_2;
9054 __Pyx_XDECREF(__pyx_t_1);
9055 __Pyx_XDECREF(__pyx_t_2);
9056 __Pyx_AddTraceback(
"PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9059 __Pyx_XGIVEREF(__pyx_r);
9060 __Pyx_RefNannyFinishContext();
9073 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9074 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 ";
9075 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9076 PyObject *__pyx_v_frm = 0;
9077 int __pyx_lineno = 0;
9078 const char *__pyx_filename = NULL;
9079 int __pyx_clineno = 0;
9080 PyObject *__pyx_r = 0;
9081 __Pyx_RefNannyDeclarations
9082 __Pyx_RefNannySetupContext(
"vector_part (wrapper)", 0);
9084 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9085 PyObject* values[1] = {0};
9086 values[0] = ((PyObject *)Py_None);
9087 if (unlikely(__pyx_kwds)) {
9089 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9091 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9093 default:
goto __pyx_L5_argtuple_error;
9095 kw_args = PyDict_Size(__pyx_kwds);
9099 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9100 if (value) { values[0] = value; kw_args--; }
9103 if (unlikely(kw_args > 0)) {
9104 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;}
9107 switch (PyTuple_GET_SIZE(__pyx_args)) {
9108 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9110 default:
goto __pyx_L5_argtuple_error;
9113 __pyx_v_frm = values[0];
9115 goto __pyx_L4_argument_unpacking_done;
9116 __pyx_L5_argtuple_error:;
9117 __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;}
9119 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9120 __Pyx_RefNannyFinishContext();
9122 __pyx_L4_argument_unpacking_done:;
9123 __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9126 __Pyx_RefNannyFinishContext();
9130 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9131 PyObject *__pyx_v_error_msg_prefix = NULL;
9132 std::vector<scalar_t> __pyx_v_vec;
9135 PyObject *__pyx_v_lst = NULL;
9136 PyObject *__pyx_v_err = NULL;
9137 PyObject *__pyx_r = NULL;
9138 __Pyx_RefNannyDeclarations
9139 PyObject *__pyx_t_1 = NULL;
9140 PyObject *__pyx_t_2 = NULL;
9141 PyObject *__pyx_t_3 = NULL;
9144 std::vector<scalar_t> __pyx_t_6;
9145 PyObject *__pyx_t_7 = NULL;
9148 PyObject *__pyx_t_10 = NULL;
9149 PyObject *__pyx_t_11 = NULL;
9150 PyObject *__pyx_t_12 = NULL;
9151 PyObject *__pyx_t_13 = NULL;
9152 PyObject *__pyx_t_14 = NULL;
9153 int __pyx_lineno = 0;
9154 const char *__pyx_filename = NULL;
9155 int __pyx_clineno = 0;
9156 __Pyx_RefNannySetupContext(
"vector_part", 0);
9165 __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9166 __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9176 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9177 __Pyx_XGOTREF(__pyx_t_1);
9178 __Pyx_XGOTREF(__pyx_t_2);
9179 __Pyx_XGOTREF(__pyx_t_3);
9189 __pyx_t_4 = (__pyx_v_frm == Py_None);
9190 __pyx_t_5 = (__pyx_t_4 != 0);
9200 __pyx_v_vec = __pyx_v_self->instance->vector_part();
9213 __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9215 __Pyx_CppExn2PyErr();
9216 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
9218 __pyx_v_vec = __pyx_t_6;
9229 __pyx_v_n = __pyx_v_vec.size();
9238 __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;}
9239 __Pyx_GOTREF(__pyx_t_7);
9240 { Py_ssize_t __pyx_temp;
9241 for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
9242 __Pyx_INCREF(__pyx_float_0_0);
9243 PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
9244 __Pyx_GIVEREF(__pyx_float_0_0);
9247 __pyx_v_lst = ((PyObject*)__pyx_t_7);
9257 __pyx_t_8 = __pyx_v_n;
9258 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
9259 __pyx_v_i = __pyx_t_9;
9268 __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;}
9269 __Pyx_GOTREF(__pyx_t_7);
9270 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;}
9271 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9281 __Pyx_XDECREF(__pyx_r);
9282 __Pyx_INCREF(__pyx_v_lst);
9283 __pyx_r = __pyx_v_lst;
9284 goto __pyx_L7_try_return;
9287 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9296 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
9298 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9299 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;}
9300 __Pyx_GOTREF(__pyx_t_7);
9301 __Pyx_GOTREF(__pyx_t_10);
9302 __Pyx_GOTREF(__pyx_t_11);
9303 __Pyx_INCREF(__pyx_t_10);
9304 __pyx_v_err = __pyx_t_10;
9313 __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;}
9314 __Pyx_GOTREF(__pyx_t_12);
9315 __Pyx_INCREF(((PyObject *)__pyx_v_self));
9316 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
9317 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
9318 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((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;}
9319 __Pyx_GOTREF(__pyx_t_13);
9320 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9321 __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;}
9322 __Pyx_GOTREF(__pyx_t_12);
9323 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9324 __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;}
9325 __Pyx_GOTREF(__pyx_t_13);
9326 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9335 __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;}
9336 __Pyx_GOTREF(__pyx_t_12);
9337 __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;}
9338 __Pyx_GOTREF(__pyx_t_14);
9339 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9340 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9341 __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;}
9342 __Pyx_GOTREF(__pyx_t_12);
9343 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9352 __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;}
9353 __Pyx_GOTREF(__pyx_t_14);
9354 __Pyx_INCREF(__pyx_v_err);
9355 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
9356 __Pyx_GIVEREF(__pyx_v_err);
9357 __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((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;}
9358 __Pyx_GOTREF(__pyx_t_13);
9359 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9360 __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;}
9361 __Pyx_GOTREF(__pyx_t_14);
9362 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9363 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9372 __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;}
9373 __Pyx_GOTREF(__pyx_t_13);
9374 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
9375 __Pyx_GIVEREF(__pyx_t_14);
9377 __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;}
9378 __Pyx_GOTREF(__pyx_t_14);
9379 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9380 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
9381 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9382 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
9384 goto __pyx_L5_except_error;
9385 __pyx_L5_except_error:;
9386 __Pyx_XGIVEREF(__pyx_t_1);
9387 __Pyx_XGIVEREF(__pyx_t_2);
9388 __Pyx_XGIVEREF(__pyx_t_3);
9389 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9390 goto __pyx_L1_error;
9391 __pyx_L7_try_return:;
9392 __Pyx_XGIVEREF(__pyx_t_1);
9393 __Pyx_XGIVEREF(__pyx_t_2);
9394 __Pyx_XGIVEREF(__pyx_t_3);
9395 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9409 __Pyx_XDECREF(__pyx_t_7);
9410 __Pyx_XDECREF(__pyx_t_10);
9411 __Pyx_XDECREF(__pyx_t_11);
9412 __Pyx_XDECREF(__pyx_t_12);
9413 __Pyx_XDECREF(__pyx_t_13);
9414 __Pyx_XDECREF(__pyx_t_14);
9415 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9418 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
9419 __Pyx_XDECREF(__pyx_v_lst);
9420 __Pyx_XDECREF(__pyx_v_err);
9421 __Pyx_XGIVEREF(__pyx_r);
9422 __Pyx_RefNannyFinishContext();
9435 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9436 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 ";
9437 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9438 PyObject *__pyx_r = 0;
9439 __Pyx_RefNannyDeclarations
9440 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
9441 __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9444 __Pyx_RefNannyFinishContext();
9448 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9449 PyObject *__pyx_r = NULL;
9450 __Pyx_RefNannyDeclarations
9451 PyObject *__pyx_t_1 = NULL;
9452 PyObject *__pyx_t_2 = NULL;
9453 int __pyx_lineno = 0;
9454 const char *__pyx_filename = NULL;
9455 int __pyx_clineno = 0;
9456 __Pyx_RefNannySetupContext(
"involute", 0);
9465 __Pyx_XDECREF(__pyx_r);
9466 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
9467 __Pyx_GOTREF(__pyx_t_1);
9468 __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;}
9469 __Pyx_GOTREF(__pyx_t_2);
9470 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9471 __pyx_r = __pyx_t_2;
9485 __Pyx_XDECREF(__pyx_t_1);
9486 __Pyx_XDECREF(__pyx_t_2);
9487 __Pyx_AddTraceback(
"PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
9490 __Pyx_XGIVEREF(__pyx_r);
9491 __Pyx_RefNannyFinishContext();
9504 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9505 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 ";
9506 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9507 PyObject *__pyx_r = 0;
9508 __Pyx_RefNannyDeclarations
9509 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
9510 __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9513 __Pyx_RefNannyFinishContext();
9517 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9518 PyObject *__pyx_r = NULL;
9519 __Pyx_RefNannyDeclarations
9520 PyObject *__pyx_t_1 = NULL;
9521 PyObject *__pyx_t_2 = NULL;
9522 int __pyx_lineno = 0;
9523 const char *__pyx_filename = NULL;
9524 int __pyx_clineno = 0;
9525 __Pyx_RefNannySetupContext(
"reverse", 0);
9534 __Pyx_XDECREF(__pyx_r);
9535 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
9536 __Pyx_GOTREF(__pyx_t_1);
9537 __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;}
9538 __Pyx_GOTREF(__pyx_t_2);
9539 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9540 __pyx_r = __pyx_t_2;
9554 __Pyx_XDECREF(__pyx_t_1);
9555 __Pyx_XDECREF(__pyx_t_2);
9556 __Pyx_AddTraceback(
"PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
9559 __Pyx_XGIVEREF(__pyx_r);
9560 __Pyx_RefNannyFinishContext();
9573 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9574 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 ";
9575 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9576 PyObject *__pyx_r = 0;
9577 __Pyx_RefNannyDeclarations
9578 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
9579 __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9582 __Pyx_RefNannyFinishContext();
9586 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9587 PyObject *__pyx_r = NULL;
9588 __Pyx_RefNannyDeclarations
9589 PyObject *__pyx_t_1 = NULL;
9590 PyObject *__pyx_t_2 = NULL;
9591 int __pyx_lineno = 0;
9592 const char *__pyx_filename = NULL;
9593 int __pyx_clineno = 0;
9594 __Pyx_RefNannySetupContext(
"conj", 0);
9603 __Pyx_XDECREF(__pyx_r);
9604 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
9605 __Pyx_GOTREF(__pyx_t_1);
9606 __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;}
9607 __Pyx_GOTREF(__pyx_t_2);
9608 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9609 __pyx_r = __pyx_t_2;
9623 __Pyx_XDECREF(__pyx_t_1);
9624 __Pyx_XDECREF(__pyx_t_2);
9625 __Pyx_AddTraceback(
"PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
9628 __Pyx_XGIVEREF(__pyx_r);
9629 __Pyx_RefNannyFinishContext();
9642 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9643 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 ";
9644 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9645 PyObject *__pyx_r = 0;
9646 __Pyx_RefNannyDeclarations
9647 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
9648 __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9651 __Pyx_RefNannyFinishContext();
9655 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9656 PyObject *__pyx_r = NULL;
9657 __Pyx_RefNannyDeclarations
9658 PyObject *__pyx_t_1 = NULL;
9659 int __pyx_lineno = 0;
9660 const char *__pyx_filename = NULL;
9661 int __pyx_clineno = 0;
9662 __Pyx_RefNannySetupContext(
"quad", 0);
9671 __Pyx_XDECREF(__pyx_r);
9672 __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;}
9673 __Pyx_GOTREF(__pyx_t_1);
9674 __pyx_r = __pyx_t_1;
9688 __Pyx_XDECREF(__pyx_t_1);
9689 __Pyx_AddTraceback(
"PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
9692 __Pyx_XGIVEREF(__pyx_r);
9693 __Pyx_RefNannyFinishContext();
9706 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9707 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 ";
9708 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9709 PyObject *__pyx_r = 0;
9710 __Pyx_RefNannyDeclarations
9711 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
9712 __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9715 __Pyx_RefNannyFinishContext();
9719 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9720 PyObject *__pyx_r = NULL;
9721 __Pyx_RefNannyDeclarations
9722 PyObject *__pyx_t_1 = NULL;
9723 int __pyx_lineno = 0;
9724 const char *__pyx_filename = NULL;
9725 int __pyx_clineno = 0;
9726 __Pyx_RefNannySetupContext(
"norm", 0);
9735 __Pyx_XDECREF(__pyx_r);
9736 __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;}
9737 __Pyx_GOTREF(__pyx_t_1);
9738 __pyx_r = __pyx_t_1;
9752 __Pyx_XDECREF(__pyx_t_1);
9753 __Pyx_AddTraceback(
"PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
9756 __Pyx_XGIVEREF(__pyx_r);
9757 __Pyx_RefNannyFinishContext();
9770 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9771 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 ";
9772 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9773 PyObject *__pyx_r = 0;
9774 __Pyx_RefNannyDeclarations
9775 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
9776 __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9779 __Pyx_RefNannyFinishContext();
9783 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9784 PyObject *__pyx_r = NULL;
9785 __Pyx_RefNannyDeclarations
9786 PyObject *__pyx_t_1 = NULL;
9787 int __pyx_lineno = 0;
9788 const char *__pyx_filename = NULL;
9789 int __pyx_clineno = 0;
9790 __Pyx_RefNannySetupContext(
"abs", 0);
9799 __Pyx_XDECREF(__pyx_r);
9800 __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;}
9801 __Pyx_GOTREF(__pyx_t_1);
9802 __pyx_r = __pyx_t_1;
9816 __Pyx_XDECREF(__pyx_t_1);
9817 __Pyx_AddTraceback(
"PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9820 __Pyx_XGIVEREF(__pyx_r);
9821 __Pyx_RefNannyFinishContext();
9834 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9835 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 ";
9836 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9837 PyObject *__pyx_r = 0;
9838 __Pyx_RefNannyDeclarations
9839 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
9840 __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9843 __Pyx_RefNannyFinishContext();
9847 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9848 PyObject *__pyx_r = NULL;
9849 __Pyx_RefNannyDeclarations
9850 PyObject *__pyx_t_1 = NULL;
9851 int __pyx_lineno = 0;
9852 const char *__pyx_filename = NULL;
9853 int __pyx_clineno = 0;
9854 __Pyx_RefNannySetupContext(
"max_abs", 0);
9863 __Pyx_XDECREF(__pyx_r);
9864 __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;}
9865 __Pyx_GOTREF(__pyx_t_1);
9866 __pyx_r = __pyx_t_1;
9880 __Pyx_XDECREF(__pyx_t_1);
9881 __Pyx_AddTraceback(
"PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9884 __Pyx_XGIVEREF(__pyx_r);
9885 __Pyx_RefNannyFinishContext();
9898 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit);
9899 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 ";
9900 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
9901 PyObject *__pyx_r = 0;
9902 __Pyx_RefNannyDeclarations
9903 __Pyx_RefNannySetupContext(
"truncated (wrapper)", 0);
9904 __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
9907 __Pyx_RefNannyFinishContext();
9911 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
9912 PyObject *__pyx_r = NULL;
9913 __Pyx_RefNannyDeclarations
9914 PyObject *__pyx_t_1 = NULL;
9916 PyObject *__pyx_t_3 = NULL;
9917 int __pyx_lineno = 0;
9918 const char *__pyx_filename = NULL;
9919 int __pyx_clineno = 0;
9920 __Pyx_RefNannySetupContext(
"truncated", 0);
9929 __Pyx_XDECREF(__pyx_r);
9930 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
9931 __Pyx_GOTREF(__pyx_t_1);
9932 __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;}
9933 __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;}
9934 __Pyx_GOTREF(__pyx_t_3);
9935 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9936 __pyx_r = __pyx_t_3;
9950 __Pyx_XDECREF(__pyx_t_1);
9951 __Pyx_XDECREF(__pyx_t_3);
9952 __Pyx_AddTraceback(
"PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
9955 __Pyx_XGIVEREF(__pyx_r);
9956 __Pyx_RefNannyFinishContext();
9969 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9970 static char __pyx_doc_8PyClical_8clifford_88isnan[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
9971 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9972 PyObject *__pyx_r = 0;
9973 __Pyx_RefNannyDeclarations
9974 __Pyx_RefNannySetupContext(
"isnan (wrapper)", 0);
9975 __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9978 __Pyx_RefNannyFinishContext();
9982 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9983 PyObject *__pyx_r = NULL;
9984 __Pyx_RefNannyDeclarations
9985 PyObject *__pyx_t_1 = NULL;
9986 int __pyx_lineno = 0;
9987 const char *__pyx_filename = NULL;
9988 int __pyx_clineno = 0;
9989 __Pyx_RefNannySetupContext(
"isnan", 0);
9998 __Pyx_XDECREF(__pyx_r);
9999 __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;}
10000 __Pyx_GOTREF(__pyx_t_1);
10001 __pyx_r = __pyx_t_1;
10015 __Pyx_XDECREF(__pyx_t_1);
10016 __Pyx_AddTraceback(
"PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10019 __Pyx_XGIVEREF(__pyx_r);
10020 __Pyx_RefNannyFinishContext();
10033 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
10034 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 ";
10035 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10036 PyObject *__pyx_r = 0;
10037 __Pyx_RefNannyDeclarations
10038 __Pyx_RefNannySetupContext(
"frame (wrapper)", 0);
10039 __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10042 __Pyx_RefNannyFinishContext();
10046 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10047 PyObject *__pyx_r = NULL;
10048 __Pyx_RefNannyDeclarations
10049 PyObject *__pyx_t_1 = NULL;
10050 PyObject *__pyx_t_2 = NULL;
10051 int __pyx_lineno = 0;
10052 const char *__pyx_filename = NULL;
10053 int __pyx_clineno = 0;
10054 __Pyx_RefNannySetupContext(
"frame", 0);
10063 __Pyx_XDECREF(__pyx_r);
10064 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
10065 __Pyx_GOTREF(__pyx_t_1);
10066 __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;}
10067 __Pyx_GOTREF(__pyx_t_2);
10068 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10069 __pyx_r = __pyx_t_2;
10083 __Pyx_XDECREF(__pyx_t_1);
10084 __Pyx_XDECREF(__pyx_t_2);
10085 __Pyx_AddTraceback(
"PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10088 __Pyx_XGIVEREF(__pyx_r);
10089 __Pyx_RefNannyFinishContext();
10102 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self);
10103 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 ";
10104 #if CYTHON_COMPILING_IN_CPYTHON
10105 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10107 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10108 PyObject *__pyx_r = 0;
10109 __Pyx_RefNannyDeclarations
10110 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
10111 __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10114 __Pyx_RefNannyFinishContext();
10118 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
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(
"__repr__", 0);
10134 __Pyx_XDECREF(__pyx_r);
10135 __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;}
10136 __Pyx_GOTREF(__pyx_t_1);
10137 __pyx_r = __pyx_t_1;
10151 __Pyx_XDECREF(__pyx_t_1);
10152 __Pyx_AddTraceback(
"PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10155 __Pyx_XGIVEREF(__pyx_r);
10156 __Pyx_RefNannyFinishContext();
10169 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self);
10170 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 ";
10171 #if CYTHON_COMPILING_IN_CPYTHON
10172 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10174 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10175 PyObject *__pyx_r = 0;
10176 __Pyx_RefNannyDeclarations
10177 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
10178 __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10181 __Pyx_RefNannyFinishContext();
10185 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10186 PyObject *__pyx_r = NULL;
10187 __Pyx_RefNannyDeclarations
10188 PyObject *__pyx_t_1 = NULL;
10189 int __pyx_lineno = 0;
10190 const char *__pyx_filename = NULL;
10191 int __pyx_clineno = 0;
10192 __Pyx_RefNannySetupContext(
"__str__", 0);
10201 __Pyx_XDECREF(__pyx_r);
10202 __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;}
10203 __Pyx_GOTREF(__pyx_t_1);
10204 __pyx_r = __pyx_t_1;
10218 __Pyx_XDECREF(__pyx_t_1);
10219 __Pyx_AddTraceback(
"PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10222 __Pyx_XGIVEREF(__pyx_r);
10223 __Pyx_RefNannyFinishContext();
10236 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
10237 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 ";
10238 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};
10239 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
10240 PyObject *__pyx_r = 0;
10241 __Pyx_RefNannyDeclarations
10242 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests (wrapper)", 0);
10243 __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
10246 __Pyx_RefNannyFinishContext();
10250 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
10251 PyObject *__pyx_r = NULL;
10252 __Pyx_RefNannyDeclarations
10253 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests", 0);
10262 __Pyx_XDECREF(__pyx_r);
10263 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10276 __Pyx_XGIVEREF(__pyx_r);
10277 __Pyx_RefNannyFinishContext();
10289 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10290 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10291 PyObject *__pyx_r = NULL;
10292 __Pyx_RefNannyDeclarations
10293 PyObject *__pyx_t_1 = NULL;
10294 PyObject *__pyx_t_2 = NULL;
10295 PyObject *__pyx_t_3 = NULL;
10296 int __pyx_lineno = 0;
10297 const char *__pyx_filename = NULL;
10298 int __pyx_clineno = 0;
10299 __Pyx_RefNannySetupContext(
"inv", 0);
10308 __Pyx_XDECREF(__pyx_r);
10309 __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;}
10310 __Pyx_GOTREF(__pyx_t_2);
10311 __Pyx_INCREF(__pyx_v_obj);
10312 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10313 __Pyx_GIVEREF(__pyx_v_obj);
10314 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
10315 __Pyx_GOTREF(__pyx_t_3);
10316 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10317 __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;}
10318 __Pyx_GOTREF(__pyx_t_2);
10319 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10321 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10322 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10323 if (likely(__pyx_t_3)) {
10324 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10325 __Pyx_INCREF(__pyx_t_3);
10326 __Pyx_INCREF(
function);
10327 __Pyx_DECREF_SET(__pyx_t_2,
function);
10331 __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;}
10332 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10334 __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;}
10336 __Pyx_GOTREF(__pyx_t_1);
10337 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10338 __pyx_r = __pyx_t_1;
10352 __Pyx_XDECREF(__pyx_t_1);
10353 __Pyx_XDECREF(__pyx_t_2);
10354 __Pyx_XDECREF(__pyx_t_3);
10355 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10358 __Pyx_XGIVEREF(__pyx_r);
10359 __Pyx_RefNannyFinishContext();
10364 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10365 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 ";
10366 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10367 PyObject *__pyx_r = 0;
10368 __Pyx_RefNannyDeclarations
10369 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
10370 __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
10373 __Pyx_RefNannyFinishContext();
10377 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10378 PyObject *__pyx_r = NULL;
10379 __Pyx_RefNannyDeclarations
10380 PyObject *__pyx_t_1 = NULL;
10381 int __pyx_lineno = 0;
10382 const char *__pyx_filename = NULL;
10383 int __pyx_clineno = 0;
10384 __Pyx_RefNannySetupContext(
"inv", 0);
10385 __Pyx_XDECREF(__pyx_r);
10386 __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;}
10387 __Pyx_GOTREF(__pyx_t_1);
10388 __pyx_r = __pyx_t_1;
10394 __Pyx_XDECREF(__pyx_t_1);
10395 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10398 __Pyx_XGIVEREF(__pyx_r);
10399 __Pyx_RefNannyFinishContext();
10411 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10412 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10413 PyObject *__pyx_r = NULL;
10414 __Pyx_RefNannyDeclarations
10415 PyObject *__pyx_t_1 = NULL;
10416 PyObject *__pyx_t_2 = NULL;
10417 PyObject *__pyx_t_3 = NULL;
10418 int __pyx_lineno = 0;
10419 const char *__pyx_filename = NULL;
10420 int __pyx_clineno = 0;
10421 __Pyx_RefNannySetupContext(
"scalar", 0);
10430 __Pyx_XDECREF(__pyx_r);
10431 __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;}
10432 __Pyx_GOTREF(__pyx_t_2);
10433 __Pyx_INCREF(__pyx_v_obj);
10434 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10435 __Pyx_GIVEREF(__pyx_v_obj);
10436 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
10437 __Pyx_GOTREF(__pyx_t_3);
10438 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10439 __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;}
10440 __Pyx_GOTREF(__pyx_t_2);
10441 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10443 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10444 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10445 if (likely(__pyx_t_3)) {
10446 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10447 __Pyx_INCREF(__pyx_t_3);
10448 __Pyx_INCREF(
function);
10449 __Pyx_DECREF_SET(__pyx_t_2,
function);
10453 __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;}
10454 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10456 __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;}
10458 __Pyx_GOTREF(__pyx_t_1);
10459 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10460 __pyx_r = __pyx_t_1;
10474 __Pyx_XDECREF(__pyx_t_1);
10475 __Pyx_XDECREF(__pyx_t_2);
10476 __Pyx_XDECREF(__pyx_t_3);
10477 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10480 __Pyx_XGIVEREF(__pyx_r);
10481 __Pyx_RefNannyFinishContext();
10486 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10487 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 ";
10488 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10489 PyObject *__pyx_r = 0;
10490 __Pyx_RefNannyDeclarations
10491 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
10492 __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
10495 __Pyx_RefNannyFinishContext();
10499 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10500 PyObject *__pyx_r = NULL;
10501 __Pyx_RefNannyDeclarations
10502 PyObject *__pyx_t_1 = NULL;
10503 int __pyx_lineno = 0;
10504 const char *__pyx_filename = NULL;
10505 int __pyx_clineno = 0;
10506 __Pyx_RefNannySetupContext(
"scalar", 0);
10507 __Pyx_XDECREF(__pyx_r);
10508 __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;}
10509 __Pyx_GOTREF(__pyx_t_1);
10510 __pyx_r = __pyx_t_1;
10516 __Pyx_XDECREF(__pyx_t_1);
10517 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10520 __Pyx_XGIVEREF(__pyx_r);
10521 __Pyx_RefNannyFinishContext();
10533 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10534 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10535 PyObject *__pyx_r = NULL;
10536 __Pyx_RefNannyDeclarations
10537 PyObject *__pyx_t_1 = NULL;
10538 PyObject *__pyx_t_2 = NULL;
10539 PyObject *__pyx_t_3 = NULL;
10540 int __pyx_lineno = 0;
10541 const char *__pyx_filename = NULL;
10542 int __pyx_clineno = 0;
10543 __Pyx_RefNannySetupContext(
"real", 0);
10552 __Pyx_XDECREF(__pyx_r);
10553 __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;}
10554 __Pyx_GOTREF(__pyx_t_2);
10555 __Pyx_INCREF(__pyx_v_obj);
10556 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10557 __Pyx_GIVEREF(__pyx_v_obj);
10558 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
10559 __Pyx_GOTREF(__pyx_t_3);
10560 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10561 __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;}
10562 __Pyx_GOTREF(__pyx_t_2);
10563 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10565 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10566 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10567 if (likely(__pyx_t_3)) {
10568 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10569 __Pyx_INCREF(__pyx_t_3);
10570 __Pyx_INCREF(
function);
10571 __Pyx_DECREF_SET(__pyx_t_2,
function);
10575 __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;}
10576 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10578 __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;}
10580 __Pyx_GOTREF(__pyx_t_1);
10581 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10582 __pyx_r = __pyx_t_1;
10596 __Pyx_XDECREF(__pyx_t_1);
10597 __Pyx_XDECREF(__pyx_t_2);
10598 __Pyx_XDECREF(__pyx_t_3);
10599 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
10602 __Pyx_XGIVEREF(__pyx_r);
10603 __Pyx_RefNannyFinishContext();
10608 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10609 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 ";
10610 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10611 PyObject *__pyx_r = 0;
10612 __Pyx_RefNannyDeclarations
10613 __Pyx_RefNannySetupContext(
"real (wrapper)", 0);
10614 __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
10617 __Pyx_RefNannyFinishContext();
10621 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10622 PyObject *__pyx_r = NULL;
10623 __Pyx_RefNannyDeclarations
10624 PyObject *__pyx_t_1 = NULL;
10625 int __pyx_lineno = 0;
10626 const char *__pyx_filename = NULL;
10627 int __pyx_clineno = 0;
10628 __Pyx_RefNannySetupContext(
"real", 0);
10629 __Pyx_XDECREF(__pyx_r);
10630 __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;}
10631 __Pyx_GOTREF(__pyx_t_1);
10632 __pyx_r = __pyx_t_1;
10638 __Pyx_XDECREF(__pyx_t_1);
10639 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
10642 __Pyx_XGIVEREF(__pyx_r);
10643 __Pyx_RefNannyFinishContext();
10655 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10656 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10657 PyObject *__pyx_r = NULL;
10658 __Pyx_RefNannyDeclarations
10659 __Pyx_RefNannySetupContext(
"imag", 0);
10668 __Pyx_XDECREF(__pyx_r);
10669 __Pyx_INCREF(__pyx_float_0_0);
10670 __pyx_r = __pyx_float_0_0;
10683 __Pyx_XGIVEREF(__pyx_r);
10684 __Pyx_RefNannyFinishContext();
10689 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10690 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 ";
10691 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10692 PyObject *__pyx_r = 0;
10693 __Pyx_RefNannyDeclarations
10694 __Pyx_RefNannySetupContext(
"imag (wrapper)", 0);
10695 __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
10698 __Pyx_RefNannyFinishContext();
10702 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10703 PyObject *__pyx_r = NULL;
10704 __Pyx_RefNannyDeclarations
10705 PyObject *__pyx_t_1 = NULL;
10706 int __pyx_lineno = 0;
10707 const char *__pyx_filename = NULL;
10708 int __pyx_clineno = 0;
10709 __Pyx_RefNannySetupContext(
"imag", 0);
10710 __Pyx_XDECREF(__pyx_r);
10711 __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;}
10712 __Pyx_GOTREF(__pyx_t_1);
10713 __pyx_r = __pyx_t_1;
10719 __Pyx_XDECREF(__pyx_t_1);
10720 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
10723 __Pyx_XGIVEREF(__pyx_r);
10724 __Pyx_RefNannyFinishContext();
10736 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10737 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10738 PyObject *__pyx_r = NULL;
10739 __Pyx_RefNannyDeclarations
10740 PyObject *__pyx_t_1 = NULL;
10741 PyObject *__pyx_t_2 = NULL;
10742 PyObject *__pyx_t_3 = NULL;
10743 int __pyx_lineno = 0;
10744 const char *__pyx_filename = NULL;
10745 int __pyx_clineno = 0;
10746 __Pyx_RefNannySetupContext(
"pure", 0);
10755 __Pyx_XDECREF(__pyx_r);
10756 __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;}
10757 __Pyx_GOTREF(__pyx_t_2);
10758 __Pyx_INCREF(__pyx_v_obj);
10759 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10760 __Pyx_GIVEREF(__pyx_v_obj);
10761 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
10762 __Pyx_GOTREF(__pyx_t_3);
10763 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10764 __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;}
10765 __Pyx_GOTREF(__pyx_t_2);
10766 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10768 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10769 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10770 if (likely(__pyx_t_3)) {
10771 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10772 __Pyx_INCREF(__pyx_t_3);
10773 __Pyx_INCREF(
function);
10774 __Pyx_DECREF_SET(__pyx_t_2,
function);
10778 __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;}
10779 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10781 __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;}
10783 __Pyx_GOTREF(__pyx_t_1);
10784 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10785 __pyx_r = __pyx_t_1;
10799 __Pyx_XDECREF(__pyx_t_1);
10800 __Pyx_XDECREF(__pyx_t_2);
10801 __Pyx_XDECREF(__pyx_t_3);
10802 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10805 __Pyx_XGIVEREF(__pyx_r);
10806 __Pyx_RefNannyFinishContext();
10811 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10812 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 ";
10813 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10814 PyObject *__pyx_r = 0;
10815 __Pyx_RefNannyDeclarations
10816 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
10817 __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
10820 __Pyx_RefNannyFinishContext();
10824 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10825 PyObject *__pyx_r = NULL;
10826 __Pyx_RefNannyDeclarations
10827 PyObject *__pyx_t_1 = NULL;
10828 int __pyx_lineno = 0;
10829 const char *__pyx_filename = NULL;
10830 int __pyx_clineno = 0;
10831 __Pyx_RefNannySetupContext(
"pure", 0);
10832 __Pyx_XDECREF(__pyx_r);
10833 __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;}
10834 __Pyx_GOTREF(__pyx_t_1);
10835 __pyx_r = __pyx_t_1;
10841 __Pyx_XDECREF(__pyx_t_1);
10842 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10845 __Pyx_XGIVEREF(__pyx_r);
10846 __Pyx_RefNannyFinishContext();
10858 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10859 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10860 PyObject *__pyx_r = NULL;
10861 __Pyx_RefNannyDeclarations
10862 PyObject *__pyx_t_1 = NULL;
10863 PyObject *__pyx_t_2 = NULL;
10864 PyObject *__pyx_t_3 = NULL;
10865 int __pyx_lineno = 0;
10866 const char *__pyx_filename = NULL;
10867 int __pyx_clineno = 0;
10868 __Pyx_RefNannySetupContext(
"even", 0);
10877 __Pyx_XDECREF(__pyx_r);
10878 __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;}
10879 __Pyx_GOTREF(__pyx_t_2);
10880 __Pyx_INCREF(__pyx_v_obj);
10881 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10882 __Pyx_GIVEREF(__pyx_v_obj);
10883 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
10884 __Pyx_GOTREF(__pyx_t_3);
10885 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10886 __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;}
10887 __Pyx_GOTREF(__pyx_t_2);
10888 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10890 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10891 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10892 if (likely(__pyx_t_3)) {
10893 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
10894 __Pyx_INCREF(__pyx_t_3);
10895 __Pyx_INCREF(
function);
10896 __Pyx_DECREF_SET(__pyx_t_2,
function);
10900 __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;}
10901 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10903 __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;}
10905 __Pyx_GOTREF(__pyx_t_1);
10906 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10907 __pyx_r = __pyx_t_1;
10921 __Pyx_XDECREF(__pyx_t_1);
10922 __Pyx_XDECREF(__pyx_t_2);
10923 __Pyx_XDECREF(__pyx_t_3);
10924 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10927 __Pyx_XGIVEREF(__pyx_r);
10928 __Pyx_RefNannyFinishContext();
10933 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10934 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 ";
10935 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10936 PyObject *__pyx_r = 0;
10937 __Pyx_RefNannyDeclarations
10938 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
10939 __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
10942 __Pyx_RefNannyFinishContext();
10946 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10947 PyObject *__pyx_r = NULL;
10948 __Pyx_RefNannyDeclarations
10949 PyObject *__pyx_t_1 = NULL;
10950 int __pyx_lineno = 0;
10951 const char *__pyx_filename = NULL;
10952 int __pyx_clineno = 0;
10953 __Pyx_RefNannySetupContext(
"even", 0);
10954 __Pyx_XDECREF(__pyx_r);
10955 __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;}
10956 __Pyx_GOTREF(__pyx_t_1);
10957 __pyx_r = __pyx_t_1;
10963 __Pyx_XDECREF(__pyx_t_1);
10964 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10967 __Pyx_XGIVEREF(__pyx_r);
10968 __Pyx_RefNannyFinishContext();
10980 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10981 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10982 PyObject *__pyx_r = NULL;
10983 __Pyx_RefNannyDeclarations
10984 PyObject *__pyx_t_1 = NULL;
10985 PyObject *__pyx_t_2 = NULL;
10986 PyObject *__pyx_t_3 = NULL;
10987 int __pyx_lineno = 0;
10988 const char *__pyx_filename = NULL;
10989 int __pyx_clineno = 0;
10990 __Pyx_RefNannySetupContext(
"odd", 0);
10999 __Pyx_XDECREF(__pyx_r);
11000 __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;}
11001 __Pyx_GOTREF(__pyx_t_2);
11002 __Pyx_INCREF(__pyx_v_obj);
11003 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11004 __Pyx_GIVEREF(__pyx_v_obj);
11005 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
11006 __Pyx_GOTREF(__pyx_t_3);
11007 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11008 __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;}
11009 __Pyx_GOTREF(__pyx_t_2);
11010 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11012 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11013 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11014 if (likely(__pyx_t_3)) {
11015 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11016 __Pyx_INCREF(__pyx_t_3);
11017 __Pyx_INCREF(
function);
11018 __Pyx_DECREF_SET(__pyx_t_2,
function);
11022 __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;}
11023 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11025 __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;}
11027 __Pyx_GOTREF(__pyx_t_1);
11028 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11029 __pyx_r = __pyx_t_1;
11043 __Pyx_XDECREF(__pyx_t_1);
11044 __Pyx_XDECREF(__pyx_t_2);
11045 __Pyx_XDECREF(__pyx_t_3);
11046 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11049 __Pyx_XGIVEREF(__pyx_r);
11050 __Pyx_RefNannyFinishContext();
11055 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11056 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 ";
11057 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11058 PyObject *__pyx_r = 0;
11059 __Pyx_RefNannyDeclarations
11060 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
11061 __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11064 __Pyx_RefNannyFinishContext();
11068 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11069 PyObject *__pyx_r = NULL;
11070 __Pyx_RefNannyDeclarations
11071 PyObject *__pyx_t_1 = NULL;
11072 int __pyx_lineno = 0;
11073 const char *__pyx_filename = NULL;
11074 int __pyx_clineno = 0;
11075 __Pyx_RefNannySetupContext(
"odd", 0);
11076 __Pyx_XDECREF(__pyx_r);
11077 __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;}
11078 __Pyx_GOTREF(__pyx_t_1);
11079 __pyx_r = __pyx_t_1;
11085 __Pyx_XDECREF(__pyx_t_1);
11086 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11089 __Pyx_XGIVEREF(__pyx_r);
11090 __Pyx_RefNannyFinishContext();
11102 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11103 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11104 PyObject *__pyx_r = NULL;
11105 __Pyx_RefNannyDeclarations
11106 PyObject *__pyx_t_1 = NULL;
11107 PyObject *__pyx_t_2 = NULL;
11108 PyObject *__pyx_t_3 = NULL;
11109 int __pyx_lineno = 0;
11110 const char *__pyx_filename = NULL;
11111 int __pyx_clineno = 0;
11112 __Pyx_RefNannySetupContext(
"involute", 0);
11121 __Pyx_XDECREF(__pyx_r);
11122 __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;}
11123 __Pyx_GOTREF(__pyx_t_2);
11124 __Pyx_INCREF(__pyx_v_obj);
11125 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11126 __Pyx_GIVEREF(__pyx_v_obj);
11127 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
11128 __Pyx_GOTREF(__pyx_t_3);
11129 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11130 __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;}
11131 __Pyx_GOTREF(__pyx_t_2);
11132 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11134 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11135 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11136 if (likely(__pyx_t_3)) {
11137 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11138 __Pyx_INCREF(__pyx_t_3);
11139 __Pyx_INCREF(
function);
11140 __Pyx_DECREF_SET(__pyx_t_2,
function);
11144 __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;}
11145 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11147 __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;}
11149 __Pyx_GOTREF(__pyx_t_1);
11150 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11151 __pyx_r = __pyx_t_1;
11165 __Pyx_XDECREF(__pyx_t_1);
11166 __Pyx_XDECREF(__pyx_t_2);
11167 __Pyx_XDECREF(__pyx_t_3);
11168 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11171 __Pyx_XGIVEREF(__pyx_r);
11172 __Pyx_RefNannyFinishContext();
11177 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11178 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 ";
11179 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11180 PyObject *__pyx_r = 0;
11181 __Pyx_RefNannyDeclarations
11182 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
11183 __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11186 __Pyx_RefNannyFinishContext();
11190 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11191 PyObject *__pyx_r = NULL;
11192 __Pyx_RefNannyDeclarations
11193 PyObject *__pyx_t_1 = NULL;
11194 int __pyx_lineno = 0;
11195 const char *__pyx_filename = NULL;
11196 int __pyx_clineno = 0;
11197 __Pyx_RefNannySetupContext(
"involute", 0);
11198 __Pyx_XDECREF(__pyx_r);
11199 __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;}
11200 __Pyx_GOTREF(__pyx_t_1);
11201 __pyx_r = __pyx_t_1;
11207 __Pyx_XDECREF(__pyx_t_1);
11208 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11211 __Pyx_XGIVEREF(__pyx_r);
11212 __Pyx_RefNannyFinishContext();
11224 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11225 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11226 PyObject *__pyx_r = NULL;
11227 __Pyx_RefNannyDeclarations
11228 PyObject *__pyx_t_1 = NULL;
11229 PyObject *__pyx_t_2 = NULL;
11230 PyObject *__pyx_t_3 = NULL;
11231 int __pyx_lineno = 0;
11232 const char *__pyx_filename = NULL;
11233 int __pyx_clineno = 0;
11234 __Pyx_RefNannySetupContext(
"reverse", 0);
11243 __Pyx_XDECREF(__pyx_r);
11244 __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;}
11245 __Pyx_GOTREF(__pyx_t_2);
11246 __Pyx_INCREF(__pyx_v_obj);
11247 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11248 __Pyx_GIVEREF(__pyx_v_obj);
11249 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
11250 __Pyx_GOTREF(__pyx_t_3);
11251 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11252 __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;}
11253 __Pyx_GOTREF(__pyx_t_2);
11254 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11256 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11257 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11258 if (likely(__pyx_t_3)) {
11259 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11260 __Pyx_INCREF(__pyx_t_3);
11261 __Pyx_INCREF(
function);
11262 __Pyx_DECREF_SET(__pyx_t_2,
function);
11266 __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;}
11267 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11269 __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;}
11271 __Pyx_GOTREF(__pyx_t_1);
11272 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11273 __pyx_r = __pyx_t_1;
11287 __Pyx_XDECREF(__pyx_t_1);
11288 __Pyx_XDECREF(__pyx_t_2);
11289 __Pyx_XDECREF(__pyx_t_3);
11290 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11293 __Pyx_XGIVEREF(__pyx_r);
11294 __Pyx_RefNannyFinishContext();
11299 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11300 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 ";
11301 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11302 PyObject *__pyx_r = 0;
11303 __Pyx_RefNannyDeclarations
11304 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
11305 __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
11308 __Pyx_RefNannyFinishContext();
11312 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11313 PyObject *__pyx_r = NULL;
11314 __Pyx_RefNannyDeclarations
11315 PyObject *__pyx_t_1 = NULL;
11316 int __pyx_lineno = 0;
11317 const char *__pyx_filename = NULL;
11318 int __pyx_clineno = 0;
11319 __Pyx_RefNannySetupContext(
"reverse", 0);
11320 __Pyx_XDECREF(__pyx_r);
11321 __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;}
11322 __Pyx_GOTREF(__pyx_t_1);
11323 __pyx_r = __pyx_t_1;
11329 __Pyx_XDECREF(__pyx_t_1);
11330 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11333 __Pyx_XGIVEREF(__pyx_r);
11334 __Pyx_RefNannyFinishContext();
11346 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11347 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11348 PyObject *__pyx_r = NULL;
11349 __Pyx_RefNannyDeclarations
11350 PyObject *__pyx_t_1 = NULL;
11351 PyObject *__pyx_t_2 = NULL;
11352 PyObject *__pyx_t_3 = NULL;
11353 int __pyx_lineno = 0;
11354 const char *__pyx_filename = NULL;
11355 int __pyx_clineno = 0;
11356 __Pyx_RefNannySetupContext(
"conj", 0);
11365 __Pyx_XDECREF(__pyx_r);
11366 __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;}
11367 __Pyx_GOTREF(__pyx_t_2);
11368 __Pyx_INCREF(__pyx_v_obj);
11369 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11370 __Pyx_GIVEREF(__pyx_v_obj);
11371 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
11372 __Pyx_GOTREF(__pyx_t_3);
11373 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11374 __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;}
11375 __Pyx_GOTREF(__pyx_t_2);
11376 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11378 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11379 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11380 if (likely(__pyx_t_3)) {
11381 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11382 __Pyx_INCREF(__pyx_t_3);
11383 __Pyx_INCREF(
function);
11384 __Pyx_DECREF_SET(__pyx_t_2,
function);
11388 __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;}
11389 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11391 __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;}
11393 __Pyx_GOTREF(__pyx_t_1);
11394 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11395 __pyx_r = __pyx_t_1;
11409 __Pyx_XDECREF(__pyx_t_1);
11410 __Pyx_XDECREF(__pyx_t_2);
11411 __Pyx_XDECREF(__pyx_t_3);
11412 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11415 __Pyx_XGIVEREF(__pyx_r);
11416 __Pyx_RefNannyFinishContext();
11421 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11422 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 ";
11423 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11424 PyObject *__pyx_r = 0;
11425 __Pyx_RefNannyDeclarations
11426 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
11427 __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
11430 __Pyx_RefNannyFinishContext();
11434 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11435 PyObject *__pyx_r = NULL;
11436 __Pyx_RefNannyDeclarations
11437 PyObject *__pyx_t_1 = NULL;
11438 int __pyx_lineno = 0;
11439 const char *__pyx_filename = NULL;
11440 int __pyx_clineno = 0;
11441 __Pyx_RefNannySetupContext(
"conj", 0);
11442 __Pyx_XDECREF(__pyx_r);
11443 __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;}
11444 __Pyx_GOTREF(__pyx_t_1);
11445 __pyx_r = __pyx_t_1;
11451 __Pyx_XDECREF(__pyx_t_1);
11452 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11455 __Pyx_XGIVEREF(__pyx_r);
11456 __Pyx_RefNannyFinishContext();
11468 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11469 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11470 PyObject *__pyx_r = NULL;
11471 __Pyx_RefNannyDeclarations
11472 PyObject *__pyx_t_1 = NULL;
11473 PyObject *__pyx_t_2 = NULL;
11474 PyObject *__pyx_t_3 = NULL;
11475 int __pyx_lineno = 0;
11476 const char *__pyx_filename = NULL;
11477 int __pyx_clineno = 0;
11478 __Pyx_RefNannySetupContext(
"quad", 0);
11487 __Pyx_XDECREF(__pyx_r);
11488 __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;}
11489 __Pyx_GOTREF(__pyx_t_2);
11490 __Pyx_INCREF(__pyx_v_obj);
11491 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11492 __Pyx_GIVEREF(__pyx_v_obj);
11493 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
11494 __Pyx_GOTREF(__pyx_t_3);
11495 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11496 __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;}
11497 __Pyx_GOTREF(__pyx_t_2);
11498 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11500 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11501 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11502 if (likely(__pyx_t_3)) {
11503 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11504 __Pyx_INCREF(__pyx_t_3);
11505 __Pyx_INCREF(
function);
11506 __Pyx_DECREF_SET(__pyx_t_2,
function);
11510 __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;}
11511 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11513 __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;}
11515 __Pyx_GOTREF(__pyx_t_1);
11516 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11517 __pyx_r = __pyx_t_1;
11531 __Pyx_XDECREF(__pyx_t_1);
11532 __Pyx_XDECREF(__pyx_t_2);
11533 __Pyx_XDECREF(__pyx_t_3);
11534 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
11537 __Pyx_XGIVEREF(__pyx_r);
11538 __Pyx_RefNannyFinishContext();
11543 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11544 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 ";
11545 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11546 PyObject *__pyx_r = 0;
11547 __Pyx_RefNannyDeclarations
11548 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
11549 __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
11552 __Pyx_RefNannyFinishContext();
11556 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11557 PyObject *__pyx_r = NULL;
11558 __Pyx_RefNannyDeclarations
11559 PyObject *__pyx_t_1 = NULL;
11560 int __pyx_lineno = 0;
11561 const char *__pyx_filename = NULL;
11562 int __pyx_clineno = 0;
11563 __Pyx_RefNannySetupContext(
"quad", 0);
11564 __Pyx_XDECREF(__pyx_r);
11565 __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;}
11566 __Pyx_GOTREF(__pyx_t_1);
11567 __pyx_r = __pyx_t_1;
11573 __Pyx_XDECREF(__pyx_t_1);
11574 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
11577 __Pyx_XGIVEREF(__pyx_r);
11578 __Pyx_RefNannyFinishContext();
11590 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11591 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11592 PyObject *__pyx_r = NULL;
11593 __Pyx_RefNannyDeclarations
11594 PyObject *__pyx_t_1 = NULL;
11595 PyObject *__pyx_t_2 = NULL;
11596 PyObject *__pyx_t_3 = NULL;
11597 int __pyx_lineno = 0;
11598 const char *__pyx_filename = NULL;
11599 int __pyx_clineno = 0;
11600 __Pyx_RefNannySetupContext(
"norm", 0);
11609 __Pyx_XDECREF(__pyx_r);
11610 __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;}
11611 __Pyx_GOTREF(__pyx_t_2);
11612 __Pyx_INCREF(__pyx_v_obj);
11613 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11614 __Pyx_GIVEREF(__pyx_v_obj);
11615 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
11616 __Pyx_GOTREF(__pyx_t_3);
11617 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11618 __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;}
11619 __Pyx_GOTREF(__pyx_t_2);
11620 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11622 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11623 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11624 if (likely(__pyx_t_3)) {
11625 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
11626 __Pyx_INCREF(__pyx_t_3);
11627 __Pyx_INCREF(
function);
11628 __Pyx_DECREF_SET(__pyx_t_2,
function);
11632 __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;}
11633 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11635 __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;}
11637 __Pyx_GOTREF(__pyx_t_1);
11638 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11639 __pyx_r = __pyx_t_1;
11653 __Pyx_XDECREF(__pyx_t_1);
11654 __Pyx_XDECREF(__pyx_t_2);
11655 __Pyx_XDECREF(__pyx_t_3);
11656 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11659 __Pyx_XGIVEREF(__pyx_r);
11660 __Pyx_RefNannyFinishContext();
11665 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11666 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 ";
11667 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11668 PyObject *__pyx_r = 0;
11669 __Pyx_RefNannyDeclarations
11670 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
11671 __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
11674 __Pyx_RefNannyFinishContext();
11678 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11679 PyObject *__pyx_r = NULL;
11680 __Pyx_RefNannyDeclarations
11681 PyObject *__pyx_t_1 = NULL;
11682 int __pyx_lineno = 0;
11683 const char *__pyx_filename = NULL;
11684 int __pyx_clineno = 0;
11685 __Pyx_RefNannySetupContext(
"norm", 0);
11686 __Pyx_XDECREF(__pyx_r);
11687 __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;}
11688 __Pyx_GOTREF(__pyx_t_1);
11689 __pyx_r = __pyx_t_1;
11695 __Pyx_XDECREF(__pyx_t_1);
11696 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11699 __Pyx_XGIVEREF(__pyx_r);
11700 __Pyx_RefNannyFinishContext();
11712 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11713 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11714 PyObject *__pyx_r = NULL;
11715 __Pyx_RefNannyDeclarations
11716 PyObject *__pyx_t_1 = NULL;
11717 int __pyx_lineno = 0;
11718 const char *__pyx_filename = NULL;
11719 int __pyx_clineno = 0;
11720 __Pyx_RefNannySetupContext(
"abs", 0);
11729 __Pyx_XDECREF(__pyx_r);
11730 __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;}
11731 __Pyx_GOTREF(__pyx_t_1);
11732 __pyx_r = __pyx_t_1;
11746 __Pyx_XDECREF(__pyx_t_1);
11747 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11750 __Pyx_XGIVEREF(__pyx_r);
11751 __Pyx_RefNannyFinishContext();
11756 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11757 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 ";
11758 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11759 PyObject *__pyx_r = 0;
11760 __Pyx_RefNannyDeclarations
11761 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
11762 __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
11765 __Pyx_RefNannyFinishContext();
11769 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11770 PyObject *__pyx_r = NULL;
11771 __Pyx_RefNannyDeclarations
11772 PyObject *__pyx_t_1 = NULL;
11773 int __pyx_lineno = 0;
11774 const char *__pyx_filename = NULL;
11775 int __pyx_clineno = 0;
11776 __Pyx_RefNannySetupContext(
"abs", 0);
11777 __Pyx_XDECREF(__pyx_r);
11778 __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;}
11779 __Pyx_GOTREF(__pyx_t_1);
11780 __pyx_r = __pyx_t_1;
11786 __Pyx_XDECREF(__pyx_t_1);
11787 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11790 __Pyx_XGIVEREF(__pyx_r);
11791 __Pyx_RefNannyFinishContext();
11803 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11804 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11805 PyObject *__pyx_r = NULL;
11806 __Pyx_RefNannyDeclarations
11807 PyObject *__pyx_t_1 = NULL;
11808 int __pyx_lineno = 0;
11809 const char *__pyx_filename = NULL;
11810 int __pyx_clineno = 0;
11811 __Pyx_RefNannySetupContext(
"max_abs", 0);
11820 __Pyx_XDECREF(__pyx_r);
11821 __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;}
11822 __Pyx_GOTREF(__pyx_t_1);
11823 __pyx_r = __pyx_t_1;
11837 __Pyx_XDECREF(__pyx_t_1);
11838 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11841 __Pyx_XGIVEREF(__pyx_r);
11842 __Pyx_RefNannyFinishContext();
11847 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11848 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 ";
11849 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11850 PyObject *__pyx_r = 0;
11851 __Pyx_RefNannyDeclarations
11852 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
11853 __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
11856 __Pyx_RefNannyFinishContext();
11860 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11861 PyObject *__pyx_r = NULL;
11862 __Pyx_RefNannyDeclarations
11863 PyObject *__pyx_t_1 = NULL;
11864 int __pyx_lineno = 0;
11865 const char *__pyx_filename = NULL;
11866 int __pyx_clineno = 0;
11867 __Pyx_RefNannySetupContext(
"max_abs", 0);
11868 __Pyx_XDECREF(__pyx_r);
11869 __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;}
11870 __Pyx_GOTREF(__pyx_t_1);
11871 __pyx_r = __pyx_t_1;
11877 __Pyx_XDECREF(__pyx_t_1);
11878 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11881 __Pyx_XGIVEREF(__pyx_r);
11882 __Pyx_RefNannyFinishContext();
11894 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11895 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11896 PyObject *__pyx_r = NULL;
11897 __Pyx_RefNannyDeclarations
11898 PyObject *__pyx_t_1 = NULL;
11899 PyObject *__pyx_t_2 = NULL;
11900 PyObject *__pyx_t_3 = NULL;
11901 PyObject *__pyx_t_4 = NULL;
11902 PyObject *__pyx_t_5 = NULL;
11903 PyObject *__pyx_t_6 = NULL;
11904 Py_ssize_t __pyx_t_7;
11905 PyObject *__pyx_t_8 = NULL;
11906 PyObject *__pyx_t_9 = NULL;
11907 PyObject *__pyx_t_10 = NULL;
11908 PyObject *__pyx_t_11 = NULL;
11909 int __pyx_lineno = 0;
11910 const char *__pyx_filename = NULL;
11911 int __pyx_clineno = 0;
11912 __Pyx_RefNannySetupContext(
"pow", 0);
11922 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
11923 __Pyx_XGOTREF(__pyx_t_1);
11924 __Pyx_XGOTREF(__pyx_t_2);
11925 __Pyx_XGOTREF(__pyx_t_3);
11935 __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;}
11936 __Pyx_GOTREF(__pyx_t_5);
11937 __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;}
11938 __Pyx_GOTREF(__pyx_t_6);
11939 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11942 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
11943 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
11944 if (likely(__pyx_t_5)) {
11945 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
11946 __Pyx_INCREF(__pyx_t_5);
11947 __Pyx_INCREF(
function);
11948 __Pyx_DECREF_SET(__pyx_t_6,
function);
11952 __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;}
11953 __Pyx_GOTREF(__pyx_t_8);
11955 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
11957 __Pyx_INCREF(__pyx_v_obj);
11958 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
11959 __Pyx_GIVEREF(__pyx_v_obj);
11960 __Pyx_INCREF(__pyx_v_m);
11961 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
11962 __Pyx_GIVEREF(__pyx_v_m);
11963 __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;}
11964 __Pyx_GOTREF(__pyx_t_4);
11965 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11966 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11967 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11969 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11970 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11971 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11972 goto __pyx_L10_try_end;
11974 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11975 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11976 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11977 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11987 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11988 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;}
11989 __Pyx_GOTREF(__pyx_t_4);
11990 __Pyx_GOTREF(__pyx_t_6);
11991 __Pyx_GOTREF(__pyx_t_8);
12000 __Pyx_XDECREF(__pyx_r);
12001 __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;}
12002 __Pyx_GOTREF(__pyx_t_9);
12003 __Pyx_INCREF(__pyx_v_obj);
12004 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12005 __Pyx_GIVEREF(__pyx_v_obj);
12006 __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((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;}
12007 __Pyx_GOTREF(__pyx_t_10);
12008 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12009 __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;}
12010 __Pyx_GOTREF(__pyx_t_9);
12011 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12013 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
12014 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12015 if (likely(__pyx_t_10)) {
12016 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
12017 __Pyx_INCREF(__pyx_t_10);
12018 __Pyx_INCREF(
function);
12019 __Pyx_DECREF_SET(__pyx_t_9,
function);
12023 __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;}
12024 __Pyx_GOTREF(__pyx_t_5);
12026 __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;}
12027 __Pyx_GOTREF(__pyx_t_11);
12028 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
12029 __Pyx_INCREF(__pyx_v_m);
12030 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12031 __Pyx_GIVEREF(__pyx_v_m);
12032 __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;}
12033 __Pyx_GOTREF(__pyx_t_5);
12034 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12036 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12037 __pyx_r = __pyx_t_5;
12039 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12040 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12041 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12042 goto __pyx_L6_except_return;
12044 __pyx_L5_except_error:;
12045 __Pyx_XGIVEREF(__pyx_t_1);
12046 __Pyx_XGIVEREF(__pyx_t_2);
12047 __Pyx_XGIVEREF(__pyx_t_3);
12048 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12049 goto __pyx_L1_error;
12050 __pyx_L6_except_return:;
12051 __Pyx_XGIVEREF(__pyx_t_1);
12052 __Pyx_XGIVEREF(__pyx_t_2);
12053 __Pyx_XGIVEREF(__pyx_t_3);
12054 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12056 __pyx_L10_try_end:;
12068 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12071 __Pyx_XDECREF(__pyx_t_4);
12072 __Pyx_XDECREF(__pyx_t_5);
12073 __Pyx_XDECREF(__pyx_t_6);
12074 __Pyx_XDECREF(__pyx_t_8);
12075 __Pyx_XDECREF(__pyx_t_9);
12076 __Pyx_XDECREF(__pyx_t_10);
12077 __Pyx_XDECREF(__pyx_t_11);
12078 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12081 __Pyx_XGIVEREF(__pyx_r);
12082 __Pyx_RefNannyFinishContext();
12087 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12088 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 ";
12089 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12090 PyObject *__pyx_v_obj = 0;
12091 PyObject *__pyx_v_m = 0;
12092 int __pyx_lineno = 0;
12093 const char *__pyx_filename = NULL;
12094 int __pyx_clineno = 0;
12095 PyObject *__pyx_r = 0;
12096 __Pyx_RefNannyDeclarations
12097 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
12099 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12100 PyObject* values[2] = {0,0};
12101 if (unlikely(__pyx_kwds)) {
12102 Py_ssize_t kw_args;
12103 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12104 switch (pos_args) {
12105 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12106 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12108 default:
goto __pyx_L5_argtuple_error;
12110 kw_args = PyDict_Size(__pyx_kwds);
12111 switch (pos_args) {
12113 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12114 else goto __pyx_L5_argtuple_error;
12116 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12118 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12121 if (unlikely(kw_args > 0)) {
12122 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;}
12124 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12125 goto __pyx_L5_argtuple_error;
12127 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12128 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12130 __pyx_v_obj = values[0];
12131 __pyx_v_m = values[1];
12133 goto __pyx_L4_argument_unpacking_done;
12134 __pyx_L5_argtuple_error:;
12135 __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;}
12137 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12138 __Pyx_RefNannyFinishContext();
12140 __pyx_L4_argument_unpacking_done:;
12141 __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12144 __Pyx_RefNannyFinishContext();
12148 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12149 PyObject *__pyx_r = NULL;
12150 __Pyx_RefNannyDeclarations
12151 PyObject *__pyx_t_1 = NULL;
12152 int __pyx_lineno = 0;
12153 const char *__pyx_filename = NULL;
12154 int __pyx_clineno = 0;
12155 __Pyx_RefNannySetupContext(
"pow", 0);
12156 __Pyx_XDECREF(__pyx_r);
12157 __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;}
12158 __Pyx_GOTREF(__pyx_t_1);
12159 __pyx_r = __pyx_t_1;
12165 __Pyx_XDECREF(__pyx_t_1);
12166 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12169 __Pyx_XGIVEREF(__pyx_r);
12170 __Pyx_RefNannyFinishContext();
12182 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12183 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12184 PyObject *__pyx_r = NULL;
12185 __Pyx_RefNannyDeclarations
12186 PyObject *__pyx_t_1 = NULL;
12187 PyObject *__pyx_t_2 = NULL;
12188 PyObject *__pyx_t_3 = NULL;
12189 PyObject *__pyx_t_4 = NULL;
12190 int __pyx_lineno = 0;
12191 const char *__pyx_filename = NULL;
12192 int __pyx_clineno = 0;
12193 __Pyx_RefNannySetupContext(
"outer_pow", 0);
12202 __Pyx_XDECREF(__pyx_r);
12203 __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;}
12204 __Pyx_GOTREF(__pyx_t_2);
12205 __Pyx_INCREF(__pyx_v_obj);
12206 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12207 __Pyx_GIVEREF(__pyx_v_obj);
12208 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
12209 __Pyx_GOTREF(__pyx_t_3);
12210 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12211 __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;}
12212 __Pyx_GOTREF(__pyx_t_2);
12213 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12215 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
12216 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12217 if (likely(__pyx_t_3)) {
12218 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
12219 __Pyx_INCREF(__pyx_t_3);
12220 __Pyx_INCREF(
function);
12221 __Pyx_DECREF_SET(__pyx_t_2,
function);
12225 __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;}
12226 __Pyx_GOTREF(__pyx_t_1);
12228 __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;}
12229 __Pyx_GOTREF(__pyx_t_4);
12230 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
12231 __Pyx_INCREF(__pyx_v_m);
12232 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
12233 __Pyx_GIVEREF(__pyx_v_m);
12234 __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;}
12235 __Pyx_GOTREF(__pyx_t_1);
12236 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12238 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12239 __pyx_r = __pyx_t_1;
12253 __Pyx_XDECREF(__pyx_t_1);
12254 __Pyx_XDECREF(__pyx_t_2);
12255 __Pyx_XDECREF(__pyx_t_3);
12256 __Pyx_XDECREF(__pyx_t_4);
12257 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12260 __Pyx_XGIVEREF(__pyx_r);
12261 __Pyx_RefNannyFinishContext();
12266 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12267 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 ";
12268 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12269 PyObject *__pyx_v_obj = 0;
12270 PyObject *__pyx_v_m = 0;
12271 int __pyx_lineno = 0;
12272 const char *__pyx_filename = NULL;
12273 int __pyx_clineno = 0;
12274 PyObject *__pyx_r = 0;
12275 __Pyx_RefNannyDeclarations
12276 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
12278 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12279 PyObject* values[2] = {0,0};
12280 if (unlikely(__pyx_kwds)) {
12281 Py_ssize_t kw_args;
12282 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12283 switch (pos_args) {
12284 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12285 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12287 default:
goto __pyx_L5_argtuple_error;
12289 kw_args = PyDict_Size(__pyx_kwds);
12290 switch (pos_args) {
12292 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12293 else goto __pyx_L5_argtuple_error;
12295 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12297 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12300 if (unlikely(kw_args > 0)) {
12301 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;}
12303 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12304 goto __pyx_L5_argtuple_error;
12306 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12307 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12309 __pyx_v_obj = values[0];
12310 __pyx_v_m = values[1];
12312 goto __pyx_L4_argument_unpacking_done;
12313 __pyx_L5_argtuple_error:;
12314 __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;}
12316 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12317 __Pyx_RefNannyFinishContext();
12319 __pyx_L4_argument_unpacking_done:;
12320 __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12323 __Pyx_RefNannyFinishContext();
12327 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12328 PyObject *__pyx_r = NULL;
12329 __Pyx_RefNannyDeclarations
12330 PyObject *__pyx_t_1 = NULL;
12331 int __pyx_lineno = 0;
12332 const char *__pyx_filename = NULL;
12333 int __pyx_clineno = 0;
12334 __Pyx_RefNannySetupContext(
"outer_pow", 0);
12335 __Pyx_XDECREF(__pyx_r);
12336 __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;}
12337 __Pyx_GOTREF(__pyx_t_1);
12338 __pyx_r = __pyx_t_1;
12344 __Pyx_XDECREF(__pyx_t_1);
12345 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12348 __Pyx_XGIVEREF(__pyx_r);
12349 __Pyx_RefNannyFinishContext();
12361 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12362 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12363 PyObject *__pyx_r = NULL;
12364 __Pyx_RefNannyDeclarations
12365 PyObject *__pyx_t_1 = NULL;
12366 PyObject *__pyx_t_2 = NULL;
12367 int __pyx_lineno = 0;
12368 const char *__pyx_filename = NULL;
12369 int __pyx_clineno = 0;
12370 __Pyx_RefNannySetupContext(
"complexifier", 0);
12379 __Pyx_XDECREF(__pyx_r);
12380 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
12381 __Pyx_GOTREF(__pyx_t_1);
12382 __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;}
12383 __Pyx_GOTREF(__pyx_t_2);
12384 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12385 __pyx_r = __pyx_t_2;
12399 __Pyx_XDECREF(__pyx_t_1);
12400 __Pyx_XDECREF(__pyx_t_2);
12401 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12404 __Pyx_XGIVEREF(__pyx_r);
12405 __Pyx_RefNannyFinishContext();
12410 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12411 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 ";
12412 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12413 PyObject *__pyx_r = 0;
12414 __Pyx_RefNannyDeclarations
12415 __Pyx_RefNannySetupContext(
"complexifier (wrapper)", 0);
12416 __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
12419 __Pyx_RefNannyFinishContext();
12423 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12424 PyObject *__pyx_r = NULL;
12425 __Pyx_RefNannyDeclarations
12426 PyObject *__pyx_t_1 = NULL;
12427 int __pyx_lineno = 0;
12428 const char *__pyx_filename = NULL;
12429 int __pyx_clineno = 0;
12430 __Pyx_RefNannySetupContext(
"complexifier", 0);
12431 __Pyx_XDECREF(__pyx_r);
12432 __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;}
12433 __Pyx_GOTREF(__pyx_t_1);
12434 __pyx_r = __pyx_t_1;
12440 __Pyx_XDECREF(__pyx_t_1);
12441 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12444 __Pyx_XGIVEREF(__pyx_r);
12445 __Pyx_RefNannyFinishContext();
12457 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12458 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) {
12459 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12460 PyObject *__pyx_r = NULL;
12461 __Pyx_RefNannyDeclarations
12464 PyObject *__pyx_t_3 = NULL;
12466 PyObject *__pyx_t_5 = NULL;
12467 PyObject *__pyx_t_6 = NULL;
12468 PyObject *__pyx_t_7 = NULL;
12469 PyObject *__pyx_t_8 = NULL;
12470 PyObject *__pyx_t_9 = NULL;
12471 PyObject *__pyx_t_10 = NULL;
12472 PyObject *__pyx_t_11 = NULL;
12473 int __pyx_lineno = 0;
12474 const char *__pyx_filename = NULL;
12475 int __pyx_clineno = 0;
12476 __Pyx_RefNannySetupContext(
"sqrt", 0);
12477 if (__pyx_optional_args) {
12478 if (__pyx_optional_args->__pyx_n > 0) {
12479 __pyx_v_i = __pyx_optional_args->i;
12490 __pyx_t_1 = (__pyx_v_i != Py_None);
12491 __pyx_t_2 = (__pyx_t_1 != 0);
12501 __Pyx_XDECREF(__pyx_r);
12502 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
12503 __Pyx_GOTREF(__pyx_t_3);
12505 __pyx_t_4 =
sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12507 __Pyx_CppExn2PyErr();
12508 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12510 __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;}
12511 __Pyx_GOTREF(__pyx_t_5);
12512 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12513 __pyx_r = __pyx_t_5;
12527 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
12528 __Pyx_XGOTREF(__pyx_t_6);
12529 __Pyx_XGOTREF(__pyx_t_7);
12530 __Pyx_XGOTREF(__pyx_t_8);
12540 __Pyx_XDECREF(__pyx_r);
12541 __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;}
12542 __Pyx_GOTREF(__pyx_t_3);
12543 __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;}
12544 __Pyx_GOTREF(__pyx_t_9);
12545 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12547 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
12548 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
12549 if (likely(__pyx_t_3)) {
12550 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
12551 __Pyx_INCREF(__pyx_t_3);
12552 __Pyx_INCREF(
function);
12553 __Pyx_DECREF_SET(__pyx_t_9,
function);
12557 __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;}
12558 __Pyx_GOTREF(__pyx_t_5);
12560 __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;}
12561 __Pyx_GOTREF(__pyx_t_10);
12562 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
12563 __Pyx_INCREF(__pyx_v_obj);
12564 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
12565 __Pyx_GIVEREF(__pyx_v_obj);
12566 __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;}
12567 __Pyx_GOTREF(__pyx_t_5);
12568 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12570 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12571 __pyx_r = __pyx_t_5;
12573 goto __pyx_L8_try_return;
12576 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12577 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12578 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12579 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12589 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12590 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;}
12591 __Pyx_GOTREF(__pyx_t_5);
12592 __Pyx_GOTREF(__pyx_t_9);
12593 __Pyx_GOTREF(__pyx_t_10);
12602 __Pyx_XDECREF(__pyx_r);
12603 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
12604 __Pyx_GOTREF(__pyx_t_3);
12605 __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;}
12606 __Pyx_GOTREF(__pyx_t_11);
12607 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12608 __pyx_r = __pyx_t_11;
12610 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12611 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12612 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12613 goto __pyx_L7_except_return;
12615 __pyx_L6_except_error:;
12616 __Pyx_XGIVEREF(__pyx_t_6);
12617 __Pyx_XGIVEREF(__pyx_t_7);
12618 __Pyx_XGIVEREF(__pyx_t_8);
12619 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12620 goto __pyx_L1_error;
12621 __pyx_L8_try_return:;
12622 __Pyx_XGIVEREF(__pyx_t_6);
12623 __Pyx_XGIVEREF(__pyx_t_7);
12624 __Pyx_XGIVEREF(__pyx_t_8);
12625 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12627 __pyx_L7_except_return:;
12628 __Pyx_XGIVEREF(__pyx_t_6);
12629 __Pyx_XGIVEREF(__pyx_t_7);
12630 __Pyx_XGIVEREF(__pyx_t_8);
12631 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12646 __Pyx_XDECREF(__pyx_t_3);
12647 __Pyx_XDECREF(__pyx_t_5);
12648 __Pyx_XDECREF(__pyx_t_9);
12649 __Pyx_XDECREF(__pyx_t_10);
12650 __Pyx_XDECREF(__pyx_t_11);
12651 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12654 __Pyx_XGIVEREF(__pyx_r);
12655 __Pyx_RefNannyFinishContext();
12660 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12661 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 ";
12662 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12663 PyObject *__pyx_v_obj = 0;
12664 PyObject *__pyx_v_i = 0;
12665 int __pyx_lineno = 0;
12666 const char *__pyx_filename = NULL;
12667 int __pyx_clineno = 0;
12668 PyObject *__pyx_r = 0;
12669 __Pyx_RefNannyDeclarations
12670 __Pyx_RefNannySetupContext(
"sqrt (wrapper)", 0);
12672 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
12673 PyObject* values[2] = {0,0};
12674 values[1] = ((PyObject *)Py_None);
12675 if (unlikely(__pyx_kwds)) {
12676 Py_ssize_t kw_args;
12677 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12678 switch (pos_args) {
12679 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12680 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12682 default:
goto __pyx_L5_argtuple_error;
12684 kw_args = PyDict_Size(__pyx_kwds);
12685 switch (pos_args) {
12687 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12688 else goto __pyx_L5_argtuple_error;
12691 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
12692 if (value) { values[1] = value; kw_args--; }
12695 if (unlikely(kw_args > 0)) {
12696 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;}
12699 switch (PyTuple_GET_SIZE(__pyx_args)) {
12700 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12701 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12703 default:
goto __pyx_L5_argtuple_error;
12706 __pyx_v_obj = values[0];
12707 __pyx_v_i = values[1];
12709 goto __pyx_L4_argument_unpacking_done;
12710 __pyx_L5_argtuple_error:;
12711 __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;}
12713 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12714 __Pyx_RefNannyFinishContext();
12716 __pyx_L4_argument_unpacking_done:;
12717 __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
12720 __Pyx_RefNannyFinishContext();
12724 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
12725 PyObject *__pyx_r = NULL;
12726 __Pyx_RefNannyDeclarations
12727 PyObject *__pyx_t_1 = NULL;
12728 struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
12729 int __pyx_lineno = 0;
12730 const char *__pyx_filename = NULL;
12731 int __pyx_clineno = 0;
12732 __Pyx_RefNannySetupContext(
"sqrt", 0);
12733 __Pyx_XDECREF(__pyx_r);
12734 __pyx_t_2.__pyx_n = 1;
12735 __pyx_t_2.i = __pyx_v_i;
12736 __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;}
12737 __Pyx_GOTREF(__pyx_t_1);
12738 __pyx_r = __pyx_t_1;
12744 __Pyx_XDECREF(__pyx_t_1);
12745 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12748 __Pyx_XGIVEREF(__pyx_r);
12749 __Pyx_RefNannyFinishContext();
12761 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12762 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12763 PyObject *__pyx_r = NULL;
12764 __Pyx_RefNannyDeclarations
12765 PyObject *__pyx_t_1 = NULL;
12766 PyObject *__pyx_t_2 = NULL;
12767 PyObject *__pyx_t_3 = NULL;
12768 PyObject *__pyx_t_4 = NULL;
12769 PyObject *__pyx_t_5 = NULL;
12770 PyObject *__pyx_t_6 = NULL;
12771 PyObject *__pyx_t_7 = NULL;
12772 PyObject *__pyx_t_8 = NULL;
12773 int __pyx_lineno = 0;
12774 const char *__pyx_filename = NULL;
12775 int __pyx_clineno = 0;
12776 __Pyx_RefNannySetupContext(
"exp", 0);
12786 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12787 __Pyx_XGOTREF(__pyx_t_1);
12788 __Pyx_XGOTREF(__pyx_t_2);
12789 __Pyx_XGOTREF(__pyx_t_3);
12799 __Pyx_XDECREF(__pyx_r);
12800 __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;}
12801 __Pyx_GOTREF(__pyx_t_5);
12802 __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;}
12803 __Pyx_GOTREF(__pyx_t_6);
12804 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12806 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
12807 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12808 if (likely(__pyx_t_5)) {
12809 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
12810 __Pyx_INCREF(__pyx_t_5);
12811 __Pyx_INCREF(
function);
12812 __Pyx_DECREF_SET(__pyx_t_6,
function);
12816 __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;}
12817 __Pyx_GOTREF(__pyx_t_4);
12819 __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;}
12820 __Pyx_GOTREF(__pyx_t_7);
12821 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
12822 __Pyx_INCREF(__pyx_v_obj);
12823 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
12824 __Pyx_GIVEREF(__pyx_v_obj);
12825 __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;}
12826 __Pyx_GOTREF(__pyx_t_4);
12827 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12829 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12830 __pyx_r = __pyx_t_4;
12832 goto __pyx_L7_try_return;
12835 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12836 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12837 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12838 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12848 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
12849 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;}
12850 __Pyx_GOTREF(__pyx_t_4);
12851 __Pyx_GOTREF(__pyx_t_6);
12852 __Pyx_GOTREF(__pyx_t_7);
12861 __Pyx_XDECREF(__pyx_r);
12862 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((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;}
12863 __Pyx_GOTREF(__pyx_t_5);
12864 __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;}
12865 __Pyx_GOTREF(__pyx_t_8);
12866 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12867 __pyx_r = __pyx_t_8;
12869 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12870 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12871 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12872 goto __pyx_L6_except_return;
12874 __pyx_L5_except_error:;
12875 __Pyx_XGIVEREF(__pyx_t_1);
12876 __Pyx_XGIVEREF(__pyx_t_2);
12877 __Pyx_XGIVEREF(__pyx_t_3);
12878 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12879 goto __pyx_L1_error;
12880 __pyx_L7_try_return:;
12881 __Pyx_XGIVEREF(__pyx_t_1);
12882 __Pyx_XGIVEREF(__pyx_t_2);
12883 __Pyx_XGIVEREF(__pyx_t_3);
12884 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12886 __pyx_L6_except_return:;
12887 __Pyx_XGIVEREF(__pyx_t_1);
12888 __Pyx_XGIVEREF(__pyx_t_2);
12889 __Pyx_XGIVEREF(__pyx_t_3);
12890 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12904 __Pyx_XDECREF(__pyx_t_4);
12905 __Pyx_XDECREF(__pyx_t_5);
12906 __Pyx_XDECREF(__pyx_t_6);
12907 __Pyx_XDECREF(__pyx_t_7);
12908 __Pyx_XDECREF(__pyx_t_8);
12909 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
12912 __Pyx_XGIVEREF(__pyx_r);
12913 __Pyx_RefNannyFinishContext();
12918 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12919 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 ";
12920 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12921 PyObject *__pyx_r = 0;
12922 __Pyx_RefNannyDeclarations
12923 __Pyx_RefNannySetupContext(
"exp (wrapper)", 0);
12924 __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
12927 __Pyx_RefNannyFinishContext();
12931 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12932 PyObject *__pyx_r = NULL;
12933 __Pyx_RefNannyDeclarations
12934 PyObject *__pyx_t_1 = NULL;
12935 int __pyx_lineno = 0;
12936 const char *__pyx_filename = NULL;
12937 int __pyx_clineno = 0;
12938 __Pyx_RefNannySetupContext(
"exp", 0);
12939 __Pyx_XDECREF(__pyx_r);
12940 __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;}
12941 __Pyx_GOTREF(__pyx_t_1);
12942 __pyx_r = __pyx_t_1;
12948 __Pyx_XDECREF(__pyx_t_1);
12949 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
12952 __Pyx_XGIVEREF(__pyx_r);
12953 __Pyx_RefNannyFinishContext();
12965 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12966 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) {
12967 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12968 PyObject *__pyx_r = NULL;
12969 __Pyx_RefNannyDeclarations
12972 PyObject *__pyx_t_3 = NULL;
12974 PyObject *__pyx_t_5 = NULL;
12975 PyObject *__pyx_t_6 = NULL;
12976 PyObject *__pyx_t_7 = NULL;
12977 PyObject *__pyx_t_8 = NULL;
12978 PyObject *__pyx_t_9 = NULL;
12979 PyObject *__pyx_t_10 = NULL;
12980 PyObject *__pyx_t_11 = NULL;
12981 int __pyx_lineno = 0;
12982 const char *__pyx_filename = NULL;
12983 int __pyx_clineno = 0;
12984 __Pyx_RefNannySetupContext(
"log", 0);
12985 if (__pyx_optional_args) {
12986 if (__pyx_optional_args->__pyx_n > 0) {
12987 __pyx_v_i = __pyx_optional_args->i;
12998 __pyx_t_1 = (__pyx_v_i != Py_None);
12999 __pyx_t_2 = (__pyx_t_1 != 0);
13009 __Pyx_XDECREF(__pyx_r);
13010 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
13011 __Pyx_GOTREF(__pyx_t_3);
13013 __pyx_t_4 =
log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13015 __Pyx_CppExn2PyErr();
13016 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13018 __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;}
13019 __Pyx_GOTREF(__pyx_t_5);
13020 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13021 __pyx_r = __pyx_t_5;
13035 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13036 __Pyx_XGOTREF(__pyx_t_6);
13037 __Pyx_XGOTREF(__pyx_t_7);
13038 __Pyx_XGOTREF(__pyx_t_8);
13048 __Pyx_XDECREF(__pyx_r);
13049 __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;}
13050 __Pyx_GOTREF(__pyx_t_3);
13051 __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;}
13052 __Pyx_GOTREF(__pyx_t_9);
13053 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13055 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13056 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13057 if (likely(__pyx_t_3)) {
13058 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13059 __Pyx_INCREF(__pyx_t_3);
13060 __Pyx_INCREF(
function);
13061 __Pyx_DECREF_SET(__pyx_t_9,
function);
13065 __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;}
13066 __Pyx_GOTREF(__pyx_t_5);
13068 __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;}
13069 __Pyx_GOTREF(__pyx_t_10);
13070 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
13071 __Pyx_INCREF(__pyx_v_obj);
13072 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13073 __Pyx_GIVEREF(__pyx_v_obj);
13074 __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;}
13075 __Pyx_GOTREF(__pyx_t_5);
13076 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13078 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13079 __pyx_r = __pyx_t_5;
13081 goto __pyx_L8_try_return;
13084 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13085 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13086 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13087 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13097 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13098 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;}
13099 __Pyx_GOTREF(__pyx_t_5);
13100 __Pyx_GOTREF(__pyx_t_9);
13101 __Pyx_GOTREF(__pyx_t_10);
13110 __Pyx_XDECREF(__pyx_r);
13111 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
13112 __Pyx_GOTREF(__pyx_t_3);
13113 __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;}
13114 __Pyx_GOTREF(__pyx_t_11);
13115 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13116 __pyx_r = __pyx_t_11;
13118 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13119 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13120 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13121 goto __pyx_L7_except_return;
13123 __pyx_L6_except_error:;
13124 __Pyx_XGIVEREF(__pyx_t_6);
13125 __Pyx_XGIVEREF(__pyx_t_7);
13126 __Pyx_XGIVEREF(__pyx_t_8);
13127 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13128 goto __pyx_L1_error;
13129 __pyx_L8_try_return:;
13130 __Pyx_XGIVEREF(__pyx_t_6);
13131 __Pyx_XGIVEREF(__pyx_t_7);
13132 __Pyx_XGIVEREF(__pyx_t_8);
13133 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13135 __pyx_L7_except_return:;
13136 __Pyx_XGIVEREF(__pyx_t_6);
13137 __Pyx_XGIVEREF(__pyx_t_7);
13138 __Pyx_XGIVEREF(__pyx_t_8);
13139 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13154 __Pyx_XDECREF(__pyx_t_3);
13155 __Pyx_XDECREF(__pyx_t_5);
13156 __Pyx_XDECREF(__pyx_t_9);
13157 __Pyx_XDECREF(__pyx_t_10);
13158 __Pyx_XDECREF(__pyx_t_11);
13159 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13162 __Pyx_XGIVEREF(__pyx_r);
13163 __Pyx_RefNannyFinishContext();
13168 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13169 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 ";
13170 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13171 PyObject *__pyx_v_obj = 0;
13172 PyObject *__pyx_v_i = 0;
13173 int __pyx_lineno = 0;
13174 const char *__pyx_filename = NULL;
13175 int __pyx_clineno = 0;
13176 PyObject *__pyx_r = 0;
13177 __Pyx_RefNannyDeclarations
13178 __Pyx_RefNannySetupContext(
"log (wrapper)", 0);
13180 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13181 PyObject* values[2] = {0,0};
13182 values[1] = ((PyObject *)Py_None);
13183 if (unlikely(__pyx_kwds)) {
13184 Py_ssize_t kw_args;
13185 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13186 switch (pos_args) {
13187 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13188 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13190 default:
goto __pyx_L5_argtuple_error;
13192 kw_args = PyDict_Size(__pyx_kwds);
13193 switch (pos_args) {
13195 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13196 else goto __pyx_L5_argtuple_error;
13199 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13200 if (value) { values[1] = value; kw_args--; }
13203 if (unlikely(kw_args > 0)) {
13204 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;}
13207 switch (PyTuple_GET_SIZE(__pyx_args)) {
13208 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13209 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13211 default:
goto __pyx_L5_argtuple_error;
13214 __pyx_v_obj = values[0];
13215 __pyx_v_i = values[1];
13217 goto __pyx_L4_argument_unpacking_done;
13218 __pyx_L5_argtuple_error:;
13219 __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;}
13221 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13222 __Pyx_RefNannyFinishContext();
13224 __pyx_L4_argument_unpacking_done:;
13225 __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13228 __Pyx_RefNannyFinishContext();
13232 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13233 PyObject *__pyx_r = NULL;
13234 __Pyx_RefNannyDeclarations
13235 PyObject *__pyx_t_1 = NULL;
13236 struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13237 int __pyx_lineno = 0;
13238 const char *__pyx_filename = NULL;
13239 int __pyx_clineno = 0;
13240 __Pyx_RefNannySetupContext(
"log", 0);
13241 __Pyx_XDECREF(__pyx_r);
13242 __pyx_t_2.__pyx_n = 1;
13243 __pyx_t_2.i = __pyx_v_i;
13244 __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;}
13245 __Pyx_GOTREF(__pyx_t_1);
13246 __pyx_r = __pyx_t_1;
13252 __Pyx_XDECREF(__pyx_t_1);
13253 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13256 __Pyx_XGIVEREF(__pyx_r);
13257 __Pyx_RefNannyFinishContext();
13269 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13270 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) {
13271 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13272 PyObject *__pyx_r = NULL;
13273 __Pyx_RefNannyDeclarations
13276 PyObject *__pyx_t_3 = NULL;
13278 PyObject *__pyx_t_5 = NULL;
13279 PyObject *__pyx_t_6 = NULL;
13280 PyObject *__pyx_t_7 = NULL;
13281 PyObject *__pyx_t_8 = NULL;
13282 PyObject *__pyx_t_9 = NULL;
13283 PyObject *__pyx_t_10 = NULL;
13284 PyObject *__pyx_t_11 = NULL;
13285 int __pyx_lineno = 0;
13286 const char *__pyx_filename = NULL;
13287 int __pyx_clineno = 0;
13288 __Pyx_RefNannySetupContext(
"cos", 0);
13289 if (__pyx_optional_args) {
13290 if (__pyx_optional_args->__pyx_n > 0) {
13291 __pyx_v_i = __pyx_optional_args->i;
13302 __pyx_t_1 = (__pyx_v_i != Py_None);
13303 __pyx_t_2 = (__pyx_t_1 != 0);
13313 __Pyx_XDECREF(__pyx_r);
13314 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
13315 __Pyx_GOTREF(__pyx_t_3);
13317 __pyx_t_4 =
cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13319 __Pyx_CppExn2PyErr();
13320 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13322 __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;}
13323 __Pyx_GOTREF(__pyx_t_5);
13324 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13325 __pyx_r = __pyx_t_5;
13339 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13340 __Pyx_XGOTREF(__pyx_t_6);
13341 __Pyx_XGOTREF(__pyx_t_7);
13342 __Pyx_XGOTREF(__pyx_t_8);
13352 __Pyx_XDECREF(__pyx_r);
13353 __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;}
13354 __Pyx_GOTREF(__pyx_t_3);
13355 __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;}
13356 __Pyx_GOTREF(__pyx_t_9);
13357 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13359 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13360 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13361 if (likely(__pyx_t_3)) {
13362 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13363 __Pyx_INCREF(__pyx_t_3);
13364 __Pyx_INCREF(
function);
13365 __Pyx_DECREF_SET(__pyx_t_9,
function);
13369 __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;}
13370 __Pyx_GOTREF(__pyx_t_5);
13372 __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;}
13373 __Pyx_GOTREF(__pyx_t_10);
13374 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
13375 __Pyx_INCREF(__pyx_v_obj);
13376 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13377 __Pyx_GIVEREF(__pyx_v_obj);
13378 __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;}
13379 __Pyx_GOTREF(__pyx_t_5);
13380 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13382 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13383 __pyx_r = __pyx_t_5;
13385 goto __pyx_L8_try_return;
13388 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13389 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13390 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13391 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13401 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13402 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;}
13403 __Pyx_GOTREF(__pyx_t_5);
13404 __Pyx_GOTREF(__pyx_t_9);
13405 __Pyx_GOTREF(__pyx_t_10);
13414 __Pyx_XDECREF(__pyx_r);
13415 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
13416 __Pyx_GOTREF(__pyx_t_3);
13417 __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;}
13418 __Pyx_GOTREF(__pyx_t_11);
13419 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13420 __pyx_r = __pyx_t_11;
13422 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13423 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13424 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13425 goto __pyx_L7_except_return;
13427 __pyx_L6_except_error:;
13428 __Pyx_XGIVEREF(__pyx_t_6);
13429 __Pyx_XGIVEREF(__pyx_t_7);
13430 __Pyx_XGIVEREF(__pyx_t_8);
13431 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13432 goto __pyx_L1_error;
13433 __pyx_L8_try_return:;
13434 __Pyx_XGIVEREF(__pyx_t_6);
13435 __Pyx_XGIVEREF(__pyx_t_7);
13436 __Pyx_XGIVEREF(__pyx_t_8);
13437 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13439 __pyx_L7_except_return:;
13440 __Pyx_XGIVEREF(__pyx_t_6);
13441 __Pyx_XGIVEREF(__pyx_t_7);
13442 __Pyx_XGIVEREF(__pyx_t_8);
13443 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13458 __Pyx_XDECREF(__pyx_t_3);
13459 __Pyx_XDECREF(__pyx_t_5);
13460 __Pyx_XDECREF(__pyx_t_9);
13461 __Pyx_XDECREF(__pyx_t_10);
13462 __Pyx_XDECREF(__pyx_t_11);
13463 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13466 __Pyx_XGIVEREF(__pyx_r);
13467 __Pyx_RefNannyFinishContext();
13472 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13473 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 ";
13474 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13475 PyObject *__pyx_v_obj = 0;
13476 PyObject *__pyx_v_i = 0;
13477 int __pyx_lineno = 0;
13478 const char *__pyx_filename = NULL;
13479 int __pyx_clineno = 0;
13480 PyObject *__pyx_r = 0;
13481 __Pyx_RefNannyDeclarations
13482 __Pyx_RefNannySetupContext(
"cos (wrapper)", 0);
13484 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13485 PyObject* values[2] = {0,0};
13486 values[1] = ((PyObject *)Py_None);
13487 if (unlikely(__pyx_kwds)) {
13488 Py_ssize_t kw_args;
13489 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13490 switch (pos_args) {
13491 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13492 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13494 default:
goto __pyx_L5_argtuple_error;
13496 kw_args = PyDict_Size(__pyx_kwds);
13497 switch (pos_args) {
13499 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13500 else goto __pyx_L5_argtuple_error;
13503 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13504 if (value) { values[1] = value; kw_args--; }
13507 if (unlikely(kw_args > 0)) {
13508 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;}
13511 switch (PyTuple_GET_SIZE(__pyx_args)) {
13512 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13513 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13515 default:
goto __pyx_L5_argtuple_error;
13518 __pyx_v_obj = values[0];
13519 __pyx_v_i = values[1];
13521 goto __pyx_L4_argument_unpacking_done;
13522 __pyx_L5_argtuple_error:;
13523 __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;}
13525 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13526 __Pyx_RefNannyFinishContext();
13528 __pyx_L4_argument_unpacking_done:;
13529 __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
13532 __Pyx_RefNannyFinishContext();
13536 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13537 PyObject *__pyx_r = NULL;
13538 __Pyx_RefNannyDeclarations
13539 PyObject *__pyx_t_1 = NULL;
13540 struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
13541 int __pyx_lineno = 0;
13542 const char *__pyx_filename = NULL;
13543 int __pyx_clineno = 0;
13544 __Pyx_RefNannySetupContext(
"cos", 0);
13545 __Pyx_XDECREF(__pyx_r);
13546 __pyx_t_2.__pyx_n = 1;
13547 __pyx_t_2.i = __pyx_v_i;
13548 __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;}
13549 __Pyx_GOTREF(__pyx_t_1);
13550 __pyx_r = __pyx_t_1;
13556 __Pyx_XDECREF(__pyx_t_1);
13557 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13560 __Pyx_XGIVEREF(__pyx_r);
13561 __Pyx_RefNannyFinishContext();
13573 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13574 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) {
13575 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13576 PyObject *__pyx_r = NULL;
13577 __Pyx_RefNannyDeclarations
13580 PyObject *__pyx_t_3 = NULL;
13582 PyObject *__pyx_t_5 = NULL;
13583 PyObject *__pyx_t_6 = NULL;
13584 PyObject *__pyx_t_7 = NULL;
13585 PyObject *__pyx_t_8 = NULL;
13586 PyObject *__pyx_t_9 = NULL;
13587 PyObject *__pyx_t_10 = NULL;
13588 PyObject *__pyx_t_11 = NULL;
13589 int __pyx_lineno = 0;
13590 const char *__pyx_filename = NULL;
13591 int __pyx_clineno = 0;
13592 __Pyx_RefNannySetupContext(
"acos", 0);
13593 if (__pyx_optional_args) {
13594 if (__pyx_optional_args->__pyx_n > 0) {
13595 __pyx_v_i = __pyx_optional_args->i;
13606 __pyx_t_1 = (__pyx_v_i != Py_None);
13607 __pyx_t_2 = (__pyx_t_1 != 0);
13617 __Pyx_XDECREF(__pyx_r);
13618 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
13619 __Pyx_GOTREF(__pyx_t_3);
13621 __pyx_t_4 =
acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13623 __Pyx_CppExn2PyErr();
13624 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13626 __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;}
13627 __Pyx_GOTREF(__pyx_t_5);
13628 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13629 __pyx_r = __pyx_t_5;
13643 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13644 __Pyx_XGOTREF(__pyx_t_6);
13645 __Pyx_XGOTREF(__pyx_t_7);
13646 __Pyx_XGOTREF(__pyx_t_8);
13656 __Pyx_XDECREF(__pyx_r);
13657 __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;}
13658 __Pyx_GOTREF(__pyx_t_3);
13659 __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;}
13660 __Pyx_GOTREF(__pyx_t_9);
13661 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13663 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13664 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13665 if (likely(__pyx_t_3)) {
13666 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
13667 __Pyx_INCREF(__pyx_t_3);
13668 __Pyx_INCREF(
function);
13669 __Pyx_DECREF_SET(__pyx_t_9,
function);
13673 __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;}
13674 __Pyx_GOTREF(__pyx_t_5);
13676 __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;}
13677 __Pyx_GOTREF(__pyx_t_10);
13678 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
13679 __Pyx_INCREF(__pyx_v_obj);
13680 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13681 __Pyx_GIVEREF(__pyx_v_obj);
13682 __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;}
13683 __Pyx_GOTREF(__pyx_t_5);
13684 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13686 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13687 __pyx_r = __pyx_t_5;
13689 goto __pyx_L8_try_return;
13692 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13693 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13694 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13695 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13705 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13706 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;}
13707 __Pyx_GOTREF(__pyx_t_5);
13708 __Pyx_GOTREF(__pyx_t_9);
13709 __Pyx_GOTREF(__pyx_t_10);
13718 __Pyx_XDECREF(__pyx_r);
13719 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
13720 __Pyx_GOTREF(__pyx_t_3);
13721 __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;}
13722 __Pyx_GOTREF(__pyx_t_11);
13723 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13724 __pyx_r = __pyx_t_11;
13726 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13727 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13728 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13729 goto __pyx_L7_except_return;
13731 __pyx_L6_except_error:;
13732 __Pyx_XGIVEREF(__pyx_t_6);
13733 __Pyx_XGIVEREF(__pyx_t_7);
13734 __Pyx_XGIVEREF(__pyx_t_8);
13735 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13736 goto __pyx_L1_error;
13737 __pyx_L8_try_return:;
13738 __Pyx_XGIVEREF(__pyx_t_6);
13739 __Pyx_XGIVEREF(__pyx_t_7);
13740 __Pyx_XGIVEREF(__pyx_t_8);
13741 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13743 __pyx_L7_except_return:;
13744 __Pyx_XGIVEREF(__pyx_t_6);
13745 __Pyx_XGIVEREF(__pyx_t_7);
13746 __Pyx_XGIVEREF(__pyx_t_8);
13747 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13762 __Pyx_XDECREF(__pyx_t_3);
13763 __Pyx_XDECREF(__pyx_t_5);
13764 __Pyx_XDECREF(__pyx_t_9);
13765 __Pyx_XDECREF(__pyx_t_10);
13766 __Pyx_XDECREF(__pyx_t_11);
13767 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13770 __Pyx_XGIVEREF(__pyx_r);
13771 __Pyx_RefNannyFinishContext();
13776 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13777 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 ";
13778 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13779 PyObject *__pyx_v_obj = 0;
13780 PyObject *__pyx_v_i = 0;
13781 int __pyx_lineno = 0;
13782 const char *__pyx_filename = NULL;
13783 int __pyx_clineno = 0;
13784 PyObject *__pyx_r = 0;
13785 __Pyx_RefNannyDeclarations
13786 __Pyx_RefNannySetupContext(
"acos (wrapper)", 0);
13788 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13789 PyObject* values[2] = {0,0};
13790 values[1] = ((PyObject *)Py_None);
13791 if (unlikely(__pyx_kwds)) {
13792 Py_ssize_t kw_args;
13793 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13794 switch (pos_args) {
13795 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13796 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13798 default:
goto __pyx_L5_argtuple_error;
13800 kw_args = PyDict_Size(__pyx_kwds);
13801 switch (pos_args) {
13803 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13804 else goto __pyx_L5_argtuple_error;
13807 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13808 if (value) { values[1] = value; kw_args--; }
13811 if (unlikely(kw_args > 0)) {
13812 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;}
13815 switch (PyTuple_GET_SIZE(__pyx_args)) {
13816 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13817 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13819 default:
goto __pyx_L5_argtuple_error;
13822 __pyx_v_obj = values[0];
13823 __pyx_v_i = values[1];
13825 goto __pyx_L4_argument_unpacking_done;
13826 __pyx_L5_argtuple_error:;
13827 __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;}
13829 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13830 __Pyx_RefNannyFinishContext();
13832 __pyx_L4_argument_unpacking_done:;
13833 __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
13836 __Pyx_RefNannyFinishContext();
13840 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13841 PyObject *__pyx_r = NULL;
13842 __Pyx_RefNannyDeclarations
13843 PyObject *__pyx_t_1 = NULL;
13844 struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
13845 int __pyx_lineno = 0;
13846 const char *__pyx_filename = NULL;
13847 int __pyx_clineno = 0;
13848 __Pyx_RefNannySetupContext(
"acos", 0);
13849 __Pyx_XDECREF(__pyx_r);
13850 __pyx_t_2.__pyx_n = 1;
13851 __pyx_t_2.i = __pyx_v_i;
13852 __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;}
13853 __Pyx_GOTREF(__pyx_t_1);
13854 __pyx_r = __pyx_t_1;
13860 __Pyx_XDECREF(__pyx_t_1);
13861 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13864 __Pyx_XGIVEREF(__pyx_r);
13865 __Pyx_RefNannyFinishContext();
13877 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
13878 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
13879 PyObject *__pyx_r = NULL;
13880 __Pyx_RefNannyDeclarations
13881 PyObject *__pyx_t_1 = NULL;
13882 PyObject *__pyx_t_2 = NULL;
13883 PyObject *__pyx_t_3 = NULL;
13884 PyObject *__pyx_t_4 = NULL;
13885 PyObject *__pyx_t_5 = NULL;
13886 PyObject *__pyx_t_6 = NULL;
13887 PyObject *__pyx_t_7 = NULL;
13888 PyObject *__pyx_t_8 = NULL;
13889 int __pyx_lineno = 0;
13890 const char *__pyx_filename = NULL;
13891 int __pyx_clineno = 0;
13892 __Pyx_RefNannySetupContext(
"cosh", 0);
13902 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13903 __Pyx_XGOTREF(__pyx_t_1);
13904 __Pyx_XGOTREF(__pyx_t_2);
13905 __Pyx_XGOTREF(__pyx_t_3);
13915 __Pyx_XDECREF(__pyx_r);
13916 __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;}
13917 __Pyx_GOTREF(__pyx_t_5);
13918 __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;}
13919 __Pyx_GOTREF(__pyx_t_6);
13920 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13922 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
13923 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13924 if (likely(__pyx_t_5)) {
13925 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
13926 __Pyx_INCREF(__pyx_t_5);
13927 __Pyx_INCREF(
function);
13928 __Pyx_DECREF_SET(__pyx_t_6,
function);
13932 __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;}
13933 __Pyx_GOTREF(__pyx_t_4);
13935 __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;}
13936 __Pyx_GOTREF(__pyx_t_7);
13937 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
13938 __Pyx_INCREF(__pyx_v_obj);
13939 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13940 __Pyx_GIVEREF(__pyx_v_obj);
13941 __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;}
13942 __Pyx_GOTREF(__pyx_t_4);
13943 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13945 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13946 __pyx_r = __pyx_t_4;
13948 goto __pyx_L7_try_return;
13951 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13952 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13953 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13954 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13964 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13965 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;}
13966 __Pyx_GOTREF(__pyx_t_4);
13967 __Pyx_GOTREF(__pyx_t_6);
13968 __Pyx_GOTREF(__pyx_t_7);
13977 __Pyx_XDECREF(__pyx_r);
13978 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((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;}
13979 __Pyx_GOTREF(__pyx_t_5);
13980 __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;}
13981 __Pyx_GOTREF(__pyx_t_8);
13982 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13983 __pyx_r = __pyx_t_8;
13985 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13986 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13987 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13988 goto __pyx_L6_except_return;
13990 __pyx_L5_except_error:;
13991 __Pyx_XGIVEREF(__pyx_t_1);
13992 __Pyx_XGIVEREF(__pyx_t_2);
13993 __Pyx_XGIVEREF(__pyx_t_3);
13994 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13995 goto __pyx_L1_error;
13996 __pyx_L7_try_return:;
13997 __Pyx_XGIVEREF(__pyx_t_1);
13998 __Pyx_XGIVEREF(__pyx_t_2);
13999 __Pyx_XGIVEREF(__pyx_t_3);
14000 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14002 __pyx_L6_except_return:;
14003 __Pyx_XGIVEREF(__pyx_t_1);
14004 __Pyx_XGIVEREF(__pyx_t_2);
14005 __Pyx_XGIVEREF(__pyx_t_3);
14006 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14020 __Pyx_XDECREF(__pyx_t_4);
14021 __Pyx_XDECREF(__pyx_t_5);
14022 __Pyx_XDECREF(__pyx_t_6);
14023 __Pyx_XDECREF(__pyx_t_7);
14024 __Pyx_XDECREF(__pyx_t_8);
14025 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14028 __Pyx_XGIVEREF(__pyx_r);
14029 __Pyx_RefNannyFinishContext();
14034 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14035 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 ";
14036 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14037 PyObject *__pyx_r = 0;
14038 __Pyx_RefNannyDeclarations
14039 __Pyx_RefNannySetupContext(
"cosh (wrapper)", 0);
14040 __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14043 __Pyx_RefNannyFinishContext();
14047 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14048 PyObject *__pyx_r = NULL;
14049 __Pyx_RefNannyDeclarations
14050 PyObject *__pyx_t_1 = NULL;
14051 int __pyx_lineno = 0;
14052 const char *__pyx_filename = NULL;
14053 int __pyx_clineno = 0;
14054 __Pyx_RefNannySetupContext(
"cosh", 0);
14055 __Pyx_XDECREF(__pyx_r);
14056 __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;}
14057 __Pyx_GOTREF(__pyx_t_1);
14058 __pyx_r = __pyx_t_1;
14064 __Pyx_XDECREF(__pyx_t_1);
14065 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14068 __Pyx_XGIVEREF(__pyx_r);
14069 __Pyx_RefNannyFinishContext();
14081 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14082 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) {
14083 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14084 PyObject *__pyx_r = NULL;
14085 __Pyx_RefNannyDeclarations
14088 PyObject *__pyx_t_3 = NULL;
14090 PyObject *__pyx_t_5 = NULL;
14091 PyObject *__pyx_t_6 = NULL;
14092 PyObject *__pyx_t_7 = NULL;
14093 PyObject *__pyx_t_8 = NULL;
14094 PyObject *__pyx_t_9 = NULL;
14095 PyObject *__pyx_t_10 = NULL;
14096 PyObject *__pyx_t_11 = NULL;
14097 int __pyx_lineno = 0;
14098 const char *__pyx_filename = NULL;
14099 int __pyx_clineno = 0;
14100 __Pyx_RefNannySetupContext(
"acosh", 0);
14101 if (__pyx_optional_args) {
14102 if (__pyx_optional_args->__pyx_n > 0) {
14103 __pyx_v_i = __pyx_optional_args->i;
14114 __pyx_t_1 = (__pyx_v_i != Py_None);
14115 __pyx_t_2 = (__pyx_t_1 != 0);
14125 __Pyx_XDECREF(__pyx_r);
14126 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
14127 __Pyx_GOTREF(__pyx_t_3);
14129 __pyx_t_4 =
acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14131 __Pyx_CppExn2PyErr();
14132 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14134 __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;}
14135 __Pyx_GOTREF(__pyx_t_5);
14136 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14137 __pyx_r = __pyx_t_5;
14151 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14152 __Pyx_XGOTREF(__pyx_t_6);
14153 __Pyx_XGOTREF(__pyx_t_7);
14154 __Pyx_XGOTREF(__pyx_t_8);
14164 __Pyx_XDECREF(__pyx_r);
14165 __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;}
14166 __Pyx_GOTREF(__pyx_t_3);
14167 __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;}
14168 __Pyx_GOTREF(__pyx_t_9);
14169 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14171 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14172 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14173 if (likely(__pyx_t_3)) {
14174 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14175 __Pyx_INCREF(__pyx_t_3);
14176 __Pyx_INCREF(
function);
14177 __Pyx_DECREF_SET(__pyx_t_9,
function);
14181 __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;}
14182 __Pyx_GOTREF(__pyx_t_5);
14184 __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;}
14185 __Pyx_GOTREF(__pyx_t_10);
14186 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
14187 __Pyx_INCREF(__pyx_v_obj);
14188 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14189 __Pyx_GIVEREF(__pyx_v_obj);
14190 __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;}
14191 __Pyx_GOTREF(__pyx_t_5);
14192 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14194 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14195 __pyx_r = __pyx_t_5;
14197 goto __pyx_L8_try_return;
14200 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14201 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14202 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14203 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14213 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14214 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;}
14215 __Pyx_GOTREF(__pyx_t_5);
14216 __Pyx_GOTREF(__pyx_t_9);
14217 __Pyx_GOTREF(__pyx_t_10);
14226 __Pyx_XDECREF(__pyx_r);
14227 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
14228 __Pyx_GOTREF(__pyx_t_3);
14229 __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;}
14230 __Pyx_GOTREF(__pyx_t_11);
14231 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14232 __pyx_r = __pyx_t_11;
14234 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14235 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14236 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14237 goto __pyx_L7_except_return;
14239 __pyx_L6_except_error:;
14240 __Pyx_XGIVEREF(__pyx_t_6);
14241 __Pyx_XGIVEREF(__pyx_t_7);
14242 __Pyx_XGIVEREF(__pyx_t_8);
14243 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14244 goto __pyx_L1_error;
14245 __pyx_L8_try_return:;
14246 __Pyx_XGIVEREF(__pyx_t_6);
14247 __Pyx_XGIVEREF(__pyx_t_7);
14248 __Pyx_XGIVEREF(__pyx_t_8);
14249 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14251 __pyx_L7_except_return:;
14252 __Pyx_XGIVEREF(__pyx_t_6);
14253 __Pyx_XGIVEREF(__pyx_t_7);
14254 __Pyx_XGIVEREF(__pyx_t_8);
14255 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14270 __Pyx_XDECREF(__pyx_t_3);
14271 __Pyx_XDECREF(__pyx_t_5);
14272 __Pyx_XDECREF(__pyx_t_9);
14273 __Pyx_XDECREF(__pyx_t_10);
14274 __Pyx_XDECREF(__pyx_t_11);
14275 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14278 __Pyx_XGIVEREF(__pyx_r);
14279 __Pyx_RefNannyFinishContext();
14284 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14285 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 ";
14286 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14287 PyObject *__pyx_v_obj = 0;
14288 PyObject *__pyx_v_i = 0;
14289 int __pyx_lineno = 0;
14290 const char *__pyx_filename = NULL;
14291 int __pyx_clineno = 0;
14292 PyObject *__pyx_r = 0;
14293 __Pyx_RefNannyDeclarations
14294 __Pyx_RefNannySetupContext(
"acosh (wrapper)", 0);
14296 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14297 PyObject* values[2] = {0,0};
14298 values[1] = ((PyObject *)Py_None);
14299 if (unlikely(__pyx_kwds)) {
14300 Py_ssize_t kw_args;
14301 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14302 switch (pos_args) {
14303 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14304 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14306 default:
goto __pyx_L5_argtuple_error;
14308 kw_args = PyDict_Size(__pyx_kwds);
14309 switch (pos_args) {
14311 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14312 else goto __pyx_L5_argtuple_error;
14315 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14316 if (value) { values[1] = value; kw_args--; }
14319 if (unlikely(kw_args > 0)) {
14320 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;}
14323 switch (PyTuple_GET_SIZE(__pyx_args)) {
14324 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14325 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14327 default:
goto __pyx_L5_argtuple_error;
14330 __pyx_v_obj = values[0];
14331 __pyx_v_i = values[1];
14333 goto __pyx_L4_argument_unpacking_done;
14334 __pyx_L5_argtuple_error:;
14335 __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;}
14337 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14338 __Pyx_RefNannyFinishContext();
14340 __pyx_L4_argument_unpacking_done:;
14341 __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
14344 __Pyx_RefNannyFinishContext();
14348 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14349 PyObject *__pyx_r = NULL;
14350 __Pyx_RefNannyDeclarations
14351 PyObject *__pyx_t_1 = NULL;
14352 struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
14353 int __pyx_lineno = 0;
14354 const char *__pyx_filename = NULL;
14355 int __pyx_clineno = 0;
14356 __Pyx_RefNannySetupContext(
"acosh", 0);
14357 __Pyx_XDECREF(__pyx_r);
14358 __pyx_t_2.__pyx_n = 1;
14359 __pyx_t_2.i = __pyx_v_i;
14360 __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;}
14361 __Pyx_GOTREF(__pyx_t_1);
14362 __pyx_r = __pyx_t_1;
14368 __Pyx_XDECREF(__pyx_t_1);
14369 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14372 __Pyx_XGIVEREF(__pyx_r);
14373 __Pyx_RefNannyFinishContext();
14385 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14386 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) {
14387 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14388 PyObject *__pyx_r = NULL;
14389 __Pyx_RefNannyDeclarations
14392 PyObject *__pyx_t_3 = NULL;
14394 PyObject *__pyx_t_5 = NULL;
14395 PyObject *__pyx_t_6 = NULL;
14396 PyObject *__pyx_t_7 = NULL;
14397 PyObject *__pyx_t_8 = NULL;
14398 PyObject *__pyx_t_9 = NULL;
14399 PyObject *__pyx_t_10 = NULL;
14400 PyObject *__pyx_t_11 = NULL;
14401 int __pyx_lineno = 0;
14402 const char *__pyx_filename = NULL;
14403 int __pyx_clineno = 0;
14404 __Pyx_RefNannySetupContext(
"sin", 0);
14405 if (__pyx_optional_args) {
14406 if (__pyx_optional_args->__pyx_n > 0) {
14407 __pyx_v_i = __pyx_optional_args->i;
14418 __pyx_t_1 = (__pyx_v_i != Py_None);
14419 __pyx_t_2 = (__pyx_t_1 != 0);
14429 __Pyx_XDECREF(__pyx_r);
14430 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
14431 __Pyx_GOTREF(__pyx_t_3);
14433 __pyx_t_4 =
sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14435 __Pyx_CppExn2PyErr();
14436 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14438 __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;}
14439 __Pyx_GOTREF(__pyx_t_5);
14440 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14441 __pyx_r = __pyx_t_5;
14455 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14456 __Pyx_XGOTREF(__pyx_t_6);
14457 __Pyx_XGOTREF(__pyx_t_7);
14458 __Pyx_XGOTREF(__pyx_t_8);
14468 __Pyx_XDECREF(__pyx_r);
14469 __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;}
14470 __Pyx_GOTREF(__pyx_t_3);
14471 __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;}
14472 __Pyx_GOTREF(__pyx_t_9);
14473 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14475 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14476 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14477 if (likely(__pyx_t_3)) {
14478 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14479 __Pyx_INCREF(__pyx_t_3);
14480 __Pyx_INCREF(
function);
14481 __Pyx_DECREF_SET(__pyx_t_9,
function);
14485 __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;}
14486 __Pyx_GOTREF(__pyx_t_5);
14488 __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;}
14489 __Pyx_GOTREF(__pyx_t_10);
14490 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
14491 __Pyx_INCREF(__pyx_v_obj);
14492 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14493 __Pyx_GIVEREF(__pyx_v_obj);
14494 __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;}
14495 __Pyx_GOTREF(__pyx_t_5);
14496 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14498 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14499 __pyx_r = __pyx_t_5;
14501 goto __pyx_L8_try_return;
14504 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14505 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14506 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14507 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14517 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14518 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;}
14519 __Pyx_GOTREF(__pyx_t_5);
14520 __Pyx_GOTREF(__pyx_t_9);
14521 __Pyx_GOTREF(__pyx_t_10);
14530 __Pyx_XDECREF(__pyx_r);
14531 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
14532 __Pyx_GOTREF(__pyx_t_3);
14533 __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;}
14534 __Pyx_GOTREF(__pyx_t_11);
14535 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14536 __pyx_r = __pyx_t_11;
14538 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14539 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14540 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14541 goto __pyx_L7_except_return;
14543 __pyx_L6_except_error:;
14544 __Pyx_XGIVEREF(__pyx_t_6);
14545 __Pyx_XGIVEREF(__pyx_t_7);
14546 __Pyx_XGIVEREF(__pyx_t_8);
14547 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14548 goto __pyx_L1_error;
14549 __pyx_L8_try_return:;
14550 __Pyx_XGIVEREF(__pyx_t_6);
14551 __Pyx_XGIVEREF(__pyx_t_7);
14552 __Pyx_XGIVEREF(__pyx_t_8);
14553 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14555 __pyx_L7_except_return:;
14556 __Pyx_XGIVEREF(__pyx_t_6);
14557 __Pyx_XGIVEREF(__pyx_t_7);
14558 __Pyx_XGIVEREF(__pyx_t_8);
14559 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14574 __Pyx_XDECREF(__pyx_t_3);
14575 __Pyx_XDECREF(__pyx_t_5);
14576 __Pyx_XDECREF(__pyx_t_9);
14577 __Pyx_XDECREF(__pyx_t_10);
14578 __Pyx_XDECREF(__pyx_t_11);
14579 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14582 __Pyx_XGIVEREF(__pyx_r);
14583 __Pyx_RefNannyFinishContext();
14588 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14589 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 ";
14590 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14591 PyObject *__pyx_v_obj = 0;
14592 PyObject *__pyx_v_i = 0;
14593 int __pyx_lineno = 0;
14594 const char *__pyx_filename = NULL;
14595 int __pyx_clineno = 0;
14596 PyObject *__pyx_r = 0;
14597 __Pyx_RefNannyDeclarations
14598 __Pyx_RefNannySetupContext(
"sin (wrapper)", 0);
14600 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14601 PyObject* values[2] = {0,0};
14602 values[1] = ((PyObject *)Py_None);
14603 if (unlikely(__pyx_kwds)) {
14604 Py_ssize_t kw_args;
14605 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14606 switch (pos_args) {
14607 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14608 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14610 default:
goto __pyx_L5_argtuple_error;
14612 kw_args = PyDict_Size(__pyx_kwds);
14613 switch (pos_args) {
14615 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14616 else goto __pyx_L5_argtuple_error;
14619 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14620 if (value) { values[1] = value; kw_args--; }
14623 if (unlikely(kw_args > 0)) {
14624 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;}
14627 switch (PyTuple_GET_SIZE(__pyx_args)) {
14628 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14629 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14631 default:
goto __pyx_L5_argtuple_error;
14634 __pyx_v_obj = values[0];
14635 __pyx_v_i = values[1];
14637 goto __pyx_L4_argument_unpacking_done;
14638 __pyx_L5_argtuple_error:;
14639 __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;}
14641 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14642 __Pyx_RefNannyFinishContext();
14644 __pyx_L4_argument_unpacking_done:;
14645 __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
14648 __Pyx_RefNannyFinishContext();
14652 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14653 PyObject *__pyx_r = NULL;
14654 __Pyx_RefNannyDeclarations
14655 PyObject *__pyx_t_1 = NULL;
14656 struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
14657 int __pyx_lineno = 0;
14658 const char *__pyx_filename = NULL;
14659 int __pyx_clineno = 0;
14660 __Pyx_RefNannySetupContext(
"sin", 0);
14661 __Pyx_XDECREF(__pyx_r);
14662 __pyx_t_2.__pyx_n = 1;
14663 __pyx_t_2.i = __pyx_v_i;
14664 __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;}
14665 __Pyx_GOTREF(__pyx_t_1);
14666 __pyx_r = __pyx_t_1;
14672 __Pyx_XDECREF(__pyx_t_1);
14673 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14676 __Pyx_XGIVEREF(__pyx_r);
14677 __Pyx_RefNannyFinishContext();
14689 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14690 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) {
14691 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14692 PyObject *__pyx_r = NULL;
14693 __Pyx_RefNannyDeclarations
14696 PyObject *__pyx_t_3 = NULL;
14698 PyObject *__pyx_t_5 = NULL;
14699 PyObject *__pyx_t_6 = NULL;
14700 PyObject *__pyx_t_7 = NULL;
14701 PyObject *__pyx_t_8 = NULL;
14702 PyObject *__pyx_t_9 = NULL;
14703 PyObject *__pyx_t_10 = NULL;
14704 PyObject *__pyx_t_11 = NULL;
14705 int __pyx_lineno = 0;
14706 const char *__pyx_filename = NULL;
14707 int __pyx_clineno = 0;
14708 __Pyx_RefNannySetupContext(
"asin", 0);
14709 if (__pyx_optional_args) {
14710 if (__pyx_optional_args->__pyx_n > 0) {
14711 __pyx_v_i = __pyx_optional_args->i;
14722 __pyx_t_1 = (__pyx_v_i != Py_None);
14723 __pyx_t_2 = (__pyx_t_1 != 0);
14733 __Pyx_XDECREF(__pyx_r);
14734 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
14735 __Pyx_GOTREF(__pyx_t_3);
14737 __pyx_t_4 =
asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14739 __Pyx_CppExn2PyErr();
14740 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14742 __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14743 __Pyx_GOTREF(__pyx_t_5);
14744 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14745 __pyx_r = __pyx_t_5;
14759 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14760 __Pyx_XGOTREF(__pyx_t_6);
14761 __Pyx_XGOTREF(__pyx_t_7);
14762 __Pyx_XGOTREF(__pyx_t_8);
14772 __Pyx_XDECREF(__pyx_r);
14773 __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;}
14774 __Pyx_GOTREF(__pyx_t_3);
14775 __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;}
14776 __Pyx_GOTREF(__pyx_t_9);
14777 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14779 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14780 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14781 if (likely(__pyx_t_3)) {
14782 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
14783 __Pyx_INCREF(__pyx_t_3);
14784 __Pyx_INCREF(
function);
14785 __Pyx_DECREF_SET(__pyx_t_9,
function);
14789 __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;}
14790 __Pyx_GOTREF(__pyx_t_5);
14792 __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;}
14793 __Pyx_GOTREF(__pyx_t_10);
14794 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
14795 __Pyx_INCREF(__pyx_v_obj);
14796 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14797 __Pyx_GIVEREF(__pyx_v_obj);
14798 __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;}
14799 __Pyx_GOTREF(__pyx_t_5);
14800 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14802 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14803 __pyx_r = __pyx_t_5;
14805 goto __pyx_L8_try_return;
14808 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14809 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14810 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14811 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14821 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14822 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;}
14823 __Pyx_GOTREF(__pyx_t_5);
14824 __Pyx_GOTREF(__pyx_t_9);
14825 __Pyx_GOTREF(__pyx_t_10);
14834 __Pyx_XDECREF(__pyx_r);
14835 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
14836 __Pyx_GOTREF(__pyx_t_3);
14837 __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;}
14838 __Pyx_GOTREF(__pyx_t_11);
14839 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14840 __pyx_r = __pyx_t_11;
14842 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14843 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14844 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14845 goto __pyx_L7_except_return;
14847 __pyx_L6_except_error:;
14848 __Pyx_XGIVEREF(__pyx_t_6);
14849 __Pyx_XGIVEREF(__pyx_t_7);
14850 __Pyx_XGIVEREF(__pyx_t_8);
14851 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14852 goto __pyx_L1_error;
14853 __pyx_L8_try_return:;
14854 __Pyx_XGIVEREF(__pyx_t_6);
14855 __Pyx_XGIVEREF(__pyx_t_7);
14856 __Pyx_XGIVEREF(__pyx_t_8);
14857 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14859 __pyx_L7_except_return:;
14860 __Pyx_XGIVEREF(__pyx_t_6);
14861 __Pyx_XGIVEREF(__pyx_t_7);
14862 __Pyx_XGIVEREF(__pyx_t_8);
14863 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14878 __Pyx_XDECREF(__pyx_t_3);
14879 __Pyx_XDECREF(__pyx_t_5);
14880 __Pyx_XDECREF(__pyx_t_9);
14881 __Pyx_XDECREF(__pyx_t_10);
14882 __Pyx_XDECREF(__pyx_t_11);
14883 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14886 __Pyx_XGIVEREF(__pyx_r);
14887 __Pyx_RefNannyFinishContext();
14892 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14893 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 ";
14894 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14895 PyObject *__pyx_v_obj = 0;
14896 PyObject *__pyx_v_i = 0;
14897 int __pyx_lineno = 0;
14898 const char *__pyx_filename = NULL;
14899 int __pyx_clineno = 0;
14900 PyObject *__pyx_r = 0;
14901 __Pyx_RefNannyDeclarations
14902 __Pyx_RefNannySetupContext(
"asin (wrapper)", 0);
14904 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14905 PyObject* values[2] = {0,0};
14906 values[1] = ((PyObject *)Py_None);
14907 if (unlikely(__pyx_kwds)) {
14908 Py_ssize_t kw_args;
14909 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14910 switch (pos_args) {
14911 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14912 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14914 default:
goto __pyx_L5_argtuple_error;
14916 kw_args = PyDict_Size(__pyx_kwds);
14917 switch (pos_args) {
14919 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14920 else goto __pyx_L5_argtuple_error;
14923 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14924 if (value) { values[1] = value; kw_args--; }
14927 if (unlikely(kw_args > 0)) {
14928 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;}
14931 switch (PyTuple_GET_SIZE(__pyx_args)) {
14932 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14933 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14935 default:
goto __pyx_L5_argtuple_error;
14938 __pyx_v_obj = values[0];
14939 __pyx_v_i = values[1];
14941 goto __pyx_L4_argument_unpacking_done;
14942 __pyx_L5_argtuple_error:;
14943 __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;}
14945 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14946 __Pyx_RefNannyFinishContext();
14948 __pyx_L4_argument_unpacking_done:;
14949 __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
14952 __Pyx_RefNannyFinishContext();
14956 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14957 PyObject *__pyx_r = NULL;
14958 __Pyx_RefNannyDeclarations
14959 PyObject *__pyx_t_1 = NULL;
14960 struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
14961 int __pyx_lineno = 0;
14962 const char *__pyx_filename = NULL;
14963 int __pyx_clineno = 0;
14964 __Pyx_RefNannySetupContext(
"asin", 0);
14965 __Pyx_XDECREF(__pyx_r);
14966 __pyx_t_2.__pyx_n = 1;
14967 __pyx_t_2.i = __pyx_v_i;
14968 __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;}
14969 __Pyx_GOTREF(__pyx_t_1);
14970 __pyx_r = __pyx_t_1;
14976 __Pyx_XDECREF(__pyx_t_1);
14977 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14980 __Pyx_XGIVEREF(__pyx_r);
14981 __Pyx_RefNannyFinishContext();
14993 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14994 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
14995 PyObject *__pyx_r = NULL;
14996 __Pyx_RefNannyDeclarations
14997 PyObject *__pyx_t_1 = NULL;
14998 PyObject *__pyx_t_2 = NULL;
14999 PyObject *__pyx_t_3 = NULL;
15000 PyObject *__pyx_t_4 = NULL;
15001 PyObject *__pyx_t_5 = NULL;
15002 PyObject *__pyx_t_6 = NULL;
15003 PyObject *__pyx_t_7 = NULL;
15004 PyObject *__pyx_t_8 = NULL;
15005 int __pyx_lineno = 0;
15006 const char *__pyx_filename = NULL;
15007 int __pyx_clineno = 0;
15008 __Pyx_RefNannySetupContext(
"sinh", 0);
15018 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15019 __Pyx_XGOTREF(__pyx_t_1);
15020 __Pyx_XGOTREF(__pyx_t_2);
15021 __Pyx_XGOTREF(__pyx_t_3);
15031 __Pyx_XDECREF(__pyx_r);
15032 __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;}
15033 __Pyx_GOTREF(__pyx_t_5);
15034 __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;}
15035 __Pyx_GOTREF(__pyx_t_6);
15036 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15038 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
15039 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15040 if (likely(__pyx_t_5)) {
15041 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
15042 __Pyx_INCREF(__pyx_t_5);
15043 __Pyx_INCREF(
function);
15044 __Pyx_DECREF_SET(__pyx_t_6,
function);
15048 __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;}
15049 __Pyx_GOTREF(__pyx_t_4);
15051 __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;}
15052 __Pyx_GOTREF(__pyx_t_7);
15053 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
15054 __Pyx_INCREF(__pyx_v_obj);
15055 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15056 __Pyx_GIVEREF(__pyx_v_obj);
15057 __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;}
15058 __Pyx_GOTREF(__pyx_t_4);
15059 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15061 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15062 __pyx_r = __pyx_t_4;
15064 goto __pyx_L7_try_return;
15067 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15068 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15069 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15070 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15080 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15081 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;}
15082 __Pyx_GOTREF(__pyx_t_4);
15083 __Pyx_GOTREF(__pyx_t_6);
15084 __Pyx_GOTREF(__pyx_t_7);
15093 __Pyx_XDECREF(__pyx_r);
15094 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((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;}
15095 __Pyx_GOTREF(__pyx_t_5);
15096 __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;}
15097 __Pyx_GOTREF(__pyx_t_8);
15098 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15099 __pyx_r = __pyx_t_8;
15101 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15102 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15103 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15104 goto __pyx_L6_except_return;
15106 __pyx_L5_except_error:;
15107 __Pyx_XGIVEREF(__pyx_t_1);
15108 __Pyx_XGIVEREF(__pyx_t_2);
15109 __Pyx_XGIVEREF(__pyx_t_3);
15110 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15111 goto __pyx_L1_error;
15112 __pyx_L7_try_return:;
15113 __Pyx_XGIVEREF(__pyx_t_1);
15114 __Pyx_XGIVEREF(__pyx_t_2);
15115 __Pyx_XGIVEREF(__pyx_t_3);
15116 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15118 __pyx_L6_except_return:;
15119 __Pyx_XGIVEREF(__pyx_t_1);
15120 __Pyx_XGIVEREF(__pyx_t_2);
15121 __Pyx_XGIVEREF(__pyx_t_3);
15122 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15136 __Pyx_XDECREF(__pyx_t_4);
15137 __Pyx_XDECREF(__pyx_t_5);
15138 __Pyx_XDECREF(__pyx_t_6);
15139 __Pyx_XDECREF(__pyx_t_7);
15140 __Pyx_XDECREF(__pyx_t_8);
15141 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15144 __Pyx_XGIVEREF(__pyx_r);
15145 __Pyx_RefNannyFinishContext();
15150 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15151 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 ";
15152 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15153 PyObject *__pyx_r = 0;
15154 __Pyx_RefNannyDeclarations
15155 __Pyx_RefNannySetupContext(
"sinh (wrapper)", 0);
15156 __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15159 __Pyx_RefNannyFinishContext();
15163 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15164 PyObject *__pyx_r = NULL;
15165 __Pyx_RefNannyDeclarations
15166 PyObject *__pyx_t_1 = NULL;
15167 int __pyx_lineno = 0;
15168 const char *__pyx_filename = NULL;
15169 int __pyx_clineno = 0;
15170 __Pyx_RefNannySetupContext(
"sinh", 0);
15171 __Pyx_XDECREF(__pyx_r);
15172 __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;}
15173 __Pyx_GOTREF(__pyx_t_1);
15174 __pyx_r = __pyx_t_1;
15180 __Pyx_XDECREF(__pyx_t_1);
15181 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15184 __Pyx_XGIVEREF(__pyx_r);
15185 __Pyx_RefNannyFinishContext();
15197 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15198 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) {
15199 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15200 PyObject *__pyx_r = NULL;
15201 __Pyx_RefNannyDeclarations
15204 PyObject *__pyx_t_3 = NULL;
15206 PyObject *__pyx_t_5 = NULL;
15207 PyObject *__pyx_t_6 = NULL;
15208 PyObject *__pyx_t_7 = NULL;
15209 PyObject *__pyx_t_8 = NULL;
15210 PyObject *__pyx_t_9 = NULL;
15211 PyObject *__pyx_t_10 = NULL;
15212 PyObject *__pyx_t_11 = NULL;
15213 int __pyx_lineno = 0;
15214 const char *__pyx_filename = NULL;
15215 int __pyx_clineno = 0;
15216 __Pyx_RefNannySetupContext(
"asinh", 0);
15217 if (__pyx_optional_args) {
15218 if (__pyx_optional_args->__pyx_n > 0) {
15219 __pyx_v_i = __pyx_optional_args->i;
15230 __pyx_t_1 = (__pyx_v_i != Py_None);
15231 __pyx_t_2 = (__pyx_t_1 != 0);
15241 __Pyx_XDECREF(__pyx_r);
15242 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
15243 __Pyx_GOTREF(__pyx_t_3);
15245 __pyx_t_4 =
asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15247 __Pyx_CppExn2PyErr();
15248 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15250 __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;}
15251 __Pyx_GOTREF(__pyx_t_5);
15252 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15253 __pyx_r = __pyx_t_5;
15267 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15268 __Pyx_XGOTREF(__pyx_t_6);
15269 __Pyx_XGOTREF(__pyx_t_7);
15270 __Pyx_XGOTREF(__pyx_t_8);
15280 __Pyx_XDECREF(__pyx_r);
15281 __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;}
15282 __Pyx_GOTREF(__pyx_t_3);
15283 __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;}
15284 __Pyx_GOTREF(__pyx_t_9);
15285 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15287 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15288 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15289 if (likely(__pyx_t_3)) {
15290 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15291 __Pyx_INCREF(__pyx_t_3);
15292 __Pyx_INCREF(
function);
15293 __Pyx_DECREF_SET(__pyx_t_9,
function);
15297 __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;}
15298 __Pyx_GOTREF(__pyx_t_5);
15300 __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;}
15301 __Pyx_GOTREF(__pyx_t_10);
15302 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
15303 __Pyx_INCREF(__pyx_v_obj);
15304 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15305 __Pyx_GIVEREF(__pyx_v_obj);
15306 __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;}
15307 __Pyx_GOTREF(__pyx_t_5);
15308 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15310 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15311 __pyx_r = __pyx_t_5;
15313 goto __pyx_L8_try_return;
15316 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15317 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15318 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15319 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15329 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15330 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;}
15331 __Pyx_GOTREF(__pyx_t_5);
15332 __Pyx_GOTREF(__pyx_t_9);
15333 __Pyx_GOTREF(__pyx_t_10);
15342 __Pyx_XDECREF(__pyx_r);
15343 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
15344 __Pyx_GOTREF(__pyx_t_3);
15345 __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;}
15346 __Pyx_GOTREF(__pyx_t_11);
15347 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15348 __pyx_r = __pyx_t_11;
15350 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15351 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15352 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15353 goto __pyx_L7_except_return;
15355 __pyx_L6_except_error:;
15356 __Pyx_XGIVEREF(__pyx_t_6);
15357 __Pyx_XGIVEREF(__pyx_t_7);
15358 __Pyx_XGIVEREF(__pyx_t_8);
15359 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15360 goto __pyx_L1_error;
15361 __pyx_L8_try_return:;
15362 __Pyx_XGIVEREF(__pyx_t_6);
15363 __Pyx_XGIVEREF(__pyx_t_7);
15364 __Pyx_XGIVEREF(__pyx_t_8);
15365 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15367 __pyx_L7_except_return:;
15368 __Pyx_XGIVEREF(__pyx_t_6);
15369 __Pyx_XGIVEREF(__pyx_t_7);
15370 __Pyx_XGIVEREF(__pyx_t_8);
15371 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15386 __Pyx_XDECREF(__pyx_t_3);
15387 __Pyx_XDECREF(__pyx_t_5);
15388 __Pyx_XDECREF(__pyx_t_9);
15389 __Pyx_XDECREF(__pyx_t_10);
15390 __Pyx_XDECREF(__pyx_t_11);
15391 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15394 __Pyx_XGIVEREF(__pyx_r);
15395 __Pyx_RefNannyFinishContext();
15400 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15401 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 ";
15402 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15403 PyObject *__pyx_v_obj = 0;
15404 PyObject *__pyx_v_i = 0;
15405 int __pyx_lineno = 0;
15406 const char *__pyx_filename = NULL;
15407 int __pyx_clineno = 0;
15408 PyObject *__pyx_r = 0;
15409 __Pyx_RefNannyDeclarations
15410 __Pyx_RefNannySetupContext(
"asinh (wrapper)", 0);
15412 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15413 PyObject* values[2] = {0,0};
15414 values[1] = ((PyObject *)Py_None);
15415 if (unlikely(__pyx_kwds)) {
15416 Py_ssize_t kw_args;
15417 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15418 switch (pos_args) {
15419 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15420 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15422 default:
goto __pyx_L5_argtuple_error;
15424 kw_args = PyDict_Size(__pyx_kwds);
15425 switch (pos_args) {
15427 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15428 else goto __pyx_L5_argtuple_error;
15431 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15432 if (value) { values[1] = value; kw_args--; }
15435 if (unlikely(kw_args > 0)) {
15436 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;}
15439 switch (PyTuple_GET_SIZE(__pyx_args)) {
15440 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15441 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15443 default:
goto __pyx_L5_argtuple_error;
15446 __pyx_v_obj = values[0];
15447 __pyx_v_i = values[1];
15449 goto __pyx_L4_argument_unpacking_done;
15450 __pyx_L5_argtuple_error:;
15451 __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;}
15453 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15454 __Pyx_RefNannyFinishContext();
15456 __pyx_L4_argument_unpacking_done:;
15457 __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15460 __Pyx_RefNannyFinishContext();
15464 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15465 PyObject *__pyx_r = NULL;
15466 __Pyx_RefNannyDeclarations
15467 PyObject *__pyx_t_1 = NULL;
15468 struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
15469 int __pyx_lineno = 0;
15470 const char *__pyx_filename = NULL;
15471 int __pyx_clineno = 0;
15472 __Pyx_RefNannySetupContext(
"asinh", 0);
15473 __Pyx_XDECREF(__pyx_r);
15474 __pyx_t_2.__pyx_n = 1;
15475 __pyx_t_2.i = __pyx_v_i;
15476 __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;}
15477 __Pyx_GOTREF(__pyx_t_1);
15478 __pyx_r = __pyx_t_1;
15484 __Pyx_XDECREF(__pyx_t_1);
15485 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15488 __Pyx_XGIVEREF(__pyx_r);
15489 __Pyx_RefNannyFinishContext();
15501 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15502 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) {
15503 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15504 PyObject *__pyx_r = NULL;
15505 __Pyx_RefNannyDeclarations
15508 PyObject *__pyx_t_3 = NULL;
15510 PyObject *__pyx_t_5 = NULL;
15511 PyObject *__pyx_t_6 = NULL;
15512 PyObject *__pyx_t_7 = NULL;
15513 PyObject *__pyx_t_8 = NULL;
15514 PyObject *__pyx_t_9 = NULL;
15515 PyObject *__pyx_t_10 = NULL;
15516 PyObject *__pyx_t_11 = NULL;
15517 int __pyx_lineno = 0;
15518 const char *__pyx_filename = NULL;
15519 int __pyx_clineno = 0;
15520 __Pyx_RefNannySetupContext(
"tan", 0);
15521 if (__pyx_optional_args) {
15522 if (__pyx_optional_args->__pyx_n > 0) {
15523 __pyx_v_i = __pyx_optional_args->i;
15534 __pyx_t_1 = (__pyx_v_i != Py_None);
15535 __pyx_t_2 = (__pyx_t_1 != 0);
15545 __Pyx_XDECREF(__pyx_r);
15546 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
15547 __Pyx_GOTREF(__pyx_t_3);
15549 __pyx_t_4 =
tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15551 __Pyx_CppExn2PyErr();
15552 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15554 __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;}
15555 __Pyx_GOTREF(__pyx_t_5);
15556 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15557 __pyx_r = __pyx_t_5;
15571 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15572 __Pyx_XGOTREF(__pyx_t_6);
15573 __Pyx_XGOTREF(__pyx_t_7);
15574 __Pyx_XGOTREF(__pyx_t_8);
15584 __Pyx_XDECREF(__pyx_r);
15585 __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;}
15586 __Pyx_GOTREF(__pyx_t_3);
15587 __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;}
15588 __Pyx_GOTREF(__pyx_t_9);
15589 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15591 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15592 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15593 if (likely(__pyx_t_3)) {
15594 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15595 __Pyx_INCREF(__pyx_t_3);
15596 __Pyx_INCREF(
function);
15597 __Pyx_DECREF_SET(__pyx_t_9,
function);
15601 __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;}
15602 __Pyx_GOTREF(__pyx_t_5);
15604 __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;}
15605 __Pyx_GOTREF(__pyx_t_10);
15606 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
15607 __Pyx_INCREF(__pyx_v_obj);
15608 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15609 __Pyx_GIVEREF(__pyx_v_obj);
15610 __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;}
15611 __Pyx_GOTREF(__pyx_t_5);
15612 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15614 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15615 __pyx_r = __pyx_t_5;
15617 goto __pyx_L8_try_return;
15620 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15621 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15622 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15623 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15633 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15634 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;}
15635 __Pyx_GOTREF(__pyx_t_5);
15636 __Pyx_GOTREF(__pyx_t_9);
15637 __Pyx_GOTREF(__pyx_t_10);
15646 __Pyx_XDECREF(__pyx_r);
15647 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
15648 __Pyx_GOTREF(__pyx_t_3);
15649 __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;}
15650 __Pyx_GOTREF(__pyx_t_11);
15651 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15652 __pyx_r = __pyx_t_11;
15654 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15655 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15656 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15657 goto __pyx_L7_except_return;
15659 __pyx_L6_except_error:;
15660 __Pyx_XGIVEREF(__pyx_t_6);
15661 __Pyx_XGIVEREF(__pyx_t_7);
15662 __Pyx_XGIVEREF(__pyx_t_8);
15663 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15664 goto __pyx_L1_error;
15665 __pyx_L8_try_return:;
15666 __Pyx_XGIVEREF(__pyx_t_6);
15667 __Pyx_XGIVEREF(__pyx_t_7);
15668 __Pyx_XGIVEREF(__pyx_t_8);
15669 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15671 __pyx_L7_except_return:;
15672 __Pyx_XGIVEREF(__pyx_t_6);
15673 __Pyx_XGIVEREF(__pyx_t_7);
15674 __Pyx_XGIVEREF(__pyx_t_8);
15675 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15690 __Pyx_XDECREF(__pyx_t_3);
15691 __Pyx_XDECREF(__pyx_t_5);
15692 __Pyx_XDECREF(__pyx_t_9);
15693 __Pyx_XDECREF(__pyx_t_10);
15694 __Pyx_XDECREF(__pyx_t_11);
15695 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15698 __Pyx_XGIVEREF(__pyx_r);
15699 __Pyx_RefNannyFinishContext();
15704 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15705 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 ";
15706 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15707 PyObject *__pyx_v_obj = 0;
15708 PyObject *__pyx_v_i = 0;
15709 int __pyx_lineno = 0;
15710 const char *__pyx_filename = NULL;
15711 int __pyx_clineno = 0;
15712 PyObject *__pyx_r = 0;
15713 __Pyx_RefNannyDeclarations
15714 __Pyx_RefNannySetupContext(
"tan (wrapper)", 0);
15716 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15717 PyObject* values[2] = {0,0};
15718 values[1] = ((PyObject *)Py_None);
15719 if (unlikely(__pyx_kwds)) {
15720 Py_ssize_t kw_args;
15721 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15722 switch (pos_args) {
15723 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15724 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15726 default:
goto __pyx_L5_argtuple_error;
15728 kw_args = PyDict_Size(__pyx_kwds);
15729 switch (pos_args) {
15731 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15732 else goto __pyx_L5_argtuple_error;
15735 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15736 if (value) { values[1] = value; kw_args--; }
15739 if (unlikely(kw_args > 0)) {
15740 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;}
15743 switch (PyTuple_GET_SIZE(__pyx_args)) {
15744 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15745 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15747 default:
goto __pyx_L5_argtuple_error;
15750 __pyx_v_obj = values[0];
15751 __pyx_v_i = values[1];
15753 goto __pyx_L4_argument_unpacking_done;
15754 __pyx_L5_argtuple_error:;
15755 __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;}
15757 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15758 __Pyx_RefNannyFinishContext();
15760 __pyx_L4_argument_unpacking_done:;
15761 __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
15764 __Pyx_RefNannyFinishContext();
15768 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15769 PyObject *__pyx_r = NULL;
15770 __Pyx_RefNannyDeclarations
15771 PyObject *__pyx_t_1 = NULL;
15772 struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
15773 int __pyx_lineno = 0;
15774 const char *__pyx_filename = NULL;
15775 int __pyx_clineno = 0;
15776 __Pyx_RefNannySetupContext(
"tan", 0);
15777 __Pyx_XDECREF(__pyx_r);
15778 __pyx_t_2.__pyx_n = 1;
15779 __pyx_t_2.i = __pyx_v_i;
15780 __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;}
15781 __Pyx_GOTREF(__pyx_t_1);
15782 __pyx_r = __pyx_t_1;
15788 __Pyx_XDECREF(__pyx_t_1);
15789 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15792 __Pyx_XGIVEREF(__pyx_r);
15793 __Pyx_RefNannyFinishContext();
15805 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15806 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) {
15807 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15808 PyObject *__pyx_r = NULL;
15809 __Pyx_RefNannyDeclarations
15812 PyObject *__pyx_t_3 = NULL;
15814 PyObject *__pyx_t_5 = NULL;
15815 PyObject *__pyx_t_6 = NULL;
15816 PyObject *__pyx_t_7 = NULL;
15817 PyObject *__pyx_t_8 = NULL;
15818 PyObject *__pyx_t_9 = NULL;
15819 PyObject *__pyx_t_10 = NULL;
15820 PyObject *__pyx_t_11 = NULL;
15821 int __pyx_lineno = 0;
15822 const char *__pyx_filename = NULL;
15823 int __pyx_clineno = 0;
15824 __Pyx_RefNannySetupContext(
"atan", 0);
15825 if (__pyx_optional_args) {
15826 if (__pyx_optional_args->__pyx_n > 0) {
15827 __pyx_v_i = __pyx_optional_args->i;
15838 __pyx_t_1 = (__pyx_v_i != Py_None);
15839 __pyx_t_2 = (__pyx_t_1 != 0);
15849 __Pyx_XDECREF(__pyx_r);
15850 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
15851 __Pyx_GOTREF(__pyx_t_3);
15853 __pyx_t_4 =
atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15855 __Pyx_CppExn2PyErr();
15856 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15858 __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;}
15859 __Pyx_GOTREF(__pyx_t_5);
15860 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15861 __pyx_r = __pyx_t_5;
15875 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15876 __Pyx_XGOTREF(__pyx_t_6);
15877 __Pyx_XGOTREF(__pyx_t_7);
15878 __Pyx_XGOTREF(__pyx_t_8);
15888 __Pyx_XDECREF(__pyx_r);
15889 __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;}
15890 __Pyx_GOTREF(__pyx_t_3);
15891 __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;}
15892 __Pyx_GOTREF(__pyx_t_9);
15893 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15895 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15896 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15897 if (likely(__pyx_t_3)) {
15898 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
15899 __Pyx_INCREF(__pyx_t_3);
15900 __Pyx_INCREF(
function);
15901 __Pyx_DECREF_SET(__pyx_t_9,
function);
15905 __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;}
15906 __Pyx_GOTREF(__pyx_t_5);
15908 __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;}
15909 __Pyx_GOTREF(__pyx_t_10);
15910 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
15911 __Pyx_INCREF(__pyx_v_obj);
15912 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15913 __Pyx_GIVEREF(__pyx_v_obj);
15914 __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;}
15915 __Pyx_GOTREF(__pyx_t_5);
15916 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15918 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15919 __pyx_r = __pyx_t_5;
15921 goto __pyx_L8_try_return;
15924 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15925 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15926 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15927 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15937 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15938 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;}
15939 __Pyx_GOTREF(__pyx_t_5);
15940 __Pyx_GOTREF(__pyx_t_9);
15941 __Pyx_GOTREF(__pyx_t_10);
15950 __Pyx_XDECREF(__pyx_r);
15951 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
15952 __Pyx_GOTREF(__pyx_t_3);
15953 __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;}
15954 __Pyx_GOTREF(__pyx_t_11);
15955 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15956 __pyx_r = __pyx_t_11;
15958 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15959 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15960 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15961 goto __pyx_L7_except_return;
15963 __pyx_L6_except_error:;
15964 __Pyx_XGIVEREF(__pyx_t_6);
15965 __Pyx_XGIVEREF(__pyx_t_7);
15966 __Pyx_XGIVEREF(__pyx_t_8);
15967 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15968 goto __pyx_L1_error;
15969 __pyx_L8_try_return:;
15970 __Pyx_XGIVEREF(__pyx_t_6);
15971 __Pyx_XGIVEREF(__pyx_t_7);
15972 __Pyx_XGIVEREF(__pyx_t_8);
15973 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15975 __pyx_L7_except_return:;
15976 __Pyx_XGIVEREF(__pyx_t_6);
15977 __Pyx_XGIVEREF(__pyx_t_7);
15978 __Pyx_XGIVEREF(__pyx_t_8);
15979 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15994 __Pyx_XDECREF(__pyx_t_3);
15995 __Pyx_XDECREF(__pyx_t_5);
15996 __Pyx_XDECREF(__pyx_t_9);
15997 __Pyx_XDECREF(__pyx_t_10);
15998 __Pyx_XDECREF(__pyx_t_11);
15999 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16002 __Pyx_XGIVEREF(__pyx_r);
16003 __Pyx_RefNannyFinishContext();
16008 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16009 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 ";
16010 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16011 PyObject *__pyx_v_obj = 0;
16012 PyObject *__pyx_v_i = 0;
16013 int __pyx_lineno = 0;
16014 const char *__pyx_filename = NULL;
16015 int __pyx_clineno = 0;
16016 PyObject *__pyx_r = 0;
16017 __Pyx_RefNannyDeclarations
16018 __Pyx_RefNannySetupContext(
"atan (wrapper)", 0);
16020 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16021 PyObject* values[2] = {0,0};
16022 values[1] = ((PyObject *)Py_None);
16023 if (unlikely(__pyx_kwds)) {
16024 Py_ssize_t kw_args;
16025 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16026 switch (pos_args) {
16027 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16028 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16030 default:
goto __pyx_L5_argtuple_error;
16032 kw_args = PyDict_Size(__pyx_kwds);
16033 switch (pos_args) {
16035 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16036 else goto __pyx_L5_argtuple_error;
16039 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16040 if (value) { values[1] = value; kw_args--; }
16043 if (unlikely(kw_args > 0)) {
16044 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;}
16047 switch (PyTuple_GET_SIZE(__pyx_args)) {
16048 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16049 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16051 default:
goto __pyx_L5_argtuple_error;
16054 __pyx_v_obj = values[0];
16055 __pyx_v_i = values[1];
16057 goto __pyx_L4_argument_unpacking_done;
16058 __pyx_L5_argtuple_error:;
16059 __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;}
16061 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16062 __Pyx_RefNannyFinishContext();
16064 __pyx_L4_argument_unpacking_done:;
16065 __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16068 __Pyx_RefNannyFinishContext();
16072 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16073 PyObject *__pyx_r = NULL;
16074 __Pyx_RefNannyDeclarations
16075 PyObject *__pyx_t_1 = NULL;
16076 struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16077 int __pyx_lineno = 0;
16078 const char *__pyx_filename = NULL;
16079 int __pyx_clineno = 0;
16080 __Pyx_RefNannySetupContext(
"atan", 0);
16081 __Pyx_XDECREF(__pyx_r);
16082 __pyx_t_2.__pyx_n = 1;
16083 __pyx_t_2.i = __pyx_v_i;
16084 __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;}
16085 __Pyx_GOTREF(__pyx_t_1);
16086 __pyx_r = __pyx_t_1;
16092 __Pyx_XDECREF(__pyx_t_1);
16093 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16096 __Pyx_XGIVEREF(__pyx_r);
16097 __Pyx_RefNannyFinishContext();
16109 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16110 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16111 PyObject *__pyx_r = NULL;
16112 __Pyx_RefNannyDeclarations
16113 PyObject *__pyx_t_1 = NULL;
16114 PyObject *__pyx_t_2 = NULL;
16115 PyObject *__pyx_t_3 = NULL;
16116 PyObject *__pyx_t_4 = NULL;
16117 PyObject *__pyx_t_5 = NULL;
16118 PyObject *__pyx_t_6 = NULL;
16119 PyObject *__pyx_t_7 = NULL;
16120 PyObject *__pyx_t_8 = NULL;
16121 int __pyx_lineno = 0;
16122 const char *__pyx_filename = NULL;
16123 int __pyx_clineno = 0;
16124 __Pyx_RefNannySetupContext(
"tanh", 0);
16134 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16135 __Pyx_XGOTREF(__pyx_t_1);
16136 __Pyx_XGOTREF(__pyx_t_2);
16137 __Pyx_XGOTREF(__pyx_t_3);
16147 __Pyx_XDECREF(__pyx_r);
16148 __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;}
16149 __Pyx_GOTREF(__pyx_t_5);
16150 __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;}
16151 __Pyx_GOTREF(__pyx_t_6);
16152 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16154 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
16155 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16156 if (likely(__pyx_t_5)) {
16157 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_6);
16158 __Pyx_INCREF(__pyx_t_5);
16159 __Pyx_INCREF(
function);
16160 __Pyx_DECREF_SET(__pyx_t_6,
function);
16164 __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;}
16165 __Pyx_GOTREF(__pyx_t_4);
16167 __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;}
16168 __Pyx_GOTREF(__pyx_t_7);
16169 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
16170 __Pyx_INCREF(__pyx_v_obj);
16171 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16172 __Pyx_GIVEREF(__pyx_v_obj);
16173 __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;}
16174 __Pyx_GOTREF(__pyx_t_4);
16175 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16177 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16178 __pyx_r = __pyx_t_4;
16180 goto __pyx_L7_try_return;
16183 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16184 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16185 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16186 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16196 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16197 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;}
16198 __Pyx_GOTREF(__pyx_t_4);
16199 __Pyx_GOTREF(__pyx_t_6);
16200 __Pyx_GOTREF(__pyx_t_7);
16209 __Pyx_XDECREF(__pyx_r);
16210 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((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;}
16211 __Pyx_GOTREF(__pyx_t_5);
16212 __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;}
16213 __Pyx_GOTREF(__pyx_t_8);
16214 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16215 __pyx_r = __pyx_t_8;
16217 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16218 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16219 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16220 goto __pyx_L6_except_return;
16222 __pyx_L5_except_error:;
16223 __Pyx_XGIVEREF(__pyx_t_1);
16224 __Pyx_XGIVEREF(__pyx_t_2);
16225 __Pyx_XGIVEREF(__pyx_t_3);
16226 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16227 goto __pyx_L1_error;
16228 __pyx_L7_try_return:;
16229 __Pyx_XGIVEREF(__pyx_t_1);
16230 __Pyx_XGIVEREF(__pyx_t_2);
16231 __Pyx_XGIVEREF(__pyx_t_3);
16232 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16234 __pyx_L6_except_return:;
16235 __Pyx_XGIVEREF(__pyx_t_1);
16236 __Pyx_XGIVEREF(__pyx_t_2);
16237 __Pyx_XGIVEREF(__pyx_t_3);
16238 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16252 __Pyx_XDECREF(__pyx_t_4);
16253 __Pyx_XDECREF(__pyx_t_5);
16254 __Pyx_XDECREF(__pyx_t_6);
16255 __Pyx_XDECREF(__pyx_t_7);
16256 __Pyx_XDECREF(__pyx_t_8);
16257 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16260 __Pyx_XGIVEREF(__pyx_r);
16261 __Pyx_RefNannyFinishContext();
16266 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16267 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 ";
16268 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16269 PyObject *__pyx_r = 0;
16270 __Pyx_RefNannyDeclarations
16271 __Pyx_RefNannySetupContext(
"tanh (wrapper)", 0);
16272 __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
16275 __Pyx_RefNannyFinishContext();
16279 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16280 PyObject *__pyx_r = NULL;
16281 __Pyx_RefNannyDeclarations
16282 PyObject *__pyx_t_1 = NULL;
16283 int __pyx_lineno = 0;
16284 const char *__pyx_filename = NULL;
16285 int __pyx_clineno = 0;
16286 __Pyx_RefNannySetupContext(
"tanh", 0);
16287 __Pyx_XDECREF(__pyx_r);
16288 __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;}
16289 __Pyx_GOTREF(__pyx_t_1);
16290 __pyx_r = __pyx_t_1;
16296 __Pyx_XDECREF(__pyx_t_1);
16297 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16300 __Pyx_XGIVEREF(__pyx_r);
16301 __Pyx_RefNannyFinishContext();
16313 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16314 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) {
16315 PyObject *__pyx_v_i = ((PyObject *)Py_None);
16316 PyObject *__pyx_r = NULL;
16317 __Pyx_RefNannyDeclarations
16320 PyObject *__pyx_t_3 = NULL;
16322 PyObject *__pyx_t_5 = NULL;
16323 PyObject *__pyx_t_6 = NULL;
16324 PyObject *__pyx_t_7 = NULL;
16325 PyObject *__pyx_t_8 = NULL;
16326 PyObject *__pyx_t_9 = NULL;
16327 PyObject *__pyx_t_10 = NULL;
16328 PyObject *__pyx_t_11 = NULL;
16329 int __pyx_lineno = 0;
16330 const char *__pyx_filename = NULL;
16331 int __pyx_clineno = 0;
16332 __Pyx_RefNannySetupContext(
"atanh", 0);
16333 if (__pyx_optional_args) {
16334 if (__pyx_optional_args->__pyx_n > 0) {
16335 __pyx_v_i = __pyx_optional_args->i;
16346 __pyx_t_1 = (__pyx_v_i != Py_None);
16347 __pyx_t_2 = (__pyx_t_1 != 0);
16357 __Pyx_XDECREF(__pyx_r);
16358 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
16359 __Pyx_GOTREF(__pyx_t_3);
16361 __pyx_t_4 =
atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16363 __Pyx_CppExn2PyErr();
16364 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16366 __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;}
16367 __Pyx_GOTREF(__pyx_t_5);
16368 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16369 __pyx_r = __pyx_t_5;
16383 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16384 __Pyx_XGOTREF(__pyx_t_6);
16385 __Pyx_XGOTREF(__pyx_t_7);
16386 __Pyx_XGOTREF(__pyx_t_8);
16396 __Pyx_XDECREF(__pyx_r);
16397 __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;}
16398 __Pyx_GOTREF(__pyx_t_3);
16399 __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;}
16400 __Pyx_GOTREF(__pyx_t_9);
16401 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16403 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
16404 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16405 if (likely(__pyx_t_3)) {
16406 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_9);
16407 __Pyx_INCREF(__pyx_t_3);
16408 __Pyx_INCREF(
function);
16409 __Pyx_DECREF_SET(__pyx_t_9,
function);
16413 __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;}
16414 __Pyx_GOTREF(__pyx_t_5);
16416 __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;}
16417 __Pyx_GOTREF(__pyx_t_10);
16418 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
16419 __Pyx_INCREF(__pyx_v_obj);
16420 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16421 __Pyx_GIVEREF(__pyx_v_obj);
16422 __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;}
16423 __Pyx_GOTREF(__pyx_t_5);
16424 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16426 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16427 __pyx_r = __pyx_t_5;
16429 goto __pyx_L8_try_return;
16432 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16433 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16434 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16435 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16445 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16446 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;}
16447 __Pyx_GOTREF(__pyx_t_5);
16448 __Pyx_GOTREF(__pyx_t_9);
16449 __Pyx_GOTREF(__pyx_t_10);
16458 __Pyx_XDECREF(__pyx_r);
16459 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
16460 __Pyx_GOTREF(__pyx_t_3);
16461 __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;}
16462 __Pyx_GOTREF(__pyx_t_11);
16463 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16464 __pyx_r = __pyx_t_11;
16466 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16467 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16468 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16469 goto __pyx_L7_except_return;
16471 __pyx_L6_except_error:;
16472 __Pyx_XGIVEREF(__pyx_t_6);
16473 __Pyx_XGIVEREF(__pyx_t_7);
16474 __Pyx_XGIVEREF(__pyx_t_8);
16475 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16476 goto __pyx_L1_error;
16477 __pyx_L8_try_return:;
16478 __Pyx_XGIVEREF(__pyx_t_6);
16479 __Pyx_XGIVEREF(__pyx_t_7);
16480 __Pyx_XGIVEREF(__pyx_t_8);
16481 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16483 __pyx_L7_except_return:;
16484 __Pyx_XGIVEREF(__pyx_t_6);
16485 __Pyx_XGIVEREF(__pyx_t_7);
16486 __Pyx_XGIVEREF(__pyx_t_8);
16487 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16502 __Pyx_XDECREF(__pyx_t_3);
16503 __Pyx_XDECREF(__pyx_t_5);
16504 __Pyx_XDECREF(__pyx_t_9);
16505 __Pyx_XDECREF(__pyx_t_10);
16506 __Pyx_XDECREF(__pyx_t_11);
16507 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16510 __Pyx_XGIVEREF(__pyx_r);
16511 __Pyx_RefNannyFinishContext();
16516 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16517 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 ";
16518 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16519 PyObject *__pyx_v_obj = 0;
16520 PyObject *__pyx_v_i = 0;
16521 int __pyx_lineno = 0;
16522 const char *__pyx_filename = NULL;
16523 int __pyx_clineno = 0;
16524 PyObject *__pyx_r = 0;
16525 __Pyx_RefNannyDeclarations
16526 __Pyx_RefNannySetupContext(
"atanh (wrapper)", 0);
16528 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16529 PyObject* values[2] = {0,0};
16530 values[1] = ((PyObject *)Py_None);
16531 if (unlikely(__pyx_kwds)) {
16532 Py_ssize_t kw_args;
16533 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16534 switch (pos_args) {
16535 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16536 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16538 default:
goto __pyx_L5_argtuple_error;
16540 kw_args = PyDict_Size(__pyx_kwds);
16541 switch (pos_args) {
16543 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16544 else goto __pyx_L5_argtuple_error;
16547 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16548 if (value) { values[1] = value; kw_args--; }
16551 if (unlikely(kw_args > 0)) {
16552 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;}
16555 switch (PyTuple_GET_SIZE(__pyx_args)) {
16556 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16557 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16559 default:
goto __pyx_L5_argtuple_error;
16562 __pyx_v_obj = values[0];
16563 __pyx_v_i = values[1];
16565 goto __pyx_L4_argument_unpacking_done;
16566 __pyx_L5_argtuple_error:;
16567 __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;}
16569 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16570 __Pyx_RefNannyFinishContext();
16572 __pyx_L4_argument_unpacking_done:;
16573 __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16576 __Pyx_RefNannyFinishContext();
16580 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16581 PyObject *__pyx_r = NULL;
16582 __Pyx_RefNannyDeclarations
16583 PyObject *__pyx_t_1 = NULL;
16584 struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
16585 int __pyx_lineno = 0;
16586 const char *__pyx_filename = NULL;
16587 int __pyx_clineno = 0;
16588 __Pyx_RefNannySetupContext(
"atanh", 0);
16589 __Pyx_XDECREF(__pyx_r);
16590 __pyx_t_2.__pyx_n = 1;
16591 __pyx_t_2.i = __pyx_v_i;
16592 __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;}
16593 __Pyx_GOTREF(__pyx_t_1);
16594 __pyx_r = __pyx_t_1;
16600 __Pyx_XDECREF(__pyx_t_1);
16601 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16604 __Pyx_XGIVEREF(__pyx_r);
16605 __Pyx_RefNannyFinishContext();
16617 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16618 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) {
16619 PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
16620 PyObject *__pyx_r = NULL;
16621 __Pyx_RefNannyDeclarations
16622 PyObject *__pyx_t_1 = NULL;
16623 PyObject *__pyx_t_2 = NULL;
16625 PyObject *__pyx_t_4 = NULL;
16626 int __pyx_lineno = 0;
16627 const char *__pyx_filename = NULL;
16628 int __pyx_clineno = 0;
16629 __Pyx_RefNannySetupContext(
"random_clifford", 0);
16630 if (__pyx_optional_args) {
16631 if (__pyx_optional_args->__pyx_n > 0) {
16632 __pyx_v_fill = __pyx_optional_args->fill;
16643 __Pyx_XDECREF(__pyx_r);
16644 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
16645 __Pyx_GOTREF(__pyx_t_1);
16646 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
16647 __Pyx_GOTREF(__pyx_t_2);
16648 __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;}
16649 __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;}
16650 __Pyx_GOTREF(__pyx_t_4);
16651 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16652 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16653 __pyx_r = __pyx_t_4;
16667 __Pyx_XDECREF(__pyx_t_1);
16668 __Pyx_XDECREF(__pyx_t_2);
16669 __Pyx_XDECREF(__pyx_t_4);
16670 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
16673 __Pyx_XGIVEREF(__pyx_r);
16674 __Pyx_RefNannyFinishContext();
16679 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16680 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 ";
16681 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16682 struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
16683 PyObject *__pyx_v_fill = 0;
16684 int __pyx_lineno = 0;
16685 const char *__pyx_filename = NULL;
16686 int __pyx_clineno = 0;
16687 PyObject *__pyx_r = 0;
16688 __Pyx_RefNannyDeclarations
16689 __Pyx_RefNannySetupContext(
"random_clifford (wrapper)", 0);
16691 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
16692 PyObject* values[2] = {0,0};
16693 values[1] = ((PyObject *)__pyx_float_1_0);
16694 if (unlikely(__pyx_kwds)) {
16695 Py_ssize_t kw_args;
16696 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16697 switch (pos_args) {
16698 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16699 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16701 default:
goto __pyx_L5_argtuple_error;
16703 kw_args = PyDict_Size(__pyx_kwds);
16704 switch (pos_args) {
16706 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
16707 else goto __pyx_L5_argtuple_error;
16710 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
16711 if (value) { values[1] = value; kw_args--; }
16714 if (unlikely(kw_args > 0)) {
16715 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;}
16718 switch (PyTuple_GET_SIZE(__pyx_args)) {
16719 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16720 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16722 default:
goto __pyx_L5_argtuple_error;
16725 __pyx_v_ixt = ((
struct __pyx_obj_8PyClical_index_set *)values[0]);
16726 __pyx_v_fill = values[1];
16728 goto __pyx_L4_argument_unpacking_done;
16729 __pyx_L5_argtuple_error:;
16730 __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;}
16732 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
16733 __Pyx_RefNannyFinishContext();
16735 __pyx_L4_argument_unpacking_done:;
16736 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;}
16737 __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
16744 __Pyx_RefNannyFinishContext();
16748 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) {
16749 PyObject *__pyx_r = NULL;
16750 __Pyx_RefNannyDeclarations
16751 PyObject *__pyx_t_1 = NULL;
16752 struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
16753 int __pyx_lineno = 0;
16754 const char *__pyx_filename = NULL;
16755 int __pyx_clineno = 0;
16756 __Pyx_RefNannySetupContext(
"random_clifford", 0);
16757 __Pyx_XDECREF(__pyx_r);
16758 __pyx_t_2.__pyx_n = 1;
16759 __pyx_t_2.fill = __pyx_v_fill;
16760 __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;}
16761 __Pyx_GOTREF(__pyx_t_1);
16762 __pyx_r = __pyx_t_1;
16768 __Pyx_XDECREF(__pyx_t_1);
16769 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
16772 __Pyx_XGIVEREF(__pyx_r);
16773 __Pyx_RefNannyFinishContext();
16785 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16786 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16787 PyObject *__pyx_r = NULL;
16788 __Pyx_RefNannyDeclarations
16789 PyObject *__pyx_t_1 = NULL;
16790 PyObject *__pyx_t_2 = NULL;
16791 int __pyx_lineno = 0;
16792 const char *__pyx_filename = NULL;
16793 int __pyx_clineno = 0;
16794 __Pyx_RefNannySetupContext(
"cga3", 0);
16803 __Pyx_XDECREF(__pyx_r);
16804 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
16805 __Pyx_GOTREF(__pyx_t_1);
16806 __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;}
16807 __Pyx_GOTREF(__pyx_t_2);
16808 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16809 __pyx_r = __pyx_t_2;
16823 __Pyx_XDECREF(__pyx_t_1);
16824 __Pyx_XDECREF(__pyx_t_2);
16825 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16828 __Pyx_XGIVEREF(__pyx_r);
16829 __Pyx_RefNannyFinishContext();
16834 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16835 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 ";
16836 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16837 PyObject *__pyx_r = 0;
16838 __Pyx_RefNannyDeclarations
16839 __Pyx_RefNannySetupContext(
"cga3 (wrapper)", 0);
16840 __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
16843 __Pyx_RefNannyFinishContext();
16847 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16848 PyObject *__pyx_r = NULL;
16849 __Pyx_RefNannyDeclarations
16850 PyObject *__pyx_t_1 = NULL;
16851 int __pyx_lineno = 0;
16852 const char *__pyx_filename = NULL;
16853 int __pyx_clineno = 0;
16854 __Pyx_RefNannySetupContext(
"cga3", 0);
16855 __Pyx_XDECREF(__pyx_r);
16856 __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;}
16857 __Pyx_GOTREF(__pyx_t_1);
16858 __pyx_r = __pyx_t_1;
16864 __Pyx_XDECREF(__pyx_t_1);
16865 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16868 __Pyx_XGIVEREF(__pyx_r);
16869 __Pyx_RefNannyFinishContext();
16881 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16882 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16883 PyObject *__pyx_r = NULL;
16884 __Pyx_RefNannyDeclarations
16885 PyObject *__pyx_t_1 = NULL;
16886 PyObject *__pyx_t_2 = NULL;
16887 int __pyx_lineno = 0;
16888 const char *__pyx_filename = NULL;
16889 int __pyx_clineno = 0;
16890 __Pyx_RefNannySetupContext(
"cga3std", 0);
16899 __Pyx_XDECREF(__pyx_r);
16900 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
16901 __Pyx_GOTREF(__pyx_t_1);
16902 __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;}
16903 __Pyx_GOTREF(__pyx_t_2);
16904 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16905 __pyx_r = __pyx_t_2;
16919 __Pyx_XDECREF(__pyx_t_1);
16920 __Pyx_XDECREF(__pyx_t_2);
16921 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
16924 __Pyx_XGIVEREF(__pyx_r);
16925 __Pyx_RefNannyFinishContext();
16930 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16931 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 ";
16932 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16933 PyObject *__pyx_r = 0;
16934 __Pyx_RefNannyDeclarations
16935 __Pyx_RefNannySetupContext(
"cga3std (wrapper)", 0);
16936 __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
16939 __Pyx_RefNannyFinishContext();
16943 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16944 PyObject *__pyx_r = NULL;
16945 __Pyx_RefNannyDeclarations
16946 PyObject *__pyx_t_1 = NULL;
16947 int __pyx_lineno = 0;
16948 const char *__pyx_filename = NULL;
16949 int __pyx_clineno = 0;
16950 __Pyx_RefNannySetupContext(
"cga3std", 0);
16951 __Pyx_XDECREF(__pyx_r);
16952 __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;}
16953 __Pyx_GOTREF(__pyx_t_1);
16954 __pyx_r = __pyx_t_1;
16960 __Pyx_XDECREF(__pyx_t_1);
16961 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
16964 __Pyx_XGIVEREF(__pyx_r);
16965 __Pyx_RefNannyFinishContext();
16977 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16978 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16979 PyObject *__pyx_r = NULL;
16980 __Pyx_RefNannyDeclarations
16981 PyObject *__pyx_t_1 = NULL;
16982 PyObject *__pyx_t_2 = NULL;
16983 int __pyx_lineno = 0;
16984 const char *__pyx_filename = NULL;
16985 int __pyx_clineno = 0;
16986 __Pyx_RefNannySetupContext(
"agc3", 0);
16995 __Pyx_XDECREF(__pyx_r);
16996 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
16997 __Pyx_GOTREF(__pyx_t_1);
16998 __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;}
16999 __Pyx_GOTREF(__pyx_t_2);
17000 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17001 __pyx_r = __pyx_t_2;
17015 __Pyx_XDECREF(__pyx_t_1);
17016 __Pyx_XDECREF(__pyx_t_2);
17017 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17020 __Pyx_XGIVEREF(__pyx_r);
17021 __Pyx_RefNannyFinishContext();
17026 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17027 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 ";
17028 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17029 PyObject *__pyx_r = 0;
17030 __Pyx_RefNannyDeclarations
17031 __Pyx_RefNannySetupContext(
"agc3 (wrapper)", 0);
17032 __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17035 __Pyx_RefNannyFinishContext();
17039 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17040 PyObject *__pyx_r = NULL;
17041 __Pyx_RefNannyDeclarations
17042 PyObject *__pyx_t_1 = NULL;
17043 int __pyx_lineno = 0;
17044 const char *__pyx_filename = NULL;
17045 int __pyx_clineno = 0;
17046 __Pyx_RefNannySetupContext(
"agc3", 0);
17047 __Pyx_XDECREF(__pyx_r);
17048 __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;}
17049 __Pyx_GOTREF(__pyx_t_1);
17050 __pyx_r = __pyx_t_1;
17056 __Pyx_XDECREF(__pyx_t_1);
17057 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17060 __Pyx_XGIVEREF(__pyx_r);
17061 __Pyx_RefNannyFinishContext();
17074 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj);
17075 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 ";
17076 static PyMethodDef __pyx_mdef_8PyClical_83e = {
"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17077 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17078 PyObject *__pyx_r = 0;
17079 __Pyx_RefNannyDeclarations
17080 __Pyx_RefNannySetupContext(
"e (wrapper)", 0);
17081 __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17084 __Pyx_RefNannyFinishContext();
17088 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17089 PyObject *__pyx_r = NULL;
17090 __Pyx_RefNannyDeclarations
17091 PyObject *__pyx_t_1 = NULL;
17092 PyObject *__pyx_t_2 = NULL;
17093 int __pyx_lineno = 0;
17094 const char *__pyx_filename = NULL;
17095 int __pyx_clineno = 0;
17096 __Pyx_RefNannySetupContext(
"e", 0);
17105 __Pyx_XDECREF(__pyx_r);
17106 __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;}
17107 __Pyx_GOTREF(__pyx_t_1);
17108 __Pyx_INCREF(__pyx_v_obj);
17109 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
17110 __Pyx_GIVEREF(__pyx_v_obj);
17111 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
17112 __Pyx_GOTREF(__pyx_t_2);
17113 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17114 __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;}
17115 __Pyx_GOTREF(__pyx_t_1);
17116 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
17117 __Pyx_GIVEREF(__pyx_t_2);
17119 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((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;}
17120 __Pyx_GOTREF(__pyx_t_2);
17121 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17122 __pyx_r = __pyx_t_2;
17136 __Pyx_XDECREF(__pyx_t_1);
17137 __Pyx_XDECREF(__pyx_t_2);
17138 __Pyx_AddTraceback(
"PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17141 __Pyx_XGIVEREF(__pyx_r);
17142 __Pyx_RefNannyFinishContext();
17155 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
17156 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 ";
17157 static PyMethodDef __pyx_mdef_8PyClical_85istpq = {
"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17158 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17159 PyObject *__pyx_v_p = 0;
17160 PyObject *__pyx_v_q = 0;
17161 int __pyx_lineno = 0;
17162 const char *__pyx_filename = NULL;
17163 int __pyx_clineno = 0;
17164 PyObject *__pyx_r = 0;
17165 __Pyx_RefNannyDeclarations
17166 __Pyx_RefNannySetupContext(
"istpq (wrapper)", 0);
17168 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17169 PyObject* values[2] = {0,0};
17170 if (unlikely(__pyx_kwds)) {
17171 Py_ssize_t kw_args;
17172 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17173 switch (pos_args) {
17174 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17175 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17177 default:
goto __pyx_L5_argtuple_error;
17179 kw_args = PyDict_Size(__pyx_kwds);
17180 switch (pos_args) {
17182 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17183 else goto __pyx_L5_argtuple_error;
17185 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17187 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
17190 if (unlikely(kw_args > 0)) {
17191 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;}
17193 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17194 goto __pyx_L5_argtuple_error;
17196 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17197 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17199 __pyx_v_p = values[0];
17200 __pyx_v_q = values[1];
17202 goto __pyx_L4_argument_unpacking_done;
17203 __pyx_L5_argtuple_error:;
17204 __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;}
17206 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17207 __Pyx_RefNannyFinishContext();
17209 __pyx_L4_argument_unpacking_done:;
17210 __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17213 __Pyx_RefNannyFinishContext();
17217 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17218 PyObject *__pyx_r = NULL;
17219 __Pyx_RefNannyDeclarations
17220 PyObject *__pyx_t_1 = NULL;
17221 PyObject *__pyx_t_2 = NULL;
17222 PyObject *__pyx_t_3 = NULL;
17223 int __pyx_lineno = 0;
17224 const char *__pyx_filename = NULL;
17225 int __pyx_clineno = 0;
17226 __Pyx_RefNannySetupContext(
"istpq", 0);
17235 __Pyx_XDECREF(__pyx_r);
17236 __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;}
17237 __Pyx_GOTREF(__pyx_t_1);
17238 __pyx_t_2 = PyNumber_Add(__pyx_v_p, __pyx_int_1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17239 __Pyx_GOTREF(__pyx_t_2);
17240 __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;}
17241 __Pyx_GOTREF(__pyx_t_3);
17242 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17243 __Pyx_GIVEREF(__pyx_t_1);
17244 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17245 __Pyx_GIVEREF(__pyx_t_2);
17248 __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;}
17249 __Pyx_GOTREF(__pyx_t_2);
17250 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17251 __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;}
17252 __Pyx_GOTREF(__pyx_t_3);
17253 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17254 __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;}
17255 __Pyx_GOTREF(__pyx_t_2);
17256 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
17257 __Pyx_GIVEREF(__pyx_t_3);
17259 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((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;}
17260 __Pyx_GOTREF(__pyx_t_3);
17261 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17262 __pyx_r = __pyx_t_3;
17276 __Pyx_XDECREF(__pyx_t_1);
17277 __Pyx_XDECREF(__pyx_t_2);
17278 __Pyx_XDECREF(__pyx_t_3);
17279 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17282 __Pyx_XGIVEREF(__pyx_r);
17283 __Pyx_RefNannyFinishContext();
17296 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
17297 static PyMethodDef __pyx_mdef_8PyClical_87_test = {
"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
17298 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
17299 PyObject *__pyx_r = 0;
17300 __Pyx_RefNannyDeclarations
17301 __Pyx_RefNannySetupContext(
"_test (wrapper)", 0);
17302 __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
17305 __Pyx_RefNannyFinishContext();
17309 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
17310 PyObject *__pyx_v_PyClical = NULL;
17311 PyObject *__pyx_v_doctest = NULL;
17312 PyObject *__pyx_r = NULL;
17313 __Pyx_RefNannyDeclarations
17314 PyObject *__pyx_t_1 = NULL;
17315 PyObject *__pyx_t_2 = NULL;
17316 PyObject *__pyx_t_3 = NULL;
17317 PyObject *__pyx_t_4 = NULL;
17318 int __pyx_lineno = 0;
17319 const char *__pyx_filename = NULL;
17320 int __pyx_clineno = 0;
17321 __Pyx_RefNannySetupContext(
"_test", 0);
17330 __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;}
17331 __Pyx_GOTREF(__pyx_t_1);
17332 __pyx_v_PyClical = __pyx_t_1;
17334 __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;}
17335 __Pyx_GOTREF(__pyx_t_1);
17336 __pyx_v_doctest = __pyx_t_1;
17346 __Pyx_XDECREF(__pyx_r);
17347 __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;}
17348 __Pyx_GOTREF(__pyx_t_2);
17350 if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
17351 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
17352 if (likely(__pyx_t_3)) {
17353 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
17354 __Pyx_INCREF(__pyx_t_3);
17355 __Pyx_INCREF(
function);
17356 __Pyx_DECREF_SET(__pyx_t_2,
function);
17360 __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;}
17361 __Pyx_GOTREF(__pyx_t_1);
17363 __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;}
17364 __Pyx_GOTREF(__pyx_t_4);
17365 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
17366 __Pyx_INCREF(__pyx_v_PyClical);
17367 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
17368 __Pyx_GIVEREF(__pyx_v_PyClical);
17369 __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;}
17370 __Pyx_GOTREF(__pyx_t_1);
17371 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17373 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17374 __pyx_r = __pyx_t_1;
17388 __Pyx_XDECREF(__pyx_t_1);
17389 __Pyx_XDECREF(__pyx_t_2);
17390 __Pyx_XDECREF(__pyx_t_3);
17391 __Pyx_XDECREF(__pyx_t_4);
17392 __Pyx_AddTraceback(
"PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
17395 __Pyx_XDECREF(__pyx_v_PyClical);
17396 __Pyx_XDECREF(__pyx_v_doctest);
17397 __Pyx_XGIVEREF(__pyx_r);
17398 __Pyx_RefNannyFinishContext();
17401 static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
17403 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
17404 struct __pyx_obj_8PyClical_index_set *p;
17406 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
17407 o = (*t->tp_alloc)(t, 0);
17409 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
17411 if (unlikely(!o))
return 0;
17412 p = ((
struct __pyx_obj_8PyClical_index_set *)o);
17413 p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
17414 if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) {
17415 Py_DECREF(o); o = 0;
17420 static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
17421 #if PY_VERSION_HEX >= 0x030400a1
17422 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
17423 if (PyObject_CallFinalizerFromDealloc(o))
return;
17427 PyObject *etype, *eval, *etb;
17428 PyErr_Fetch(&etype, &eval, &etb);
17430 __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
17432 PyErr_Restore(etype, eval, etb);
17434 (*Py_TYPE(o)->tp_free)(o);
17436 static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
17438 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
17439 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
17444 static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
17446 return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
17449 PyErr_Format(PyExc_NotImplementedError,
17450 "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
17455 static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
17456 {
"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
17457 {
"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
17458 {
"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
17459 {
"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
17460 {
"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
17461 {
"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
17462 {
"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
17463 {
"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
17464 {
"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
17468 static PyNumberMethods __pyx_tp_as_number_index_set = {
17472 #if PY_MAJOR_VERSION < 3
17482 __pyx_pw_8PyClical_9index_set_18__invert__,
17485 __pyx_pw_8PyClical_9index_set_24__and__,
17486 __pyx_pw_8PyClical_9index_set_20__xor__,
17487 __pyx_pw_8PyClical_9index_set_28__or__,
17488 #if PY_MAJOR_VERSION < 3
17492 #if PY_MAJOR_VERSION < 3
17498 #if PY_MAJOR_VERSION < 3
17501 #if PY_MAJOR_VERSION < 3
17507 #if PY_MAJOR_VERSION < 3
17514 __pyx_pw_8PyClical_9index_set_26__iand__,
17515 __pyx_pw_8PyClical_9index_set_22__ixor__,
17516 __pyx_pw_8PyClical_9index_set_30__ior__,
17522 #if PY_VERSION_HEX >= 0x03050000
17525 #if PY_VERSION_HEX >= 0x03050000
17530 static PySequenceMethods __pyx_tp_as_sequence_index_set = {
17534 __pyx_sq_item_8PyClical_index_set,
17538 __pyx_pw_8PyClical_9index_set_13__contains__,
17543 static PyMappingMethods __pyx_tp_as_mapping_index_set = {
17545 __pyx_pw_8PyClical_9index_set_11__getitem__,
17546 __pyx_mp_ass_subscript_8PyClical_index_set,
17549 static PyTypeObject __pyx_type_8PyClical_index_set = {
17550 PyVarObject_HEAD_INIT(0, 0)
17551 "PyClical.index_set",
17552 sizeof(
struct __pyx_obj_8PyClical_index_set),
17554 __pyx_tp_dealloc_8PyClical_index_set,
17558 #if PY_MAJOR_VERSION < 3
17563 __pyx_pw_8PyClical_9index_set_48__repr__,
17564 &__pyx_tp_as_number_index_set,
17565 &__pyx_tp_as_sequence_index_set,
17566 &__pyx_tp_as_mapping_index_set,
17569 __pyx_pw_8PyClical_9index_set_50__str__,
17573 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
17574 "\n Python class index_set wraps C++ class IndexSet.\n ",
17577 __pyx_pw_8PyClical_9index_set_7__richcmp__,
17579 __pyx_pw_8PyClical_9index_set_15__iter__,
17581 __pyx_methods_8PyClical_index_set,
17591 __pyx_tp_new_8PyClical_index_set,
17601 #if PY_VERSION_HEX >= 0x030400a1
17605 static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
17607 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
17608 struct __pyx_obj_8PyClical_clifford *p;
17610 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
17611 o = (*t->tp_alloc)(t, 0);
17613 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
17615 if (unlikely(!o))
return 0;
17616 p = ((
struct __pyx_obj_8PyClical_clifford *)o);
17617 p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
17618 if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) {
17619 Py_DECREF(o); o = 0;
17624 static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
17625 #if PY_VERSION_HEX >= 0x030400a1
17626 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
17627 if (PyObject_CallFinalizerFromDealloc(o))
return;
17631 PyObject *etype, *eval, *etb;
17632 PyErr_Fetch(&etype, &eval, &etb);
17634 __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
17636 PyErr_Restore(etype, eval, etb);
17638 (*Py_TYPE(o)->tp_free)(o);
17640 static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
17642 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
17643 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
17648 static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
17649 {
"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
17650 {
"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
17651 {
"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
17652 {
"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
17653 {
"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
17654 {
"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
17655 {
"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
17656 {
"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
17657 {
"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
17658 {
"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
17659 {
"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
17660 {
"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
17661 {
"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
17662 {
"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
17663 {
"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
17664 {
"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
17665 {
"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
17666 {
"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
17667 {
"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
17668 {
"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
17672 static PyNumberMethods __pyx_tp_as_number_clifford = {
17673 __pyx_pw_8PyClical_8clifford_21__add__,
17674 __pyx_pw_8PyClical_8clifford_25__sub__,
17675 __pyx_pw_8PyClical_8clifford_29__mul__,
17676 #if PY_MAJOR_VERSION < 3
17677 __pyx_pw_8PyClical_8clifford_45__div__,
17679 __pyx_pw_8PyClical_8clifford_33__mod__,
17681 __pyx_pw_8PyClical_8clifford_55__pow__,
17682 __pyx_pw_8PyClical_8clifford_17__neg__,
17683 __pyx_pw_8PyClical_8clifford_19__pos__,
17689 __pyx_pw_8PyClical_8clifford_37__and__,
17690 __pyx_pw_8PyClical_8clifford_41__xor__,
17691 __pyx_pw_8PyClical_8clifford_51__or__,
17692 #if PY_MAJOR_VERSION < 3
17696 #if PY_MAJOR_VERSION < 3
17702 #if PY_MAJOR_VERSION < 3
17705 #if PY_MAJOR_VERSION < 3
17708 __pyx_pw_8PyClical_8clifford_23__iadd__,
17709 __pyx_pw_8PyClical_8clifford_27__isub__,
17710 __pyx_pw_8PyClical_8clifford_31__imul__,
17711 #if PY_MAJOR_VERSION < 3
17712 __pyx_pw_8PyClical_8clifford_47__idiv__,
17714 __pyx_pw_8PyClical_8clifford_35__imod__,
17718 __pyx_pw_8PyClical_8clifford_39__iand__,
17719 __pyx_pw_8PyClical_8clifford_43__ixor__,
17720 __pyx_pw_8PyClical_8clifford_53__ior__,
17726 #if PY_VERSION_HEX >= 0x03050000
17729 #if PY_VERSION_HEX >= 0x03050000
17734 static PySequenceMethods __pyx_tp_as_sequence_clifford = {
17738 __pyx_sq_item_8PyClical_clifford,
17742 __pyx_pw_8PyClical_8clifford_7__contains__,
17747 static PyMappingMethods __pyx_tp_as_mapping_clifford = {
17749 __pyx_pw_8PyClical_8clifford_15__getitem__,
17753 static PyTypeObject __pyx_type_8PyClical_clifford = {
17754 PyVarObject_HEAD_INIT(0, 0)
17755 "PyClical.clifford",
17756 sizeof(
struct __pyx_obj_8PyClical_clifford),
17758 __pyx_tp_dealloc_8PyClical_clifford,
17762 #if PY_MAJOR_VERSION < 3
17767 __pyx_pw_8PyClical_8clifford_93__repr__,
17768 &__pyx_tp_as_number_clifford,
17769 &__pyx_tp_as_sequence_clifford,
17770 &__pyx_tp_as_mapping_clifford,
17772 __pyx_pw_8PyClical_8clifford_61__call__,
17773 __pyx_pw_8PyClical_8clifford_95__str__,
17777 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
17778 "\n Python class clifford wraps C++ class Clifford.\n ",
17781 __pyx_pw_8PyClical_8clifford_13__richcmp__,
17783 __pyx_pw_8PyClical_8clifford_9__iter__,
17785 __pyx_methods_8PyClical_clifford,
17795 __pyx_tp_new_8PyClical_clifford,
17805 #if PY_VERSION_HEX >= 0x030400a1
17810 static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
17811 static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
17813 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
17815 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__)))) {
17816 o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
17817 memset(o, 0,
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
17818 (void) PyObject_INIT(o, t);
17819 PyObject_GC_Track(o);
17821 o = (*t->tp_alloc)(t, 0);
17822 if (unlikely(!o))
return 0;
17827 static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
17828 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
17829 PyObject_GC_UnTrack(o);
17830 Py_CLEAR(p->__pyx_v_idx);
17831 Py_CLEAR(p->__pyx_v_self);
17832 Py_CLEAR(p->__pyx_t_0);
17833 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__)))) {
17834 __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
17836 (*Py_TYPE(o)->tp_free)(o);
17840 static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v,
void *a) {
17842 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
17843 if (p->__pyx_v_idx) {
17844 e = (*v)(p->__pyx_v_idx, a);
if (e)
return e;
17846 if (p->__pyx_v_self) {
17847 e = (*v)(((PyObject*)p->__pyx_v_self), a);
if (e)
return e;
17849 if (p->__pyx_t_0) {
17850 e = (*v)(p->__pyx_t_0, a);
if (e)
return e;
17855 static int __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
17857 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
17858 tmp = ((PyObject*)p->__pyx_v_idx);
17859 p->__pyx_v_idx = Py_None; Py_INCREF(Py_None);
17861 tmp = ((PyObject*)p->__pyx_v_self);
17862 p->__pyx_v_self = ((
struct __pyx_obj_8PyClical_index_set *)Py_None); Py_INCREF(Py_None);
17864 tmp = ((PyObject*)p->__pyx_t_0);
17865 p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
17870 static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
17871 PyVarObject_HEAD_INIT(0, 0)
17872 "PyClical.__pyx_scope_struct____iter__",
17873 sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__),
17875 __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__,
17879 #if PY_MAJOR_VERSION < 3
17894 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
17896 __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__,
17897 __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__,
17912 __pyx_tp_new_8PyClical___pyx_scope_struct____iter__,
17922 #if PY_VERSION_HEX >= 0x030400a1
17927 static PyMethodDef __pyx_methods[] = {
17928 {
"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
17929 {
"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
17930 {
"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
17931 {
"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
17932 {
"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
17933 {
"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
17934 {
"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
17935 {
"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
17936 {
"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
17937 {
"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
17938 {
"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
17939 {
"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
17940 {
"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
17941 {
"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
17942 {
"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
17943 {
"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
17944 {
"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
17945 {
"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
17946 {
"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
17947 {
"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
17948 {
"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
17949 {
"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
17950 {
"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
17951 {
"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
17952 {
"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
17953 {
"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
17954 {
"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
17955 {
"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
17956 {
"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
17957 {
"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
17958 {
"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
17959 {
"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
17960 {
"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
17961 {
"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
17962 {
"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
17963 {
"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
17964 {
"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
17965 {
"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
17966 {
"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
17970 #if PY_MAJOR_VERSION >= 3
17971 static struct PyModuleDef __pyx_moduledef = {
17972 #if PY_VERSION_HEX < 0x03020000
17973 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
17975 PyModuleDef_HEAD_INIT,
17988 static __Pyx_StringTabEntry __pyx_string_tab[] = {
17989 {&__pyx_kp_s_, __pyx_k_,
sizeof(__pyx_k_), 0, 0, 1, 0},
17990 {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2,
sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
17991 {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index,
sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
17992 {&__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},
17993 {&__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},
17994 {&__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},
17995 {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec,
sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
17996 {&__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},
17997 {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe,
sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
17998 {&__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},
17999 {&__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},
18000 {&__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},
18001 {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute,
sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18002 {&__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},
18003 {&__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},
18004 {&__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},
18005 {&__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},
18006 {&__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},
18007 {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto,
sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18008 {&__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},
18009 {&__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},
18010 {&__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},
18011 {&__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},
18012 {&__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},
18013 {&__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},
18014 {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif,
sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18015 {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford,
sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18016 {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers,
sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18017 {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2,
sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18018 {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor,
sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18019 {&__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},
18020 {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo,
sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18021 {&__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},
18022 {&__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},
18023 {&__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},
18024 {&__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},
18025 {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto,
sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18026 {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector,
sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18027 {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect,
sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18028 {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway,
sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18029 {&__pyx_n_s_IndexError, __pyx_k_IndexError,
sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18030 {&__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},
18031 {&__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},
18032 {&__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},
18033 {&__pyx_n_s_Integral, __pyx_k_Integral,
sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18034 {&__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},
18035 {&__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},
18036 {&__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},
18037 {&__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},
18038 {&__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},
18039 {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector,
sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18040 {&__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},
18041 {&__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},
18042 {&__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},
18043 {&__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},
18044 {&__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},
18045 {&__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},
18046 {&__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},
18047 {&__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},
18048 {&__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},
18049 {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto,
sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18050 {&__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},
18051 {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented,
sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18052 {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable,
sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18053 {&__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},
18054 {&__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},
18055 {&__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},
18056 {&__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},
18057 {&__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},
18058 {&__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},
18059 {&__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},
18060 {&__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},
18061 {&__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},
18062 {&__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},
18063 {&__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},
18064 {&__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},
18065 {&__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},
18066 {&__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},
18067 {&__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},
18068 {&__pyx_n_s_PyClical, __pyx_k_PyClical,
sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18069 {&__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},
18070 {&__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},
18071 {&__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},
18072 {&__pyx_n_s_Real, __pyx_k_Real,
sizeof(__pyx_k_Real), 0, 0, 1, 1},
18073 {&__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},
18074 {&__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},
18075 {&__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},
18076 {&__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},
18077 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError,
sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18078 {&__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},
18079 {&__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},
18080 {&__pyx_n_s_Sequence, __pyx_k_Sequence,
sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18081 {&__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},
18082 {&__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},
18083 {&__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},
18084 {&__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},
18085 {&__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},
18086 {&__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},
18087 {&__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},
18088 {&__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},
18089 {&__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},
18090 {&__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},
18091 {&__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},
18092 {&__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},
18093 {&__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},
18094 {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus,
sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18095 {&__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},
18096 {&__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},
18097 {&__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},
18098 {&__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},
18099 {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat,
sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18100 {&__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},
18101 {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat,
sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18102 {&__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},
18103 {&__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},
18104 {&__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},
18105 {&__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},
18106 {&__pyx_n_s_TypeError, __pyx_k_TypeError,
sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18107 {&__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},
18108 {&__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},
18109 {&__pyx_n_s_ValueError, __pyx_k_ValueError,
sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18110 {&__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},
18111 {&__pyx_kp_s__2, __pyx_k__2,
sizeof(__pyx_k__2), 0, 0, 1, 0},
18112 {&__pyx_kp_s__3, __pyx_k__3,
sizeof(__pyx_k__3), 0, 0, 1, 0},
18113 {&__pyx_kp_s__4, __pyx_k__4,
sizeof(__pyx_k__4), 0, 0, 1, 0},
18114 {&__pyx_kp_s__5, __pyx_k__5,
sizeof(__pyx_k__5), 0, 0, 1, 0},
18115 {&__pyx_kp_s__6, __pyx_k__6,
sizeof(__pyx_k__6), 0, 0, 1, 0},
18116 {&__pyx_kp_s__7, __pyx_k__7,
sizeof(__pyx_k__7), 0, 0, 1, 0},
18117 {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473,
sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18118 {&__pyx_n_s_acos, __pyx_k_acos,
sizeof(__pyx_k_acos), 0, 0, 1, 1},
18119 {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619,
sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18120 {&__pyx_n_s_acosh, __pyx_k_acosh,
sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18121 {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656,
sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18122 {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844,
sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18123 {&__pyx_n_s_args, __pyx_k_args,
sizeof(__pyx_k_args), 0, 0, 1, 1},
18124 {&__pyx_kp_s_as_frame, __pyx_k_as_frame,
sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18125 {&__pyx_n_s_asin, __pyx_k_asin,
sizeof(__pyx_k_asin), 0, 0, 1, 1},
18126 {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698,
sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18127 {&__pyx_n_s_asinh, __pyx_k_asinh,
sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18128 {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733,
sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18129 {&__pyx_n_s_atan, __pyx_k_atan,
sizeof(__pyx_k_atan), 0, 0, 1, 1},
18130 {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769,
sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18131 {&__pyx_n_s_atanh, __pyx_k_atanh,
sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18132 {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798,
sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18133 {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824,
sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18134 {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833,
sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18135 {&__pyx_n_s_cl, __pyx_k_cl,
sizeof(__pyx_k_cl), 0, 0, 1, 1},
18136 {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739,
sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18137 {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835,
sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18138 {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019,
sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18139 {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895,
sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18140 {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706,
sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18141 {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750,
sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18142 {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850,
sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18143 {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910,
sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18144 {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820,
sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18145 {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792,
sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18146 {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949,
sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18147 {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770,
sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18148 {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637,
sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18149 {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880,
sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18150 {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805,
sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18151 {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779,
sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18152 {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721,
sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18153 {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938,
sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18154 {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730,
sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18155 {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960,
sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18156 {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225,
sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18157 {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234,
sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18158 {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759,
sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18159 {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865,
sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18160 {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174,
sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18161 {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137,
sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18162 {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554,
sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18163 {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060,
sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18164 {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214,
sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18165 {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests,
sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18166 {&__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},
18167 {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925,
sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18168 {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106,
sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18169 {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205,
sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18170 {&__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},
18171 {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163,
sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18172 {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069,
sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18173 {&__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},
18174 {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979,
sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18175 {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049,
sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18176 {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152,
sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18177 {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648,
sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18178 {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122,
sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18179 {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038,
sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18180 {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194,
sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18181 {&__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},
18182 {&__pyx_n_s_close, __pyx_k_close,
sizeof(__pyx_k_close), 0, 0, 1, 1},
18183 {&__pyx_n_s_collections, __pyx_k_collections,
sizeof(__pyx_k_collections), 0, 0, 1, 1},
18184 {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490,
sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18185 {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527,
sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18186 {&__pyx_n_s_conj, __pyx_k_conj,
sizeof(__pyx_k_conj), 0, 0, 1, 1},
18187 {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436,
sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18188 {&__pyx_n_s_copy, __pyx_k_copy,
sizeof(__pyx_k_copy), 0, 0, 1, 1},
18189 {&__pyx_n_s_cos, __pyx_k_cos,
sizeof(__pyx_k_cos), 0, 0, 1, 1},
18190 {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602,
sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18191 {&__pyx_n_s_cosh, __pyx_k_cosh,
sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18192 {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640,
sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18193 {&__pyx_n_s_doctest, __pyx_k_doctest,
sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18194 {&__pyx_n_s_e, __pyx_k_e,
sizeof(__pyx_k_e), 0, 0, 1, 1},
18195 {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887,
sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18196 {&__pyx_n_s_even, __pyx_k_even,
sizeof(__pyx_k_even), 0, 0, 1, 1},
18197 {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388,
sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18198 {&__pyx_n_s_exp, __pyx_k_exp,
sizeof(__pyx_k_exp), 0, 0, 1, 1},
18199 {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565,
sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18200 {&__pyx_n_s_fill, __pyx_k_fill,
sizeof(__pyx_k_fill), 0, 0, 1, 1},
18201 {&__pyx_n_s_frm, __pyx_k_frm,
sizeof(__pyx_k_frm), 0, 0, 1, 1},
18202 {&__pyx_kp_s_from, __pyx_k_from,
sizeof(__pyx_k_from), 0, 0, 1, 0},
18203 {&__pyx_n_s_grade, __pyx_k_grade,
sizeof(__pyx_k_grade), 0, 0, 1, 1},
18204 {&__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},
18205 {&__pyx_n_s_i, __pyx_k_i,
sizeof(__pyx_k_i), 0, 0, 1, 1},
18206 {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366,
sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18207 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
18208 {&__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},
18209 {&__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},
18210 {&__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},
18211 {&__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},
18212 {&__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},
18213 {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter,
sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18214 {&__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},
18215 {&__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},
18216 {&__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},
18217 {&__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},
18218 {&__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},
18219 {&__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},
18220 {&__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},
18221 {&__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},
18222 {&__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},
18223 {&__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},
18224 {&__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},
18225 {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests,
sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18226 {&__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},
18227 {&__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},
18228 {&__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},
18229 {&__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},
18230 {&__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},
18231 {&__pyx_n_s_inv, __pyx_k_inv,
sizeof(__pyx_k_inv), 0, 0, 1, 1},
18232 {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329,
sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
18233 {&__pyx_kp_s_invalid, __pyx_k_invalid,
sizeof(__pyx_k_invalid), 0, 0, 1, 0},
18234 {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string,
sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
18235 {&__pyx_n_s_involute, __pyx_k_involute,
sizeof(__pyx_k_involute), 0, 0, 1, 1},
18236 {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406,
sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
18237 {&__pyx_n_s_ist, __pyx_k_ist,
sizeof(__pyx_k_ist), 0, 0, 1, 1},
18238 {&__pyx_n_s_istpq, __pyx_k_istpq,
sizeof(__pyx_k_istpq), 0, 0, 1, 1},
18239 {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900,
sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
18240 {&__pyx_n_s_iter, __pyx_k_iter,
sizeof(__pyx_k_iter), 0, 0, 1, 1},
18241 {&__pyx_n_s_ixt, __pyx_k_ixt,
sizeof(__pyx_k_ixt), 0, 0, 1, 1},
18242 {&__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},
18243 {&__pyx_n_s_lhs, __pyx_k_lhs,
sizeof(__pyx_k_lhs), 0, 0, 1, 1},
18244 {&__pyx_n_s_log, __pyx_k_log,
sizeof(__pyx_k_log), 0, 0, 1, 1},
18245 {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579,
sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
18246 {&__pyx_n_s_m, __pyx_k_m,
sizeof(__pyx_k_m), 0, 0, 1, 1},
18247 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
18248 {&__pyx_n_s_math, __pyx_k_math,
sizeof(__pyx_k_math), 0, 0, 1, 1},
18249 {&__pyx_n_s_max, __pyx_k_max,
sizeof(__pyx_k_max), 0, 0, 1, 1},
18250 {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482,
sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
18251 {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511,
sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
18252 {&__pyx_n_s_min, __pyx_k_min,
sizeof(__pyx_k_min), 0, 0, 1, 1},
18253 {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502,
sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
18254 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
18255 {&__pyx_n_s_nbar3, __pyx_k_nbar3,
sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
18256 {&__pyx_n_s_ninf3, __pyx_k_ninf3,
sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
18257 {&__pyx_n_s_norm, __pyx_k_norm,
sizeof(__pyx_k_norm), 0, 0, 1, 1},
18258 {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462,
sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
18259 {&__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},
18260 {&__pyx_n_s_numbers, __pyx_k_numbers,
sizeof(__pyx_k_numbers), 0, 0, 1, 1},
18261 {&__pyx_n_s_obj, __pyx_k_obj,
sizeof(__pyx_k_obj), 0, 0, 1, 1},
18262 {&__pyx_n_s_odd, __pyx_k_odd,
sizeof(__pyx_k_odd), 0, 0, 1, 1},
18263 {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397,
sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
18264 {&__pyx_n_s_other, __pyx_k_other,
sizeof(__pyx_k_other), 0, 0, 1, 1},
18265 {&__pyx_n_s_outer_pow, __pyx_k_outer_pow,
sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
18266 {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518,
sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
18267 {&__pyx_n_s_p, __pyx_k_p,
sizeof(__pyx_k_p), 0, 0, 1, 1},
18268 {&__pyx_n_s_pi, __pyx_k_pi,
sizeof(__pyx_k_pi), 0, 0, 1, 1},
18269 {&__pyx_n_s_pow, __pyx_k_pow,
sizeof(__pyx_k_pow), 0, 0, 1, 1},
18270 {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494,
sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
18271 {&__pyx_n_s_pure, __pyx_k_pure,
sizeof(__pyx_k_pure), 0, 0, 1, 1},
18272 {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377,
sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
18273 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable,
sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
18274 {&__pyx_n_s_q, __pyx_k_q,
sizeof(__pyx_k_q), 0, 0, 1, 1},
18275 {&__pyx_n_s_quad, __pyx_k_quad,
sizeof(__pyx_k_quad), 0, 0, 1, 1},
18276 {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451,
sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
18277 {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815,
sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
18278 {&__pyx_n_s_range, __pyx_k_range,
sizeof(__pyx_k_range), 0, 0, 1, 1},
18279 {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355,
sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
18280 {&__pyx_n_s_reverse, __pyx_k_reverse,
sizeof(__pyx_k_reverse), 0, 0, 1, 1},
18281 {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421,
sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
18282 {&__pyx_n_s_rhs, __pyx_k_rhs,
sizeof(__pyx_k_rhs), 0, 0, 1, 1},
18283 {&__pyx_n_s_scalar, __pyx_k_scalar,
sizeof(__pyx_k_scalar), 0, 0, 1, 1},
18284 {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344,
sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
18285 {&__pyx_n_s_send, __pyx_k_send,
sizeof(__pyx_k_send), 0, 0, 1, 1},
18286 {&__pyx_n_s_sin, __pyx_k_sin,
sizeof(__pyx_k_sin), 0, 0, 1, 1},
18287 {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679,
sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
18288 {&__pyx_n_s_sinh, __pyx_k_sinh,
sizeof(__pyx_k_sinh), 0, 0, 1, 1},
18289 {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719,
sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
18290 {&__pyx_n_s_sqrt, __pyx_k_sqrt,
sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
18291 {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542,
sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
18292 {&__pyx_n_s_tan, __pyx_k_tan,
sizeof(__pyx_k_tan), 0, 0, 1, 1},
18293 {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752,
sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
18294 {&__pyx_n_s_tanh, __pyx_k_tanh,
sizeof(__pyx_k_tanh), 0, 0, 1, 1},
18295 {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786,
sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
18296 {&__pyx_n_s_tau, __pyx_k_tau,
sizeof(__pyx_k_tau), 0, 0, 1, 1},
18297 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
18298 {&__pyx_n_s_test_2, __pyx_k_test_2,
sizeof(__pyx_k_test_2), 0, 0, 1, 1},
18299 {&__pyx_n_s_testmod, __pyx_k_testmod,
sizeof(__pyx_k_testmod), 0, 0, 1, 1},
18300 {&__pyx_n_s_throw, __pyx_k_throw,
sizeof(__pyx_k_throw), 0, 0, 1, 1},
18301 {&__pyx_kp_s_to_frame, __pyx_k_to_frame,
sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
18302 {&__pyx_kp_s_using, __pyx_k_using,
sizeof(__pyx_k_using), 0, 0, 1, 0},
18303 {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid,
sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
18304 {&__pyx_kp_s_value, __pyx_k_value,
sizeof(__pyx_k_value), 0, 0, 1, 0},
18305 {&__pyx_n_s_version, __pyx_k_version,
sizeof(__pyx_k_version), 0, 0, 1, 1},
18306 {&__pyx_n_s_xrange, __pyx_k_xrange,
sizeof(__pyx_k_xrange), 0, 0, 1, 1},
18307 {0, 0, 0, 0, 0, 0, 0}
18309 static int __Pyx_InitCachedBuiltins(
void) {
18310 __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;}
18311 __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;}
18312 __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;}
18313 __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;}
18314 __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;}
18315 __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;}
18316 #if PY_MAJOR_VERSION >= 3
18317 __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;}
18319 __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;}
18326 static int __Pyx_InitCachedConstants(
void) {
18327 __Pyx_RefNannyDeclarations
18328 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
18337 __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;}
18338 __Pyx_GOTREF(__pyx_tuple__8);
18339 __Pyx_GIVEREF(__pyx_tuple__8);
18348 __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;}
18349 __Pyx_GOTREF(__pyx_tuple__9);
18350 __Pyx_GIVEREF(__pyx_tuple__9);
18359 __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;}
18368 __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;}
18377 __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;}
18378 __Pyx_GOTREF(__pyx_tuple__12);
18379 __Pyx_GIVEREF(__pyx_tuple__12);
18388 __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;}
18389 __Pyx_GOTREF(__pyx_tuple__13);
18390 __Pyx_GIVEREF(__pyx_tuple__13);
18391 __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;}
18400 __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;}
18401 __Pyx_GOTREF(__pyx_tuple__15);
18402 __Pyx_GIVEREF(__pyx_tuple__15);
18403 __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;}
18412 __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;}
18413 __Pyx_GOTREF(__pyx_tuple__17);
18414 __Pyx_GIVEREF(__pyx_tuple__17);
18415 __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;}
18416 __Pyx_GOTREF(__pyx_tuple__18);
18417 __Pyx_GIVEREF(__pyx_tuple__18);
18426 __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;}
18427 __Pyx_GOTREF(__pyx_tuple__19);
18428 __Pyx_GIVEREF(__pyx_tuple__19);
18429 __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;}
18430 __Pyx_GOTREF(__pyx_tuple__20);
18431 __Pyx_GIVEREF(__pyx_tuple__20);
18440 __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;}
18441 __Pyx_GOTREF(__pyx_tuple__21);
18442 __Pyx_GIVEREF(__pyx_tuple__21);
18443 __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;}
18444 __Pyx_RefNannyFinishContext();
18447 __Pyx_RefNannyFinishContext();
18451 static int __Pyx_InitGlobals(
void) {
18452 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
18453 __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;}
18454 __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;}
18455 __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;}
18456 __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;}
18457 __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;}
18458 __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;}
18459 __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;}
18460 __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;}
18466 #if PY_MAJOR_VERSION < 3
18467 PyMODINIT_FUNC initPyClical(
void);
18468 PyMODINIT_FUNC initPyClical(
void)
18470 PyMODINIT_FUNC PyInit_PyClical(
void);
18471 PyMODINIT_FUNC PyInit_PyClical(
void)
18474 PyObject *__pyx_t_1 = NULL;
18475 PyObject *__pyx_t_2 = NULL;
18476 PyObject *__pyx_t_3 = NULL;
18478 int __pyx_lineno = 0;
18479 const char *__pyx_filename = NULL;
18480 int __pyx_clineno = 0;
18481 __Pyx_RefNannyDeclarations
18482 #if CYTHON_REFNANNY
18483 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
18484 if (!__Pyx_RefNanny) {
18486 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
18487 if (!__Pyx_RefNanny)
18488 Py_FatalError(
"failed to import 'refnanny' module");
18491 __Pyx_RefNannySetupContext(
"PyMODINIT_FUNC PyInit_PyClical(void)", 0);
18492 if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18493 __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;}
18494 __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;}
18495 #ifdef __Pyx_CyFunction_USED
18496 if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18498 #ifdef __Pyx_FusedFunction_USED
18499 if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18501 #ifdef __Pyx_Generator_USED
18502 if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18506 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
18508 PyEval_InitThreads();
18512 #if PY_MAJOR_VERSION < 3
18513 __pyx_m = Py_InitModule4(
"PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
18515 __pyx_m = PyModule_Create(&__pyx_moduledef);
18517 if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18518 __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;}
18519 Py_INCREF(__pyx_d);
18520 __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;}
18521 #if CYTHON_COMPILING_IN_PYPY
18522 Py_INCREF(__pyx_b);
18524 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
18526 if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18527 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
18528 if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18530 if (__pyx_module_is_main_PyClical) {
18531 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;};
18533 #if PY_MAJOR_VERSION >= 3
18535 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18536 if (!PyDict_GetItemString(modules,
"PyClical")) {
18537 if (unlikely(PyDict_SetItemString(modules,
"PyClical", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18542 if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18544 if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18549 __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
18550 __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet))__pyx_f_8PyClical_9index_set_wrap;
18551 __pyx_vtable_8PyClical_index_set.unwrap = (
IndexSet (*)(
struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
18552 __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
18553 if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18554 __pyx_type_8PyClical_index_set.tp_print = 0;
18555 #if CYTHON_COMPILING_IN_CPYTHON
18557 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;}
18558 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18559 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18560 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
18561 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
18565 #if CYTHON_COMPILING_IN_CPYTHON
18567 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;}
18568 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18569 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18570 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
18571 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
18575 #if CYTHON_COMPILING_IN_CPYTHON
18577 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;}
18578 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18579 __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18580 __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
18581 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
18585 #if CYTHON_COMPILING_IN_CPYTHON
18587 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;}
18588 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18589 __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18590 __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
18591 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
18595 #if CYTHON_COMPILING_IN_CPYTHON
18597 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;}
18598 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18599 __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18600 __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
18601 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
18605 #if CYTHON_COMPILING_IN_CPYTHON
18607 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;}
18608 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18609 __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18610 __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
18611 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
18615 #if CYTHON_COMPILING_IN_CPYTHON
18617 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;}
18618 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18619 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18620 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
18621 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
18625 #if CYTHON_COMPILING_IN_CPYTHON
18627 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;}
18628 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18629 __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18630 __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
18631 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
18635 #if CYTHON_COMPILING_IN_CPYTHON
18637 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;}
18638 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18639 __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18640 __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
18641 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
18645 #if CYTHON_COMPILING_IN_CPYTHON
18647 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;}
18648 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18649 __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18650 __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
18651 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
18655 #if CYTHON_COMPILING_IN_CPYTHON
18657 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;}
18658 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18659 __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18660 __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
18661 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
18665 #if CYTHON_COMPILING_IN_CPYTHON
18667 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;}
18668 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18669 __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18670 __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
18671 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
18675 #if CYTHON_COMPILING_IN_CPYTHON
18677 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;}
18678 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18679 __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18680 __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
18681 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
18685 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;}
18686 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;}
18687 __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
18688 __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
18689 __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
Clifford))__pyx_f_8PyClical_8clifford_wrap;
18690 __pyx_vtable_8PyClical_clifford.unwrap = (
Clifford (*)(
struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
18691 __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
18692 if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18693 __pyx_type_8PyClical_clifford.tp_print = 0;
18694 #if CYTHON_COMPILING_IN_CPYTHON
18696 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;}
18697 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18698 __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18699 __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
18700 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
18704 #if CYTHON_COMPILING_IN_CPYTHON
18706 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;}
18707 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18708 __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18709 __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
18710 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
18714 #if CYTHON_COMPILING_IN_CPYTHON
18716 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;}
18717 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18718 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18719 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
18720 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
18724 #if CYTHON_COMPILING_IN_CPYTHON
18726 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;}
18727 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18728 __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18729 __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
18730 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
18734 #if CYTHON_COMPILING_IN_CPYTHON
18736 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;}
18737 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18738 __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18739 __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
18740 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
18744 #if CYTHON_COMPILING_IN_CPYTHON
18746 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;}
18747 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18748 __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18749 __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
18750 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
18754 #if CYTHON_COMPILING_IN_CPYTHON
18756 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;}
18757 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18758 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18759 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
18760 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
18764 #if CYTHON_COMPILING_IN_CPYTHON
18766 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;}
18767 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18768 __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18769 __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
18770 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
18774 #if CYTHON_COMPILING_IN_CPYTHON
18776 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;}
18777 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18778 __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18779 __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
18780 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
18784 #if CYTHON_COMPILING_IN_CPYTHON
18786 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;}
18787 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18788 __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18789 __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
18790 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
18794 #if CYTHON_COMPILING_IN_CPYTHON
18796 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;}
18797 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18798 __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18799 __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
18800 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
18804 #if CYTHON_COMPILING_IN_CPYTHON
18806 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;}
18807 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18808 __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18809 __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
18810 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
18814 #if CYTHON_COMPILING_IN_CPYTHON
18816 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;}
18817 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18818 __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18819 __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
18820 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
18824 #if CYTHON_COMPILING_IN_CPYTHON
18826 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;}
18827 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18828 __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18829 __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
18830 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
18834 #if CYTHON_COMPILING_IN_CPYTHON
18836 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;}
18837 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18838 __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18839 __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
18840 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
18844 #if CYTHON_COMPILING_IN_CPYTHON
18846 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;}
18847 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18848 __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18849 __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
18850 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
18854 #if CYTHON_COMPILING_IN_CPYTHON
18856 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;}
18857 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18858 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18859 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
18860 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
18864 #if PY_MAJOR_VERSION < 3
18865 #if CYTHON_COMPILING_IN_CPYTHON
18867 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;}
18868 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18869 __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18870 __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
18871 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
18876 #if PY_MAJOR_VERSION < 3
18877 #if CYTHON_COMPILING_IN_CPYTHON
18879 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;}
18880 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18881 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18882 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
18883 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
18888 #if CYTHON_COMPILING_IN_CPYTHON
18890 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;}
18891 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18892 __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18893 __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
18894 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
18898 #if CYTHON_COMPILING_IN_CPYTHON
18900 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;}
18901 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18902 __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18903 __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
18904 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
18908 #if CYTHON_COMPILING_IN_CPYTHON
18910 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;}
18911 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18912 __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18913 __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
18914 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
18918 #if CYTHON_COMPILING_IN_CPYTHON
18920 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;}
18921 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18922 __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18923 __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
18924 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
18928 #if CYTHON_COMPILING_IN_CPYTHON
18930 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;}
18931 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18932 __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18933 __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
18934 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
18938 #if CYTHON_COMPILING_IN_CPYTHON
18940 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;}
18941 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18942 __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18943 __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
18944 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
18948 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;}
18949 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;}
18950 __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
18951 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;}
18952 __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
18953 __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
18966 __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;}
18967 __Pyx_GOTREF(__pyx_t_1);
18968 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;}
18969 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18978 __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;}
18979 __Pyx_GOTREF(__pyx_t_1);
18980 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;}
18981 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18990 __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;}
18991 __Pyx_GOTREF(__pyx_t_1);
18992 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;}
18993 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19002 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;}
19011 __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;}
19012 __Pyx_GOTREF(__pyx_t_1);
19013 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;}
19014 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19023 __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;}
19024 __Pyx_GOTREF(__pyx_t_1);
19025 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;}
19026 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19035 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((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;}
19036 __Pyx_GOTREF(__pyx_t_1);
19037 __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;}
19038 __Pyx_GOTREF(__pyx_t_2);
19039 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19040 __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;}
19041 __Pyx_GOTREF(__pyx_t_1);
19042 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19043 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;}
19044 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19053 __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;}
19054 __Pyx_GOTREF(__pyx_t_1);
19055 __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_float_2_0);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19056 __Pyx_GOTREF(__pyx_t_2);
19057 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19058 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;}
19059 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19068 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19077 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
19086 __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;}
19087 __Pyx_GOTREF(__pyx_t_2);
19088 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;}
19089 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19098 __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;}
19099 __Pyx_GOTREF(__pyx_t_2);
19100 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;}
19101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19110 __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;}
19111 __Pyx_GOTREF(__pyx_t_2);
19112 __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;}
19113 __Pyx_GOTREF(__pyx_t_1);
19114 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19115 __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;}
19116 __Pyx_GOTREF(__pyx_t_2);
19117 __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;}
19118 __Pyx_GOTREF(__pyx_t_3);
19119 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19120 __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;}
19121 __Pyx_GOTREF(__pyx_t_2);
19122 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19123 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19124 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;}
19125 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19134 __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;}
19135 __Pyx_GOTREF(__pyx_t_2);
19136 __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;}
19137 __Pyx_GOTREF(__pyx_t_3);
19138 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19139 __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;}
19140 __Pyx_GOTREF(__pyx_t_2);
19141 __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;}
19142 __Pyx_GOTREF(__pyx_t_1);
19143 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19144 __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;}
19145 __Pyx_GOTREF(__pyx_t_2);
19146 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19147 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19148 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;}
19149 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19158 __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;}
19159 __Pyx_GOTREF(__pyx_t_2);
19160 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;}
19161 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19169 __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;}
19170 __Pyx_GOTREF(__pyx_t_2);
19171 __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;}
19172 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19180 __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;}
19181 __Pyx_GOTREF(__pyx_t_1);
19183 if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
19184 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
19185 if (likely(__pyx_t_3)) {
19186 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
19187 __Pyx_INCREF(__pyx_t_3);
19188 __Pyx_INCREF(
function);
19189 __Pyx_DECREF_SET(__pyx_t_1,
function);
19193 __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;}
19194 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19196 __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;}
19198 __Pyx_GOTREF(__pyx_t_2);
19199 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19200 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19210 __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;}
19211 __Pyx_GOTREF(__pyx_t_2);
19212 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;}
19213 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;}
19214 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;}
19215 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;}
19216 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;}
19217 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;}
19218 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;}
19219 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;}
19220 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;}
19221 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;}
19222 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;}
19223 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;}
19224 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;}
19225 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;}
19226 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;}
19227 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;}
19228 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;}
19229 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;}
19230 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;}
19231 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;}
19232 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;}
19233 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;}
19234 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;}
19235 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;}
19236 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;}
19237 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;}
19238 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;}
19239 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;}
19240 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;}
19241 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;}
19242 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;}
19243 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;}
19244 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;}
19245 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;}
19246 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;}
19247 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;}
19248 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;}
19249 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;}
19250 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;}
19251 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;}
19252 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;}
19253 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;}
19254 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;}
19255 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;}
19256 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;}
19257 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;}
19258 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;}
19259 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;}
19260 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;}
19261 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;}
19262 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;}
19263 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;}
19264 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;}
19265 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;}
19266 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;}
19267 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;}
19268 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;}
19269 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;}
19270 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;}
19271 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;}
19272 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;}
19273 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;}
19274 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;}
19275 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;}
19276 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;}
19277 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;}
19278 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;}
19279 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;}
19280 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;}
19281 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;}
19282 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;}
19283 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;}
19284 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;}
19285 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;}
19286 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;}
19287 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;}
19288 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;}
19289 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;}
19290 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;}
19291 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;}
19292 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;}
19293 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;}
19294 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;}
19295 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;}
19296 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;}
19297 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;}
19298 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;}
19299 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;}
19300 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;}
19301 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;}
19302 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;}
19303 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;}
19304 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;}
19305 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;}
19306 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;}
19307 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;}
19308 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;}
19309 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;}
19310 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;}
19311 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;}
19312 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;}
19313 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;}
19314 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;}
19315 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;}
19316 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;}
19317 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;}
19318 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;}
19319 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;}
19320 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19326 __Pyx_XDECREF(__pyx_t_1);
19327 __Pyx_XDECREF(__pyx_t_2);
19328 __Pyx_XDECREF(__pyx_t_3);
19331 __Pyx_AddTraceback(
"init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
19332 Py_DECREF(__pyx_d); __pyx_d = 0;
19334 Py_DECREF(__pyx_m); __pyx_m = 0;
19335 }
else if (!PyErr_Occurred()) {
19336 PyErr_SetString(PyExc_ImportError,
"init PyClical");
19339 __Pyx_RefNannyFinishContext();
19340 #if PY_MAJOR_VERSION < 3
19348 #if CYTHON_REFNANNY
19349 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
19350 PyObject *m = NULL, *p = NULL;
19352 m = PyImport_ImportModule((
char *)modname);
19354 p = PyObject_GetAttrString(m, (
char *)
"RefNannyAPI");
19356 r = PyLong_AsVoidPtr(p);
19360 return (__Pyx_RefNannyAPIStruct *)r;
19364 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
19365 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
19366 if (unlikely(!result)) {
19367 PyErr_Format(PyExc_NameError,
19368 #
if PY_MAJOR_VERSION >= 3
19369 "name '%U' is not defined", name);
19371 "name '%.200s' is not defined", PyString_AS_STRING(name));
19377 #if CYTHON_COMPILING_IN_CPYTHON
19378 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
19380 ternaryfunc call = func->ob_type->tp_call;
19381 if (unlikely(!call))
19382 return PyObject_Call(func, arg, kw);
19383 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
19385 result = (*call)(func, arg, kw);
19386 Py_LeaveRecursiveCall();
19387 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
19390 "NULL result without error in PyObject_Call");
19396 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
19397 #if CYTHON_COMPILING_IN_CPYTHON
19398 PyObject *tmp_type, *tmp_value, *tmp_tb;
19399 PyThreadState *tstate = PyThreadState_GET();
19400 tmp_type = tstate->curexc_type;
19401 tmp_value = tstate->curexc_value;
19402 tmp_tb = tstate->curexc_traceback;
19403 tstate->curexc_type = type;
19404 tstate->curexc_value = value;
19405 tstate->curexc_traceback = tb;
19406 Py_XDECREF(tmp_type);
19407 Py_XDECREF(tmp_value);
19408 Py_XDECREF(tmp_tb);
19410 PyErr_Restore(type, value, tb);
19413 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
19414 #if CYTHON_COMPILING_IN_CPYTHON
19415 PyThreadState *tstate = PyThreadState_GET();
19416 *type = tstate->curexc_type;
19417 *value = tstate->curexc_value;
19418 *tb = tstate->curexc_traceback;
19419 tstate->curexc_type = 0;
19420 tstate->curexc_value = 0;
19421 tstate->curexc_traceback = 0;
19423 PyErr_Fetch(type, value, tb);
19427 static void __Pyx_WriteUnraisable(
const char *name, CYTHON_UNUSED
int clineno,
19428 CYTHON_UNUSED
int lineno, CYTHON_UNUSED
const char *filename,
19429 int full_traceback) {
19430 PyObject *old_exc, *old_val, *old_tb;
19432 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
19433 if (full_traceback) {
19434 Py_XINCREF(old_exc);
19435 Py_XINCREF(old_val);
19436 Py_XINCREF(old_tb);
19437 __Pyx_ErrRestore(old_exc, old_val, old_tb);
19440 #if PY_MAJOR_VERSION < 3
19441 ctx = PyString_FromString(name);
19443 ctx = PyUnicode_FromString(name);
19445 __Pyx_ErrRestore(old_exc, old_val, old_tb);
19447 PyErr_WriteUnraisable(Py_None);
19449 PyErr_WriteUnraisable(ctx);
19454 #if CYTHON_COMPILING_IN_CPYTHON
19455 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
19456 PyObject *
self, *result;
19458 cfunc = PyCFunction_GET_FUNCTION(func);
19459 self = PyCFunction_GET_SELF(func);
19460 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
19462 result = cfunc(
self, arg);
19463 Py_LeaveRecursiveCall();
19464 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
19467 "NULL result without error in PyObject_Call");
19473 #if CYTHON_COMPILING_IN_CPYTHON
19474 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
19476 PyObject *args = PyTuple_New(1);
19477 if (unlikely(!args))
return NULL;
19479 PyTuple_SET_ITEM(args, 0, arg);
19480 result = __Pyx_PyObject_Call(func, args, NULL);
19484 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
19485 #ifdef __Pyx_CyFunction_USED
19486 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
19488 if (likely(PyCFunction_Check(func))) {
19490 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
19491 return __Pyx_PyObject_CallMethO(func, arg);
19494 return __Pyx__PyObject_CallOneArg(func, arg);
19497 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
19498 PyObject* args = PyTuple_Pack(1, arg);
19499 return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
19503 #if CYTHON_COMPILING_IN_CPYTHON
19504 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
19505 #ifdef __Pyx_CyFunction_USED
19506 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
19508 if (likely(PyCFunction_Check(func))) {
19510 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
19511 return __Pyx_PyObject_CallMethO(func, NULL);
19514 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
19518 static void __Pyx_RaiseDoubleKeywordsError(
19519 const char* func_name,
19522 PyErr_Format(PyExc_TypeError,
19523 #
if PY_MAJOR_VERSION >= 3
19524 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
19526 "%s() got multiple values for keyword argument '%s'", func_name,
19527 PyString_AsString(kw_name));
19531 static int __Pyx_ParseOptionalKeywords(
19533 PyObject **argnames[],
19535 PyObject *values[],
19536 Py_ssize_t num_pos_args,
19537 const char* function_name)
19539 PyObject *key = 0, *value = 0;
19540 Py_ssize_t pos = 0;
19542 PyObject*** first_kw_arg = argnames + num_pos_args;
19543 while (PyDict_Next(kwds, &pos, &key, &value)) {
19544 name = first_kw_arg;
19545 while (*name && (**name != key)) name++;
19547 values[name-argnames] = value;
19550 name = first_kw_arg;
19551 #if PY_MAJOR_VERSION < 3
19552 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
19554 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
19555 && _PyString_Eq(**name, key)) {
19556 values[name-argnames] = value;
19561 if (*name)
continue;
19563 PyObject*** argname = argnames;
19564 while (argname != first_kw_arg) {
19565 if ((**argname == key) || (
19566 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
19567 && _PyString_Eq(**argname, key))) {
19568 goto arg_passed_twice;
19575 if (likely(PyUnicode_Check(key))) {
19577 int cmp = (**name == key) ? 0 :
19578 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
19579 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
19581 PyUnicode_Compare(**name, key);
19582 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
19584 values[name-argnames] = value;
19589 if (*name)
continue;
19591 PyObject*** argname = argnames;
19592 while (argname != first_kw_arg) {
19593 int cmp = (**argname == key) ? 0 :
19594 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
19595 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
19597 PyUnicode_Compare(**argname, key);
19598 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
19599 if (cmp == 0)
goto arg_passed_twice;
19604 goto invalid_keyword_type;
19606 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
19608 goto invalid_keyword;
19613 __Pyx_RaiseDoubleKeywordsError(function_name, key);
19615 invalid_keyword_type:
19616 PyErr_Format(PyExc_TypeError,
19617 "%.200s() keywords must be strings", function_name);
19620 PyErr_Format(PyExc_TypeError,
19621 #
if PY_MAJOR_VERSION < 3
19622 "%.200s() got an unexpected keyword argument '%.200s'",
19623 function_name, PyString_AsString(key));
19625 "%s() got an unexpected keyword argument '%U'",
19626 function_name, key);
19632 static void __Pyx_RaiseArgtupleInvalid(
19633 const char* func_name,
19635 Py_ssize_t num_min,
19636 Py_ssize_t num_max,
19637 Py_ssize_t num_found)
19639 Py_ssize_t num_expected;
19640 const char *more_or_less;
19641 if (num_found < num_min) {
19642 num_expected = num_min;
19643 more_or_less =
"at least";
19645 num_expected = num_max;
19646 more_or_less =
"at most";
19649 more_or_less =
"exactly";
19651 PyErr_Format(PyExc_TypeError,
19652 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
19653 func_name, more_or_less, num_expected,
19654 (num_expected == 1) ?
"" :
"s", num_found);
19657 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
19659 #if CYTHON_COMPILING_IN_CPYTHON
19660 result = PyDict_GetItem(__pyx_d, name);
19661 if (likely(result)) {
19665 result = PyObject_GetItem(__pyx_d, name);
19669 result = __Pyx_GetBuiltinName(name);
19674 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
19675 #if CYTHON_COMPILING_IN_CPYTHON
19676 PyThreadState *tstate = PyThreadState_GET();
19677 *type = tstate->exc_type;
19678 *value = tstate->exc_value;
19679 *tb = tstate->exc_traceback;
19681 Py_XINCREF(*value);
19684 PyErr_GetExcInfo(type, value, tb);
19687 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
19688 #if CYTHON_COMPILING_IN_CPYTHON
19689 PyObject *tmp_type, *tmp_value, *tmp_tb;
19690 PyThreadState *tstate = PyThreadState_GET();
19691 tmp_type = tstate->exc_type;
19692 tmp_value = tstate->exc_value;
19693 tmp_tb = tstate->exc_traceback;
19694 tstate->exc_type = type;
19695 tstate->exc_value = value;
19696 tstate->exc_traceback = tb;
19697 Py_XDECREF(tmp_type);
19698 Py_XDECREF(tmp_value);
19699 Py_XDECREF(tmp_tb);
19701 PyErr_SetExcInfo(type, value, tb);
19705 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
19706 PyObject *local_type, *local_value, *local_tb;
19707 #if CYTHON_COMPILING_IN_CPYTHON
19708 PyObject *tmp_type, *tmp_value, *tmp_tb;
19709 PyThreadState *tstate = PyThreadState_GET();
19710 local_type = tstate->curexc_type;
19711 local_value = tstate->curexc_value;
19712 local_tb = tstate->curexc_traceback;
19713 tstate->curexc_type = 0;
19714 tstate->curexc_value = 0;
19715 tstate->curexc_traceback = 0;
19717 PyErr_Fetch(&local_type, &local_value, &local_tb);
19719 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
19720 #if CYTHON_COMPILING_IN_CPYTHON
19721 if (unlikely(tstate->curexc_type))
19723 if (unlikely(PyErr_Occurred()))
19726 #if PY_MAJOR_VERSION >= 3
19728 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
19732 Py_XINCREF(local_tb);
19733 Py_XINCREF(local_type);
19734 Py_XINCREF(local_value);
19735 *type = local_type;
19736 *value = local_value;
19738 #if CYTHON_COMPILING_IN_CPYTHON
19739 tmp_type = tstate->exc_type;
19740 tmp_value = tstate->exc_value;
19741 tmp_tb = tstate->exc_traceback;
19742 tstate->exc_type = local_type;
19743 tstate->exc_value = local_value;
19744 tstate->exc_traceback = local_tb;
19745 Py_XDECREF(tmp_type);
19746 Py_XDECREF(tmp_value);
19747 Py_XDECREF(tmp_tb);
19749 PyErr_SetExcInfo(local_type, local_value, local_tb);
19756 Py_XDECREF(local_type);
19757 Py_XDECREF(local_value);
19758 Py_XDECREF(local_tb);
19762 #if PY_MAJOR_VERSION < 3
19763 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
19764 CYTHON_UNUSED PyObject *cause) {
19766 if (!value || value == Py_None)
19770 if (!tb || tb == Py_None)
19774 if (!PyTraceBack_Check(tb)) {
19775 PyErr_SetString(PyExc_TypeError,
19776 "raise: arg 3 must be a traceback or None");
19780 if (PyType_Check(type)) {
19781 #if CYTHON_COMPILING_IN_PYPY
19783 Py_INCREF(Py_None);
19787 PyErr_NormalizeException(&type, &value, &tb);
19790 PyErr_SetString(PyExc_TypeError,
19791 "instance exception may not have a separate value");
19795 type = (PyObject*) Py_TYPE(type);
19797 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
19798 PyErr_SetString(PyExc_TypeError,
19799 "raise: exception class must be a subclass of BaseException");
19803 __Pyx_ErrRestore(type, value, tb);
19812 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
19813 PyObject* owned_instance = NULL;
19814 if (tb == Py_None) {
19816 }
else if (tb && !PyTraceBack_Check(tb)) {
19817 PyErr_SetString(PyExc_TypeError,
19818 "raise: arg 3 must be a traceback or None");
19821 if (value == Py_None)
19823 if (PyExceptionInstance_Check(type)) {
19825 PyErr_SetString(PyExc_TypeError,
19826 "instance exception may not have a separate value");
19830 type = (PyObject*) Py_TYPE(value);
19831 }
else if (PyExceptionClass_Check(type)) {
19832 PyObject *instance_class = NULL;
19833 if (value && PyExceptionInstance_Check(value)) {
19834 instance_class = (PyObject*) Py_TYPE(value);
19835 if (instance_class != type) {
19836 if (PyObject_IsSubclass(instance_class, type)) {
19837 type = instance_class;
19839 instance_class = NULL;
19843 if (!instance_class) {
19846 args = PyTuple_New(0);
19847 else if (PyTuple_Check(value)) {
19851 args = PyTuple_Pack(1, value);
19854 owned_instance = PyObject_Call(type, args, NULL);
19856 if (!owned_instance)
19858 value = owned_instance;
19859 if (!PyExceptionInstance_Check(value)) {
19860 PyErr_Format(PyExc_TypeError,
19861 "calling %R should have returned an instance of "
19862 "BaseException, not %R",
19863 type, Py_TYPE(value));
19868 PyErr_SetString(PyExc_TypeError,
19869 "raise: exception class must be a subclass of BaseException");
19872 #if PY_VERSION_HEX >= 0x03030000
19875 if (cause && cause != Py_None) {
19877 PyObject *fixed_cause;
19878 if (cause == Py_None) {
19879 fixed_cause = NULL;
19880 }
else if (PyExceptionClass_Check(cause)) {
19881 fixed_cause = PyObject_CallObject(cause, NULL);
19882 if (fixed_cause == NULL)
19884 }
else if (PyExceptionInstance_Check(cause)) {
19885 fixed_cause = cause;
19886 Py_INCREF(fixed_cause);
19888 PyErr_SetString(PyExc_TypeError,
19889 "exception causes must derive from "
19893 PyException_SetCause(value, fixed_cause);
19895 PyErr_SetObject(type, value);
19897 PyThreadState *tstate = PyThreadState_GET();
19898 PyObject* tmp_tb = tstate->curexc_traceback;
19899 if (tb != tmp_tb) {
19901 tstate->curexc_traceback = tb;
19902 Py_XDECREF(tmp_tb);
19906 Py_XDECREF(owned_instance);
19911 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
19914 r = PyObject_SetItem(o, j, v);
19918 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
19919 int is_list,
int wraparound,
int boundscheck) {
19920 #if CYTHON_COMPILING_IN_CPYTHON
19921 if (is_list || PyList_CheckExact(o)) {
19922 Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
19923 if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
19924 PyObject* old = PyList_GET_ITEM(o, n);
19926 PyList_SET_ITEM(o, n, v);
19931 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
19932 if (likely(m && m->sq_ass_item)) {
19933 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
19934 Py_ssize_t l = m->sq_length(o);
19935 if (likely(l >= 0)) {
19938 if (PyErr_ExceptionMatches(PyExc_OverflowError))
19944 return m->sq_ass_item(o, i, v);
19948 #if CYTHON_COMPILING_IN_PYPY
19949 if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
19951 if (is_list || PySequence_Check(o)) {
19953 return PySequence_SetItem(o, i, v);
19956 return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
19959 static void __Pyx_RaiseArgumentTypeInvalid(
const char* name, PyObject *obj, PyTypeObject *type) {
19960 PyErr_Format(PyExc_TypeError,
19961 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
19962 name, type->tp_name, Py_TYPE(obj)->tp_name);
19964 static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
19965 const char *name,
int exact)
19967 if (unlikely(!type)) {
19968 PyErr_SetString(PyExc_SystemError,
"Missing type object");
19971 if (none_allowed && obj == Py_None)
return 1;
19973 if (likely(Py_TYPE(obj) == type))
return 1;
19974 #if PY_MAJOR_VERSION == 2
19975 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj)))
return 1;
19979 if (likely(PyObject_TypeCheck(obj, type)))
return 1;
19981 __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
19985 static int __Pyx_SetVtable(PyObject *dict,
void *vtable) {
19986 #if PY_VERSION_HEX >= 0x02070000
19987 PyObject *ob = PyCapsule_New(vtable, 0, 0);
19989 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
19993 if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
20002 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals) {
20003 #if CYTHON_COMPILING_IN_PYPY
20004 return PyObject_RichCompareBool(s1, s2, equals);
20007 return (equals == Py_EQ);
20008 }
else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
20009 const char *ps1, *ps2;
20010 Py_ssize_t length = PyBytes_GET_SIZE(s1);
20011 if (length != PyBytes_GET_SIZE(s2))
20012 return (equals == Py_NE);
20013 ps1 = PyBytes_AS_STRING(s1);
20014 ps2 = PyBytes_AS_STRING(s2);
20015 if (ps1[0] != ps2[0]) {
20016 return (equals == Py_NE);
20017 }
else if (length == 1) {
20018 return (equals == Py_EQ);
20020 int result = memcmp(ps1, ps2, (
size_t)length);
20021 return (equals == Py_EQ) ? (result == 0) : (result != 0);
20023 }
else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
20024 return (equals == Py_NE);
20025 }
else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
20026 return (equals == Py_NE);
20029 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
20032 result = __Pyx_PyObject_IsTrue(py_result);
20033 Py_DECREF(py_result);
20039 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals) {
20040 #if CYTHON_COMPILING_IN_PYPY
20041 return PyObject_RichCompareBool(s1, s2, equals);
20043 #if PY_MAJOR_VERSION < 3
20044 PyObject* owned_ref = NULL;
20046 int s1_is_unicode, s2_is_unicode;
20050 s1_is_unicode = PyUnicode_CheckExact(s1);
20051 s2_is_unicode = PyUnicode_CheckExact(s2);
20052 #if PY_MAJOR_VERSION < 3
20053 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
20054 owned_ref = PyUnicode_FromObject(s2);
20055 if (unlikely(!owned_ref))
20059 }
else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
20060 owned_ref = PyUnicode_FromObject(s1);
20061 if (unlikely(!owned_ref))
20065 }
else if (((!s2_is_unicode) & (!s1_is_unicode))) {
20066 return __Pyx_PyBytes_Equals(s1, s2, equals);
20069 if (s1_is_unicode & s2_is_unicode) {
20072 void *data1, *data2;
20073 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
20075 length = __Pyx_PyUnicode_GET_LENGTH(s1);
20076 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
20079 kind = __Pyx_PyUnicode_KIND(s1);
20080 if (kind != __Pyx_PyUnicode_KIND(s2)) {
20083 data1 = __Pyx_PyUnicode_DATA(s1);
20084 data2 = __Pyx_PyUnicode_DATA(s2);
20085 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
20087 }
else if (length == 1) {
20090 int result = memcmp(data1, data2, (
size_t)(length * kind));
20091 #if PY_MAJOR_VERSION < 3
20092 Py_XDECREF(owned_ref);
20094 return (equals == Py_EQ) ? (result == 0) : (result != 0);
20096 }
else if ((s1 == Py_None) & s2_is_unicode) {
20098 }
else if ((s2 == Py_None) & s1_is_unicode) {
20102 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
20105 result = __Pyx_PyObject_IsTrue(py_result);
20106 Py_DECREF(py_result);
20110 #if PY_MAJOR_VERSION < 3
20111 Py_XDECREF(owned_ref);
20113 return (equals == Py_EQ);
20115 #if PY_MAJOR_VERSION < 3
20116 Py_XDECREF(owned_ref);
20118 return (equals == Py_NE);
20122 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
20123 int start = 0, mid = 0, end = count - 1;
20124 if (end >= 0 && code_line > entries[end].code_line) {
20127 while (start < end) {
20128 mid = (start + end) / 2;
20129 if (code_line < entries[mid].code_line) {
20131 }
else if (code_line > entries[mid].code_line) {
20137 if (code_line <= entries[mid].code_line) {
20143 static PyCodeObject *__pyx_find_code_object(
int code_line) {
20144 PyCodeObject* code_object;
20146 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
20149 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
20150 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
20153 code_object = __pyx_code_cache.entries[pos].code_object;
20154 Py_INCREF(code_object);
20155 return code_object;
20157 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
20159 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
20160 if (unlikely(!code_line)) {
20163 if (unlikely(!entries)) {
20164 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
20165 if (likely(entries)) {
20166 __pyx_code_cache.entries = entries;
20167 __pyx_code_cache.max_count = 64;
20168 __pyx_code_cache.count = 1;
20169 entries[0].code_line = code_line;
20170 entries[0].code_object = code_object;
20171 Py_INCREF(code_object);
20175 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
20176 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
20177 PyCodeObject* tmp = entries[pos].code_object;
20178 entries[pos].code_object = code_object;
20182 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
20183 int new_max = __pyx_code_cache.max_count + 64;
20184 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
20185 __pyx_code_cache.entries, (
size_t)new_max*
sizeof(__Pyx_CodeObjectCacheEntry));
20186 if (unlikely(!entries)) {
20189 __pyx_code_cache.entries = entries;
20190 __pyx_code_cache.max_count = new_max;
20192 for (i=__pyx_code_cache.count; i>pos; i--) {
20193 entries[i] = entries[i-1];
20195 entries[pos].code_line = code_line;
20196 entries[pos].code_object = code_object;
20197 __pyx_code_cache.count++;
20198 Py_INCREF(code_object);
20201 #include "compile.h"
20202 #include "frameobject.h"
20203 #include "traceback.h"
20204 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
20205 const char *funcname,
int c_line,
20206 int py_line,
const char *filename) {
20207 PyCodeObject *py_code = 0;
20208 PyObject *py_srcfile = 0;
20209 PyObject *py_funcname = 0;
20210 #if PY_MAJOR_VERSION < 3
20211 py_srcfile = PyString_FromString(filename);
20213 py_srcfile = PyUnicode_FromString(filename);
20215 if (!py_srcfile)
goto bad;
20217 #if PY_MAJOR_VERSION < 3
20218 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20220 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20224 #if PY_MAJOR_VERSION < 3
20225 py_funcname = PyString_FromString(funcname);
20227 py_funcname = PyUnicode_FromString(funcname);
20230 if (!py_funcname)
goto bad;
20231 py_code = __Pyx_PyCode_New(
20248 Py_DECREF(py_srcfile);
20249 Py_DECREF(py_funcname);
20252 Py_XDECREF(py_srcfile);
20253 Py_XDECREF(py_funcname);
20256 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
20257 int py_line,
const char *filename) {
20258 PyCodeObject *py_code = 0;
20259 PyFrameObject *py_frame = 0;
20260 py_code = __pyx_find_code_object(c_line ? c_line : py_line);
20262 py_code = __Pyx_CreateCodeObjectForTraceback(
20263 funcname, c_line, py_line, filename);
20264 if (!py_code)
goto bad;
20265 __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
20267 py_frame = PyFrame_New(
20268 PyThreadState_GET(),
20273 if (!py_frame)
goto bad;
20274 py_frame->f_lineno = py_line;
20275 PyTraceBack_Here(py_frame);
20277 Py_XDECREF(py_code);
20278 Py_XDECREF(py_frame);
20281 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
20282 PyObject *empty_list = 0;
20283 PyObject *module = 0;
20284 PyObject *global_dict = 0;
20285 PyObject *empty_dict = 0;
20287 #if PY_VERSION_HEX < 0x03030000
20288 PyObject *py_import;
20289 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
20296 empty_list = PyList_New(0);
20301 global_dict = PyModule_GetDict(__pyx_m);
20304 empty_dict = PyDict_New();
20308 #if PY_MAJOR_VERSION >= 3
20310 if (strchr(__Pyx_MODULE_NAME,
'.')) {
20311 #if PY_VERSION_HEX < 0x03030000
20312 PyObject *py_level = PyInt_FromLong(1);
20315 module = PyObject_CallFunctionObjArgs(py_import,
20316 name, global_dict, empty_dict, list, py_level, NULL);
20317 Py_DECREF(py_level);
20319 module = PyImport_ImportModuleLevelObject(
20320 name, global_dict, empty_dict, list, 1);
20323 if (!PyErr_ExceptionMatches(PyExc_ImportError))
20332 #if PY_VERSION_HEX < 0x03030000
20333 PyObject *py_level = PyInt_FromLong(level);
20336 module = PyObject_CallFunctionObjArgs(py_import,
20337 name, global_dict, empty_dict, list, py_level, NULL);
20338 Py_DECREF(py_level);
20340 module = PyImport_ImportModuleLevelObject(
20341 name, global_dict, empty_dict, list, level);
20346 #if PY_VERSION_HEX < 0x03030000
20347 Py_XDECREF(py_import);
20349 Py_XDECREF(empty_list);
20350 Py_XDECREF(empty_dict);
20354 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value) \
20356 func_type value = func_value; \
20357 if (sizeof(target_type) < sizeof(func_type)) { \
20358 if (unlikely(value != (func_type) (target_type) value)) { \
20359 func_type zero = 0; \
20360 if (is_unsigned && unlikely(value < zero)) \
20361 goto raise_neg_overflow; \
20363 goto raise_overflow; \
20366 return (target_type) value; \
20369 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20370 #if CYTHON_USE_PYLONG_INTERNALS
20371 #include "longintrepr.h"
20375 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
20376 const int neg_one = (int) -1, const_zero = 0;
20377 const int is_unsigned = neg_one > const_zero;
20378 #if PY_MAJOR_VERSION < 3
20379 if (likely(PyInt_Check(x))) {
20380 if (
sizeof(
int) <
sizeof(long)) {
20381 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
20383 long val = PyInt_AS_LONG(x);
20384 if (is_unsigned && unlikely(val < 0)) {
20385 goto raise_neg_overflow;
20391 if (likely(PyLong_Check(x))) {
20393 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20394 #if CYTHON_USE_PYLONG_INTERNALS
20395 switch (Py_SIZE(x)) {
20397 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, ((PyLongObject*)x)->ob_digit[0]);
20401 if (unlikely(Py_SIZE(x) < 0)) {
20402 goto raise_neg_overflow;
20404 if (
sizeof(
int) <=
sizeof(
unsigned long)) {
20405 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, PyLong_AsUnsignedLong(x))
20406 }
else if (
sizeof(
int) <=
sizeof(
unsigned long long)) {
20407 __PYX_VERIFY_RETURN_INT(
int,
unsigned long long, PyLong_AsUnsignedLongLong(x))
20410 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20411 #if CYTHON_USE_PYLONG_INTERNALS
20412 switch (Py_SIZE(x)) {
20414 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, +(((PyLongObject*)x)->ob_digit[0]));
20415 case -1: __PYX_VERIFY_RETURN_INT(
int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
20419 if (
sizeof(
int) <=
sizeof(
long)) {
20420 __PYX_VERIFY_RETURN_INT(
int,
long, PyLong_AsLong(x))
20421 }
else if (
sizeof(
int) <=
sizeof(
long long)) {
20422 __PYX_VERIFY_RETURN_INT(
int,
long long, PyLong_AsLongLong(x))
20426 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
20427 PyErr_SetString(PyExc_RuntimeError,
20428 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
20431 PyObject *v = __Pyx_PyNumber_Int(x);
20432 #if PY_MAJOR_VERSION < 3
20433 if (likely(v) && !PyLong_Check(v)) {
20435 v = PyNumber_Long(tmp);
20440 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
20441 unsigned char *bytes = (
unsigned char *)&val;
20442 int ret = _PyLong_AsByteArray((PyLongObject *)v,
20443 bytes,
sizeof(val),
20444 is_little, !is_unsigned);
20454 PyObject *tmp = __Pyx_PyNumber_Int(x);
20455 if (!tmp)
return (
int) -1;
20456 val = __Pyx_PyInt_As_int(tmp);
20461 PyErr_SetString(PyExc_OverflowError,
20462 "value too large to convert to int");
20464 raise_neg_overflow:
20465 PyErr_SetString(PyExc_OverflowError,
20466 "can't convert negative value to int");
20470 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
20471 const int neg_one = (int) -1, const_zero = 0;
20472 const int is_unsigned = neg_one > const_zero;
20474 if (
sizeof(
int) <
sizeof(long)) {
20475 return PyInt_FromLong((
long) value);
20476 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
20477 return PyLong_FromUnsignedLong((
unsigned long) value);
20478 }
else if (
sizeof(
int) <=
sizeof(
unsigned long long)) {
20479 return PyLong_FromUnsignedLongLong((
unsigned long long) value);
20482 if (
sizeof(
int) <=
sizeof(
long)) {
20483 return PyInt_FromLong((
long) value);
20484 }
else if (
sizeof(
int) <=
sizeof(
long long)) {
20485 return PyLong_FromLongLong((
long long) value);
20489 int one = 1;
int little = (int)*(
unsigned char *)&one;
20490 unsigned char *bytes = (
unsigned char *)&value;
20491 return _PyLong_FromByteArray(bytes,
sizeof(
int),
20492 little, !is_unsigned);
20496 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
20497 const long neg_one = (long) -1, const_zero = 0;
20498 const int is_unsigned = neg_one > const_zero;
20500 if (
sizeof(
long) <
sizeof(long)) {
20501 return PyInt_FromLong((
long) value);
20502 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
20503 return PyLong_FromUnsignedLong((
unsigned long) value);
20504 }
else if (
sizeof(
long) <=
sizeof(
unsigned long long)) {
20505 return PyLong_FromUnsignedLongLong((
unsigned long long) value);
20508 if (
sizeof(
long) <=
sizeof(
long)) {
20509 return PyInt_FromLong((
long) value);
20510 }
else if (
sizeof(
long) <=
sizeof(
long long)) {
20511 return PyLong_FromLongLong((
long long) value);
20515 int one = 1;
int little = (int)*(
unsigned char *)&one;
20516 unsigned char *bytes = (
unsigned char *)&value;
20517 return _PyLong_FromByteArray(bytes,
sizeof(
long),
20518 little, !is_unsigned);
20522 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
20523 const long neg_one = (long) -1, const_zero = 0;
20524 const int is_unsigned = neg_one > const_zero;
20525 #if PY_MAJOR_VERSION < 3
20526 if (likely(PyInt_Check(x))) {
20527 if (
sizeof(
long) <
sizeof(long)) {
20528 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
20530 long val = PyInt_AS_LONG(x);
20531 if (is_unsigned && unlikely(val < 0)) {
20532 goto raise_neg_overflow;
20538 if (likely(PyLong_Check(x))) {
20540 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20541 #if CYTHON_USE_PYLONG_INTERNALS
20542 switch (Py_SIZE(x)) {
20544 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, ((PyLongObject*)x)->ob_digit[0]);
20548 if (unlikely(Py_SIZE(x) < 0)) {
20549 goto raise_neg_overflow;
20551 if (
sizeof(
long) <=
sizeof(
unsigned long)) {
20552 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, PyLong_AsUnsignedLong(x))
20553 }
else if (
sizeof(
long) <=
sizeof(
unsigned long long)) {
20554 __PYX_VERIFY_RETURN_INT(
long,
unsigned long long, PyLong_AsUnsignedLongLong(x))
20557 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20558 #if CYTHON_USE_PYLONG_INTERNALS
20559 switch (Py_SIZE(x)) {
20561 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, +(((PyLongObject*)x)->ob_digit[0]));
20562 case -1: __PYX_VERIFY_RETURN_INT(
long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
20566 if (
sizeof(
long) <=
sizeof(
long)) {
20567 __PYX_VERIFY_RETURN_INT(
long,
long, PyLong_AsLong(x))
20568 }
else if (
sizeof(
long) <=
sizeof(
long long)) {
20569 __PYX_VERIFY_RETURN_INT(
long,
long long, PyLong_AsLongLong(x))
20573 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
20574 PyErr_SetString(PyExc_RuntimeError,
20575 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
20578 PyObject *v = __Pyx_PyNumber_Int(x);
20579 #if PY_MAJOR_VERSION < 3
20580 if (likely(v) && !PyLong_Check(v)) {
20582 v = PyNumber_Long(tmp);
20587 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
20588 unsigned char *bytes = (
unsigned char *)&val;
20589 int ret = _PyLong_AsByteArray((PyLongObject *)v,
20590 bytes,
sizeof(val),
20591 is_little, !is_unsigned);
20601 PyObject *tmp = __Pyx_PyNumber_Int(x);
20602 if (!tmp)
return (
long) -1;
20603 val = __Pyx_PyInt_As_long(tmp);
20608 PyErr_SetString(PyExc_OverflowError,
20609 "value too large to convert to long");
20611 raise_neg_overflow:
20612 PyErr_SetString(PyExc_OverflowError,
20613 "can't convert negative value to long");
20617 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
20618 PyObject* fake_module;
20619 PyTypeObject* cached_type = NULL;
20620 fake_module = PyImport_AddModule((
char*)
"_cython_" CYTHON_ABI);
20621 if (!fake_module)
return NULL;
20622 Py_INCREF(fake_module);
20623 cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
20625 if (!PyType_Check((PyObject*)cached_type)) {
20626 PyErr_Format(PyExc_TypeError,
20627 "Shared Cython type %.200s is not a type object",
20631 if (cached_type->tp_basicsize != type->tp_basicsize) {
20632 PyErr_Format(PyExc_TypeError,
20633 "Shared Cython type %.200s has the wrong size, try recompiling",
20638 if (!PyErr_ExceptionMatches(PyExc_AttributeError))
goto bad;
20640 if (PyType_Ready(type) < 0)
goto bad;
20641 if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
20644 cached_type = type;
20647 Py_DECREF(fake_module);
20648 return cached_type;
20650 Py_XDECREF(cached_type);
20651 cached_type = NULL;
20655 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
20656 PyObject *tmp_type, *tmp_value, *tmp_tb;
20657 #if CYTHON_COMPILING_IN_CPYTHON
20658 PyThreadState *tstate = PyThreadState_GET();
20659 tmp_type = tstate->exc_type;
20660 tmp_value = tstate->exc_value;
20661 tmp_tb = tstate->exc_traceback;
20662 tstate->exc_type = *type;
20663 tstate->exc_value = *value;
20664 tstate->exc_traceback = *tb;
20666 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
20667 PyErr_SetExcInfo(*type, *value, *tb);
20670 *value = tmp_value;
20674 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
20675 PyObject *method, *result = NULL;
20676 method = __Pyx_PyObject_GetAttrStr(obj, method_name);
20677 if (unlikely(!method))
goto bad;
20678 #if CYTHON_COMPILING_IN_CPYTHON
20679 if (likely(PyMethod_Check(method))) {
20680 PyObject *
self = PyMethod_GET_SELF(method);
20681 if (likely(
self)) {
20683 PyObject *
function = PyMethod_GET_FUNCTION(method);
20684 args = PyTuple_New(2);
20685 if (unlikely(!args))
goto bad;
20687 PyTuple_SET_ITEM(args, 0,
self);
20689 PyTuple_SET_ITEM(args, 1, arg);
20690 Py_INCREF(
function);
20691 Py_DECREF(method); method = NULL;
20692 result = __Pyx_PyObject_Call(
function, args, NULL);
20694 Py_DECREF(
function);
20699 result = __Pyx_PyObject_CallOneArg(method, arg);
20701 Py_XDECREF(method);
20705 static PyObject *__Pyx_Generator_Next(PyObject *
self);
20706 static PyObject *__Pyx_Generator_Send(PyObject *
self, PyObject *value);
20707 static PyObject *__Pyx_Generator_Close(PyObject *
self);
20708 static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
20709 static PyTypeObject *__pyx_GeneratorType = 0;
20710 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
20711 #define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
20712 #if 1 || PY_VERSION_HEX < 0x030300B0
20713 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
20714 PyObject *et, *ev, *tb;
20715 PyObject *value = NULL;
20716 __Pyx_ErrFetch(&et, &ev, &tb);
20720 Py_INCREF(Py_None);
20724 if (unlikely(et != PyExc_StopIteration) &&
20725 unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
20726 __Pyx_ErrRestore(et, ev, tb);
20729 if (likely(et == PyExc_StopIteration)) {
20730 if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
20732 Py_INCREF(Py_None);
20741 PyErr_NormalizeException(&et, &ev, &tb);
20742 if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
20743 __Pyx_ErrRestore(et, ev, tb);
20748 #if PY_VERSION_HEX >= 0x030300A0
20749 value = ((PyStopIterationObject *)ev)->value;
20754 PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
20756 if (likely(args)) {
20757 value = PyObject_GetItem(args, 0);
20760 if (unlikely(!value)) {
20761 __Pyx_ErrRestore(NULL, NULL, NULL);
20762 Py_INCREF(Py_None);
20771 static CYTHON_INLINE
20772 void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *
self) {
20773 PyObject *exc_type =
self->exc_type;
20774 PyObject *exc_value =
self->exc_value;
20775 PyObject *exc_traceback =
self->exc_traceback;
20776 self->exc_type = NULL;
20777 self->exc_value = NULL;
20778 self->exc_traceback = NULL;
20779 Py_XDECREF(exc_type);
20780 Py_XDECREF(exc_value);
20781 Py_XDECREF(exc_traceback);
20783 static CYTHON_INLINE
20784 int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
20785 if (unlikely(gen->is_running)) {
20786 PyErr_SetString(PyExc_ValueError,
20787 "generator already executing");
20792 static CYTHON_INLINE
20793 PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *
self, PyObject *value) {
20795 assert(!self->is_running);
20796 if (unlikely(self->resume_label == 0)) {
20797 if (unlikely(value && value != Py_None)) {
20798 PyErr_SetString(PyExc_TypeError,
20799 "can't send non-None value to a "
20800 "just-started generator");
20804 if (unlikely(self->resume_label == -1)) {
20805 PyErr_SetNone(PyExc_StopIteration);
20809 #if CYTHON_COMPILING_IN_PYPY
20811 if (self->exc_traceback) {
20812 PyThreadState *tstate = PyThreadState_GET();
20813 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
20814 PyFrameObject *f = tb->tb_frame;
20815 Py_XINCREF(tstate->frame);
20816 assert(f->f_back == NULL);
20817 f->f_back = tstate->frame;
20820 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
20821 &self->exc_traceback);
20823 __Pyx_Generator_ExceptionClear(
self);
20825 self->is_running = 1;
20826 retval =
self->body((PyObject *)
self, value);
20827 self->is_running = 0;
20829 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
20830 &self->exc_traceback);
20831 #if CYTHON_COMPILING_IN_PYPY
20833 if (self->exc_traceback) {
20834 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
20835 PyFrameObject *f = tb->tb_frame;
20836 Py_CLEAR(f->f_back);
20840 __Pyx_Generator_ExceptionClear(
self);
20844 static CYTHON_INLINE
20845 PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
20847 PyObject *val = NULL;
20848 __Pyx_Generator_Undelegate(gen);
20849 __Pyx_PyGen_FetchStopIterationValue(&val);
20850 ret = __Pyx_Generator_SendEx(gen, val);
20854 static PyObject *__Pyx_Generator_Next(PyObject *
self) {
20855 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*)
self;
20856 PyObject *yf = gen->yieldfrom;
20857 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20861 gen->is_running = 1;
20862 ret = Py_TYPE(yf)->tp_iternext(yf);
20863 gen->is_running = 0;
20867 return __Pyx_Generator_FinishDelegation(gen);
20869 return __Pyx_Generator_SendEx(gen, Py_None);
20871 static PyObject *__Pyx_Generator_Send(PyObject *
self, PyObject *value) {
20872 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*)
self;
20873 PyObject *yf = gen->yieldfrom;
20874 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20878 gen->is_running = 1;
20879 if (__Pyx_Generator_CheckExact(yf)) {
20880 ret = __Pyx_Generator_Send(yf, value);
20882 if (value == Py_None)
20883 ret = PyIter_Next(yf);
20885 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
20887 gen->is_running = 0;
20891 return __Pyx_Generator_FinishDelegation(gen);
20893 return __Pyx_Generator_SendEx(gen, value);
20895 static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
20896 PyObject *retval = NULL;
20898 if (__Pyx_Generator_CheckExact(yf)) {
20899 retval = __Pyx_Generator_Close(yf);
20904 gen->is_running = 1;
20905 meth = PyObject_GetAttr(yf, __pyx_n_s_close);
20906 if (unlikely(!meth)) {
20907 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
20908 PyErr_WriteUnraisable(yf);
20912 retval = PyObject_CallFunction(meth, NULL);
20917 gen->is_running = 0;
20919 Py_XDECREF(retval);
20922 static PyObject *__Pyx_Generator_Close(PyObject *
self) {
20923 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
20924 PyObject *retval, *raised_exception;
20925 PyObject *yf = gen->yieldfrom;
20927 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20931 err = __Pyx_Generator_CloseIter(gen, yf);
20932 __Pyx_Generator_Undelegate(gen);
20936 PyErr_SetNone(PyExc_GeneratorExit);
20937 retval = __Pyx_Generator_SendEx(gen, NULL);
20940 PyErr_SetString(PyExc_RuntimeError,
20941 "generator ignored GeneratorExit");
20944 raised_exception = PyErr_Occurred();
20945 if (!raised_exception
20946 || raised_exception == PyExc_StopIteration
20947 || raised_exception == PyExc_GeneratorExit
20948 || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
20949 || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
20951 if (raised_exception) PyErr_Clear();
20952 Py_INCREF(Py_None);
20957 static PyObject *__Pyx_Generator_Throw(PyObject *
self, PyObject *args) {
20958 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
20960 PyObject *tb = NULL;
20961 PyObject *val = NULL;
20962 PyObject *yf = gen->yieldfrom;
20963 if (!PyArg_UnpackTuple(args, (
char *)
"throw", 1, 3, &typ, &val, &tb))
20965 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20970 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
20971 int err = __Pyx_Generator_CloseIter(gen, yf);
20973 __Pyx_Generator_Undelegate(gen);
20975 return __Pyx_Generator_SendEx(gen, NULL);
20978 gen->is_running = 1;
20979 if (__Pyx_Generator_CheckExact(yf)) {
20980 ret = __Pyx_Generator_Throw(yf, args);
20982 PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
20983 if (unlikely(!meth)) {
20985 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
20986 gen->is_running = 0;
20990 __Pyx_Generator_Undelegate(gen);
20991 gen->is_running = 0;
20994 ret = PyObject_CallObject(meth, args);
20997 gen->is_running = 0;
21000 ret = __Pyx_Generator_FinishDelegation(gen);
21005 __Pyx_Raise(typ, val, tb, NULL);
21006 return __Pyx_Generator_SendEx(gen, NULL);
21008 static int __Pyx_Generator_traverse(PyObject *
self, visitproc visit,
void *arg) {
21009 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
21010 Py_VISIT(gen->closure);
21011 Py_VISIT(gen->classobj);
21012 Py_VISIT(gen->yieldfrom);
21013 Py_VISIT(gen->exc_type);
21014 Py_VISIT(gen->exc_value);
21015 Py_VISIT(gen->exc_traceback);
21018 static int __Pyx_Generator_clear(PyObject *
self) {
21019 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
21020 Py_CLEAR(gen->closure);
21021 Py_CLEAR(gen->classobj);
21022 Py_CLEAR(gen->yieldfrom);
21023 Py_CLEAR(gen->exc_type);
21024 Py_CLEAR(gen->exc_value);
21025 Py_CLEAR(gen->exc_traceback);
21026 Py_CLEAR(gen->gi_name);
21027 Py_CLEAR(gen->gi_qualname);
21030 static void __Pyx_Generator_dealloc(PyObject *
self) {
21031 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
21032 PyObject_GC_UnTrack(gen);
21033 if (gen->gi_weakreflist != NULL)
21034 PyObject_ClearWeakRefs(
self);
21035 if (gen->resume_label > 0) {
21036 PyObject_GC_Track(
self);
21037 #if PY_VERSION_HEX >= 0x030400a1
21038 if (PyObject_CallFinalizerFromDealloc(
self))
21040 Py_TYPE(gen)->tp_del(
self);
21041 if (self->ob_refcnt > 0)
21046 PyObject_GC_UnTrack(
self);
21048 __Pyx_Generator_clear(
self);
21049 PyObject_GC_Del(gen);
21051 static void __Pyx_Generator_del(PyObject *
self) {
21053 PyObject *error_type, *error_value, *error_traceback;
21054 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
21055 if (gen->resume_label <= 0)
21057 #if PY_VERSION_HEX < 0x030400a1
21058 assert(self->ob_refcnt == 0);
21059 self->ob_refcnt = 1;
21061 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
21062 res = __Pyx_Generator_Close(
self);
21064 PyErr_WriteUnraisable(
self);
21067 __Pyx_ErrRestore(error_type, error_value, error_traceback);
21068 #if PY_VERSION_HEX < 0x030400a1
21069 assert(self->ob_refcnt > 0);
21070 if (--self->ob_refcnt == 0) {
21074 Py_ssize_t refcnt =
self->ob_refcnt;
21075 _Py_NewReference(
self);
21076 self->ob_refcnt = refcnt;
21078 #if CYTHON_COMPILING_IN_CPYTHON
21079 assert(PyType_IS_GC(self->ob_type) &&
21080 _Py_AS_GC(
self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
21083 #ifdef COUNT_ALLOCS
21084 --Py_TYPE(
self)->tp_frees;
21085 --Py_TYPE(
self)->tp_allocs;
21090 __Pyx_Generator_get_name(__pyx_GeneratorObject *
self)
21092 Py_INCREF(self->gi_name);
21093 return self->gi_name;
21096 __Pyx_Generator_set_name(__pyx_GeneratorObject *
self, PyObject *value)
21099 #if PY_MAJOR_VERSION >= 3
21100 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
21102 if (unlikely(value == NULL || !PyString_Check(value))) {
21104 PyErr_SetString(PyExc_TypeError,
21105 "__name__ must be set to a string object");
21108 tmp =
self->gi_name;
21110 self->gi_name = value;
21115 __Pyx_Generator_get_qualname(__pyx_GeneratorObject *
self)
21117 Py_INCREF(self->gi_qualname);
21118 return self->gi_qualname;
21121 __Pyx_Generator_set_qualname(__pyx_GeneratorObject *
self, PyObject *value)
21124 #if PY_MAJOR_VERSION >= 3
21125 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
21127 if (unlikely(value == NULL || !PyString_Check(value))) {
21129 PyErr_SetString(PyExc_TypeError,
21130 "__qualname__ must be set to a string object");
21133 tmp =
self->gi_qualname;
21135 self->gi_qualname = value;
21139 static PyGetSetDef __pyx_Generator_getsets[] = {
21140 {(
char *)
"__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name,
21141 (
char*) PyDoc_STR("name of the generator"), 0},
21142 {(
char *)
"__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname,
21143 (
char*) PyDoc_STR("qualified name of the generator"), 0},
21146 static PyMemberDef __pyx_Generator_memberlist[] = {
21147 {(
char *)
"gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL},
21150 static PyMethodDef __pyx_Generator_methods[] = {
21151 {
"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
21152 {
"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
21153 {
"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
21156 static PyTypeObject __pyx_GeneratorType_type = {
21157 PyVarObject_HEAD_INIT(0, 0)
21159 sizeof(__pyx_GeneratorObject),
21161 (destructor) __Pyx_Generator_dealloc,
21165 #if PY_MAJOR_VERSION < 3
21180 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
21182 (traverseproc) __Pyx_Generator_traverse,
21185 offsetof(__pyx_GeneratorObject, gi_weakreflist),
21187 (iternextfunc) __Pyx_Generator_Next,
21188 __pyx_Generator_methods,
21189 __pyx_Generator_memberlist,
21190 __pyx_Generator_getsets,
21206 #
if PY_VERSION_HEX >= 0x030400a1
21209 __Pyx_Generator_del,
21212 #
if PY_VERSION_HEX >= 0x030400a1
21213 __Pyx_Generator_del,
21216 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
21217 PyObject *closure, PyObject *name, PyObject *qualname) {
21218 __pyx_GeneratorObject *gen =
21219 PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
21223 gen->closure = closure;
21224 Py_XINCREF(closure);
21225 gen->is_running = 0;
21226 gen->resume_label = 0;
21227 gen->classobj = NULL;
21228 gen->yieldfrom = NULL;
21229 gen->exc_type = NULL;
21230 gen->exc_value = NULL;
21231 gen->exc_traceback = NULL;
21232 gen->gi_weakreflist = NULL;
21233 Py_XINCREF(qualname);
21234 gen->gi_qualname = qualname;
21236 gen->gi_name = name;
21237 PyObject_GC_Track(gen);
21240 static int __pyx_Generator_init(
void) {
21241 __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
21242 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
21243 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
21244 if (__pyx_GeneratorType == NULL) {
21250 static int __Pyx_check_binary_version(
void) {
21251 char ctversion[4], rtversion[4];
21252 PyOS_snprintf(ctversion, 4,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
21253 PyOS_snprintf(rtversion, 4,
"%s", Py_GetVersion());
21254 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
21256 PyOS_snprintf(message,
sizeof(message),
21257 "compiletime version %s of module '%.100s' "
21258 "does not match runtime version %s",
21259 ctversion, __Pyx_MODULE_NAME, rtversion);
21260 return PyErr_WarnEx(NULL, message, 1);
21265 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
21267 #if PY_MAJOR_VERSION < 3
21268 if (t->is_unicode) {
21269 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
21270 }
else if (t->intern) {
21271 *t->p = PyString_InternFromString(t->s);
21273 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
21276 if (t->is_unicode | t->is_str) {
21278 *t->p = PyUnicode_InternFromString(t->s);
21279 }
else if (t->encoding) {
21280 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
21282 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
21285 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
21295 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
21296 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
21298 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject* o) {
21300 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
21302 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
21303 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
21305 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
21306 __Pyx_sys_getdefaultencoding_not_ascii &&
21308 PyUnicode_Check(o)) {
21309 #if PY_VERSION_HEX < 0x03030000
21311 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
21312 if (!defenc)
return NULL;
21313 defenc_c = PyBytes_AS_STRING(defenc);
21314 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
21316 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
21318 for (c = defenc_c; c < end; c++) {
21319 if ((
unsigned char) (*c) >= 128) {
21320 PyUnicode_AsASCIIString(o);
21326 *length = PyBytes_GET_SIZE(defenc);
21329 if (__Pyx_PyUnicode_READY(o) == -1)
return NULL;
21330 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
21331 if (PyUnicode_IS_ASCII(o)) {
21332 *length = PyUnicode_GET_LENGTH(o);
21333 return PyUnicode_AsUTF8(o);
21335 PyUnicode_AsASCIIString(o);
21339 return PyUnicode_AsUTF8AndSize(o, length);
21344 #if !CYTHON_COMPILING_IN_PYPY
21345 if (PyByteArray_Check(o)) {
21346 *length = PyByteArray_GET_SIZE(o);
21347 return PyByteArray_AS_STRING(o);
21352 int r = PyBytes_AsStringAndSize(o, &result, length);
21353 if (unlikely(r < 0)) {
21360 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
21361 int is_true = x == Py_True;
21362 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
21363 else return PyObject_IsTrue(x);
21365 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
21366 PyNumberMethods *m;
21367 const char *name = NULL;
21368 PyObject *res = NULL;
21369 #if PY_MAJOR_VERSION < 3
21370 if (PyInt_Check(x) || PyLong_Check(x))
21372 if (PyLong_Check(x))
21374 return Py_INCREF(x), x;
21375 m = Py_TYPE(x)->tp_as_number;
21376 #if PY_MAJOR_VERSION < 3
21377 if (m && m->nb_int) {
21379 res = PyNumber_Int(x);
21381 else if (m && m->nb_long) {
21383 res = PyNumber_Long(x);
21386 if (m && m->nb_int) {
21388 res = PyNumber_Long(x);
21392 #if PY_MAJOR_VERSION < 3
21393 if (!PyInt_Check(res) && !PyLong_Check(res)) {
21395 if (!PyLong_Check(res)) {
21397 PyErr_Format(PyExc_TypeError,
21398 "__%.4s__ returned non-%.4s (type %.200s)",
21399 name, name, Py_TYPE(res)->tp_name);
21404 else if (!PyErr_Occurred()) {
21405 PyErr_SetString(PyExc_TypeError,
21406 "an integer is required");
21410 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
21413 #if PY_MAJOR_VERSION < 3
21414 if (likely(PyInt_CheckExact(b)))
21415 return PyInt_AS_LONG(b);
21417 if (likely(PyLong_CheckExact(b))) {
21418 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
21419 #if CYTHON_USE_PYLONG_INTERNALS
21420 switch (Py_SIZE(b)) {
21421 case -1:
return -(sdigit)((PyLongObject*)b)->ob_digit[0];
21423 case 1:
return ((PyLongObject*)b)->ob_digit[0];
21427 return PyLong_AsSsize_t(b);
21429 x = PyNumber_Index(b);
21431 ival = PyInt_AsSsize_t(x);
21435 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
21436 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)].